<?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 Re: Stop Mode K27F (FRDM K28 power_mode_switch example) in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778292#M47351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eldar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The external debugger connection will affect the Kinetis chip enter into a &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;pseudo low power mode&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Please check &lt;A _jive_internal="true" href="https://community.nxp.com/thread/309567"&gt;here&lt;/A&gt; for more detailed info.&lt;/P&gt;&lt;P&gt;The &lt;A href="http://cache.freescale.com/files/32bit/doc/app_note/AN4503.pdf"&gt;AN4503&lt;/A&gt; shows some tips about making low-power measurements on the bench:&lt;/P&gt;&lt;P&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/62455iA018649CE339E6D8/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&gt;In general, when we check if the chip enter into very low power mode, we will measure the chip current match with datasheet spec and disconnect external debugger at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the attention.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&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>Tue, 26 Jun 2018 01:07:59 GMT</pubDate>
    <dc:creator>Hui_Ma</dc:creator>
    <dc:date>2018-06-26T01:07:59Z</dc:date>
    <item>
      <title>Stop Mode K27F (FRDM K28 power_mode_switch example)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778287#M47346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am using MCUXpresso 10.2 and SDK 2.3.1, FreeRTOS and tickless Idle. I am developing an application where I need to use the low power modes of Kinetis K27F. The processor will be idle for about 200 ms, then run maybe a couple of milliseconds and then back to sleep again. Using the FreeRTOS hooks&amp;nbsp;configPRE_SLEEP_PROCESSING /&amp;nbsp;configPOST_SLEEP_PROCESSING I have tested first with normal stop mode (deepsleep). I use LPTMR0 for tickless and LPTMR1 as wakeup timer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when waking up from deepsleep, I discovered that "STOPA" bit is always set (also before enter WFI) :&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;/* read back to make sure the configuration valid before enter stop mode */&lt;BR /&gt; (void)base-&amp;gt;PMCTRL;&lt;BR /&gt; __DSB();&lt;BR /&gt; __WFI();&lt;BR /&gt; __ISB();&lt;/P&gt;&lt;P&gt;/* check whether the power mode enter Stop mode succeed */&lt;/P&gt;&lt;P&gt;if (base-&amp;gt;PMCTRL &amp;amp; SMC_PMCTRL_STOPA_MASK)&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return kStatus_SMC_StopAbort;&amp;nbsp; // always return here&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Then I tested using the "FRDM-K28 power_mode_switch" example which by the way does not work out-of-the box either (LPTMR0_IRQHandler is for some reason called constantly once enabled by NVIC...?).&amp;nbsp; Is it a known problem?&lt;/P&gt;&lt;P&gt;Commenting out "NVIC_EnableIRQ(LPTMR0_IRQn);" I tested "C - Stop Mode" using&amp;nbsp;switch SW3 as wake-up, but same thing happens as in my application, STOPA is always 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a bit confusing since K27 doc says :&lt;/P&gt;&lt;P&gt;3&lt;BR /&gt;STOPA&lt;BR /&gt;Stop Aborted&lt;BR /&gt;When set, this read-only status bit indicates an interrupt occured during the previous stop mode entry&lt;BR /&gt;sequence, preventing the system from entering that mode. This field is cleared by reset or by hardware at&lt;BR /&gt;the beginning of any stop mode entry sequence and is set if the sequence was aborted.&lt;BR /&gt;0 The previous stop mode entry was successful.&lt;BR /&gt;1 The previous stop mode entry was aborted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, that means it did not go to deepsleep?&amp;nbsp; Does debugger attached change something ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 08:29:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778287#M47346</guid>
      <dc:creator>eldarfiring</dc:creator>
      <dc:date>2018-06-13T08:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Stop Mode K27F (FRDM K28 power_mode_switch example)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778288#M47347</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;You couldn't run the power_mode_switch example with FRDM-K28F board, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 08:17:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778288#M47347</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-06-15T08:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Stop Mode K27F (FRDM K28 power_mode_switch example)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778289#M47348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Correct, I had to disable&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;LPTMR0_IRQn in order to make it run (and use the switch option only). I tried this on both our own hardware and FRDM-K28. Running &lt;SPAN&gt;power_mode_switch example u&lt;/SPAN&gt;sing SW3 on FRDM-28,&amp;nbsp; the STOPA bit is always set when exiting deepsleep/stop mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best Regards,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Eldar&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 08:25:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778289#M47348</guid>
      <dc:creator>eldarfiring</dc:creator>
      <dc:date>2018-06-15T08:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Stop Mode K27F (FRDM K28 power_mode_switch example)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778290#M47349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eldar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the later reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't regenerate your mentioned issue with FRDM-K28F board with MCUXpresso SDK [power_mode_switch] demo.&lt;/P&gt;&lt;P&gt;I use below code to print the SMC_PMCTRL register value when wake up from VLPS or VLLS3 mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t reg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; reg = SMC-&amp;gt;PMCTRL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; PRINTF("SMC_PMCTRL = 0x%x\r\n", reg);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got below value when wake up from VLLS3 using SW3 button:&lt;/P&gt;&lt;P&gt;SMC_PMCTRL = 0x4&lt;/P&gt;&lt;P&gt;I got below value when wake up from VLPS using SW3 button:&lt;/P&gt;&lt;P&gt;SMC_PMCTRL = 0x2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I using the on board OpenSDA as debugger tool and run the code outside of debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&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, 25 Jun 2018 05:37:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778290#M47349</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-06-25T05:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Stop Mode K27F (FRDM K28 power_mode_switch example)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778291#M47350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks a lot for investigating!&amp;nbsp; I'm using Segger J-link probe directly attached to the K27F/K28F through the Cortex connector (I have modified FRDM-K28 in order to do this). When running the application from the debugger, the STOPA bit is always set when exiting stop mode.&amp;nbsp; When I removed the j-link probe / debugger it works as expected. So I guess the debugger attached prevents it from going into deepsleep/stop mode. I verified this using some printf's as you did. Thanks again for you help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Eldar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 08:29:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778291#M47350</guid>
      <dc:creator>eldarfiring</dc:creator>
      <dc:date>2018-06-25T08:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Stop Mode K27F (FRDM K28 power_mode_switch example)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778292#M47351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eldar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The external debugger connection will affect the Kinetis chip enter into a &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;pseudo low power mode&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Please check &lt;A _jive_internal="true" href="https://community.nxp.com/thread/309567"&gt;here&lt;/A&gt; for more detailed info.&lt;/P&gt;&lt;P&gt;The &lt;A href="http://cache.freescale.com/files/32bit/doc/app_note/AN4503.pdf"&gt;AN4503&lt;/A&gt; shows some tips about making low-power measurements on the bench:&lt;/P&gt;&lt;P&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/62455iA018649CE339E6D8/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&gt;In general, when we check if the chip enter into very low power mode, we will measure the chip current match with datasheet spec and disconnect external debugger at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the attention.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&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>Tue, 26 Jun 2018 01:07:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Stop-Mode-K27F-FRDM-K28-power-mode-switch-example/m-p/778292#M47351</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-06-26T01:07:59Z</dc:date>
    </item>
  </channel>
</rss>

