I use 9S12DJ64 on my project. I use the following code to force the software reset / reboot:
COPCTL = 0x01;
ARMCOP = 0x98;
I wonder that after the reboot, will data RAM be cleared or still be able to keep the value stored before the reboot. In other words, if a global variable is assigned to a non-zero value, will that global variable be cleared to zero after the software reboot? I noticed that the global variables are always reset to zero on my code after the software reboot. I would like to know if it is correct behavior or something was wrong on my code or the way of reboot I implemented. Cosmic C compiler is used in my company. I contacted the technical support at Cosmic and I was told there was no way ( no such assembler command) to simply reset program counter to zero (like "jmp $0") to reset DJ64. Is it true? Very appreciate for your help!