NXP S32K14x: Mass erase is not working

19-Nov-2024

Most common reason is using authentication keys when partitioning the FlexRAM to EEPROM. Authenticating and removing this authentication by using CSEc keys is not supported by winIDEA. The partitioning can only be reversed manually. 

When no authentication keys are used, the EEPROM section can be reverted back by mass erasing the chip. In case of partitioning the FlexRAM to EEPROM while using authentication keys the EEPROM section will remain there, it can not be reverted using mass erase. winIDEA will erase all sectors, except the ones partitioned as EEPROM.


How to verify if authentication keys were used

EEEPROM Partitioning (Example)



CSEc keys were used (authentication)

FlexRAM (@0x1400_0000) is 4kB in size on S32K148 and when used as EEEPROM this size is reduced by the size of used authentication keys. Depending on the key size, CSEc takes 0, 128, 256 or 512 bytes from the FlexRAM memory, which become un-addressable. For a partition with key size = 0, the whole 4 kB of FlexRAM [0x14000000 to 0x14000FFF] can be accessed (Read/Write).




Refer to your CPU reference manual for the exact procedure on how to achieve this.

Was this answer helpful?