Karen Shi

Is RAM data always been cleared after software reset on DJ64

Discussion created by Karen Shi on Feb 29, 2008
Latest reply on Mar 3, 2008 by Daniel Lundin
I use 9S12DJ64 on my project. I use the following code to force the software reset / reboot:
 
code:
 
swReset()
{
     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!  
 
Thanks.
 
Karen Shi
 

Outcomes