2025-06-02 8:20 PM - edited 2025-06-02 8:27 PM
Hi, I was trying to implement timer interrupt on an ST32F407 Discovery board. The ST-Link on my board has been broken so I used an external ST-Link dongle and I have it connected by following this post:
I set up the timer so it will trigger interrupt once every 1s, but when I upload the code it does not go into interrupt. Only when I debug and put a break point in the callback function that it can execute the interrupt.
Here is a link to my code:
https://github.com/datcamap/DISCOVERYstm32.git
Callback function
Solved! Go to Solution.
2025-06-02 8:31 PM
Don't check the SR value. The callback is called when the update event happens. The update flag is already cleared when the function is called.
2025-06-02 8:31 PM
Don't check the SR value. The callback is called when the update event happens. The update flag is already cleared when the function is called.
2025-06-02 8:42 PM
Thank you so much, this solved my problem.