2021-04-19 10:56 PM
2021-04-21 03:30 AM
@DC.18hen you are welcome :)
This bit is set by the UG flag.
You can more check the RM0008, in the timer section that you are using.
For example for (TIM2 to TIM5) section:
"Update: counter overflow/underflow, counter initialization (by software or internal/external trigger)."
The update event can be generated at each counter overflow and at each counter underflow or by setting the UG bit in the TIMx_EGR register (by software or by using the slave mode controller) also generates an update event. In this case, the counter restarts counting from 0, as well as the counter of the prescaler.
Please mark my answer as best by clicking on the "Select as Best" button if it helped :smiling_face_with_smiling_eyes:.
Imen
2021-04-20 02:16 AM
Hello @DC.18hen and welcome to the STM32 Community =)
CNT_INIT is an internal signal.
I will ask our team to add a description for the CNT_INIT bit.
Please mark my answer as best by clicking on the "Select as Best" button if it helped :smiling_face_with_smiling_eyes:.
Imen
2021-04-20 03:03 AM
Hello @Imen DAHMEN
Thank you for your help. And where is the CNT_INIT bit? What is its completely English words stands for?
Best regards,
Dchen
2021-04-20 05:55 AM
CNT_INIT means counter initialize. and when this bit is set, the counter clock is reset.
Imen
2021-04-20 06:29 AM
Thanks Imen.
And is this bit set by user or the UG flag?
Sorry for having so many questions.
DChen
2021-04-21 03:30 AM
@DC.18hen you are welcome :)
This bit is set by the UG flag.
You can more check the RM0008, in the timer section that you are using.
For example for (TIM2 to TIM5) section:
"Update: counter overflow/underflow, counter initialization (by software or internal/external trigger)."
The update event can be generated at each counter overflow and at each counter underflow or by setting the UG bit in the TIMx_EGR register (by software or by using the slave mode controller) also generates an update event. In this case, the counter restarts counting from 0, as well as the counter of the prescaler.
Please mark my answer as best by clicking on the "Select as Best" button if it helped :smiling_face_with_smiling_eyes:.
Imen
2021-04-21 07:23 AM
Thank you Imen. I got it from your answer.
DChen