<?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: NXPs32k312 HSE reset issue in S32K</title>
    <link>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2157583#M52135</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/228025"&gt;@Anitha7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should do both. The WFI says if it is already possible to configure clocks. HSE_STATUS_INIT_OK says, if HSE was successfully started and you can start using HSE services. If the status bit is not set, HSE firmware may be corrupted and user's action is required. Read section "14.6.7 HSE Firmware Handshake" in HSE firmware reference manual for details.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a timeout when waiting for&amp;nbsp;HSE_STATUS_INIT_OK. It may take up to approximately 1s after AB SWAP until the flag is set. That's because HSE takes backup of itself to passive partition. I recommend timeout about 1.3s.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Mon, 25 Aug 2025 13:33:23 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2025-08-25T13:33:23Z</dc:date>
    <item>
      <title>NXPs32k312 HSE reset issue</title>
      <link>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2157060#M52110</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Other-NXP-Products/NXP-s32k312-HSE-Reset-Issue/m-p/2148312#M29567" target="_blank"&gt;Solved: Re: NXP s32k312 HSE Reset Issue - NXP Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We are currently using RTD 4.0.0 and do not have the option to upgrade to a newer version. To address the HSE reset issue occurring without a debugger connection, we implemented the following &lt;STRONG&gt;solution 1&lt;/STRONG&gt; based on your earlier suggestion:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/* Before configuring HSE_CLK and accessing the CONFIG_REG_GPR register,&lt;BR /&gt;the driver should wait for Secure BAF to enter WFI state by checking&lt;BR /&gt;the PRTN0_CORE2_STAT register. */&lt;BR /&gt;do {&lt;BR /&gt;WfiStatus = (BOARD_MC_ME-&amp;gt;prtn0_core2_stat &amp;amp; MC_ME_PRTN0_CORE2_STAT_WFI_MASK);&lt;BR /&gt;} while (WfiStatus != MC_ME_PRTN0_CORE2_STAT_WFI_MASK);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This solution is implemented during clock initialization to ensure proper reset behavior without the debugger.&lt;/P&gt;&lt;P&gt;However, the NXP community also suggests an alternate approach:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#define MU_FSR_ADDRESS (volatile os_uint32_t*)0x4038c104U&lt;BR /&gt;#define HSE_INIT_OK_SHIFT 24U&lt;BR /&gt;#define UTEST_HSE_ENABLED_ADDRESS (volatile os_uint32_t*)0x1B000000U&lt;BR /&gt;#define UTEST_HSE_ENABLED_DEFAULT 0xFFFFFFFFU&lt;/P&gt;&lt;P&gt;if (UTEST_HSE_ENABLED_ADDRESS != UTEST_HSE_ENABLED_DEFAULT)&lt;BR /&gt;{&lt;BR /&gt;board_waitforHSEinit();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void board_waitforHSEinit(void)&lt;BR /&gt;{&lt;BR /&gt;volatile os_uint32_t* Mu_FSR_Address = MU_FSR_ADDRESS;&lt;BR /&gt;while (((*Mu_FSR_Address &amp;gt;&amp;gt; HSE_INIT_OK_SHIFT) &amp;amp; 0x01) != 0x01U);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Although both solutions resolve the reset issue without a debugger, we are concerned that in &lt;STRONG&gt;Solution 2&lt;/STRONG&gt;, if the HSE status bit is unexpectedly corrupted or never set (e.g., due to hardware fault), the software could get stuck indefinitely in the while loop.&lt;/P&gt;&lt;P&gt;Could you please advise which of these two approaches is more appropriate and robust for handling HSE reset issues without debugger support?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Aug 2025 06:04:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2157060#M52110</guid>
      <dc:creator>Anitha7</dc:creator>
      <dc:date>2025-08-24T06:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: NXPs32k312 HSE reset issue</title>
      <link>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2157583#M52135</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/228025"&gt;@Anitha7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should do both. The WFI says if it is already possible to configure clocks. HSE_STATUS_INIT_OK says, if HSE was successfully started and you can start using HSE services. If the status bit is not set, HSE firmware may be corrupted and user's action is required. Read section "14.6.7 HSE Firmware Handshake" in HSE firmware reference manual for details.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a timeout when waiting for&amp;nbsp;HSE_STATUS_INIT_OK. It may take up to approximately 1s after AB SWAP until the flag is set. That's because HSE takes backup of itself to passive partition. I recommend timeout about 1.3s.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 25 Aug 2025 13:33:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2157583#M52135</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-08-25T13:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: NXPs32k312 HSE reset issue</title>
      <link>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2159127#M52185</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi, &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you for your response.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have a few points that I would like to clarify:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;If we apply &lt;STRONG&gt;Solution 1&lt;/STRONG&gt; and &lt;STRONG&gt;Solution 2&lt;/STRONG&gt; externally with &lt;STRONG&gt;RTD 4.0.0&lt;/STRONG&gt;, could this lead to any additional issues?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;In the case of &lt;STRONG&gt;HSE firmware corruption&lt;/STRONG&gt;, is there any &lt;STRONG&gt;automatic recovery mechanism&lt;/STRONG&gt; available &lt;STRONG&gt;without relying on external recovery methods or debugger intervention&lt;/STRONG&gt;?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is the &lt;STRONG&gt;reset issue (without using a debugger)&lt;/STRONG&gt; addressed internally as part of the improvements in &lt;STRONG&gt;RTD 5.0.0&lt;/STRONG&gt;?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;We are using the &lt;STRONG&gt;EB stack&lt;/STRONG&gt;, which implements its own &lt;STRONG&gt;clock configuration&lt;/STRONG&gt; using &lt;STRONG&gt;RTD 4.0.0&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Even when a &lt;STRONG&gt;valid HSE image&lt;/STRONG&gt; is present, if the &lt;STRONG&gt;HSE status flag bit is cleared (we observed this issue)&lt;/STRONG&gt;, &lt;STRONG&gt;Solution 2&lt;/STRONG&gt; causes the code to &lt;STRONG&gt;get stuck in a loop&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;we added WFI and HSE status Flag checking solutions during clock initialization stage&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Could you please provide a &lt;STRONG&gt;clear and stable solution&lt;/STRONG&gt; for handling the &lt;STRONG&gt;reset issue without a debugger&lt;/STRONG&gt;, specifically for &lt;STRONG&gt;RTD 4.0.0&lt;/STRONG&gt;, as we currently &lt;STRONG&gt;do not have the option to upgrade to a newer RTD version&lt;/STRONG&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 10:36:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2159127#M52185</guid>
      <dc:creator>Anitha7</dc:creator>
      <dc:date>2025-08-27T10:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: NXPs32k312 HSE reset issue</title>
      <link>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2159681#M52213</link>
      <description>&lt;OL&gt;
