AnsweredAssumed Answered

MC9S08SH STOP3 mode power consumption

Question asked by Janis Zaharans on Feb 26, 2011
Latest reply on Feb 27, 2011 by Janis Zaharans

Hi,

 

I'm trying to achive STOP3 mode power consumption as low as shown in the MC9S08SH datasheet.

It says that in STOP3 + RTC enabled it should be 1.5uA + 500nA = 2uA but currently I can achieve only 100uA.

 

Below I have included my code.

 

 

void main(void) {

  EnableInterrupts; /* enable interrupts */

  /* Set all pins as output and low */
  PTADD = 0xFF;
  PTBDD = 0xFF;
  PTAD  = 0x00;
  PTBD  = 0x00;
              
  /* Configure LED */
  PTBDD_PTBDD2 = 1;
  PTBD_PTBD2 = 1;
  
    /* 1 second RTC */
  RTCSC_RTCLKS  = 0x00;   // Internal Clock
  RTCSC_RTIE    = 1;      // Interrupt Enable
  RTCSC_RTCPS   = 0x0F;   // 10^3

  /* Interrupt every 1 sec */
  RTCMOD       = 0x00;  

  /* Enable STOP mode */
  SOPT1_STOPE = 1;

  /* Disable LVD when STOP */
  SPMSC1_LVDE = 1;
  SPMSC1_LVDRE = 1;
         

  for(;;) {
    __RESET_WATCHDOG();   
   
    /* Enter STOP mode */
    _Stop;
  
    /* Toggle LED */
    PTBD_PTBD2 = 0;
    WaitNms(50);
    PTBD_PTBD2 = 1;   
  }
}

 

I will appreciate any help to achieve lower power consumption.

Thanks!

 

Janis

Outcomes