9S12C32 stops code execution after random amount of instructions

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

9S12C32 stops code execution after random amount of instructions

1,043件の閲覧回数
sayeo87
Contributor I

We have a 9S12C32 on a custom PCB target, and are trying to program it through codewarrior in C. What we have noticed is that after a random number of executed instructions (maybe around 100,000 C statements), execution stops and we get either a "Trigger A occurred" or "ILLEGAL_BP" message within the codewarrior debugger. We are programing the MCU through BDM, and all interrupts are currently disabled. Does anybody know what could be wrong? We suspect that our clock might be very slightly off, so that after some number of instructions it becomes completely shifted and wreaks havoc...

 

Thanks in advance for any help!

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

415件の閲覧回数
sayeo87
Contributor I

We've solved the problem. We were using the PLL, even though we did not include the circuitry for it. Not using the PLL solved the problem.

0 件の賞賛

415件の閲覧回数
Lundin
Senior Contributor IV
That issue is caused by the accidental execution of op code 0x00 (BGND). In 99% of all cases, it means there is a bug with either runaway code, stack overflow or memory corruption caused by pointer bugs or buffer overflow. You don't need to worry about the clock, it is supervised through hardware.
0 件の賞賛