MC9S12XDP512

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

MC9S12XDP512

1,772件の閲覧回数
roja
Contributor I

Hi All,

Please help me!!

I am using the XIRQ interrupt in my application & I am facing the problem of illegal_bp(illegal breakpoint).

Please tell me the method of handling the XIRQ interrupt,what is the cause for illegal_bp & how to avoid illegal_bp.

 

Thanks.....

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

1,247件の閲覧回数
isionous
Contributor III

You might find this message board thread helpful.  Your XIRQ ISR is probably not set up correctly and when an XIRQ interrupt happens, the microcontroller goes off into "bogus territory" where there are BGND instructions.  Check your interrupt vector for the XIRQ, which should be at your vector base + $F4, which is usually $FFF4 unless you've messed with the IVBR register.  Check that the location that $FFF4 points to is your XIRQ ISR.

 

If you are using Freescale Codewarrior, you can use the bin/Project.abs.s19 file to look at the contents of $FFF4, and you can use the bin/Project.map to check where your XIRQ ISR is put.  Be aware of banking issues.  You might want to have your XIRQ ISR look like this:

 

 

#pragma push#pragma CODE_SEG __NEAR_SEG NON_BANKEDinterrupt void __near XIRQ_ISR(){    //code here}#pragma pop

 That way the ISR will not be placed in banked memory and therefore the ISR can be addressed using only two bytes, which means it can fit in $FFF4..$FFF5.

 

0 件の賞賛
返信

1,247件の閲覧回数
roja
Contributor I

Thanks for the reply.But my ISR looks as you have shown but still id does'nt work..

0 件の賞賛
返信

1,247件の閲覧回数
isionous
Contributor III

Then you'll have to tell us more about your problem.  When exactly do you get the illegal breakpoint errors? What is going on just before the illegal breakpoint error? What is the value of the program counter?  Are you executing BGND instructions or not?  Does the same thing happen when you simulate a XIRQ edge in the simulator?

 

You might want to make a project that is as simple as possible but still has the problem and upload it here.

0 件の賞賛
返信