<?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: S32K324 HSE Setting ADKP Issue</title>
    <link>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2366850#M58664</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/261898"&gt;@MohamedAbdelmoteleb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 99 in HSE Firmware reference manual rev. 2.7 shows the types of all attributes.&lt;/P&gt;
&lt;P&gt;All those mentioned attributes are OTP-ATTR:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1779099686593.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/385743iAD80CF3111AC7FAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1779099686593.png" alt="lukaszadrapa_0-1779099686593.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That means the attributes are stored to UTEST memory. But UTEST memory is in the same read partition as flash block 0. And that means it is not possible to access flash block 0 while programming the UTEST. Most likely, your code is running from flash block 0, isn’t it?&lt;/P&gt;
&lt;P&gt;The solution is to executed the code (which triggers HSE hseSetAttrSrv_t service) from RAM or from another flash block. This is described in mentioned manual in section “14.6.5&amp;nbsp; Synchronizing flash read/write access between HSE and application core”, Table 151.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2026 10:22:26 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2026-05-18T10:22:26Z</dc:date>
    <item>
      <title>S32K324 HSE Setting ADKP Issue</title>
      <link>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2366376#M58639</link>
      <description>&lt;DIV&gt;Hello, I am currently working on enabling Secure Debug for the NXP S32K324. I have configured the target for dynamic authentication with UID diversification by setting the following attributes:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1. HSE_EXTEND_CUST_SECURITY_POLICY_ATTR_ID&lt;/DIV&gt;&lt;DIV&gt;2. HSE_APP_DEBUG_KEY_ATTR_ID&lt;/DIV&gt;&lt;DIV&gt;3. HSE_DEBUG_AUTH_MODE_ATTR_ID&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The issue is that the target enters an unhandled exception immediately after each attribute is set and following a reset. Despite the exceptions, the attributes appear to be set correctly when queried.&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt; &lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 May 2026 23:39:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2366376#M58639</guid>
      <dc:creator>MohamedAbdelmoteleb</dc:creator>
      <dc:date>2026-05-15T23:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: S32K324 HSE Setting ADKP Issue</title>
      <link>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2366850#M58664</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/261898"&gt;@MohamedAbdelmoteleb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 99 in HSE Firmware reference manual rev. 2.7 shows the types of all attributes.&lt;/P&gt;
&lt;P&gt;All those mentioned attributes are OTP-ATTR:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1779099686593.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/385743iAD80CF3111AC7FAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1779099686593.png" alt="lukaszadrapa_0-1779099686593.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That means the attributes are stored to UTEST memory. But UTEST memory is in the same read partition as flash block 0. And that means it is not possible to access flash block 0 while programming the UTEST. Most likely, your code is running from flash block 0, isn’t it?&lt;/P&gt;
&lt;P&gt;The solution is to executed the code (which triggers HSE hseSetAttrSrv_t service) from RAM or from another flash block. This is described in mentioned manual in section “14.6.5&amp;nbsp; Synchronizing flash read/write access between HSE and application core”, Table 151.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2026 10:22:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2366850#M58664</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2026-05-18T10:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: S32K324 HSE Setting ADKP Issue</title>
      <link>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2368434#M58730</link>
      <description>&lt;P&gt;Hello&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;Thank you for the clarification.&lt;/P&gt;&lt;P&gt;We are currently using Hse_Ip_ServiceRequest to invoke the hseSetAttrSrv_t request. Based on your feedback and the requirements in Section 14.6.5 (Table 151), I would like to confirm the standard way for the implementation:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Use of Hse_Ip Driver&lt;/STRONG&gt;: Is it the standard way to continue using the standard RTD Hse_Ip driver (Hse_Ip_ServiceRequest) for these OTP attribute services? Since the driver is normally linked to Flash by default (CRYPTO_43_HSE_SEC_CODE), is it the standard way to manually relocate this sections&amp;nbsp;CRYPTO_43_HSE_SEC_CODE to SRAM OR to another Flash block?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Relocation Strategy&lt;/STRONG&gt;: If RAM relocation is the standard way, is it sufficient to relocate only the Hse_Ip_ServiceRequest call chain and the synchronization loop to SRAM, or must the entire Interrupt Vector Table also be moved to RAM to prevent a fetch from Block 0 during an unexpected interrupt?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Synchronization Method&lt;/STRONG&gt;: To comply with the synchronization requirements in Table 151, is polling the HSE GPR Register 3 (0x4039C028) for bits 24 and 25 the standard way to determine when it is safe to resume execution from Flash?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Single-Block Hardware&lt;/STRONG&gt;: For S32K3 variants that feature only a single Flash block (where "another flash block" is not an option), is SRAM execution the standard way for setting OTP attributes?&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 11:29:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2368434#M58730</guid>
      <dc:creator>MohamedAbdelmoteleb</dc:creator>
      <dc:date>2026-05-20T11:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: S32K324 HSE Setting ADKP Issue</title>
      <link>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2369325#M58774</link>
      <description>&lt;P&gt;Yes, it is standard way to use Hse_Ip driver for this. But the driver is not prepared to relocate necessary code to RAM or to another flash block, so it must be done manually. And it’s not only HSE_IP_ServiceRequest function. Be aware that this function calls some other functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the critical part of code inside the function when using synchronous mode:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if (HSE_IP_REQTYPE_SYNC == pRequest-&amp;gt;eReqType)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Convert from microseconds to ticks */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u32TimeoutTicks = OsIf_MicrosToTicks(pRequest-&amp;gt;u32Timeout, (OsIf_CounterType)HSE_IP_TIMEOUT_OSIF_COUNTER_TYPE);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Send the service request to HSE */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mu_Ip_SetTxRegister(Hse_Ip_apMuBase[u8MuInstance], u8MuChannel, (uint32)pHseSrvDesc);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Read the current value of the counter */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u32CurrentTicks = OsIf_GetCounter((OsIf_CounterType)HSE_IP_TIMEOUT_OSIF_COUNTER_TYPE);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wait for the HSE response */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((FALSE == Mu_Ip_IsResponseReady(Hse_Ip_apMuBase[u8MuInstance], u8MuChannel)) &amp;amp;&amp;amp; (u32ElapsedTicks &amp;lt; u32TimeoutTicks))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Update the elapsed ticks, current ticks will be updated too by the OsIf function */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u32ElapsedTicks += OsIf_GetElapsed(&amp;amp;u32CurrentTicks, (OsIf_CounterType)HSE_IP_TIMEOUT_OSIF_COUNTER_TYPE);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The Mu_Ip… functions are inlined, so there’s no problem. But OsIf functions from BaseNXP module are not inlined, so you need to move them to RAM too. I recommend to step the function to see that all the code executed in this area is running from RAM. Or you can check the map file as well. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will create a feature request to implement some support for code relocation to future versions of the driver because I can see this is causing troubles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the UTEST is being programmed, nothing can access flash block 0. So, it’s necessary to keep the interrupts disabled. Otherwise you would have to move all used resources (vector table, handlers, functions and data used by handlers) to RAM or to another flash block. But because OTP attributes are usually programmed in factory in controlled environment, it should be more convenient to disable interrupts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Synchronization: in configuration phase, it is good idea to launch one command at a time when programming OTP attributes. In this case, it’s sufficient to wait for completion of current service only. In more complex system, yes, it could be necessary to use also HSE GPR3 register.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case of single flash block device, run the code from RAM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2026 08:30:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K324-HSE-Setting-ADKP-Issue/m-p/2369325#M58774</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2026-05-21T08:30:11Z</dc:date>
    </item>
  </channel>
</rss>

