Determining IRQ Source

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Determining IRQ Source

1,166件の閲覧回数
jimfell
Contributor III

My ColdFire application is jumping into the default ISR.  (All "unused" ISRs are mapped to a default ISR.)  How do I determine the source of the interrupt/exception?  I am using MCF51JM128 and CodeWarrior 10.2.  Thanks.

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

900件の閲覧回数
kef
Specialist I

It is simple. For debugging purposes you can make each vector-N pointing to empty ISR_n.

0 件の賞賛
返信

900件の閲覧回数
jimfell
Contributor III

I need to know what triggered the ISR, after getting into the ISR.  There are not enough breakpoints available to be able to set a breakpoint in every possible ISR.

0 件の賞賛
返信

900件の閲覧回数
TomE
Specialist II

The standard method for common interrupt service routines (like when you have multiple serial ports using common code) is to have separate service routines with different vectors, but have them load up a register with a unique number (the vector index usually) and then branch to a common service routine. In your case that's where you set the one breakpoint, and then examine the register (or variable where the routine saves the number) to see which one did it. Or you can have the individual routines simply CALL the common function, and when in there you just display a stack-trace to see which service routine called the common one.

Tom

900件の閲覧回数
kef
Specialist I

Then instead of empty ISR's you need ISR with for(;;){} inside. In case watchdog is enabled, make these forewer loops resetting watchdog timer. Then just halt timer to see which ISR is running. LED could be used to signal when ISR is called.