Hi @Jojo_Hu
For development purposes, when working in the CUST_DEL life cycle, firmware erase functionality was introduced. This erase functionality is available starting from version 0.2.40.0 and newer, across all S32K3 devices. If you are using an older version like 0.2.6.0, this feature will not be available.
There are two key HSE services:
- HSE_SRV_ID_ERASE_FW – This service erases the HSE firmware, its backup, and the system image (SYS-IMG).
- HSE_SRV_ID_ERASE_HSE_NVM_DATA – This one only erases the SYS-IMG.
It is important to note that even after using HSE_SRV_ID_ERASE_FW, the flash memory originally allocated for the HSE firmware remains reserved for it. That means you will not gain access to that flash space.
Also, if you previously installed an AB SWAP version and then erased it, the OTA flag (which is an OTP) will still be set. Because of this, you should not install a FULL MEM version on such a device afterward.
For a simple guide on how to trigger the HSE_SRV_ID_ERASE_FW service, please refer to the following thread where my colleague explains the process:
HSE firmware installation
BR, VaneB