// the find
nicokorn/STM32H7XX_WS2812B
This is an example code of controlling a ws2812b led stripe with 10 leds thus the used driver is configured as 1 row with 10 cols. You can change row and col in the ws2812b header file. You can connect up to 16 led stripes. Data is written in parallel to the stripes from a GPIO Bank (GPIO A in this example) This is why up to 16 stripes can be controlled in parallel. A Timer is used in which 3 DMA transfer are triggered used to write data to the gpio's on which the stripes are connected to. This 3 DMA transfer are triggered as following: First trigger is on each timer update event. It sets all gpio pins to high. Second trigger is on the first capture compare event on the 9th tick/pulse. The GPIOS are set accordingly if the bit for the ws2812b shall be a 1 or a 0. The third trigger is the second capture compare event and sets all gpio pins always to 0 through a dma transfer. It doesn't matter if the pins are already set to 0 by the first capture compare event. Please read the ws2812b datasheet to understand the communication protocol with the ws2812b led chips. This example is programmed in the IAR Embedded Workbench IDE for a Nucleo STM32H743 Board. But you can use this library for any other IDE or stm32 microcontroller. Just be sure to set the correct DMA streams/channels, otherwise it won't work.
A bare-metal STM32H7 example that drives up to 16 WS2812B LED strips in parallel using a 3-DMA-transfer trick synchronized to a timer. The trick is clever: one DMA sets all GPIO pins high on timer update, a second sets the data bits at the 9th tick, and a third pulls everything low at the second compare event — no CPU involvement after setup. Aimed squarely at embedded developers who already understand WS2812B timing and need a parallel-output approach on STM32H7.
The parallel GPIO bank approach is the main thing worth stealing here — driving 16 strips with three DMA transfers instead of one per strip is a real win over naive bit-banging or single-strip SPI approaches. The timer + triple-DMA pattern is well-suited to the STM32H7's DMA multiplexer and correctly handles the WS2812B's strict 400ns/800ns timing without a RTOS or spinloop. Protocol timing diagrams are included in the README with actual scope captures, which is more than most embedded example repos bother with. The code is structured so the row/col dimensions are header-file constants, making it easy to reconfigure for different strip lengths without touching driver logic.
This is a single-board IAR project with no abstraction layer — porting to GCC/CubeIDE requires manually mapping DMA streams, timer channels, and GPIO assignments, and there's no guidance on which registers need to change. No HSE/clock configuration documentation; the H743 has a notoriously fiddly clock tree and the example will silently produce wrong timing if your system clock differs from the author's setup. Abandoned since September 2022 with 5 stars and no forks, so you're on your own if something doesn't work on your specific H7 variant. The CMSIS DSP test suite is committed wholesale into the Drivers directory, which inflates the repo with ~200 files completely unrelated to WS2812B control.