S32K3 recovery issue when install HSE fw via MU We are currently developing secure boot functionality on the S32K344/S32K314 using HSE, based on the `S32K344_Advanced_SecureBoot` demo from the `S32K3_HSE_DemoExamples`. We have completed most of the feature development and can debug through successfully. In our configuration program, we calculate signatures for the BM, FBL, and APP using ED25519, write them to specified addresses in flash, and configure the SMR and CR for these three applications (BM as pre‑boot SMR, FBL and APP as post‑boot SMR). However, we have encountered some unclear issues and would appreciate your help. We are currently using the FULL_MEM form of HSE. Because we use the ED25519 algorithm to compute signatures for all application binaries, the configuration program takes a long time to execute. If a power failure occurs unexpectedly before the program finishes, we find that HSE enters an unrecoverable error state. Neither power‑cycling nor re‑flashing the firmware makes HSE respond to any host requests anymore. By checking the register at `0x4039C028` (HSE_CONFIG_GPR3), we see the value is `0xC0`; bit 0 has become `0`, which indicates that the HSE firmware may have been erased by SBAF. After power‑up, the MU0 FSR register is also `0`. We therefore tried to re‑install the HSE firmware. Since the normal IVT‑based installation method no longer works, we attempted installation via the MU interface. We simulated the steps described in the documentation, but found that after writing the SRAM address of the Pink Image into the MU Tx register (step 5), the value in HSE_CONFIG_GPR3 immediately changes from `0xC2` back to `0xC0` – i.e., bit 1 goes from `1` to `0` – and we never receive the expected success response `0xDACACADA`. We also referred to a similar issue on the forum:S32K3_The MU installation AB_SWAP process of HSE is incorrect. . We tried performing a functional reset immediately after step 5, but after the reset the new HSE firmware still cannot be installed. Could you please advise how to handle and recover from such a corrupted HSE state? Let me know if you need any adjustments. Re: S32K3 recovery issue when install HSE fw via MU Hi @chengjinwang
I’m unable to read the source files in the project you shared because they are encrypted. Please provide a version with plain (unencrypted) files.
A few days ago, I created a Trace32 script to recover the HSE AB_SWAP firmware via the MU interface, so I quickly modified it for the FULL_MEM version. It works on my side - I receive the 0xDACACADA response.
Do you wait approximately 1.5 seconds after writing the pink image location before performing any further actions? This delay is not explicitly mentioned in the FULL_MEM installation procedure, but it is required for the AB_SWAP version. This could be the issue.
If you are using Trace32, let me know and I can share my script.
Regards,
Lukas Re: S32K3 recovery issue when install HSE fw via MU Here is the recovery program I'm using for HSE FW installation through MU; could you take a look and see what's wrong? Re: S32K3 recovery issue when install HSE fw via MU The attached file is the unencrypted version of the project I am currently using. For my tests, I am using the S32K344 chip, a PE debugger, and the S32DS project in the attachment. I tried waiting a few seconds after writing the Pink image to receive a successful response from SBAF, but that did not work either. Performing a functional reset directly also did not work. Could you please check if there are any issues with my MU installation routine in the attached project?
View full article