<?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>Kinetis MicrocontrollersのトピックRe: K64F how to enter VLPS stop mode</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64F-how-to-enter-VLPS-stop-mode/m-p/726367#M44422</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;Yes, I have now found that the problem is again due to the, seemingly horrendous, mbed environment that I'm using. By reading PMCTRL after reset the STOPA bit was always high which probably means that there is still some interrupt doing its thing and preventing stop mode, although I have called disable_irq.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm used to work with Eclipse and STM32 standard libraries, so as a pleasant surprise I found the NXP Kinetis SDK wizard plug-in for Eclipse and all the peripheral drivers, which seem to be very similar to the STM32 system. Installation was quick and I got VLPS working in under 10 minutes! Remarkably, code size for a basic blinky program is about 4kb done with the Kinetis SDK and about 25kb with the mbed SDK.&amp;nbsp;Ridiculous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the links. I'll have to look at uTasker too, seems useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Dec 2017 11:37:58 GMT</pubDate>
    <dc:creator>paulinikula</dc:creator>
    <dc:date>2017-12-16T11:37:58Z</dc:date>
    <item>
      <title>K64F how to enter VLPS stop mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64F-how-to-enter-VLPS-stop-mode/m-p/726365#M44420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been struggling to get my FRDM K64F board to enter VLPS mode. Here's my code to enter stop mode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="font-size: 13px;"&gt;disable_irq(); // Disable Interrupts&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 13px;"&gt;SMC -&amp;gt;PMPROT |= 0x20; //allow VLPS mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;SMC -&amp;gt;PMCTRL |= 0x02; //select VLPS mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;tmp = SMC -&amp;gt;PMCTRL; //dummy read&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;//clear watchdog STOPEN for giggles, maybe it's the culprit&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;WDOG -&amp;gt;UNLOCK = 0xC520;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; WDOG -&amp;gt;UNLOCK = 0xD928;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; WDOG -&amp;gt;STCTRLH &amp;amp;= ~0x0040;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;//WDGEN is already 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;SCB -&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;asm("NOP");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; asm("NOP");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; asm("NOP");&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;asm("WFI"); //sleep instruction&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN style="font-size: 15px;"&gt;Nothing happens and my test blinky keeps running.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Should I disable all peripherals first? Is it enough to disable the clock gates for the peripherals? Should the 48Mhz IRC clock be disabled? I think it is disabled at least in MCG_C7 and SIM_SOPT2. The USB RECOVER_IRC_EN register I could not check because my program would lock up when I try to read it(explanation for this would also be nice..:smileylaugh:). Should I change system clock source to the 4Mhz IRC first? I'm starting to go nuts with the reference manual. It does not clearly state any of these things.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 14:37:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64F-how-to-enter-VLPS-stop-mode/m-p/726365#M44420</guid>
      <dc:creator>paulinikula</dc:creator>
      <dc:date>2017-12-15T14:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: K64F how to enter VLPS stop mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64F-how-to-enter-VLPS-stop-mode/m-p/726366#M44421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pauli&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just get the free Open Source uTasker project from GIT hub as reference since it integrates proper low power mode without any effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, a typical first mistake is that you may find that your initialisation code is writing PMPROT to 0. This is a "write-once" register and so any additional writes that you attempt will be ignored - and then no low leakage modes will be accepted.&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;BR /&gt;Kinetis K64:&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&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;SPAN&gt;- &lt;/SPAN&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;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTEENSY_3.5.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TEENSY_3.5.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FHexiwear-K64F.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/Hexiwear-K64F.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Low power and LLWU: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FLLWU.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/LLWU.html&lt;/A&gt;&lt;BR /&gt;Low power videos:&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FkWNlsAoMly4" rel="nofollow" target="_blank"&gt;https://youtu.be/kWNlsAoMly4&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FiZEMRiDmHzw" rel="nofollow" target="_blank"&gt;https://youtu.be/iZEMRiDmHzw&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2Fv4UnfcDiaE4" rel="nofollow" target="_blank"&gt;https://youtu.be/v4UnfcDiaE4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Free Open Source solution: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FuTasker%2FuTasker-Kinetis" rel="nofollow" target="_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Working project in 15 minutes video: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FK8ScSgpgQ6M" rel="nofollow" target="_blank"&gt;https://youtu.be/K8ScSgpgQ6M&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Professional Kinetis support, one-on-one training and complete fast-track project solutions: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fsupport.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/support.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 00:55:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64F-how-to-enter-VLPS-stop-mode/m-p/726366#M44421</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-12-16T00:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: K64F how to enter VLPS stop mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64F-how-to-enter-VLPS-stop-mode/m-p/726367#M44422</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;Yes, I have now found that the problem is again due to the, seemingly horrendous, mbed environment that I'm using. By reading PMCTRL after reset the STOPA bit was always high which probably means that there is still some interrupt doing its thing and preventing stop mode, although I have called disable_irq.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm used to work with Eclipse and STM32 standard libraries, so as a pleasant surprise I found the NXP Kinetis SDK wizard plug-in for Eclipse and all the peripheral drivers, which seem to be very similar to the STM32 system. Installation was quick and I got VLPS working in under 10 minutes! Remarkably, code size for a basic blinky program is about 4kb done with the Kinetis SDK and about 25kb with the mbed SDK.&amp;nbsp;Ridiculous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the links. I'll have to look at uTasker too, seems useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 11:37:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64F-how-to-enter-VLPS-stop-mode/m-p/726367#M44422</guid>
      <dc:creator>paulinikula</dc:creator>
      <dc:date>2017-12-16T11:37:58Z</dc:date>
    </item>
  </channel>
</rss>

