<?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: HSE Stuck only on first startup in S32K</title>
    <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170241#M52704</link>
    <description>We experienced the same problem, issue is that due to cost reduction even if there is in theory a dedicated DFLASH for HSE beneath is only one dflash controller (this in the past with Calypso did not happen), and logical steps would be NXP to implement one of these:&lt;BR /&gt;1) Bus arbitration at the bus level, control access of the masters - transparent for the end user&lt;BR /&gt;2) Semaphore in the HSE FW&lt;BR /&gt;3) Semaphore in the FLS driver&lt;BR /&gt;None of these will happen in the near future unfortunately. We went with a solution to have a SW semaphore in the pre/post of CSM API calls so no NVM / FLS operations are allowed during the CSM calls.</description>
    <pubDate>Tue, 16 Sep 2025 07:28:33 GMT</pubDate>
    <dc:creator>ovidiubriscan</dc:creator>
    <dc:date>2025-09-16T07:28:33Z</dc:date>
    <item>
      <title>HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168712#M52634</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I successfully installed HSE FW (v0.2.55) on my S32K312 micro, and I am experiencing some issues.&lt;/P&gt;&lt;P&gt;I will explain the sequence that I am using right now.&lt;BR /&gt;I am using an 'installer' firmware that handles HSE FW installation and initial configuration.&lt;/P&gt;&lt;P&gt;Starting from a clean state, it performs the following steps:&lt;/P&gt;&lt;P&gt;- Install HSE FW through IVT method, also enabling HSE FW Feature Flag in UTEST when needed&lt;BR /&gt;- Check that installation is successful and read FW Version (success, I can read v0.2.55)&lt;BR /&gt;- Read MU Status and based on that, perform FormatKeyCatalog (success, catalog is correctly formatted)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After that, I erase DFLASH and PFLASH completely, and I flash my official AUTOSAR FW, issuing a Reset just before running it.&lt;BR /&gt;When I do so, I encounter the following scenario.&lt;BR /&gt;- After startup, the HSE receives a request for a MAC verify operation. Anyway this is targetting an empty key slot, so the HSE responds with error code&amp;nbsp;&lt;SPAN&gt;HSE_SRV_RSP_KEY_EMPTY (as I would expect).&lt;BR /&gt;- After this operation, I perform the KeyElementSet for the key that was found empty before. Anyway when I do so, I do not receive any response from HSE and I am stuck waiting for it.&lt;BR /&gt;If I check the FSR and GSR registers, I can see that:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="strofald_0-1757662154168.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/356676i6FBEFB867576A17F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="strofald_0-1757662154168.png" alt="strofald_0-1757662154168.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also, at address 0x4039C028:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="strofald_1-1757662181157.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/356677i814BB19258FF7480/image-size/medium?v=v2&amp;amp;px=400" role="button" title="strofald_1-1757662181157.png" alt="strofald_1-1757662181157.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What can be the issue of this behavior?&amp;nbsp;&lt;BR /&gt;Would this be solved if I call KeyElementSet before trying to perform the Mac Verify job with that same key?&lt;BR /&gt;Also note that I am using the RTD MCAL drivers v6.0.0, and actually I do not perform any kind of waiting during startup to check if the HSE is alive before performing clock initialization through Mcu.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Aldo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 07:32:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168712#M52634</guid>
      <dc:creator>strofald</dc:creator>
      <dc:date>2025-09-12T07:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168714#M52635</link>
      <description>&lt;P&gt;One important thing to note is that in that scenario, if I issue a reset with the debugger and I retry the same steps a second time, they are executed successfully and I see that the HSE is not stuck.&lt;BR /&gt;So it seems that this behavior is triggered only at the first time after installation.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 07:38:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168714#M52635</guid>
      <dc:creator>strofald</dc:creator>
      <dc:date>2025-09-12T07:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168774#M52636</link>
      <description>&lt;P&gt;Another detail that I was able to see is that nothing changes if I try to switch the order of the operations:&lt;BR /&gt;Even if I do first the KeyElementSet and then the MacVerify operation, the error still remains.&lt;BR /&gt;&lt;BR /&gt;It seems that any operation that is made right after the FW installation and key catalog formatting, triggers a fault in the HSE.&lt;BR /&gt;That fault is recovered if I issue a reset with the debugger, in fact after that the KeyElementSet is performed correctly (return code&amp;nbsp;0x55A5AA33 -&amp;nbsp;&lt;SPAN&gt;HSE_SRV_RSP_OK&lt;/SPAN&gt;)&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 08:49:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168774#M52636</guid>
      <dc:creator>strofald</dc:creator>
      <dc:date>2025-09-12T08:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168885#M52641</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also noticed that the value of the CONFIG_GPR3 register right after sending the HSE request is turned to the one below:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="strofald_0-1757672452206.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/356723i52907C1971B1DE30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="strofald_0-1757672452206.png" alt="strofald_0-1757672452206.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I am not mistaken, the bit 27 set in the register means that the HSE FW was performing some operations in the BLOCK 2 (Data Flash) and the Host should not interfere.&lt;BR /&gt;Anyway I am thinking about the fact that during first startup we execute the NvM_ReadAll that fetches the data from the data flash... could this be triggering some conflicts between host and hse access?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 10:24:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168885#M52641</guid>
      <dc:creator>strofald</dc:creator>
      <dc:date>2025-09-12T10:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168964#M52643</link>
      <description>&lt;P&gt;For those who may be helped by this post: the issue occurs because in my case the host application , during startup, is is trying to read/write from the Data Flash (BLOCK 2).&lt;BR /&gt;it seems that during this time the HSE is also trying to access data flash.&lt;BR /&gt;&lt;BR /&gt;Currently I was not able to find any resource in Fls (4.4) or more recent driver MEM_43_INFLS that implements a mechanism of synchronization for this.&lt;BR /&gt;(The Mem_43_INFLS UM is saying that a synchronization mechanism should exist, but I was not able to find it in the driver)&lt;BR /&gt;&lt;BR /&gt;The only solution that was working for me was to use the configuration parameter of the Fls module: FlsStartFlashAccessNotif&amp;nbsp;&lt;BR /&gt;Using this, I can specify a callback function to be called before every Flash access is made.&lt;BR /&gt;In that function I implemented a check to verify that the HSE is in WFI mode.&lt;BR /&gt;&lt;BR /&gt;By doing so I was able to overcome the issue I described.&lt;BR /&gt;&lt;BR /&gt;I still would like to ask: is there any implementation mechanism that NXP is planning to provide to overcome this issue? I saw that in the Mcu driver files something is actually present (check that the HSE is in WFI before modifying clock configuration)&lt;BR /&gt;Is there a plan to port this kind of mechanism also for the Flash drivers?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 13:34:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2168964#M52643</guid>
      <dc:creator>strofald</dc:creator>
      <dc:date>2025-09-12T13:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2169370#M52662</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229151"&gt;@strofald&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This sounds like synchronization issue. There are shared resources between application core and HSE, so application is supposed to perform appropriate steps. It is described in section "14.6.5 Synchronizing flash read/write access between HSE and application core" in HSE firmware reference manual v2.6.&lt;/P&gt;
