Skip to main content
WRutk
Visitor II
June 27, 2019
Question

Timer interrupts not firing

  • June 27, 2019
  • 1 reply
  • 787 views

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?

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
June 27, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..