MC9S08SH STOP3 mode power consumption

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MC9S08SH STOP3 mode power consumption

跳至解决方案
2,029 次查看
binary
Contributor II

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

标签 (1)
0 项奖励
回复
1 解答
1,416 次查看
binary
Contributor II

Solved the problem! :smileyhappy:

 

It finds out that I hadn't set LVDSE to 0, which disables LVD while MCU is in STOP mode.

 

Janis

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,416 次查看
rocco
Senior Contributor II

Hi Janis,

 

Welcome to the forum.

 

I do not see you seting port C to outputs. Could the extra current draw be from port C inputs floating?

0 项奖励
回复
1,416 次查看
binary
Contributor II

Oh, forgot to mention that I use 16 pin version of MC9S08SH series microcontroller. So it has just port A and B.

 

Janis

0 项奖励
回复
1,416 次查看
rocco
Senior Contributor II

Hello again Janis,

 

Just because you can't see them doesn't mean they are not there . . .

 

More specifically, just because Freescale does not bond-out those pins doesn't mean that they remove them from the die. Trust me, port C is there. Just like it shows in the data-sheet. You just can't physically get to them.

 

Try setting port C to output, and see if your current consumption goes down. It may not be your only problem, but it is certainly one of them. If you search for power-consumption topics on this board, you will find you are not alone. There are many things that can cause higher-than-expected current consumption.

0 项奖励
回复
1,416 次查看
binary
Contributor II

Thanks rocco!

Didn't know they put the same die in different pin count packages. Sadly, port C didn't solve the problem.

 

Well, I looked through some topics but couldn't find any useful information.

 

Janis

0 项奖励
回复
1,417 次查看
binary
Contributor II

Solved the problem! :smileyhappy:

 

It finds out that I hadn't set LVDSE to 0, which disables LVD while MCU is in STOP mode.

 

Janis

0 项奖励
回复