Question about interrupts while being stopped in the debugger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question about interrupts while being stopped in the debugger

Jump to solution
676 Views
AirDragon
Contributor III

CodeWarrior SE, version 5.9.0 Build 5294

MC9S12DG256

 

I found this a bit odd a few minutes ago, I stopped my robot in the debugger for awhile to check on some variable values. I look up, and notice that the thing is still running!

 

For those who don't know, my "robot" is the AirDragon, a beginner's custom quadrotor craft that uses a 9S12 as its MCU (keep thinking that its overkill as the days go by).

 

I have a routine that is interrupt driven, for the curious this routine carries out the attitude (pitch and role) control procedure.

 

 

This brings me to my question:

 

When stopped in the debugger, does the MCU still service and run through the interrupts (provided that it isn't stopped in an interrupt to begin with)?

Labels (1)
Tags (1)
0 Kudos
1 Solution
492 Views
kef
Specialist I

No, MCU isn't servicing interrupts when stopped in debugger. But your robot could get reset and run while it is stopped, debugger probably won't notice that. BDM cable is good antenna to receive some noise through /RESET wire and pursue voltage supervisor that voltage dropped too much.

View solution in original post

0 Kudos
4 Replies
493 Views
kef
Specialist I

No, MCU isn't servicing interrupts when stopped in debugger. But your robot could get reset and run while it is stopped, debugger probably won't notice that. BDM cable is good antenna to receive some noise through /RESET wire and pursue voltage supervisor that voltage dropped too much.

0 Kudos
492 Views
AirDragon
Contributor III

I'm using the SerialMonitor, which uses the SCI0 port. Does this still apply?

0 Kudos
492 Views
kef
Specialist I

Hm, I don't know how is this particular serial monitor implemented. I think when stopped from debugger, MCU should be looping inside serial monitor's SCI interrupt handler untill you command debugger to continue executing your code. I bit should be set not allowing other interrupts to be processed.

On reset behaviour should be similar to what you have using BDM, target probably should run at full speed, unless it is made to wait on reset for serial commands from debugger.

0 Kudos
492 Views
AirDragon
Contributor III

I've got the serial monitor from EVBplus, so it's likely to have some interesting implemenataions.

 

I guess I'll make a simple program to blink an LED or something, to figure out what its doing.

0 Kudos