<?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: S32K328 RTC FAIL AFTER WAKEUP in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2369794#M58791</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to share your project, or the .mex configuration file, so I can inspect the code on my side?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only reasons I can think of for the RTC not keeping the value are:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Reset reason is other than Wake-Up and value is not kept since reset is non-functional.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Even if reset reason is functional, it may not be wakeup, meaning the RTC is being re-initialized.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;You've mentioned that byte 7 shares reset reason, however I cannot see in the images which reset reason is being sent over CAN. &lt;SPAN&gt;MCU_WAKEUP_REASON is declared as 28 inside the Power_Ip_Specific.h, I imagine CAN must send a 28?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If you are using MCAL, make sure the option "GPT Standby Wakeup Support" is enabled:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/S32K324-RTC-value-not-preserved-after-sleep/m-p/1965805" target="_blank"&gt;S32K324 RTC value not preserved after sleep&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;One thing I can suggest is to do a register dump (through the "Watch Registers" view). This may help you spot any differences between projects. Simply export both S32K328 &amp;amp; S32K314 register values as files, and you can compare them through any program, for example WinMerge.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 May 2026 20:23:40 GMT</pubDate>
    <dc:creator>Julián_AragónM</dc:creator>
    <dc:date>2026-05-21T20:23:40Z</dc:date>
    <item>
      <title>S32K328 RTC FAIL AFTER WAKEUP</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2368275#M58725</link>
      <description>&lt;P&gt;Hello NXP Team,&lt;/P&gt;&lt;P&gt;I have previously developed RTC functionality on the S32K314, and after sleep wake-up it can continue counting time normally.&lt;/P&gt;&lt;P&gt;Now I am porting the project to the S32K328. However, while porting the RTC function, I encountered an issue:&lt;/P&gt;&lt;P&gt;After wake-up, the date (year/month/day) is reset to the default value 1970/1/1. In addition, the time (hours/minutes/seconds) does not preserve the originally configured value, but instead reflects only the elapsed time counted from the RTC start point.&lt;/P&gt;&lt;P&gt;For example, I initialize the RTC to 2026/05/08 05:06:07. After 1 minute of operation, when the MCU wakes up and I read back the RTC time, the date has reverted to 1970/01/01, and the time shows 00:01:00 instead of the expected 05:07:07.&lt;/P&gt;&lt;P&gt;This issue did not occur on the S32K314. What could be the possible causes of this problem?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RTC INIT.jpg" style="width: 439px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386156i9C1E667500C818A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="RTC INIT.jpg" alt="RTC INIT.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rtc_Ip_u32ChState.jpg" style="width: 733px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386157i60E84FC632C2C529/image-size/large?v=v2&amp;amp;px=999" role="button" title="Rtc_Ip_u32ChState.jpg" alt="Rtc_Ip_u32ChState.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 08:55:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2368275#M58725</guid>
      <dc:creator>Wade0905</dc:creator>
      <dc:date>2026-05-20T08:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: S32K328 RTC FAIL AFTER WAKEUP</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2368933#M58758</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/255424"&gt;@Wade0905&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Have you checked RTC clock source? Confirm if SIRC and "Enabled in Standby" options are selected:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_1-1779316332707.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386246i0C2756FA97DD99CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Julin_AragnM_1-1779316332707.png" alt="Julin_AragnM_1-1779316332707.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1779316326784.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386245i8B636E8903855665/image-size/large?v=v2&amp;amp;px=999" role="button" title="Julin_AragnM_0-1779316326784.png" alt="Julin_AragnM_0-1779316326784.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also, keep in mind that&amp;nbsp;&lt;SPAN&gt;RTC counter value will not be reset after wake-up, but it will reset by calling RTC initialization code in main.c. I can see you initialize RTC only after wake-up event. You can try reading reset reason to see if any other type of reset is being issued, and thus, clearing RTC value by mistake.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There is a community post you can refer to:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K312-RTC-Preserving-RTC-counter-value-from-getting-resets/ta-p/2028176" target="_blank"&gt;S32K312: RTC- Preserving RTC counter value from getting resets once after every wakeup&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please compare it to your configuration.&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>Wed, 20 May 2026 22:38:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2368933#M58758</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2026-05-20T22:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: S32K328 RTC FAIL AFTER WAKEUP</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2369234#M58767</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Julián,&lt;/P&gt;&lt;P&gt;Thanks for your reponse.&lt;/P&gt;&lt;P&gt;Regarding clock source, I select SXOSC which same as our project in S32K314. Please see below picture for you ref.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SXOSC_1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386327i0CA2E1843692CC5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="SXOSC_1.jpg" alt="SXOSC_1.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SXOSC_2.jpg" style="width: 340px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386328i3DBBC6CAE150C1B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="SXOSC_2.jpg" alt="SXOSC_2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regarding init, I only do rtc_app_init() when&amp;nbsp;WAKEUP_REASON &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;!=&lt;/STRONG&gt;&lt;/FONT&gt; MCU_WAKEUP_REASON&amp;nbsp;which same as our project in S32K314.&amp;nbsp;Please see below picture for you ref.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rtc_app_init.jpg" style="width: 447px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386329iB4A1ED53BE354921/image-size/large?v=v2&amp;amp;px=999" role="button" title="rtc_app_init.jpg" alt="rtc_app_init.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I believe the counter continues counting during sleep mode, but the date and time are reset.&lt;BR /&gt;You can refer to my test results below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;At the first power-on, after rtc_app_init() is completed, the system starts counting from 2026/05/08, 5 hours, 6 minutes, and 7 seconds.&lt;/P&gt;&lt;P&gt;This is transmitted via CAN message 0x521.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;BYTE 0: Year&lt;/LI&gt;&lt;LI&gt;BYTE 1: Month&lt;/LI&gt;&lt;LI&gt;BYTE 2: Day&lt;/LI&gt;&lt;LI&gt;BYTE 3: Hour&lt;/LI&gt;&lt;LI&gt;BYTE 4: Minute&lt;/LI&gt;&lt;LI&gt;BYTE 5: Second&lt;/LI&gt;&lt;LI&gt;BYTE 7: RESET REASON&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="power on.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386330i31140623B5F32AE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="power on.jpg" alt="power on.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After waking up from sleep for five minutes, the counter (CNT) continues counting. However, the year, month, day, hour, minute, and second all start counting from 1970/01/01 00:00:00, instead of continuing from the time set during initialization.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="wakeup.jpg" style="width: 725px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386331i67F51EC5EBFEF76F/image-size/large?v=v2&amp;amp;px=999" role="button" title="wakeup.jpg" alt="wakeup.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For 0x263, BYTE 2 to BYTE 5 represent the time extracted using Rtc_Ip_ConvertTimeDateToSeconds().&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rtc_Ip_ConvertTimeDateToSeconds.jpg" style="width: 488px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386332i01C37725A505228F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Rtc_Ip_ConvertTimeDateToSeconds.jpg" alt="Rtc_Ip_ConvertTimeDateToSeconds.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please check the differences between the S32K328 and S32K314.&lt;/P&gt;&lt;P&gt;Why does the RTC on the S32K328 not retain the previously configured date and time, even though the same settings work correctly on the S32K314?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 May 2026 07:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2369234#M58767</guid>
      <dc:creator>Wade0905</dc:creator>
      <dc:date>2026-05-21T07:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: S32K328 RTC FAIL AFTER WAKEUP</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2369794#M58791</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to share your project, or the .mex configuration file, so I can inspect the code on my side?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only reasons I can think of for the RTC not keeping the value are:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Reset reason is other than Wake-Up and value is not kept since reset is non-functional.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Even if reset reason is functional, it may not be wakeup, meaning the RTC is being re-initialized.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;You've mentioned that byte 7 shares reset reason, however I cannot see in the images which reset reason is being sent over CAN. &lt;SPAN&gt;MCU_WAKEUP_REASON is declared as 28 inside the Power_Ip_Specific.h, I imagine CAN must send a 28?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If you are using MCAL, make sure the option "GPT Standby Wakeup Support" is enabled:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/S32K324-RTC-value-not-preserved-after-sleep/m-p/1965805" target="_blank"&gt;S32K324 RTC value not preserved after sleep&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;One thing I can suggest is to do a register dump (through the "Watch Registers" view). This may help you spot any differences between projects. Simply export both S32K328 &amp;amp; S32K314 register values as files, and you can compare them through any program, for example WinMerge.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2026 20:23:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2369794#M58791</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2026-05-21T20:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: S32K328 RTC FAIL AFTER WAKEUP</title>
      <link>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2369844#M58792</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Julián,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Reset reason is 0x1C(28). If re-init happened, date and time should be 2026/5/8&amp;nbsp;&lt;SPAN&gt;05:06:07 which same as I set in&amp;nbsp;rtc_app_init(). Besides, as I mentioned, I can see that the counter (CNT) continues counting, as the seconds value obtained using Rtc_Ip_ConvertTimeDateToSeconds() keeps increasing even after the MCU wakes up from standby mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;I see the same problem in&amp;nbsp;NXP Community for S32K328.&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://community.nxp.com/t5/S32K/S32K328%E5%86%85%E9%83%A8%E7%9A%84RTC%E6%98%AF%E4%B8%8D%E6%98%AF%E4%B8%8D%E6%94%AF%E6%8C%81%E9%87%8D%E5%90%AF%E4%BF%9D%E5%AD%98%E6%97%B6%E9%97%B4%E5%8A%9F%E8%83%BD%E5%95%8A/m-p/2158185" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S32K/S32K328%E5%86%85%E9%83%A8%E7%9A%84RTC%E6%98%AF%E4%B8%8D%E6%98%AF%E4%B8%8D%E6%94%AF%E6%8C%81%E9%87%8D%E5%90%AF%E4%BF%9D%E5%AD%98%E6%97%B6%E9%97%B4%E5%8A%9F%E8%83%BD%E5%95%8A/m-p/2158511/highlight/true?utm_source=chatgpt.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The .mex configuration file will be sent to you separately.&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;The RTC and standby-related code are as follows.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Executed once during initialization; not executed upon wake-up.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rtc_app_init.jpg" style="width: 447px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386436i109ED3FAB91F1408/image-size/large?v=v2&amp;amp;px=999" role="button" title="rtc_app_init.jpg" alt="rtc_app_init.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;rtc_app_main() is executed every 500 ms.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rtc_app_main.jpg" style="width: 354px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386438i7D7759230FBD57F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="rtc_app_main.jpg" alt="rtc_app_main.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;mcu_standby_service() is executed once before entering standby mode.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mcu_standby_service.jpg" style="width: 460px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/386439i02C0522ED5D4FB0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="mcu_standby_service.jpg" alt="mcu_standby_service.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;Wade&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 May 2026 00:53:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K328-RTC-FAIL-AFTER-WAKEUP/m-p/2369844#M58792</guid>
      <dc:creator>Wade0905</dc:creator>
      <dc:date>2026-05-22T00:53:36Z</dc:date>
    </item>
  </channel>
</rss>

