Tommy Lai

Using Low-power mode of MC9S08GB

Discussion created by Tommy Lai on Jun 14, 2007
Latest reply on Jun 15, 2007 by Tommy Lai
Hello all,
 
I'm writing program on the chip of MC9S08GT16 to enter low power mode periodically. I want it to enter STOP2, so write code in the initilization:
 
SOPT = 0x73;         /* Enable STOPE */
SPMSC2 = 0x03;    /* Set PDC and PPDC to 1 */
IRQSC = 0x16;       /* Enable IRQPE */
SPMSC1 &= 0xF7; /* Disable LVDSE */
 
Every time I am about to enter STOP2, I switch to use internal clock, and SRTISC is set to be 0x17, to set RTI in every 1 sec.
 
I would like to know if anything is wrong, because I didn't notice it quitting from STOP2.
 
I used SMAC4.2 and CodeWarrior 5.1. Please let me know if I'm doing anything wrongly. Thanks a lot!
 
Tommy
 

Outcomes