STM32 Library for WS2812 using DMA+PWM
The primary documentation is on our wiki here: https://stm32world.com/wiki/STM32_WS2812_(NeoPixel_RGB_LED)
Video showing it's use here: https://www.youtube.com/watch?v=mdZerUTFJUw
The folder containing the library source will need to be included in STM32CubeIDE under Includes
and under Sources:
The ws2812 library uses a PWM timer channel to drive the LED string. This should be configured under timers:
A DMA channel will have to be enabled as a circular buffer:
The "Counter value" is the most important value. It need to divide the timer clock so that the resulting PWM frequency is exactly 800 kHz.