This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994: Can I identify the Interrupt Source?

Part Number: MSP430FR5994

When I enable my timer, I get an interrupt that lands in the default ISR Trap.  Since I know my code is correct (right!) and tied to the correct vector (I can see that in the MAP), how do I determine which IRQ source is triggering this?  I'm sure it's a silly mistake, but there are 50+ interrupt sources.

Thanks.

Dan

  • As far as I know, there is no register which says what the active (or most recent) interrupt source is.

    What I would do (have done) is go through each device in the Registers view (yes there a number of them) and look for any xxxIV register which is non-0. You might start with the RTC, since in some devices a debugger reset doesn't reset the RTC.

    Or, if your code isn't very large, inspection might be quicker.

  • The timer has two interrupt vectors and it can be confusing figuring out which gets called for which condition. (CCR0 for one, everything else for the other) The first step would be to include an ISR for the other timer interrupt vector. Assuming you haven't set any other IE bits, that should point the way to the solution.

  • Thank you David.  I didn't see the two IRQs.  In addition, I got confused because the CCxIF was set on compare with '0'.  I created the other IRQ and then realized that I had them assigned in reverse, which was the original problem.  My timer is now running, which means I can chase all the functional code.

    Thanks again.

    Dan

**Attention** This is a public forum