<?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 Deep Sleep and VLPS on MK64FN1M0VLL12 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663443#M40758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I'm trying to put my microcontroller into deep sleep mode (stop) or the VLPS mode. In my code I'm calling a function that suppose to put the uC in sleep mode and then I would like to use a UART port as a wake up. From what I have read in STOP mode any interrupt should wake the microcontroller (without use of the LLWU). Here is a code that I'm using to put the system in sleep:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;NVIC_EnableIRQ(UART4_RX_TX_IRQn);&amp;nbsp;&amp;nbsp;//enable UART4 interrupts&lt;BR /&gt;&amp;nbsp;SMC_PMPROT = SMC_PMPROT_AVLP_MASK;&lt;BR /&gt;&amp;nbsp;/* Set the STOPM field to 0b010 for VLPS mode */&lt;BR /&gt;&amp;nbsp;SMC_PMCTRL &amp;amp;= ~SMC_PMCTRL_STOPM_MASK;&lt;BR /&gt;&amp;nbsp;SMC_PMCTRL |= SMC_PMCTRL_STOPM(0x2);&lt;BR /&gt;&amp;nbsp;//exit to run on interrupt&lt;BR /&gt;&amp;nbsp;SMC_PMCTRL |= SMC_PMCTRL_LPWUI_MASK;&lt;BR /&gt;&amp;nbsp;/*wait for write to complete to SMC before stopping core */&lt;BR /&gt;&amp;nbsp;dummyread = SMC_PMCTRL;&lt;BR /&gt;&amp;nbsp;/* Now execute the stop instruction to go into VLPS */&lt;BR /&gt;/* Set the SLEEPDEEP bit to enable deep sleep mode - enter stop mode*/&lt;BR /&gt;&amp;nbsp; SCB-&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;&lt;BR /&gt;&amp;nbsp;#ifdef CMSIS&lt;BR /&gt;&amp;nbsp;__wfi();&lt;BR /&gt;&amp;nbsp;#else&lt;BR /&gt;&amp;nbsp;/* WFI instruction will start entry into STOP mode */&lt;BR /&gt;&amp;nbsp;asm("WFI");&lt;BR /&gt;&amp;nbsp;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are multiple issues that I observed with both STOP and VLPS modes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. The current is regular RUN mode is around 40mA at 3V, which is what the datasheet specifies. After I execute the &amp;nbsp;&amp;nbsp;&amp;nbsp;sleep instruction it decreases to around 25 mA, which is way to big. According to datasheet it should be around &amp;nbsp;&amp;nbsp;&amp;nbsp;0.5mA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. The system does not wake up, when I send any command through UART. It looks like it is not responding at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. The sleep function does not work in debug mode. It looks like the instructions are executed but it does not go &amp;nbsp;&amp;nbsp;&amp;nbsp;into&amp;nbsp;any sleep modes. (I'm using Keil development studio).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or suggestions is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jan 2017 17:10:32 GMT</pubDate>
    <dc:creator>jakubpankau</dc:creator>
    <dc:date>2017-01-05T17:10:32Z</dc:date>
    <item>
      <title>Deep Sleep and VLPS on MK64FN1M0VLL12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663443#M40758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I'm trying to put my microcontroller into deep sleep mode (stop) or the VLPS mode. In my code I'm calling a function that suppose to put the uC in sleep mode and then I would like to use a UART port as a wake up. From what I have read in STOP mode any interrupt should wake the microcontroller (without use of the LLWU). Here is a code that I'm using to put the system in sleep:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;NVIC_EnableIRQ(UART4_RX_TX_IRQn);&amp;nbsp;&amp;nbsp;//enable UART4 interrupts&lt;BR /&gt;&amp;nbsp;SMC_PMPROT = SMC_PMPROT_AVLP_MASK;&lt;BR /&gt;&amp;nbsp;/* Set the STOPM field to 0b010 for VLPS mode */&lt;BR /&gt;&amp;nbsp;SMC_PMCTRL &amp;amp;= ~SMC_PMCTRL_STOPM_MASK;&lt;BR /&gt;&amp;nbsp;SMC_PMCTRL |= SMC_PMCTRL_STOPM(0x2);&lt;BR /&gt;&amp;nbsp;//exit to run on interrupt&lt;BR /&gt;&amp;nbsp;SMC_PMCTRL |= SMC_PMCTRL_LPWUI_MASK;&lt;BR /&gt;&amp;nbsp;/*wait for write to complete to SMC before stopping core */&lt;BR /&gt;&amp;nbsp;dummyread = SMC_PMCTRL;&lt;BR /&gt;&amp;nbsp;/* Now execute the stop instruction to go into VLPS */&lt;BR /&gt;/* Set the SLEEPDEEP bit to enable deep sleep mode - enter stop mode*/&lt;BR /&gt;&amp;nbsp; SCB-&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;&lt;BR /&gt;&amp;nbsp;#ifdef CMSIS&lt;BR /&gt;&amp;nbsp;__wfi();&lt;BR /&gt;&amp;nbsp;#else&lt;BR /&gt;&amp;nbsp;/* WFI instruction will start entry into STOP mode */&lt;BR /&gt;&amp;nbsp;asm("WFI");&lt;BR /&gt;&amp;nbsp;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are multiple issues that I observed with both STOP and VLPS modes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. The current is regular RUN mode is around 40mA at 3V, which is what the datasheet specifies. After I execute the &amp;nbsp;&amp;nbsp;&amp;nbsp;sleep instruction it decreases to around 25 mA, which is way to big. According to datasheet it should be around &amp;nbsp;&amp;nbsp;&amp;nbsp;0.5mA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. The system does not wake up, when I send any command through UART. It looks like it is not responding at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. The sleep function does not work in debug mode. It looks like the instructions are executed but it does not go &amp;nbsp;&amp;nbsp;&amp;nbsp;into&amp;nbsp;any sleep modes. (I'm using Keil development studio).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or suggestions is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2017 17:10:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663443#M40758</guid>
      <dc:creator>jakubpankau</dc:creator>
      <dc:date>2017-01-05T17:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Deep Sleep and VLPS on MK64FN1M0VLL12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663444#M40759</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;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2019" data-containertype="14" data-objectid="327741" data-objecttype="1" href="https://community.nxp.com/thread/327741#421247"&gt;https://community.nxp.com/message/421247#421247&lt;/A&gt;&lt;BR /&gt;This gives some expected figure and you can test on HW using the binaries at&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-K64F.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K64F.html&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K64F120M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K64F120M.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the low power interface as used by the uTasker project which includes a complete (integrated) low power solution supporting all modes and automatic dynamic switching between whatever mode you want to use (eg. VLPS with almost unrestricted UART operation on all 6 UARTs) so that you don't need to actively command anything (it will simply sleep whenever there is nothing pending).&lt;BR /&gt;The solution has been proven during over two years of real product operation (also K64 based, but is compatible with all K, KL, etc. designs) with very low power requirements in a POS type environment requiring also immediate UART response (eg. bar code readers) and so is reliable and mature (not simply example code that needs further development and bug fixing to become useful).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All code is Keil compatible (as well as CW, KDS, IAR, Green Hills, etc.) and the complete framework contains a Keil project. &lt;EM&gt;Note however that not all low leakage modes can be fully tested with the debugger since the JTAG/SWD interface will also be deactivated.&lt;/EM&gt;&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>Thu, 05 Jan 2017 21:53:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663444#M40759</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-01-05T21:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Deep Sleep and VLPS on MK64FN1M0VLL12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663445#M40760</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;NXP provides KSDK software for K64 product, which includes low power demo located at below default location:&lt;/P&gt;&lt;P&gt;..\SDK_2.0_FRDM-K64F\boards\frdmk64f\demo_apps\power_manager&lt;/P&gt;&lt;P&gt;The KSDK software could be build and downloaded from &lt;A href="https://mcuxpresso.nxp.com/en/welcome"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And customer also could download bare-metal K64 example code from &lt;A href="http://www.nxp.com/products/sensors/accelerometers/3-axis-accelerometers/kinetis-k64-mcu-tower-system-module:TWR-K64F120M?tab=Design_Tools_Tab"&gt;here&lt;/A&gt;, which also provides a low power demo.&lt;/P&gt;&lt;P&gt;KINETIS_K64_SC(REV 1.3)&lt;BR /&gt;Bare metal sample code for Kinetis K64 120 Mhz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The UART module could wake up the core from STOP and VLPS mode with interrupt enabled. Please check if the related UART module interrupt enabled or not.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&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>Fri, 06 Jan 2017 02:54:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663445#M40760</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2017-01-06T02:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Deep Sleep and VLPS on MK64FN1M0VLL12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663446#M40761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys, will try some of your suggestions and let you know if it works. Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2017 13:59:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Deep-Sleep-and-VLPS-on-MK64FN1M0VLL12/m-p/663446#M40761</guid>
      <dc:creator>jakubpankau</dc:creator>
      <dc:date>2017-01-06T13:59:58Z</dc:date>
    </item>
  </channel>
</rss>

