2022-09-25 12:30 PM
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
2022-10-05 02:44 AM
Hello,
I am waiting for the update.
Any help would be appreciable
.
Thanks and Regards
Sarthak Malik
2022-10-07 07:49 AM
2022-10-10 11:21 PM
I have already seen this video. I know how the PWM works but my question is when I am configuring the PWM to generate 24 pulses I am getting 3 extra pulses. So why am I getting 3 extra pulses?
Thanks
Sarthak
2022-10-19 11:02 PM
Hello,
I am waiting for your response please provide me a solution.
Thanks
Sarthak
2022-10-28 12:37 AM
Hello @Remy ISSALYS
I am waiting for your response. Any help would be appreciable.
Thanks
Sarthak
2022-11-02 10:51 PM
Hello @Remy ISSALYS ,
Please update, I am waiting for the response.
Thanks
Sarthak