<?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 KL03Z: Current Draw in VLPR Mode? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704233#M43232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very basic code for the KL03Z for which I'm trying to verify the current draw in VLPR mode as noted in the data sheet. I have the QFN package of the microcontroller, I have set the LIRC clock to 8MHz and divided it down so that the core is at 4MHz and the bus is at 1MHz. The datasheet shows that the current draw should be either 188uA or 209uA depending on the meaning of "compute operating mode".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="193934_193934.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/123147i8F53BCF7B9EFE5D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="193934_193934.png" alt="193934_193934.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/29390i82635A2BDC4F2E5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the attached code, I get 1.06mA. When I step through the code using the debugger, I see the correct current (~184uA). I'm using the latest KDS software and Jlink. When I disconnect the Jlink, I still see the 1.06mA. The PMSTAT register shows that I'm in VLPR mode.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So...my questions:&lt;/P&gt;&lt;P&gt;1. Why do I not read the correct current draw when I run as opposed to step?&lt;/P&gt;&lt;P&gt;2. What is the "Computer Operation Mode"?&lt;/P&gt;&lt;P&gt;3. How do I put the While(1) look in SRAM vs flash as noted in that same datasheet entry? Is what I have in the code SRAM?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337667"&gt;main.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Sep 2017 20:34:38 GMT</pubDate>
    <dc:creator>sarastout-grand</dc:creator>
    <dc:date>2017-09-14T20:34:38Z</dc:date>
    <item>
      <title>KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704233#M43232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very basic code for the KL03Z for which I'm trying to verify the current draw in VLPR mode as noted in the data sheet. I have the QFN package of the microcontroller, I have set the LIRC clock to 8MHz and divided it down so that the core is at 4MHz and the bus is at 1MHz. The datasheet shows that the current draw should be either 188uA or 209uA depending on the meaning of "compute operating mode".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="193934_193934.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/123147i8F53BCF7B9EFE5D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="193934_193934.png" alt="193934_193934.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/29390i82635A2BDC4F2E5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the attached code, I get 1.06mA. When I step through the code using the debugger, I see the correct current (~184uA). I'm using the latest KDS software and Jlink. When I disconnect the Jlink, I still see the 1.06mA. The PMSTAT register shows that I'm in VLPR mode.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So...my questions:&lt;/P&gt;&lt;P&gt;1. Why do I not read the correct current draw when I run as opposed to step?&lt;/P&gt;&lt;P&gt;2. What is the "Computer Operation Mode"?&lt;/P&gt;&lt;P&gt;3. How do I put the While(1) look in SRAM vs flash as noted in that same datasheet entry? Is what I have in the code SRAM?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337667"&gt;main.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2017 20:34:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704233#M43232</guid>
      <dc:creator>sarastout-grand</dc:creator>
      <dc:date>2017-09-14T20:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704234#M43233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sara,&lt;/P&gt;&lt;P&gt;Considering that you may have already '&lt;A _jive_internal="true" href="https://community.nxp.com/thread/460054"&gt;refer MCUXpresso SDK for FRDM-KL03Z SDK package, which provided [power_mode_switch] demo&lt;/A&gt;'. If the current is still high, please refer the method mentioned in '&lt;A _jive_internal="true" href="https://community.nxp.com/thread/453665"&gt;MKL03Z: Current consumption too high in VLLSx states&lt;/A&gt;'.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 03:22:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704234#M43233</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-09-18T03:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704235#M43234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neither of those links helped me, I have already seen both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will re-state my questions, being more specific about the first one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Why does the While(1) loop cause my current to double?&lt;/P&gt;&lt;P&gt;2. What is the "Computer Operation Mode"?&lt;/P&gt;&lt;P&gt;3. How do I put the While(1) look in SRAM vs flash as noted in that same datasheet entry? Is what I have in the code SRAM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first question stems from the fact that I get the correct current draw when I "step" through my code with the debugger, right up until I hit the While(1) loop. When I "run" the code, the current nearly doubles as soon as it hits the While(1) loop. Can you run my code and see if you get the same thing? What is causing this? How do I get a true view of my actual current if I can't get into the While(1) loop? And, to compare to the datasheet, I believe I need to be in a while(1) loop. Please confirm this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My second question stems from me trying to understand the specification on the datasheet. One of the VLPR current specifications is in "Compute Operation Mode" and this is not specified in the other. What does this mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The third question also comes from me trying to understand the specification on the datasheet. The VLPR currents are specified as sometimes being in SRAM and sometimes in flash. How do I know which one I have set-up in the code I sent you? I'm assuming SRAM, but I didn't specify either. One of them must be the default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 12:26:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704235#M43234</guid>
      <dc:creator>sarastout-grand</dc:creator>
      <dc:date>2017-09-18T12:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704236#M43235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for my last reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. What is the "Computer Operation Mode"?&lt;/P&gt;&lt;P&gt;Please read the chapter '7.2.2 Compute Operation' of &lt;A href="https://www.nxp.com/docs/en/reference-manual/KL03P24M48SF0RM.pdf"&gt;KL03P24M48SF0RM&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="7.2.2 Compute Operation.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31510iC0C881BD0676E18C/image-size/large?v=v2&amp;amp;px=999" role="button" title="7.2.2 Compute Operation.png" alt="7.2.2 Compute Operation.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 09:30:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704236#M43235</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-09-22T09:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704237#M43236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answer to the 2nd question. I was able to find that section in the manual just yesterday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas for the other two questions? I believe I have sort-of answered the 3rd question. My code is in flash because I think that is the default. I'm not sure what I would have to do to put it in SRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 12:12:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704237#M43236</guid>
      <dc:creator>sarastout-grand</dc:creator>
      <dc:date>2017-09-22T12:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704238#M43237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;About the 3nd question, please refer '&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-104433"&gt;Relocating Code and Data Using the KDS GCC Linker File for Kinetis&lt;/A&gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the higher current just like you:&lt;/P&gt;&lt;P&gt;1. I have test the &lt;STRONG&gt;power_manager&lt;/STRONG&gt; and &lt;STRONG&gt;power_mode_switch&lt;/STRONG&gt; demo in &lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fmcuxpresso.nxp.com%2Fen%2Fwelcome" rel="nofollow" target="_blank"&gt;SDK_2.2_FRDM-KL03Z&lt;/A&gt;, after input 'D' the MCU enter &lt;STRONG&gt;VLPR&lt;/STRONG&gt; mode. But I get the higher current about &lt;STRONG&gt;1mA&lt;/STRONG&gt;.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;2. I have also try to configure the FTFA_FOPT[LPBOOT]=01 or 00(ensure the MCU direct boot to VLPR mode), still get &lt;STRONG&gt;1mA&lt;/STRONG&gt; current. (I have attach the test project. You can test it with IAR and FRDM-KL03Z board.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="LPBOOT.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44291i2AD4227D84D73FEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="LPBOOT.png" alt="LPBOOT.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="KL03 LPBOOT SDK2.2 IAR.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44339i19610611AF324131/image-size/large?v=v2&amp;amp;px=999" role="button" title="KL03 LPBOOT SDK2.2 IAR.png" alt="KL03 LPBOOT SDK2.2 IAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;&lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DKINETIS-POWER-ESTIMATION-TOOL-SW%26Parent_nodeId%3D1441687948849713233495%26Parent_pageType%3Dproduct" rel="nofollow" target="_blank"&gt;The Power Estimation Tool&lt;/A&gt; for Kinetis MCUs also show me that the VLPR mode current is about 1.06mA.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Power Estimation Tool v1.0.1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44387iD2D9989062190BAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Power Estimation Tool v1.0.1.png" alt="Power Estimation Tool v1.0.1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have report this to AE team and will inform you ASAP when I get the reply.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 09:23:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704238#M43237</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-09-27T09:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704239#M43238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm glad you were able to see my problem. I await any feedback you receive from the AE team.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 12:02:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704239#M43238</guid>
      <dc:creator>sarastout-grand</dc:creator>
      <dc:date>2017-09-27T12:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704240#M43239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;feedback:&lt;/P&gt;&lt;P&gt;The VLPR mode data sheet notes indicate the code, the while(1), is being run out of SRAM. Most likely the flash has been turned off as well, but I can't be certain.&amp;nbsp; If you run the while(1) out of flash you will bearing the flash operation power which you have shown to be about 1 ma.&amp;nbsp; Check this out and let us know how you come along with your spec checking.&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the low power modes VLPW, VLPS, LLS and VLLSx as well if you are not running your function in VLPR&amp;nbsp;100% of the time, transitioning out of low power mode with interrupts and from LLS and VLLSx with the LLWU module inputs. I wrote the app note &lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fcache.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN4503.pdf%3Ffsrch%3D1%26sr%3D2%26pageNum%3D1" rel="nofollow" target="_blank"&gt;AN4503&lt;/A&gt; , it has a wealth of information available about Kinetis Low power modes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 02:05:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704240#M43239</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-10-11T02:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704241#M43240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I agree. When I run with the clocks as noted in the datasheet with the code in flash, I get their numbers for current that are posted. However, I'm still puzzled by why the current drops by about half when I place an "if" statement inside the while(1) loop. Is that normal? It seems that it very much matters what type of statement goes inside the while(1) loop. So, I measure about 1.06mA, with my clocks (4MHz core, 1MHz Bus) and code in flash, with nothing inside the while(1) loop. Then, if I put the following statement inside the while(1) loop, the current drops from 1.06mA to about 475uA :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (SMC_BRD_PMSTAT_PMSTAT(SMC)==0b0100)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what is my real current draw in VLPR mode? Is it 1.06mA or 475uA or any other number that I get when I put something else inside the while(1) loop? I need to know the lowest that I can go in VLPR mode. I completely understand about the other modes and will be using them as well. However, in my application, I need to know the lowest current consumption while I'm running. The difference between 1.06mA and 475uA is significant in terms of battery life in my application. Obviously something is going on inside the while(1) loop that draws a lot of current and adding the "if" statement changes that behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to understand what is happening so that I can optimize it. Can you look into this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 12:30:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704241#M43240</guid>
      <dc:creator>sarastout-grand</dc:creator>
      <dc:date>2017-10-11T12:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704242#M43241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this still being looked into? I would really like some insight into why this is happening!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 19:52:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704242#M43241</guid>
      <dc:creator>sarastout-grand</dc:creator>
      <dc:date>2017-10-26T19:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704243#M43242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Hi,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;I am facing the same problem as Sara. My hardware&amp;nbsp;consists only of a KL03Z running the VLPR Mode. Here's my initialization sequence:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Disable peripheral clocks (no peripheral is initialized)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Set MCG to LIRC8M mode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Switch to VLPR mode (LIRC2M) using the API provided by latest SDK and the frdmkl03z_power_mode_switch example&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;while(1){} loop&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;In this case the current consumption is 1mA but if I put an if(something) into the while, the current drops to 710uA!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Please, I need to know what is happening. Why does the current decrease by simply modifying the code?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Can anyone help?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;gaston&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Oct 2019 13:30:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704243#M43242</guid>
      <dc:creator>gschelotto</dc:creator>
      <dc:date>2019-10-26T13:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704244#M43243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A possible explanation of the difference in current consumption is that in the case of a simple forever loop the code is running in cache (or something similar) and so the processor is running at full speed (no wait states due to Flash access) but if you add some code that doesn't allow caching it slows the processor (adds wait states) and this slightly reduces current consumption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Oct 2019 22:30:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704244#M43243</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-10-27T22:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: Current Draw in VLPR Mode?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704245#M43244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Yes, you're right since the cache is placed in RAM. For example, I've verified that in VLPR mode the current consumption drops to 120uA! with the while(1) loop relocated to RAM.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;If the while(1) FLASH-located has statements with access to RAM (conditionals, assignments,...) we will have some access to RAM and others to FLASH and the result is an average of both consumptions.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;I think it is clear and in my opinion we could leave the case solved.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Thanks,&lt;BR /&gt;gaston&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2019 08:10:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-Current-Draw-in-VLPR-Mode/m-p/704245#M43244</guid>
      <dc:creator>gschelotto</dc:creator>
      <dc:date>2019-10-28T08:10:30Z</dc:date>
    </item>
  </channel>
</rss>

