Go Down

Topic: Debug breakpoints stop ISRs (Read 413 times) previous topic - next topic


Nov 14, 2014, 08:07 pm Last Edit: Nov 14, 2014, 08:09 pm by ketilwright

I realize this problem is out of scope with respect to the Arduino IDE, but I did notice other posting regarding the use of Atmel Studio on this forum, so I thought I'd try my luck.

Using a due, atmel studio 6.2 and a jtagice3, it appears that anytime I hit a breakpoint & then continue, timer ISRs stop firing. The loop function continues running. This happens with both JTAG and SWD debug interfaces.

I can provide examples if necessary, although that involves a lot of work to bring in the arduino libraries to atmel studio. An easier way to see the problem is to use a simple atmel studio boilerplate example for the sam3x8e/Due.

In Atmel Studio 6.2:

  • Choose File -> New -> Example project
  • Device Family = Sam32bit, Category = Applications
  • Select "Getting-started application on SAM - Arduino dueX"
  • Click OK

If you start debugging, AS will trap at entry to main() & you can continue with no problems. But, if you place a break anywhere in the while(1) loop, I find that the delay function (called mdelay in the ASF example) never returns, because the SysTick_Handler ISR has stopped being called.

A couple other things I noticed:

  • Mechanisms involving TC0 behave the same way
  • A hard coded bp using __asm__ ("BKPT 0xAB") will also stop the ISRs

Go Up