&lt;LI&gt;If we apply &lt;STRONG&gt;Solution 1&lt;/STRONG&gt; and &lt;STRONG&gt;Solution 2&lt;/STRONG&gt; externally with &lt;STRONG&gt;RTD 4.0.0&lt;/STRONG&gt;, could this lead to any additional issues?&lt;BR /&gt;&lt;BR /&gt;- I can’t see other issues. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;In the case of &lt;STRONG&gt;HSE firmware corruption&lt;/STRONG&gt;, is there any &lt;STRONG&gt;automatic recovery mechanism&lt;/STRONG&gt; available &lt;STRONG&gt;without relying on external recovery methods or debugger intervention&lt;/STRONG&gt;?&lt;BR /&gt;&lt;BR /&gt;- This can be still solved by software without debugger. The software should follow handshake procedure (in fact, it’s just a triggering of several resets while checking if HSE works). If handshake procedure is not successful, the firmware must be installed again which can be also done by software only. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Is the &lt;STRONG&gt;reset issue (without using a debugger)&lt;/STRONG&gt; addressed internally as part of the improvements in &lt;STRONG&gt;RTD 5.0.0&lt;/STRONG&gt;?&lt;BR /&gt;&lt;BR /&gt;- This is not a known problem, first we have to identify the source of your troubles. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;We are using the &lt;STRONG&gt;EB stack&lt;/STRONG&gt;, which implements its own &lt;STRONG&gt;clock configuration&lt;/STRONG&gt; using &lt;STRONG&gt;RTD 4.0.0&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;- What is your HSE_CLK? If you do not use secure boot, it should be set to 60MHz. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Even when a &lt;STRONG&gt;valid HSE image&lt;/STRONG&gt; is present, if the &lt;STRONG&gt;HSE status flag bit is cleared (we observed this issue)&lt;/STRONG&gt;, &lt;STRONG&gt;Solution 2&lt;/STRONG&gt; causes the code to &lt;STRONG&gt;get stuck in a loop&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;- If HSE_STATUS_INIT_OK is not set, there’s something wrong with HSE firmware and handshake procedure must be started. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;we added WFI and HSE status Flag checking solutions during clock initialization stage&lt;BR /&gt;&lt;BR /&gt;- Ok. &amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me ask again what I already asked in previous thread:&lt;BR /&gt;Have you tried to attach your debugger (I mean hot-sync without reset) after the fail to see what happened? Just reset the MCU externally, so it does not run in debug mode and try to attach the debugger afterwards.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 06:43:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/NXPs32k312-HSE-reset-issue/m-p/2159681#M52213</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-08-28T06:43:03Z</dc:date>
    </item>
  </channel>
</rss>

