hubmartin / WS2812B_STM32F3

WS2812 DMA library with low RAM needs. Up to 16 paralel outputs and thousands of LEDs on each of them
MIT License
60 stars 15 forks source link

stm32F4 port #1

Closed usernamevalis closed 7 years ago

usernamevalis commented 7 years ago

Hi There

Im struggling to get this running on the stm32F401 Nucleo Board. Im using CubeMx to generate all the project files for True Studio and it looks like the F4 uses a unique DMA controller. Have you tried to run this on the f401 by any chance?

thanks

hubmartin commented 7 years ago

Hello, I've opened reference manual for F303 and F401 and the DMA is a little different (not sure how ST HAL for F401 deals with that). You have to correct the TIM2 DMA Channels/Streams on F401. Compare the F303 reference manual Table 78 to F401 reference manual Table 28. You have to correctly set three DMA for TIM2_UP, TIM_2_CH1 and TIM2_CH2. You can also select completely different TIMer if you for example use TIM2 just for PWM. I've created dirty image which would help you. If you'll have no luck, let me know. I try that on my F407. https://dl.dropboxusercontent.com/u/2198455/stm32f303%20STM32f401%20ws2812b%20lib.png

hubmartin commented 7 years ago

stm32f303 stm32f401 ws2812b lib

dmitryshagin commented 7 years ago

Hi. Any luck to bring it running on stm32f4?

hubmartin commented 7 years ago

Hi, hit F5. I've just added port few minutes ago on my git :) STM32F407

hubmartin commented 7 years ago

https://github.com/hubmartin/STM32F4_WS2812B https://twitter.com/hubmartin/status/814812529696407552

dmitryshagin commented 7 years ago

It's just a NY gift. Thank you!

hubmartin commented 7 years ago

Please let me know if you have any issues with running the code, the way the library is written or if you think something should be better documented. Thanks.

dmitryshagin commented 7 years ago

Just checked out https://github.com/hubmartin/STM32F4_WS2812B on nucleo stm32f446. Works like a charm, thank you!

usernamevalis commented 7 years ago

Thanks for the direction! I haven't had a chance to try it out yet but ill let you know as soon as I have.