Unexpected WS2812B data burst on TIM3 after power-up (before Init)
Hi everyone,
I’m using the WS28XX library by NimaLTD from GitHub:
:backhand_index_pointing_right: https://github.com/nimaltd/ws28xx
Setup:
STM32F103
TIM3 Channel 4 as PWM output
Data pin on PB1
8×8 WS2812B LED matrix
Initialization and pixel updates work perfectly:
WS28XX_Init(&ws, &htim3, 72, TIM_CHANNEL_4, 64);
WS28XX_SetPixel_RGB(&ws, 0, 100, 0, 0);
WS28XX_Update(&ws);Issue:
Immediately after power-up, some LEDs (LED 41 an 10-12 following) light up before WS28XX_Init() is even called.
On the logic analyzer, I can see a valid WS2812B data burst right after startup,
covering up to LED 40 with "0", followed by a ~100 ms gap,
and only then my actual data frames appear.
Once WS28XX_Update() runs, everything looks correct and stable.
Questions:
What generates this initial data burst on the PWM pin?
Could TIM3 or DMA be triggered automatically during startup?
Does CubeMX initialize the PWM channel before main() executes?
Has anyone seen similar behaviour with WS2812B + DMA on STM32?
Thanks for any insight!
Paul
