Code Monkey home page Code Monkey logo

Comments (10)

MaJerle avatar MaJerle commented on July 20, 2024 1

But you can always change the timer, which is available in your GPIO. Sadly, if there is no timer alternate function on your pin, then you cannot use this pin for signal generation.

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

MaJerle avatar MaJerle commented on July 20, 2024 1

Driving LEDs with SPI or timer is very advanced topic and not a typical application use case with these IPs. For this reason, HAL drivers don't necessary support all the features in the every neat way. This is then when LL drivers come to play.

I do not have any other repo.

Maybe this can help you if you have access to SPI on your led pin: https://www.newinnovations.nl/post/controlling-ws2812-and-ws2812b-using-only-stm32-spi/

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

gaucho1978 avatar gaucho1978 commented on July 20, 2024 1

Anyway this repo was really useful to understand the best approach to use, the protocol, and to get support on my problem. At the end I implemented with success the same approach on stm32cube ide.
Thank you very much.

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

MaJerle avatar MaJerle commented on July 20, 2024

Sure you can. You will need to select another timer and adjust DMA for another timer (different channel) but concept will of course work.

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

gaucho1978 avatar gaucho1978 commented on July 20, 2024

Sure you can. You will need to select another timer and adjust DMA for another timer (different channel) but concept will of course work.

Thank you for reply.
I don’t understand: this library uses timer to generate pwm. But timer can be used only with specific gpio. No one of the alternate functions of my gpio are related to timer output, then I suppose I can not use this approach. Where am I wrong?

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

gaucho1978 avatar gaucho1978 commented on July 20, 2024

Yes, my pin doesn’t have timer as alternate function.

Is it possible to generate custom interrupts at fixed periods and toggle gpio inside that interrupts? Sorry for newbie question.

will it result in a too slow update rate for a 2 meters led strip?

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

MaJerle avatar MaJerle commented on July 20, 2024

Alternatively you may use SPI if you have MOSI on your pin?
Otherwise you will need bitbanging, that will slow your CPU :)

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

gaucho1978 avatar gaucho1978 commented on July 20, 2024

Alternatively you may use SPI if you have MOSI on your pin? Otherwise you will need bitbanging, that will slow your CPU :)

Thank you.
Meanwhile I found the way to use another pin with AF timer. Now I’m reading your code to find the way to integrate it in to my code.

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

gaucho1978 avatar gaucho1978 commented on July 20, 2024

unfortunately this library is using LL driver and not HAL. I find too difficult to convert it to STM32F0xx uP, since some functions are using different number of parameters, and I obtain a lot of errors. Can I use some other github repo as starting point?

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

gaucho1978 avatar gaucho1978 commented on July 20, 2024

I have no SPI in my free pins.
Meanwhile i compiled with success this: https://github.com/Cpt-Quantum/STM32F0-Timer-WS2812
I made some adjustments and I need to double check everything before to try it. I hope I can do it today.

from stm32-ws2811-ws2812-ws2812b-ws281x-tim-pwm-dma-timer.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.