2023-08-01 11:20 PM
Hi All,
I've configured TIM1 and TIM2 of my board (STM32WL55JC1) CH1 of both TIM to PWM output which is synchronized by output compare of TIM1 CH2, its working well for the first run then I stop PWM for 5 minutes by following commands:
HAL_TIM_OC_Stop(&htim1, TIM_CHANNEL_2);
HAL_TIM_PWM_Stop(&htim2, TIM_CHANNEL_1);
HAL_TIM_PWM_Stop(&htim1, TIM_CHANNEL_1);
And turn on again via the following commands:
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);
HAL_TIM_OC_Start(&htim1, TIM_CHANNEL_2);
But when I run PWM again they don't sync anymore (see following picture from first run and after stop and start )
Any ideas how to stop PWM and start and they will be sync again?
2023-08-02 05:28 AM
Hello @MichaelMor and welcome to ST Community.
I suggest you to:
This may ensure that the synchronization signal is active before the PWM outputs are started.
Best Regards.
Issam
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.