<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MC9S08SH STOP3 mode power consumption in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186720#M14050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to achive STOP3 mode power consumption as low as shown in the MC9S08SH datasheet.&lt;/P&gt;&lt;P&gt;It says that in STOP3 + RTC enabled it should be 1.5uA + 500nA = 2uA but currently I can achieve only 100uA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below I have included my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void main(void) {
 
&amp;nbsp; EnableInterrupts; /* enable interrupts */
 
&amp;nbsp; /* Set all pins as output and low */
&amp;nbsp; PTADD = 0xFF;
&amp;nbsp; PTBDD = 0xFF;
&amp;nbsp; PTAD&amp;nbsp; = 0x00;
&amp;nbsp; PTBD&amp;nbsp; = 0x00; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; /* Configure LED */
&amp;nbsp; PTBDD_PTBDD2 = 1;
&amp;nbsp; PTBD_PTBD2 = 1;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* 1 second RTC */
&amp;nbsp; RTCSC_RTCLKS&amp;nbsp; = 0x00;&amp;nbsp;&amp;nbsp; // Internal Clock
&amp;nbsp; RTCSC_RTIE&amp;nbsp;&amp;nbsp;&amp;nbsp; = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Interrupt Enable
&amp;nbsp; RTCSC_RTCPS&amp;nbsp;&amp;nbsp; = 0x0F;&amp;nbsp;&amp;nbsp; // 10^3
 
&amp;nbsp; /* Interrupt every 1 sec */
&amp;nbsp; RTCMOD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00;&amp;nbsp;&amp;nbsp; 
 
&amp;nbsp; /* Enable STOP mode */
&amp;nbsp; SOPT1_STOPE = 1;
 
&amp;nbsp; /* Disable LVD when STOP */
&amp;nbsp; SPMSC1_LVDE = 1;
&amp;nbsp; SPMSC1_LVDRE = 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp; for(;;) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; __RESET_WATCHDOG();&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enter STOP mode */
&amp;nbsp;&amp;nbsp;&amp;nbsp; _Stop;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Toggle LED */
&amp;nbsp;&amp;nbsp;&amp;nbsp; PTBD_PTBD2 = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; WaitNms(50);
&amp;nbsp;&amp;nbsp;&amp;nbsp; PTBD_PTBD2 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; }
}
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will appreciate any help to achieve lower power consumption.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:37:55 GMT</pubDate>
    <dc:creator>binary</dc:creator>
    <dc:date>2020-10-29T09:37:55Z</dc:date>
    <item>
      <title>MC9S08SH STOP3 mode power consumption</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186720#M14050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to achive STOP3 mode power consumption as low as shown in the MC9S08SH datasheet.&lt;/P&gt;&lt;P&gt;It says that in STOP3 + RTC enabled it should be 1.5uA + 500nA = 2uA but currently I can achieve only 100uA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below I have included my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void main(void) {
 
&amp;nbsp; EnableInterrupts; /* enable interrupts */
 
&amp;nbsp; /* Set all pins as output and low */
&amp;nbsp; PTADD = 0xFF;
&amp;nbsp; PTBDD = 0xFF;
&amp;nbsp; PTAD&amp;nbsp; = 0x00;
&amp;nbsp; PTBD&amp;nbsp; = 0x00; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; /* Configure LED */
&amp;nbsp; PTBDD_PTBDD2 = 1;
&amp;nbsp; PTBD_PTBD2 = 1;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* 1 second RTC */
&amp;nbsp; RTCSC_RTCLKS&amp;nbsp; = 0x00;&amp;nbsp;&amp;nbsp; // Internal Clock
&amp;nbsp; RTCSC_RTIE&amp;nbsp;&amp;nbsp;&amp;nbsp; = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Interrupt Enable
&amp;nbsp; RTCSC_RTCPS&amp;nbsp;&amp;nbsp; = 0x0F;&amp;nbsp;&amp;nbsp; // 10^3
 
&amp;nbsp; /* Interrupt every 1 sec */
&amp;nbsp; RTCMOD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x00;&amp;nbsp;&amp;nbsp; 
 
&amp;nbsp; /* Enable STOP mode */
&amp;nbsp; SOPT1_STOPE = 1;
 
&amp;nbsp; /* Disable LVD when STOP */
&amp;nbsp; SPMSC1_LVDE = 1;
&amp;nbsp; SPMSC1_LVDRE = 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp; for(;;) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; __RESET_WATCHDOG();&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enter STOP mode */
&amp;nbsp;&amp;nbsp;&amp;nbsp; _Stop;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Toggle LED */
&amp;nbsp;&amp;nbsp;&amp;nbsp; PTBD_PTBD2 = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; WaitNms(50);
&amp;nbsp;&amp;nbsp;&amp;nbsp; PTBD_PTBD2 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; }
}
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will appreciate any help to achieve lower power consumption.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:37:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186720#M14050</guid>
      <dc:creator>binary</dc:creator>
      <dc:date>2020-10-29T09:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08SH STOP3 mode power consumption</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186721#M14051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not see you seting port C to outputs. Could the extra current draw be from port C inputs floating?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 07:42:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186721#M14051</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2011-02-27T07:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08SH STOP3 mode power consumption</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186722#M14052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, forgot to mention that I use 16 pin version of MC9S08SH series microcontroller. So it has just port A and B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 08:16:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186722#M14052</guid>
      <dc:creator>binary</dc:creator>
      <dc:date>2011-02-27T08:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08SH STOP3 mode power consumption</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186723#M14053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again Janis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just because you can't see them doesn't mean they are not there . . .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 08:30:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186723#M14053</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2011-02-27T08:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08SH STOP3 mode power consumption</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186724#M14054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks rocco!&lt;/P&gt;&lt;P&gt;Didn't know they put the same die in different pin count packages. Sadly, port C didn't solve the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, I looked through some topics but couldn't find any useful information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 08:46:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186724#M14054</guid>
      <dc:creator>binary</dc:creator>
      <dc:date>2011-02-27T08:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08SH STOP3 mode power consumption</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186725#M14055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved the problem! &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It finds out that I hadn't set LVDSE to 0, which disables LVD while MCU is in STOP mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Janis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 06:56:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08SH-STOP3-mode-power-consumption/m-p/186725#M14055</guid>
      <dc:creator>binary</dc:creator>
      <dc:date>2011-02-28T06:56:05Z</dc:date>
    </item>
  </channel>
</rss>

