Skip to main content
denis
Associate III
August 19, 2013
Question

how to change default(unexpected) IRQ handler ?

  • August 19, 2013
  • 2 replies
  • 1235 views
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

)
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    August 19, 2013
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    denis
    denisAuthor
    Associate III
    September 4, 2013
    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)