<?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>S32K中的主题 Re: Comparing WFI-only vs VLSR transition approaches</title>
    <link>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086983#M48146</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I’d like to ask if there is any RTD support for transitioning between RUN mode and STANDBY mode.&lt;BR /&gt;&lt;BR /&gt;If such support exists, would it be possible to receive an example project or configuration demonstrating how to properly implement this transition using PIT?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance for your help!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Apr 2025 02:41:53 GMT</pubDate>
    <dc:creator>malove</dc:creator>
    <dc:date>2025-04-25T02:41:53Z</dc:date>
    <item>
      <title>Comparing WFI-only vs VLSR transition approaches</title>
      <link>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086455#M48111</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I'm working on a power-optimized bare-metal application using the &lt;STRONG&gt;S32K311&lt;/STRONG&gt;.&lt;BR /&gt;Our system runs a periodic task every &lt;STRONG&gt;10ms&lt;/STRONG&gt;, and remains idle the rest of the time.&lt;/P&gt;&lt;P class=""&gt;Currently, I'm evaluating &lt;STRONG&gt;two different strategies&lt;/STRONG&gt; for reducing power consumption during idle periods:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Option 1 – WFI only:&lt;/STRONG&gt;&lt;BR /&gt;Let the MCU stay in &lt;STRONG&gt;RUN mode&lt;/STRONG&gt;, and simply use __WFI() at the end of the main loop when there's nothing to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="c"&gt;while (1) {
  if (task_ready) {
    DoSomething();
  }

  __WFI(); // Sleep during idle
}​&lt;/LI-CODE&gt;&lt;P class=""&gt;This approach keeps the PLL and high-speed clocks active, but gates the CPU core during idle time.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Option 2 – Dynamic VLSR/Run mode switching:&lt;/STRONG&gt;&lt;BR /&gt;Switch the MCU to &lt;STRONG&gt;VLSR mode&lt;/STRONG&gt; (FIRC 3MHz) when idle, and back to &lt;STRONG&gt;RUN mode&lt;/STRONG&gt; (PLL) when a task is ready:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;while (1) {
  if (task_ready) {
    ChangeToRunMode();
    DoSomething();
  } else {
    ChangeToVLSRMode();
  }
}&lt;/LI-CODE&gt;&lt;P class=""&gt;This reduces the clock domain frequency during idle, but introduces frequent MC_ME and clock domain switching.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;My question:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Is it &lt;STRONG&gt;practical and safe&lt;/STRONG&gt; to switch between RUN and VLSR mode &lt;STRONG&gt;every few milliseconds&lt;/STRONG&gt;?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Could the overhead of &lt;STRONG&gt;frequent mode transitions&lt;/STRONG&gt; outweigh the power saving benefit?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Would NXP recommend one approach over the other for 10ms-periodic task scheduling?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;My primary goal is to achieve maximum power saving without causing system instability or excessive latency.&lt;/P&gt;&lt;P class=""&gt;I would really appreciate your technical opinion on this.&lt;/P&gt;&lt;P class=""&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 09:09:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086455#M48111</guid>
      <dc:creator>malove</dc:creator>
      <dc:date>2025-04-24T09:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing WFI-only vs VLSR transition approaches</title>
      <link>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086891#M48140</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/241168"&gt;@malove&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I can see you've also posted about a similar issue in this post:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/Inquiry-about-WFI-PIT-Scheduler-Use-in-Bare-metal-on-S32K311/td-p/2086138" target="_blank" rel="noopener"&gt;Inquiry about WFI + PIT Scheduler Use in Bare-metal on S32K311 - NXP Community&lt;/A&gt;. If this answer applies to that post as well, please let me know so I can close it instead.&lt;/P&gt;
