A few years ago I discussed WS2812-compatible (ws2812, sk6812, pd9823, …) LEDs
https://andre.blaatschaap.be/2017/03/led-there-be-light-part-1/
https://andre.blaatschaap.be/2017/07/led-there-be-light-part-2/
https://andre.blaatschaap.be/2017/07/led-there-be-light-part-3/
https://andre.blaatschaap.be/2017/07/led-there-be-light-part-4/

Back in the days, I’ve discussed a few code snippets, but I’ve never came around on releasing the firmware I’ve wrote back in the days. Now I’ve uploaded the old code from back in those days to https://github.com/BlaatSchaapArchive/LEDcontroller.
This is en Eclipse project, using the Eclipse build system (CDT or what is it called). This makes copying the project to a different machine kinda awkward. I guess that, and there still being some issues with the project, are reasons for not publishing it yet… and then I got this burnout, and the project faded away.

But here it is. The project uses the PWM capabilities of the Timer hardware and DMA transfers to control the WS2812-compatible LEDs. Each timer can output 4 signals. This allows for controlling multiple strings at the same time. The host side software takes an OpenPixel connection. The issues in the old project are more on the host side, Basically, to take advantage of outputting multiple signals at the same time, the control software must take this into account. The current issue in this project is using multiple timers. As there is a single buffer, updating one channel on a different timer requires them all getting updated. The current driver updating any number of consecutive channels can be updated in stead of all four of them, however, this is not yet implemented in the host software.

I’ve started to integrate parts of this code into the ucdev projects. Here is the libws2812dma repository:
https://github.com/a-v-s/libws2812dma
This contains the STM32F103 PWM-DMA driver for the WS2812 as discussed. Furthermore there is a driver for the NRF5x series. This is code I’ve written last year to control some LEDs with an nRF52832 microcontroller for some freelance project I’ve worked on. Currently this is a single-channel implementation using the nrfx library.