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

Cortex m3 JTAG/SWD and external interrupts.

Hello,

I try to debug my program in cortex m3 MCU but seems is impossible to get external interrupt when I'm in single steps using jtag/swd so long as I use single steps the external interrupts are in pending state but not executed only when I make a run or run to cursor line in debugger then external interrupt is executed. I think debug and stepping have more big priority in interrupts but how to solve this ?

I try to debug my program running on this cortex but is very hard when I'm dealing with USB/USART and others external interrupts when can happen many of them to see what going on on my program because external interrupts I can only see as pending bits and in this case I must set breakpoint on every of them and I cannot use stepping mode then a lot of code executting is a black hole for me and I cannot fully debug my system.

Is exist any way to prevent this as - I use single step mode with SWD connection interrupt incoming I make next single step and then I'm on PC = external interrupt if this interrupt happens.

  • Interrupts are blocked while single stepping. So you need to run the target in order for interrupts to get executed. For example you can use Run to Cursor line instead of single stepping (or breakpoints).

    Also be aware that debugging by stopping the target is intrusive in respect to the peripherals. Take a look at my reply http://www.keil.com/forum/docs/thread15486.asp

    You should consider using other non intrusive debug techniques where you don't stop the core (examining variables/memory on the fly ...)