&lt;P&gt;Actually, Option 2 is a recommended implementation if you need to cyclically monitor anything while trying to save power consumption. You can see in the S32K3xx Data Sheet, in chapter 6.9 (Cyclic wake-up current), a cyclic wake-up current example is presented.&lt;/P&gt;
&lt;P&gt;It shows data for&amp;nbsp;an application that periodically (every 40ms) alternates between RUN mode, for approximately 200μs to scan several GPIO inputs (51 GPIOS), and spends the rest of the time in STANDBY mode.&lt;/P&gt;
&lt;P&gt;There are some recommendations in the&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Low-Power-Management-AN-and-demos/ta-p/1527724" target="_blank" rel="noopener"&gt;S32K3 Low Power Management AN and demos&lt;/A&gt;&amp;nbsp;document.&amp;nbsp;One common issue for high current consumption is frequency of wake-up events is too high, which means that the MCU spends more time in Run or VLSR mode than in a low-power mode. The transition time from low-power mode to Run mode is quick. If the MCU only spends 9 ms in run and 1 ms in a low-power mode, the average current of the system will be considerably higher than if the MCU was running only 1 ms every 1 second.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P class=""&gt;&lt;STRONG&gt;Is it&amp;nbsp;practical and safe&amp;nbsp;to switch between RUN and VLSR mode&amp;nbsp;every few milliseconds?&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Yes.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P class=""&gt;&lt;STRONG&gt;Could the overhead of&amp;nbsp;frequent mode transitions&amp;nbsp;outweigh the power saving benefit?&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This is application dependent.&amp;nbsp;As current consumption depends on various factors such as which modules are enabled, what frequency is feeding Core and other peripherals, temperature conditions, and so on. You can use the &lt;A href="https://www.nxp.com/design/design-center/software/automotive-software-and-tools/s32k-power-estimation-tool-pet:S32K-PET" target="_self"&gt;Power Estimation Tool (PET)&lt;/A&gt;. Keep in mind&amp;nbsp;the data provided in the tool are estimations only based on ideal conditions and should be used as reference.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P class=""&gt;&lt;STRONG&gt;Would NXP recommend one approach over the other for 10ms-periodic task scheduling?&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Not really. You should measure consumption in both cases and evaluate which one is more beneficial for your specific application.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 21:20:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086891#M48140</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2025-04-24T21:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing WFI-only vs VLSR transition approaches</title>
      <link>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086932#M48144</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/200831"&gt;@Julián_AragónM&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Sorry for posting a duplicate thread. I must have accidentally submitted it twice.&lt;BR /&gt;Please feel free to remove the previous one.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thank you as always for your kind and helpful respo&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 23:09:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086932#M48144</guid>
      <dc:creator>malove</dc:creator>
      <dc:date>2025-04-24T23:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing WFI-only vs VLSR transition approaches</title>
      <link>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086983#M48146</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I’d like to ask if there is any RTD support for transitioning between RUN mode and STANDBY mode.&lt;BR /&gt;&lt;BR /&gt;If such support exists, would it be possible to receive an example project or configuration demonstrating how to properly implement this transition using PIT?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 02:41:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2086983#M48146</guid>
      <dc:creator>malove</dc:creator>
      <dc:date>2025-04-25T02:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing WFI-only vs VLSR transition approaches</title>
      <link>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2087409#M48174</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/241168"&gt;@malove&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can look into the previous thread I shared, which shows various examples with RTD in low-level and high-level drivers. There is also the updated thread for RTD 4.0.0 &amp;amp; 5.0.0, since the original post is based in S32DS v3.4 + RTD 2.0.0.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Low-Power-Management-AN-and-demos/ta-p/1527724" target="_blank"&gt;S32K3 Low Power Management AN and demos - NXP Community&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Low-Power-Management-AN-and-demos-RTD-4-0-0-amp-5-0-0/ta-p/1993152" target="_blank"&gt;S32K3 Low Power Management AN and demos RTD 4.0.0 &amp;amp; 5.0.0 - NXP Community&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Specifically, you can look at the RTI_Cycl_Wkup example, which shows t&lt;SPAN&gt;he usage of Normal and Fast cycle wake up by RTI Timeout, and you can&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;change the standby time by changing the value of PIT_RTI_TIME in Wkup.h header.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Julián&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 15:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Comparing-WFI-only-vs-VLSR-transition-approaches/m-p/2087409#M48174</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2025-04-25T15:53:35Z</dc:date>
    </item>
  </channel>
</rss>

