<?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: S32K311 HSE — Random Generate Service (RNG) not working in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K311-HSE-Random-Generate-Service-RNG-not-working/m-p/2374515#M58958</link>
    <description>&lt;P&gt;If I understand you well, HSE core does not respond at all. Could you investigate GSR register?&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2026 15:38:51 GMT</pubDate>
    <dc:creator>davidtosenovjan</dc:creator>
    <dc:date>2026-06-01T15:38:51Z</dc:date>
    <item>
      <title>S32K311 HSE — Random Generate Service (RNG) not working</title>
      <link>https://community.nxp.com/t5/S32K/S32K311-HSE-Random-Generate-Service-RNG-not-working/m-p/2374197#M58948</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Hello NXP Team,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;LI-PRODUCT title="S32K3" id="S32K3"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Hardware &amp;amp; Software:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MCU: NXP S32K311, Cortex-M7 + HSE-B subsystem&lt;/LI&gt;&lt;LI&gt;HSE FW: 0.12.0 / 2.55.0 FULL_MEM STANDARD&lt;/LI&gt;&lt;LI&gt;MCAL: NXP RTD 6.0.0 (Crypto_43_HSE_TS_T40D34M60I0R0)&lt;/LI&gt;&lt;LI&gt;AUTOSAR Stack: Vector MicroSAR R34, DaVinci 5.31.55 SP5&lt;/LI&gt;&lt;LI&gt;Compiler: GHS (Green Hills)&lt;/LI&gt;&lt;LI&gt;Debugger: Lauterbach TRACE32&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Problem Statement:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are trying to get HSE random number generation working on S32K311. HSE firmware initializes successfully (hseStatus = 0x960 → INIT_OK | RNG_INIT_OK | HOST_DEBUGGER | CUST_SUPER_USER). However, the RNG service fails in both approaches:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Approach 1 — Via AUTOSAR Csm stack (&lt;/STRONG&gt;&lt;STRONG&gt;Csm_RandomGenerate&lt;/STRONG&gt;&lt;STRONG&gt;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The driver returns timeout&lt;/LI&gt;&lt;LI&gt;In the Lauterbach debugger, the MU0_MUB Receive Register (RR) shows error code &lt;STRONG&gt;0x55A5A26A&lt;/STRONG&gt; = &lt;STRONG&gt;HSE_SRV_RSP_INVALID_ADDR&lt;/STRONG&gt; ("The address parameters are invalid")&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Approach 2 — Bypassing AUTOSAR stack, calling &lt;/STRONG&gt;&lt;STRONG&gt;Hse_Ip_ServiceRequest&lt;/STRONG&gt;&lt;STRONG&gt; directly:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The call returns &lt;STRONG&gt;HSE_IP_SRV_RSP_NO_RESPONSE&lt;/STRONG&gt; (timeout, no response in RR at all)&lt;/LI&gt;&lt;LI&gt;TSR bit clears (HSE consumed the request), but RSR never gets set&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;In both cases, the expected random data is never generated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We also attempted HSE_SRV_ID_FORMAT_KEY_CATALOGS (since INSTALL_OK bit 9 / 0x200 is NOT set in hseStatus) and observed the same timeout behavior.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Do we really need Key formatting for RNG?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MU base address: MU0_MUB = 0x4038C000.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;Observation&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;Via Csm (AUTOSAR)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;Via direct Hse_Ip call&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;TSR (after TR write)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;Bit clears &lt;/SPAN&gt;&lt;SPAN&gt;✓&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;Bit clears &lt;/SPAN&gt;&lt;SPAN&gt;✓&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RSR (during polling)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Eventually set&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Never set (stays 0)&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RR value&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0x55A5A26A (INVALID_ADDR)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;No response&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Driver return&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Timeout- No response&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Timeout - HSE_IP_SRV_RSP_NO_RESPONSE&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;hseStatus (FSR)&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0x960&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0x960&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Troubleshooting Steps Performed:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Verified hseStatus = 0x960&lt;/STRONG&gt; — Confirmed HSE FW booted successfully, RNG engine initialized, lifecycle is CUST_SUPER_USER. Noted that INSTALL_OK (bit 9) is not set.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Ruled out buffer alignment&lt;/STRONG&gt; — Ensured random number output buffer is 4-byte aligned and placed in SRAM (0x20400000 region), not in DTCM (0x20000000) which HSE cannot access.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Ruled out D-CACHE coherency&lt;/STRONG&gt; — Added Cache_Ip_Clean() before Hse_Ip_ServiceRequest() and Cache_Ip_Invalidate() after. Verified in Lauterbach that Data (D:) and Supervisor Data (SD:) memory views show identical content — cache is not causing stale data.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Verified channel allocation&lt;/STRONG&gt; — Ensured channel 0 is used for admin services and channel 1+ via Hse_Ip_GetFreeChannel() for general services.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Cleared descriptor memory&lt;/STRONG&gt; — Added memset() to zero the entire hseSrvDescriptor_t before populating fields to eliminate any stale metadata.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Attempted FormatKeyCatalogs&lt;/STRONG&gt; — Since INSTALL_OK was not set, attempted HSE_SRV_ID_FORMAT_KEY_CATALOGS as the first service after Crypto_43_HSE_Init(). Same timeout behavior observed.&lt;/LI&gt;&lt;LI&gt;Also, we placed&lt;SPAN&gt;.mcal_bss_no_cacheable and .mcal_data_no_cacheable&amp;nbsp;&lt;FONT color="#000000"&gt;in a &lt;STRONG&gt;non-cacheable memory region&lt;/STRONG&gt; (with MPU configured as non-cacheable) for HSE service descriptors to work correctly? Is INVALID_ADDR expected when descriptors are in cacheable memory?&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;P&gt;As per the HSE User Manual, we have followed all the required steps for executing the RNG job. However, we are not receiving any response from the HSE.&lt;/P&gt;&lt;P&gt;To assist with troubleshooting, we have attached relevant debugging snapshots for your reference.&lt;/P&gt;&lt;P&gt;We request you to kindly review the issue and provide your feedback or guidance on resolving this problem.&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CC;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/194767"&gt;@Shubham_MQ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jun 2026 05:40:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K311-HSE-Random-Generate-Service-RNG-not-working/m-p/2374197#M58948</guid>
      <dc:creator>Sapana_MQ</dc:creator>
      <dc:date>2026-06-01T05:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: S32K311 HSE — Random Generate Service (RNG) not working</title>
      <link>https://community.nxp.com/t5/S32K/S32K311-HSE-Random-Generate-Service-RNG-not-working/m-p/2374515#M58958</link>
      <description>&lt;P&gt;If I understand you well, HSE core does not respond at all. Could you investigate GSR register?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2026 15:38:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K311-HSE-Random-Generate-Service-RNG-not-working/m-p/2374515#M58958</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2026-06-01T15:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: S32K311 HSE — Random Generate Service (RNG) not working</title>
      <link>https://community.nxp.com/t5/S32K/S32K311-HSE-Random-Generate-Service-RNG-not-working/m-p/2374807#M58973</link>
      <description>&lt;P&gt;Yes, HSE core is not responding.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;I have attached the screenshot of the complete MU register for your reference.&lt;/P&gt;&lt;P&gt;I am also sharing again the screenshot of the &lt;STRONG&gt;GSR register&lt;/STRONG&gt;, which was captured during debugging.&lt;/P&gt;&lt;P&gt;Please review the attached register details and let us know your observations or recommended next steps.&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sapana_MQ_0-1780381025628.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/387495i5488DBD34681EE0C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sapana_MQ_0-1780381025628.png" alt="Sapana_MQ_0-1780381025628.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2026 06:19:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K311-HSE-Random-Generate-Service-RNG-not-working/m-p/2374807#M58973</guid>
      <dc:creator>Sapana_MQ</dc:creator>
      <dc:date>2026-06-02T06:19:48Z</dc:date>
    </item>
  </channel>
</rss>

