NXP/ST Power Architecture / ST SPC58: Flash mass erase on HSM enabled device

29-Mar-2024

When Alternate Flash Programming Interface is set, only the HSM core has access to HSM code and data flash. Erased HSM code flash does not contain valid HSM boot headers, therefore HSM core remains in reset state forever, and flash monitor cannot be executed there. As a consequence the HSM functionality is not possible anymore, so HSM code flash must not be erased.

This does not apply when Main Flash Programming Interface is set - all flashes can be erased, unless HSM code/data flash are reserved by HSM_EXCLUSIVE DCF record.


Possible solution

Use the script which mass erases all the flashes (code + data and HSM data flash) except the HSM code flash. Please contact Technical support to get the script.

Was this answer helpful?