This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to debug an isr?

Hi!

I have written a simple uart driver for the nordic bRF24E1 (8051 with intergrated rf) and somehow i do not seem to be able to debug my interrupt service routine.

EA is set to 1 and Serial Interrupt is enabled but when i set a breakpoint inside the isr the debugger will not stop at the breakpoint.

The isr is triggered however. I know it because there seems to be a bug in my isr (stack is messed up) which only occurs when EA = 1. As soon as i disable interrupts the bug goes away. So isr is triggered but i can not debug it because tracing into the isr doesn't seem to be possible.

So how can i debug interupt-service-routines with the integrated debugger?

Regards

Christian

Parents
  • QEA is set to 1 and Serial Interrupt is enabled but when i set a breakpoint inside the isr the debugger will not stop at the breakpoint.

    AHave you tried putting breakpoints on all the interrupt vectors, to see which one is actually occurring?

    Andy,
    it took me some time to figure out that your reply indeed was valid so excuse me for adding this for clarification:

    By breakpointing all interrupt vectors you may find that another interrupot blows your stack whille you do not get any serial interrups (the old problem of one error masking another)

    Erik

Reply
  • QEA is set to 1 and Serial Interrupt is enabled but when i set a breakpoint inside the isr the debugger will not stop at the breakpoint.

    AHave you tried putting breakpoints on all the interrupt vectors, to see which one is actually occurring?

    Andy,
    it took me some time to figure out that your reply indeed was valid so excuse me for adding this for clarification:

    By breakpointing all interrupt vectors you may find that another interrupot blows your stack whille you do not get any serial interrups (the old problem of one error masking another)

    Erik

Children
No data