Associate
February 5, 2022
Question
STM32G071: TIM1+PWM+DMA 2nd pulse looks strange
- 5 replies
- 1674 views
Hi,
I'm trying to talk to WS2812 RGB Leds. I'm using TIM1 CH3 PWM Output with DMA. Everything looks almost fine. I'm always sending the same data using:
HAL_TIM_PWM_Start_DMA (&htim1, TIM_CHANNEL_3, (uint32_t *) pwmData, (24 * NUM_OF_LEDS) + 50);Here pwmData sets a duty cycle of 33 % (20 of period 60, 48 MHz) for the first 13 cycles. In between I wait for 500 ms.
But time to time (~1 out of 3) the second pulse behaves strange. Only the second pulse seems to randomly jump approx. from duty cycle 20 ... 80 %. All remaining pulses are correct.
Thanks for any hint!
