<?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 KW41Z Deep Sleep in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-Deep-Sleep/m-p/978344#M8168</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;Where can I find examples of how to implement deep sleep and how to achieve the less power consumption for the KW41Z microcontrollers running ZigBee protocol?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the ZigBee End Device generic and LTO sensor SDK examples but I can't get too much power saving with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2020 14:54:05 GMT</pubDate>
    <dc:creator>alejandrovelez</dc:creator>
    <dc:date>2020-01-07T14:54:05Z</dc:date>
    <item>
      <title>KW41Z Deep Sleep</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-Deep-Sleep/m-p/978344#M8168</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;Where can I find examples of how to implement deep sleep and how to achieve the less power consumption for the KW41Z microcontrollers running ZigBee protocol?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the ZigBee End Device generic and LTO sensor SDK examples but I can't get too much power saving with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2020 14:54:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-Deep-Sleep/m-p/978344#M8168</guid>
      <dc:creator>alejandrovelez</dc:creator>
      <dc:date>2020-01-07T14:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z Deep Sleep</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-Deep-Sleep/m-p/978345#M8169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alejandro, I hope you're doing well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's a document called Power Management for Kinetis MCUs explaining the different existing power modes in Kinetis&amp;nbsp; MCUs, as well as example code, transitions explanations, enabled modules in each power mode, along with other relevant information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The document can be found &lt;A href="https://www.nxp.com/docs/en/application-note/AN4503.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically, for ZigBee 3.0 Stack SDK examples and projects, some additional definitions must be changed to enable the use of low power and sleep modes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;To enable the use of Low Power modes on an application, the cPWR_UsePowerDownMode definition must be changed to 1 in the config.h header file, inside the source folder of the End Device ZigBee3.0 example project.&lt;/LI&gt;&lt;LI&gt;Additionally, the chosen deep sleep mode must be specified in the app_framework_config.h header file, using the cPWR_DeepSleepMode definition.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more information, could you please take a look at the ZigBee 3.0 Stack User Guide pdf included in the SDK package for the KW41Z?&lt;/P&gt;&lt;P&gt;It can be found in the following path:&lt;/P&gt;&lt;P&gt;&amp;lt;…\SDK_SDK_2.2.1_FRDM-KW41Z\docs\wireless\Zigbee\ZigBee 3.0 Stack User Guide.pdf&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you need more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2020 16:05:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-Deep-Sleep/m-p/978345#M8169</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2020-01-07T16:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: KW41Z Deep Sleep</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW41Z-Deep-Sleep/m-p/1181082#M10365</link>
      <description>&lt;P&gt;I just activated the Low power with the macros, but i think there is a problem in the firmware of the ZigBee End Device example. The first time before joining network it just works fine. It enters this section in app_end_device_node.c the&amp;nbsp;APP_cbTimerPoll method:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alejandrovelez_0-1605053416614.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129615i062409123CC42988/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alejandrovelez_0-1605053416614.png" alt="alejandrovelez_0-1605053416614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cofigures mode 4 of deepsleep, and in the pwrm_shim.c file I can debug this section&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alejandrovelez_1-1605053491218.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129616i17014A8028018B5B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alejandrovelez_1-1605053491218.png" alt="alejandrovelez_1-1605053491218.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the method&amp;nbsp;PWR_CheckIfDeviceCanGoToSleep() returns TRUE so it can go to sleep.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But after node joins a network, it enters here&amp;nbsp;in app_end_device_node.c the&amp;nbsp;APP_cbTimerPoll method:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alejandrovelez_2-1605053727012.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/129617i042CE6C5318F5571/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alejandrovelez_2-1605053727012.png" alt="alejandrovelez_2-1605053727012.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And&amp;nbsp;vStopAllTimers(); should clear all timers that prevents enter low power mode, but there still is one timer that doesn't clear the global variable&amp;nbsp;&lt;U&gt;mLPMFlag that keeps value of 1,&lt;/U&gt; so, this method:&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;bool_t PWR_CheckIfDeviceCanGoToSleep(void)
{
    bool_t returnValue;
    
    OSA_InterruptDisable();
    returnValue = mLPMFlag == 0 ? TRUE : FALSE;
    OSA_InterruptEnable();
    
    return returnValue;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always returns false. So&amp;nbsp;in the pwrm_shim.c, the code after condition could never be executed to enter low power mode:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if(PWR_CheckIfDeviceCanGoToSleep() &amp;amp;&amp;amp; ((TRUE == s_bWakeTimerActive)||(3 != PWR_GetDeepSleepMode())))
    {
        PWRLib_WakeupReason_t wakeupReason;
        wakeupReason = PWR_EnterLowPower();
        ...
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 00:34:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW41Z-Deep-Sleep/m-p/1181082#M10365</guid>
      <dc:creator>alejandrovelez</dc:creator>
      <dc:date>2020-11-11T00:34:21Z</dc:date>
    </item>
  </channel>
</rss>

