<?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: RW612 - PM4 deep sleep intermittently draws high current in Wi-Fi® + Bluetooth® + 802.15.4</title>
    <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2056498#M3745</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you are doing well. What SDK version are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you seen this behavior with the SDK example without modifications?&lt;/P&gt;
&lt;P&gt;Can we reproduce this behavior with the SDK example? What changes need to be done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to see this behavior in our FRDM?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2025 18:42:45 GMT</pubDate>
    <dc:creator>Ricardo_Zamora</dc:creator>
    <dc:date>2025-03-05T18:42:45Z</dc:date>
    <item>
      <title>RW612 - PM4 deep sleep intermittently draws high current</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2056368#M3744</link>
      <description>&lt;P&gt;We are encountering an issue where one of our products, based on an RW612 in a u-blox IRIS-W10 module, is ostensibly entering deep sleep but in reality is drawing ~60 mA and rapidly draining the battery.&lt;/P&gt;&lt;P&gt;Here is our function that is entering deep sleep:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;void PowerManager::EnterPowerDown(uint32_t duration_secs) {
  auto &amp;amp;board = Board::GetInstance();
  debug_.Info(kTopicGeneral, "sleeping for %lu secs (max)", duration_secs);
  os_self_sleep_ms(500u);
  auto sleep_ticks = SecsToRtcTicks(duration_secs);
  PM_SetConstraints(kLowPowerMode, APP_PM_CONSTRAINTS);
  auto base_priority = os_enter_critical_from_isr();
  board.InitPins();
  PM_EnablePowerManager(true);
  PM_EnterLowPower(sleep_ticks);
  /* Should never get here, PM4 Deep Sleep requires a cold boot. */
  PM_EnablePowerManager(false);
  os_exit_critical_from_isr(base_priority);
  PM_ReleaseConstraints(kLowPowerMode, APP_PM_CONSTRAINTS);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;&lt;EM&gt;&lt;STRONG&gt;kLowPowerMode&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; is defined as&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;PM_LP_STATE_PM4&lt;/STRONG&gt;&lt;/FONT&gt;, and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;APP_PM_CONSTRAINTS&lt;/STRONG&gt;&lt;/FONT&gt; is 0.&amp;nbsp; We select our power mode and constraints, enter a critical section, put our GPIO into a known state, enable the Power Management driver, and invoke low power mode.&amp;nbsp; Our board does wake up when a wake signal occurs on GPIO[24], or when one hour has elapsed, and it does immediately restart, as one would expect after entering PM4 Deep Sleep.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Most of the time the system draws &amp;lt;1 mA in this state.&amp;nbsp; But intermittently, it enters this state and draws ~60 mA for the duration of the sleep cycle, which is a maximum of one hour in our application.&amp;nbsp; Needless to say, this destroys our battery life between charges.&amp;nbsp; (The power should be going to &amp;lt;10 uA per the datasheet, but that's a topic for another day.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To avoid complications with starting and stopping the Wi-Fi driver, I've engineered the system such that when we want to go to sleep, I set a flag in NVRAM, reboot the system by calling &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;__NVIC_SystemReset()&lt;/FONT&gt;&lt;/STRONG&gt;, and then enter low-power mode, while leaving the Wi-Fi subsystem untouched.&amp;nbsp; When we wake from sleep, we reboot (because we're coming out of PM4), start Wi-Fi, and upload telemetry to the cloud.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Your "power_manager_test" SDK example was written for baremetal; are there additional precautions that one must take when running FreeRTOS to ensure that entering PM4 will genuinely yield a low-power state?&amp;nbsp; What other conditions could cause a false PM4 state?&lt;/P&gt;&lt;P&gt;Dana M.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 15:01:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2056368#M3744</guid>
      <dc:creator>dmarks_ls</dc:creator>
      <dc:date>2025-03-05T15:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: RW612 - PM4 deep sleep intermittently draws high current</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2056498#M3745</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope you are doing well. What SDK version are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you seen this behavior with the SDK example without modifications?&lt;/P&gt;
&lt;P&gt;Can we reproduce this behavior with the SDK example? What changes need to be done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to see this behavior in our FRDM?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 18:42:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2056498#M3745</guid>
      <dc:creator>Ricardo_Zamora</dc:creator>
      <dc:date>2025-03-05T18:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: RW612 - PM4 deep sleep intermittently draws high current</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2057305#M3747</link>
      <description>&lt;P&gt;&lt;EM&gt;What SDK version are you using?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I generated our project using SDK v2.16.1.&amp;nbsp; I have SDK 24.12 (2025-01-15) pulled down but I have not yet attempted to apply it to this project, given how MCUXpresso likes to render projects unusable when adding or upgrading components.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Are you seen this behavior with the SDK example without modifications?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In the very limited testing we did with the SDK example, no, it did not occur.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can we reproduce this behavior with the SDK example?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Likely not.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;What changes need to be done?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Add FreeRTOS, Wi-Fi driver, lwIP networking, and an AWS client stack to the example.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Are you able to see this behavior in our FRDM?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;It would take considerable effort to rig up a FRDM board to work the same as our custom board, but it could be done.&lt;/P&gt;&lt;P&gt;Dana M.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 19:18:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2057305#M3747</guid>
      <dc:creator>dmarks_ls</dc:creator>
      <dc:date>2025-03-06T19:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: RW612 - PM4 deep sleep intermittently draws high current</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2064822#M3777</link>
      <description>&lt;P&gt;I believe I’ve found the issue.&amp;nbsp; Our system performs a reboot immediately prior to engaging low-power mode.&amp;nbsp; This removes the requirement to implement a graceful shutdown of the Wi-Fi + TCP/IP stack prior to power-down.&amp;nbsp; (My initial attempts at shutting down the Wi-Fi stack through the Wi-Fi API were unreliable, so I switched to the reboot approach.)&amp;nbsp; We use a flag in NVRAM to signal the system not to bring up Wi-Fi but instead immediately configure the wakeup pin for the correct polarity and go into power-down.&amp;nbsp; Our board pulls ~1 mA in deep sleep.&lt;/P&gt;&lt;P&gt;I believe the cause of our excessive current draw is that sometimes when we would reset the main CPU (Cortex-M33), the Wi-Fi CPU/radio would be left in an active state, pulling ~56 mA.&amp;nbsp; Since our sleep/check-in interval is 1 hour, that’s 56 mAh of draw from the battery.&amp;nbsp; I &lt;A href="https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-Canonical-way-to-reset-MCU/m-p/2059765" target="_blank" rel="noopener"&gt;asked NXP specifically about how the CPUs and radios are reset&lt;/A&gt;, and that seemed to confirm that &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;__NVIC_SystemReset()&lt;/FONT&gt;&lt;/STRONG&gt; only resets the Cortex-M33, leaving the other processors alone.&amp;nbsp; This morning, I put two lines of code into our board startup function:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;/* Ensure that the radios are powered off at startup.  Thus, if we go
 * directly into power-down, this should eliminate the possibility that
 * the radios are still powered and thus pulling current. */
POWER_PowerOffWlan();
POWER_PowerOffBle();&lt;/LI-CODE&gt;&lt;P&gt;I rebuilt the application and then ran it for ~40 minutes, using an LED flashlight to wake up the board every time it went to sleep.&amp;nbsp; I woke the unit up likely about 50 times during the test, and 50/50 it went into low power, i.e. it did not draw excessive current.&amp;nbsp; Previously, it would take me only a few attempts to get the system into a high-current sleep state.&amp;nbsp; At this point, I consider the issue solved.&lt;/P&gt;&lt;P&gt;In summary… if the Wi-Fi and/or BLE stacks are initialized and running, and the system is reset or watchdogged, it is necessary to call &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;POWER_PowerOffWlan()&lt;/FONT&gt;&lt;/STRONG&gt; and/or &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;POWER_PowerOffBle()&lt;/FONT&gt;&lt;/STRONG&gt; at startup to ensure that the Wi-Fi and BLE CPUs/radios are powered off.&amp;nbsp; When starting Wi-Fi using the NXP stack, one of the first steps is powering down and then powering up the Wi-Fi processor, so explicitly powering down the radio at startup does not interfere with a later initialization of the Wi-Fi stack.&lt;/P&gt;&lt;P&gt;Dana M.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 16:09:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/RW612-PM4-deep-sleep-intermittently-draws-high-current/m-p/2064822#M3777</guid>
      <dc:creator>dmarks_ls</dc:creator>
      <dc:date>2025-03-19T16:09:32Z</dc:date>
    </item>
  </channel>
</rss>

