cancel
Showing results for 
Search instead for 
Did you mean: 

how to change default(unexpected) IRQ handler ?

denis
Associate II
Posted on August 19, 2013 at 13:59

I may have some spurious or unhandled interrupts and want to see where and when with software catch.

Is there a default (in absence of specific) IRQ handler i can overwrite / install? (E.g. as you would with 

HardFault_Handler

)
2 REPLIES 2
Posted on August 19, 2013 at 14:21

You have whatever status the NVIC provides.

You can place your own handlers in the vector table (startup_stm32fxxx.s), these could be instead of the WEAK individual service routines.

The HardFault Handler (and other handlers) could output diagnostic information instead of being while(1) loops.

The interrupts enabled should be pretty finite, a) you'd be enabling them in the peripheral, and b) the NVIC. You have some other candidates for this spurious sources?

To dynamical change things you'd want to put the vector table in RAM, and reconfigure SCB->VTOR to point at it. Must be on a 512-byte boundary.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
denis
Associate II
Posted on September 04, 2013 at 13:23

somehow related to my un-cleared unexpected uart interrupt i've asked about (which i know how to avoid at least).

that stuck interrupt causes havoc elsewhere (and also seems confused me about what i see in the disassembly)