2024-04-14 6:48 AM
I am using 4 TIMs for updated interrupts functions. in the main while loop, I will call start the timer. and if the timer reaches its full-period and call the callback function. A Flag will be setted in the callback function and print a timeout meassage. The problem I found is the timeout will be triggerred in every powered on. Everytime I click reset MCU, it will first enter the callback function and print the "timeout message". Why this will happen and how to avoid this?
Thanks all in advance!
2024-04-15 2:39 AM
Hello @HAL_GET_ANSWER, welcome to ST Community,
The callback is being fired automatically, as a test, you can reset the UIF flag in the SR register before calling the HAL_TIM_Base_Start_IT.
Also, check this gotcha!
I hope that helps!
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.
2024-05-07 7:03 AM
Hello again @HAL_GET_ANSWER, any updates on this issue?
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.