Illegal BP error MC9S08

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

Illegal BP error MC9S08

655 Views
b_rad
Contributor I

Hi,

 

I'm implementing SPI communications using the MC9S08GT16A. The code has been working perfectly for ages and now, all of a sudden, im getting an illegal BP error.

I keep getting the error even with the watchdog disabled and no interrupts present in my code.

 

If its not an unmapped interrupt or the watchdog then the other two options are an illegal address or a stack overflow, right?

Ive made the stack as large as possible.

 

So, how do I check if its trying to access an illegal address, and if so, fix that?

 

Thanks

Labels (1)
0 Kudos
Reply
2 Replies

424 Views
bigmac
Specialist III

Hello,

 

Do you happen to be using full chip simulation (FCS) mode?  If so, the SPI code may not operate as intended.  Best to use the actual hardware when testing your SPI code.

 

Regards,

Mac

 

0 Kudos
Reply

424 Views
rocco
Senior Contributor II

b-rad wrote:
If its not an unmapped interrupt or the watchdog then the other two options are an illegal address or a stack overflow, right?

There are other things that can cause that problem, like mis-jumping to an address that does not contain valid code, or jumping to valid code but not aligned correctly to the instruction. If your using C, check for un-initialized pointers. In assembler, there are dozens of things that can cause that. I think I've done most of them.

0 Kudos
Reply