&lt;P&gt;In case of clocks, the synchronization was already added to RTD drivers in version 5.0.0 (and higher). The driver is waiting for WFI bit before changing clocks because it is not allowed to change the HSE clocks while HSE is running. &lt;BR /&gt;But the synchronization between application core(s) and HSE is not implemented in the drivers. It's up to user to follow the recommendations described in mention section.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 05:57:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2169370#M52662</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-09-15T05:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2169442#M52667</link>
      <description>&lt;P&gt;I understand that it is up to the application to take care of the synchronization issues but you also have to consider that access to flash memory is completely handled by MCAL drivers and in the upper layer modules of the AUTOSAR stack.&lt;/P&gt;&lt;P&gt;Application really does not have a mean to handle this issue without inserting some 'user-defined' code like the approach I mentioned.&lt;BR /&gt;Is there any plan to provide MCAL drivers that handle this kind of issue?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 06:58:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2169442#M52667</guid>
      <dc:creator>strofald</dc:creator>
      <dc:date>2025-09-15T06:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170241#M52704</link>
      <description>We experienced the same problem, issue is that due to cost reduction even if there is in theory a dedicated DFLASH for HSE beneath is only one dflash controller (this in the past with Calypso did not happen), and logical steps would be NXP to implement one of these:&lt;BR /&gt;1) Bus arbitration at the bus level, control access of the masters - transparent for the end user&lt;BR /&gt;2) Semaphore in the HSE FW&lt;BR /&gt;3) Semaphore in the FLS driver&lt;BR /&gt;None of these will happen in the near future unfortunately. We went with a solution to have a SW semaphore in the pre/post of CSM API calls so no NVM / FLS operations are allowed during the CSM calls.</description>
      <pubDate>Tue, 16 Sep 2025 07:28:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170241#M52704</guid>
      <dc:creator>ovidiubriscan</dc:creator>
      <dc:date>2025-09-16T07:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170282#M52708</link>
      <description>&lt;P&gt;I checked latest release of RTD 6.0.0 drivers and it's even mentioned in the driver limitations in user manual:&lt;/P&gt;
&lt;P&gt;"3.5.5 Ensure that HSE CPU is in the WFI state before programming, erasing or&amp;nbsp;execute code."&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1758009765838.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/357105i371267CE1C25E129/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1758009765838.png" alt="lukaszadrapa_0-1758009765838.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I believe it will be fixed in next releases. I will ask SW team for details.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2025 08:02:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170282#M52708</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-09-16T08:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170441#M52719</link>
      <description>Hello,&lt;BR /&gt;thanks for sharing your experience.&lt;BR /&gt;Honestly it's a bit sad because I expected that this issue would be handled by the RTD driver.&lt;BR /&gt;Anyway, if I may ask, how did you solve the synchronization issue that happens when during startup the host is accessing data flash (e.g. for NvM_ReadAll) and the HSE is accessing it too?</description>
      <pubDate>Tue, 16 Sep 2025 12:05:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170441#M52719</guid>
      <dc:creator>strofald</dc:creator>
      <dc:date>2025-09-16T12:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: HSE Stuck only on first startup</title>
      <link>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170882#M52752</link>
      <description>&lt;P&gt;I discussed this with SW team. They told me that they already added semaphores for basic synchronization to RTD 6.0.0.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1758091898948.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/357242iF9565CB1588EE50C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1758091898948.png" alt="lukaszadrapa_0-1758091898948.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And the plan is to add more sophisticated synchronization to RTD 7.0.0 which should be release in about two months.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid synchronization issues during startup, the host should not access flash blocks used by HSE until the HSE enters idle state (wait-for-interrupt mode), so host should poll for&amp;nbsp; PRTN0_CORE2_STAT[WFI].&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2025 06:56:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-Stuck-only-on-first-startup/m-p/2170882#M52752</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-09-17T06:56:35Z</dc:date>
    </item>
  </channel>
</rss>

