<?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>8-bit MicrocontrollersのトピックRe: How to enter the low power mode with 9S08QE</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183719#M13579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone interested in looking at low power mode&amp;nbsp;for 9S08QE8 written in assembly is invited to check out my project&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.rasmicro.com/Low_Power_Temp_Sensor.htm" rel="nofollow" target="_blank"&gt;http://www.rasmicro.com/Low_Power_Temp_Sensor.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 04 Dec 2011 20:48:18 GMT</pubDate>
    <dc:creator>RogerSchaefer</dc:creator>
    <dc:date>2011-12-04T20:48:18Z</dc:date>
    <item>
      <title>How to enter the low power mode with 9S08QE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183713#M13573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I used the STOP3 and RTC interrupt to realize sensor sampling with very low power consumption. However, the minimum supply current with a battery of 3V is 5mA, which is much larger than that of the datasheet (450nA at STOP3 mode). I don't know why. Is there any code example to illustrate how to sleep and work with very low power?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forwards your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fantasticxp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 13:53:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183713#M13573</guid>
      <dc:creator>clockdog</dc:creator>
      <dc:date>2011-11-17T13:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter the low power mode with 9S08QE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183714#M13574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This question has been answered a number of times before. In the Forum search box at the upper right of this web page, enter STOP3 and click on Search. A number of forum threads on the subject will be displayed. Hopefully you will find your answer in one of those.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 20:28:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183714#M13574</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2011-11-17T20:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter the low power mode with 9S08QE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183715#M13575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition to Tom's advice, here are a couple of things to check:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;All unused GPIO to be set to output, and&amp;nbsp;also to&amp;nbsp;be set to logic low.&amp;nbsp; This includes any GPIO signals that are &lt;U&gt;unpinned&lt;/U&gt; on the package you are using.&lt;/LI&gt;&lt;LI&gt;LVD module to be disabled during STOP mode, for minimum current.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you measure the current draw, the BDM Multilink tool should be disconnected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 21:00:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183715#M13575</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2011-11-18T21:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter the low power mode with 9S08QE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183716#M13576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Tom and Mac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you very much. I looked up in the forum and did what others have been told. All the pin, including the unshown pin, have been set output low. The SOPT1_BKGDPE has been set to be 0. The SPMSC1_LVDE and SPMSC1_LVDSE both have been set to be 0. When I measure, the&amp;nbsp;BDM Multilink is disconnectted. It seems to be better, but the supply current still has 2.6mA. How about the clock setting? Following is my code. I appreciate for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; MCU_Init(); &amp;nbsp;/* Function that initializes the MCU */&lt;BR /&gt;&amp;nbsp; GPIO_Init(); /* Function that initializes the Ports of the MCU */&lt;BR /&gt;&amp;nbsp; ADC_Init(); &amp;nbsp;/* Function that initializes the ADC*/&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; APCTL2_ADPC15 = 1; /* Select the channel for ADC input (the pin stop working as GPIO) */&lt;BR /&gt;&amp;nbsp; APCTL3_ADPC16 = 1; /* Select the channel for ADC input (the pin stop working as GPIO) */&lt;BR /&gt;&amp;nbsp; APCTL3_ADPC17 = 1; /* Select the channel for ADC input (the pin stop working as GPIO) */&lt;BR /&gt;&amp;nbsp; APCTL1_ADPC1 = 1; /* Select the channel for ADC input (the pin stop working as GPIO) */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;SCIOpenCommunication();// Opens SCI communication&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;EnableInterrupts; /* enable interrupts */&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; RTC_Init(); /* Function that initializes the RTC*/&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; for(;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SOPT1_STOPE=1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; _Stop;&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void MCU_Init(void) {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SOPT1 = 0x21; /* Watchdog disable. Stop Mode Enable. Background Pin Disable. RESET pin enable */&lt;BR /&gt;&lt;BR /&gt;SCGC1 = 0x11; /* Bus Clock to ADC,SCI1 is enable */&lt;BR /&gt;SCGC2 = 0x04; /* Bus clock to the RTC module is enable*/&lt;BR /&gt;&lt;BR /&gt;SPMSC1_LVDE = 0;&lt;BR /&gt;SPMSC1_LVDRE = 1;&lt;BR /&gt;SPMSC1_LVDSE=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(NVICSTRM != 0xFF) // Set Clock 24 Mhz&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ICSTRM=NVICSTRM;&lt;BR /&gt;else&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ICSTRM=0xBC;&lt;/P&gt;&lt;P&gt;ICSC1 = ICSC1_IREFS_MASK | ICSC1_IRCLKEN_MASK;&lt;BR /&gt;ICSC2=0x00;&lt;BR /&gt;ICSSC = ICSSC_FTRIM_MASK;&lt;BR /&gt;&lt;BR /&gt;while(ICSC1_CLKS!=ICSSC_CLKST);&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void GPIO_Init(void) {&lt;/P&gt;&lt;P&gt;//Setting IO low output&lt;BR /&gt;PTADD=0xFF;&lt;BR /&gt;PTAD= 0x00;&lt;BR /&gt;&lt;BR /&gt;PTBDD=0xFF;&lt;BR /&gt;PTBD= 0x00;&lt;BR /&gt;&lt;BR /&gt;PTCDD=0xFF;&lt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;{&lt;BR /&gt;// Configures ADC peripheral (ADC clock = 8MHz)&lt;BR /&gt;// Selects ADC continuous conversion&lt;BR /&gt;&lt;BR /&gt;ADCCFG = 0x98; /* Input clock/1. Low power, Long Sample time configuration. 10-bit conversion */&lt;/P&gt;&lt;P&gt;ADCSC2 = 0x00; /* Software trigger selected */&lt;BR /&gt;ADCSC1_ADCO = 0;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void SCIOpenCommunication(void)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;if (!sci_status)&lt;BR /&gt;{&lt;BR /&gt;// Open SCI Communications&lt;BR /&gt;sci_status = TRUE;&lt;BR /&gt;// Set Baud Rate Modulo Divisor&lt;BR /&gt;SCI1BD = BR;&lt;BR /&gt;&lt;BR /&gt;// Normal operation, 8 data bits stop and no Parity&lt;BR /&gt;SCI1C1 = 0x00;&lt;BR /&gt;// Trasmitter and Receiver Enable&lt;BR /&gt;//SCI1C2 = SCI1C2_RIE_MASK |SCI1C2_TE_MASK |SCI1C2_RE_MASK;&lt;BR /&gt;SCI1C2 = 0x0C;&lt;BR /&gt;SCI1C3 = 0x00;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void RTC_Init(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;RTCSC=0x18;&lt;BR /&gt;RTCMOD=0x23;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Nov 2011 11:04:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183716#M13576</guid>
      <dc:creator>clockdog</dc:creator>
      <dc:date>2011-11-19T11:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter the low power mode with 9S08QE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183717#M13577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there body can help me? Looking forwards to the technical support.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 12:38:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183717#M13577</guid>
      <dc:creator>clockdog</dc:creator>
      <dc:date>2011-11-23T12:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter the low power mode with 9S08QE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183718#M13578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It always helps to say what is&amp;nbsp;the intended operation of your code - it is not immediately obvious.&amp;nbsp; You appear to have enabled interrupts for the RTC, and I assume this is your wakeup source, but you have not shown the ISR code.&amp;nbsp; If you are not properly clearing the interrupt flag, it is possible that you do not ever enter stop 3 mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For "write once" registers, all bits need to be simultaneously written, rather than a single bit at a time.&amp;nbsp; With the code -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;for ( ; ; )&amp;nbsp;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#ff0000"&gt;SOPT1_STOPE = 1;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Stop;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the highlighted statement achieves absolutely nothing, since it refers to a write once bit (I assume that the STOP instruction is already enabled within your initialisation function).&amp;nbsp; This code would also&amp;nbsp;imply that all the "work" following a wakeup would occur within the ISR that initiates the wakeup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One method to&amp;nbsp;determine for how long the MCU operates in stop mode would be to set a GPIO bit prior to the stop instruction, and to clear the bit following the stop&amp;nbsp;instruction.&amp;nbsp; The result can then be observed with an oscilloscope.&amp;nbsp; Actually, this would also include the ISR execution time, which should be a very short period relative to the timer period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your intent is to complete an ADC conversion whilst in stop 3, this will not work with your present setup, using the bus clock for the ADC module.&amp;nbsp; I do not see where you are initiating an ADC conversion, except once at the completion of the initialisation, and the pins for ADC operation have not been enabled at this point.&amp;nbsp; Why is this part of the initialisation process not within the initialisation function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 14:47:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183718#M13578</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2011-11-24T14:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to enter the low power mode with 9S08QE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183719#M13579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone interested in looking at low power mode&amp;nbsp;for 9S08QE8 written in assembly is invited to check out my project&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.rasmicro.com/Low_Power_Temp_Sensor.htm" rel="nofollow" target="_blank"&gt;http://www.rasmicro.com/Low_Power_Temp_Sensor.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Dec 2011 20:48:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-enter-the-low-power-mode-with-9S08QE/m-p/183719#M13579</guid>
      <dc:creator>RogerSchaefer</dc:creator>
      <dc:date>2011-12-04T20:48:18Z</dc:date>
    </item>
  </channel>
</rss>

