Question about interrupts while being stopped in the debugger

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Question about interrupts while being stopped in the debugger

跳至解决方案
799 次查看
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)?

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
615 次查看
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 项奖励
回复
4 回复数
616 次查看
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 项奖励
回复
615 次查看
AirDragon
Contributor III

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

0 项奖励
回复
615 次查看
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 项奖励
回复
615 次查看
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 项奖励
回复