Hello NXP Team,
I am working with an S32K358 and have enabled HSE with AB-SWAP (OTA). HSE was previously working, but after flashing a combined bootloader + application image and performing a partial code flash erase, HSE is no longer initializing.
Environment
MCU: S32K358
HSE: AB-SWAP / OTA enabled
HSE FW: s32k358_hse_fw_1.14.0_2.40.0_pb230807.bin.pink
Installer: S32K344_HSE_FW_INSTALL with AB-SWAP configuration
Debugger: J-Link / PEmicro through S32 Design Studio
Application: Custom BMS bootloader + application using HSE for SHA-256/RSA secure boot functionality
Current Issue
After the flash operation, Hse_Ip_GetHseStatus() does not return an initialized HSE status. The MU0 FSR (0x4038C104) remains 0x00000000, and the installer application gets stuck in HseFwInstall_WaitInitOk() and eventually reports HSE_INSTALL_MU_TIMEOUT.
The following observations were made:
0x4038C104 (MU0 FSR) = 0x00000000
0x1B000000 (UTEST HSE feature flag) = DDCCBBAA AABBCCDD
0x00400000 contains data beginning with 60FFFFDB...
HSE passive region 0x00BD4000 cannot be read through the debugger
J-Link verification of the passive region fails
Directly loading the .pink file with J-Link reports that the file format is unsupported
We erased the application/code flash area:
0x00400000 – 0x0068FFFF
Our understanding is that this does not overlap the HSE/sBAF reserved region:
0x00BD4000 – 0x00BFFFFF
Questions
Could you please advise on the correct HSE recovery/reinstallation procedure for S32K358 with AB-SWAP enabled when MU FSR remains 0x00000000?
Specifically:
Is the HSE passive region expected to be unreadable through J-Link after HSE is enabled/protected?
For recovery, should we use the complete HSE installer ELF with the required IVT/boot header rather than directly programming the .pink file?
If the UTEST HSE feature flag is already programmed and HSE firmware data is present at 0x00400000, what conditions could prevent sBAF from installing or initializing HSE firmware during POR?
Could the LC state or compatibility between the sBAF version and HSE firmware version cause the installation to fail without an obvious error?
When MU0 FSR remains 0x00000000, which registers or status bits should we check to identify the reason for the HSE boot/install failure?
Is there any specific AB-SWAP recovery sequence that should be followed after a partial code flash erase?
The expected behavior is that after a successful POR and HSE initialization, MU0 FSR should indicate HSE_STATUS_INIT_OK and HSE_STATUS_RNG_INIT_OK, allowing HSE services to be used.
Any guidance on the correct recovery procedure and the registers/debug information we should collect would be greatly appreciated.
Thank you.