2019-10-23 02:19 AM
when MCU execute this "HAL_TIM_Base_Start_IT(&htim2);" then at that instant program jumps to IRQHandler. And then it works normally.
How can I solve this issue?
Regards
Imran
2019-10-23 03:03 AM
Clear the TIMx_SR just after initialization/before enabling interrupts. The initialization sets TIMx_EGR.UG to force new PSC to be used in the first period, and that sets the Update flag in SR.
JW
PS. Please change your username to a normal (nick)name.