<?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 MCU sleep mode in S32K</title>
    <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028396#M6429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm developing a baremetal application and I'm thinking to put the mcu in sleep mode when idle using the WFI instruction.&lt;/P&gt;&lt;P&gt;As far as I understand, when calling WFI with mcu in RUN mode and DEEPSLEEP register set to 0, the mcu just goes to sleep (no STOP1 or STOP2 mode involved), is it correct?&lt;/P&gt;&lt;P&gt;I'm trying to figure out what's the behaviour of other peripherals when the mcu is in sleep: is there any operation that needs to be terminated before going to sleep?&lt;/P&gt;&lt;P&gt;For example, is it safe to call a WFI when there is an eeeprom write running at the same time?&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2020 10:01:42 GMT</pubDate>
    <dc:creator>riccardolalli</dc:creator>
    <dc:date>2020-01-17T10:01:42Z</dc:date>
    <item>
      <title>MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028396#M6429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm developing a baremetal application and I'm thinking to put the mcu in sleep mode when idle using the WFI instruction.&lt;/P&gt;&lt;P&gt;As far as I understand, when calling WFI with mcu in RUN mode and DEEPSLEEP register set to 0, the mcu just goes to sleep (no STOP1 or STOP2 mode involved), is it correct?&lt;/P&gt;&lt;P&gt;I'm trying to figure out what's the behaviour of other peripherals when the mcu is in sleep: is there any operation that needs to be terminated before going to sleep?&lt;/P&gt;&lt;P&gt;For example, is it safe to call a WFI when there is an eeeprom write running at the same time?&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:01:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028396#M6429</guid>
      <dc:creator>riccardolalli</dc:creator>
      <dc:date>2020-01-17T10:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028397#M6430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Riccardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At first, I would like to mention a few points from RM rev. 11.&lt;/P&gt;&lt;P&gt;Also, please, look at the section 38.8 Module operation in available power modes,&amp;nbsp;39.2 Modes of operation and&amp;nbsp;Table 39-1. Power modes&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Deep Sleep is mapped to STOP/VLPS.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;39.4.2.1 VLPS/Stop mode entry sequence&lt;BR /&gt;Entry into a low-power stop mode (Stop, VLPS) is initiated by a CPU executing the WFI&lt;BR /&gt;instruction. After the instruction is executed, the following sequence occurs:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;27.4.4 VLPR/VLPS mode entry&lt;/P&gt;&lt;P&gt;When entering VLPR/VLPS mode, the system clock should be SIRC. The FIRC, SOSC,&lt;/P&gt;&lt;P&gt;and SPLL must be disabled by software in RUN mode before making any mode&lt;/P&gt;&lt;P&gt;transition. Ensure that CMU is gated by its PCC.CGC before entering STOP/VLPS/CPO&lt;/P&gt;&lt;P&gt;mode.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;PMC_REGSC[BIASEN] must be set to 1 when using VLP* modes.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2020 08:29:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028397#M6430</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-01-21T08:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028398#M6431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, thanks for the answer.&lt;/P&gt;&lt;P&gt;I read the paragraphs, but I'm still not sure what to do.&lt;/P&gt;&lt;P&gt;Let me explain what i would like to do in my application. I want to measure the time the CPU remains idle, so my idea was to put the CPU (only the core, every other peripheral shall remain running) in sleep when there is nothing to do and be ready to resume as soon as an interrupt fires. In this way I could read the value of a timer (LPIT or FlexTimer) just before the wfi instruction and immediately after to get an estimate of the idle time. I'm not interested in any powersaving feature.&lt;/P&gt;&lt;P&gt;From what i read in the ARM documentation I should use the ARM sleep mode, but in the S32K reference manual there is no information about that. On the contrary it describes the STOP2 mode which also seems to be a good candidate for the job (core clock stopped, but almost everything else enabled).&lt;/P&gt;&lt;P&gt;What would be the best option for my pourposes?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 11:40:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028398#M6431</guid>
      <dc:creator>riccardolalli</dc:creator>
      <dc:date>2020-02-06T11:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028399#M6432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your purpose, the best option is, as you said, STOP2 because the bus clock remains active, but&amp;nbsp;FTM (FlexTimer module) is OFF in the STOP modes.&lt;/P&gt;&lt;P&gt;The LPIT has full functionality in the STOP2, so, you can use it.&amp;nbsp;However, the timers have&amp;nbsp;some disadvantages.&lt;/P&gt;&lt;P&gt;The LPIT you can read only in the interrupt. The LPTM is only 16-bit and RTC is&amp;nbsp;accurate when you have an external clock.&lt;/P&gt;&lt;P&gt;So, it depends on your application.&lt;/P&gt;&lt;P&gt;Also, I would like to recommend you to look at&amp;nbsp;&lt;STRONG&gt;Table 38-4. Module operation in available power modes&lt;/STRONG&gt; to see each module functionality in this mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you can look at AN5425. There the&amp;nbsp;STOP mode entry sequence can be seen.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/application-note/AN5425.pdf" title="https://www.nxp.com/docs/en/application-note/AN5425.pdf"&gt;https://www.nxp.com/docs/en/application-note/AN5425.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AN5425SW&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/webapp/Download?colCode=AN5425SW&amp;amp;docLang=en" title="https://www.nxp.com/webapp/Download?colCode=AN5425SW&amp;amp;docLang=en"&gt;https://www.nxp.com/webapp/Download?colCode=AN5425SW&amp;amp;docLang=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2020 08:46:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028399#M6432</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-02-11T08:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028400#M6433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Thanks for the answer.&lt;/P&gt;&lt;P&gt;No, sorry,&amp;nbsp; I noticed that the FTM is required in my application and can't be stopped, so STOP2 is not applicable.&lt;/P&gt;&lt;P&gt;However from the application note AN5425, I understand that ARM Sleep mode is indeed available on the S32K (paragraph 2.1), but the document does not say what are the effects on other peripherals. Are they affected if I put the Core in Sleep?&lt;/P&gt;&lt;P&gt;I would like a clarification on that, please.&lt;/P&gt;&lt;P&gt;Thanks for the support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2020 10:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028400#M6433</guid>
      <dc:creator>riccardolalli</dc:creator>
      <dc:date>2020-02-12T10:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028401#M6434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Riccardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sleep mode which you are looking for is called "Wait mode" in the RM.&lt;/P&gt;&lt;P&gt;"Wait mode is not supported in this device. See &lt;EM&gt;Table 38-4. Module operation in available power modes&lt;/EM&gt; for&lt;BR /&gt;details on available power modes."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the S32K1xx device does not support WAIT, VLPW and low&lt;BR /&gt;leakage modes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 08:39:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028401#M6434</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-02-13T08:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028402#M6435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Diana,&lt;/P&gt;&lt;P&gt;If so then application note is incorrect, see paragraph 2.1&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/97706i1BE661203E5D752C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;The reference manual too say something about it&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/97915iAE016FAE52084FA5/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;even if it doesn't explain much more. I think the reference manual is not very clear about this.&lt;/P&gt;&lt;P&gt;Also where in the manual can I find a definition of Wait mode and its association with ARM sleep?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 10:02:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028402#M6435</guid>
      <dc:creator>riccardolalli</dc:creator>
      <dc:date>2020-02-13T10:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028403#M6436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Riccardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It isn't very clear as you said. I will report to the apps team that "sleep mode" should be clearly described in the RM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can&amp;nbsp;see the translation between ARM CPU mode and MCU power modes in section &lt;STRONG&gt;39.2 Modes of operation.&lt;/STRONG&gt;&amp;nbsp;So,&amp;nbsp;sleep mode is not there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98695iEB6DE96E4FF807A8/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also, the filed which represent sleep/wait power mode on the S32K1xx is empty in the AN5425 in Figure 1. Power modes comparison.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/99072i92EF927D08629ADD/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 12:52:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028403#M6436</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-02-13T12:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: MCU sleep mode</title>
      <link>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028404#M6437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Diana,&lt;/P&gt;&lt;P&gt;thanks very much for the answer.&lt;/P&gt;&lt;P&gt;I hoped for an easier way to do what I had in mind. I need to figure out how to make the STOP 2 work in my case then.&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Riccardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 13:29:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/MCU-sleep-mode/m-p/1028404#M6437</guid>
      <dc:creator>riccardolalli</dc:creator>
      <dc:date>2020-02-13T13:29:38Z</dc:date>
    </item>
  </channel>
</rss>

