STM32F446RETx TIM2_CH4 DMA for WS2812B - Cant make it work
Hello All,
I wonder if someone here can help me out. I have spend a large number of hours over a few days on and off trying to drive a bitstream into a WS2812B using DMA. I have proven the hardware by bit-banging into the LED and it works as expected. I have the DIN pin of the WS2812B to PA3 configured for TIM2_CH4, this is a clean project with nothing else in the way. Clocks are configured to the point where I can get the expected frequency/duty cycle I need, and I have 24 bytes of static data that I want to send to the PWM CCP to create a bitstream.
The code is below, I have gotten this far be reading, seeing examples, even chatting with Chat GPT, and I just cannot get this to work. The code below yields nothing out, its just always low. If I enable the PWM by uncommenting lines 102 and 103 I get the expected 803Khz at 50% mark/space.
In my main loop I am trying to trigger a DMA transfer once ever 500ms... but it does not work, and I am at a loss as where to go now, have followed lots of examples and tried lots of poking around with things, but I just cant seem to make this work.
Can anyone help or offer me any pointers please?
Gerry

