MC9S08SH STOP3 mode power consumption

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC9S08SH STOP3 mode power consumption

ソリューションへジャンプ
1,436件の閲覧回数
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 解決策
823件の閲覧回数
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 返答(返信)
823件の閲覧回数
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 件の賞賛
返信
823件の閲覧回数
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 件の賞賛
返信
823件の閲覧回数
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 件の賞賛
返信
823件の閲覧回数
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 件の賞賛
返信
824件の閲覧回数
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 件の賞賛
返信