Jim Sung

ILLEGAL_BP and reset

Discussion created by Jim Sung on Jun 24, 2011
Latest reply on Jun 27, 2011 by kef

We are using the MC9S12XEQ512.

 

I've had my share of ILLEGAL_BP, but this one I don't understand.

 

We use the following code that we lifted from the Freescale sample bootloader to do soft reset:

 

   COPCTL = 0x01;
   ARMCOP = 0x00;

When inside the debugger, a soft reset or the hard button reset causes an ILLEGAL_BP (the IP is the customary 0xff13), not always, but < 1 / 5 times.  If I exit out of the debugger, the target doesn't seem to have any problem with either the soft or the hard reset.

 

I tried to set up a user-defined end trigger and trace, but I can never get it to work.

 

If somebody can shed some light, will be greatly appreciated.

Outcomes