Illegal BP error MC9S08

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

Illegal BP error MC9S08

1,001 次查看
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

标签 (1)
0 项奖励
回复
2 回复数

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

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