STM32WB55 - PWM not working
Hello,
I am trying to use PWM using DMA in the P-NUCLEO WB55 dongle but the PWM signal was not behaving according to the setting which was done in STM32Cube MX.
Can anyone help me to understand the role of Auto Reload Register, Repetition counter, and PWM Generation channel pulse? Basically, I want to generate 24 pulses with different pulse widths but when I am trying to generate 24 pulses I am always getting 3 extra pulses.
Code -
for (int i=23; i>=0; i--)
{
if (color&(1<<i))
{
pwmData[i] = 66;
}
else pwmData[i] = 33;
}
HAL_TIM_PWM_Start_DMA(&htim1, TIM_CHANNEL_1, (uint32_t *)pwmData, 24);So my question is why I am always getting 3 extra pulses every time. The parameters that are defined in cube Mx are given below-
System Clock - 64 MHz
TImer counter Prescaler- 0
Counter period- 100-1
Repetition counter- 24
Firmware version - STM32Cube FW_WB V1.14.0
I have also tried to find some documents on the PWM but I am not able to find any relevant document, Please help me to provide any document on PWM.
Any help would be appreciable
.
Thanks and Regards
Sarthak Malik
