2024-02-15 06:03 AM - edited 2024-02-15 07:06 AM
Hello Forum,
I am struggling with a sync timer problem and I have no more idea for resolve it. Here we go :
TMR5 is configured as master for TMR3
TMR3 is configured as master for TMR4
I configured TMR3 as OnePulse output signal with a delai from a OutputCompareStatus of TMR5
I configured TMR4 as PWM signal started by OutputCompareStatus of TMR3
I do Init/Configure/Start after a powerOn and the system works well. I want to do an update of the delai on TMR3 and, impossible to have a correct synchronization between my signals as in the first call.
I did several attempt and I lost my self in all theses, someone know the exact sequence of call I have to do for make the magic happened ?
Thanks a lot
When it works,
Any other attempt stop/update same delai/start, the blue wave loose the synchro
Mickael
Solved! Go to Solution.
2024-02-19 03:28 AM - edited 2024-02-19 03:41 AM
Hello,
For people meet same kind of problems, the DeInit API for TIM_PWM and TIM_OC can be replaced by
__HAL_RCC_TIMX_FORCE_RESET/
__HAL_RCC_TIMX_RELEASE_RESET
Then, I modified my value of Delay of my first slave and duty of second slave.
Finally, call Init/ConfigChannel/MasterEx/SlaveConfig,Start.
Bye
Mickael
2024-02-15 06:32 AM
If you give a graph that shows the behavior you want, typically something can be done.
> I configured TMR4 as PWM signal started by OutputCompareStatus of TMR4
Probably a typo here. Unlikely to be able to start TIM4 by looking at itself.
2024-02-15 07:07 AM
yes ! Error of typo, I added also graphs, thanks a lot for your feedback.
2024-02-19 03:28 AM - edited 2024-02-19 03:41 AM
Hello,
For people meet same kind of problems, the DeInit API for TIM_PWM and TIM_OC can be replaced by
__HAL_RCC_TIMX_FORCE_RESET/
__HAL_RCC_TIMX_RELEASE_RESET
Then, I modified my value of Delay of my first slave and duty of second slave.
Finally, call Init/ConfigChannel/MasterEx/SlaveConfig,Start.
Bye
Mickael