cancel
Showing results for 
Search instead for 
Did you mean: 

Timer interrupts not firing

WRutk
Associate

I wrote a timer that uses interrupts to count us on stm32f103c8. It compiles and fun’s fine in uvision. However. The exact same code will not trigger interrupts in truestudio. I did the same thing on an F407 and both run flawlessly. Any clues? May firmware?

1 REPLY 1

Check the specific interrupt naming in the startup.s files as these will be different.

Check the .MAP and listing files to understand if your handler code has actually been linked in correctly/as expected.

Watch for using .CPP or compiling as C++, this will mangle the function names, and the WEAK linkage functions will be used.

use the form

extern "C" void TIMx_IRQHandler(void)

Do some debugging and detective work. Confirm the TIM clock, TIM peripheral registers, and NVIC settings are correct. Use a "Peripheral View" if provided.

Make sure the Vector Table address is correctly set.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..