Suan Aik Yeo

9S12C32 stops code execution after random amount of instructions

Discussion created by Suan Aik Yeo on Apr 14, 2010
Latest reply on Apr 16, 2010 by Suan Aik Yeo

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!

Outcomes