🎉 We're happy to announce new public releases 🎉

  • SmartCode v10.4r1 - Take advantage of all the benefits our tools have to offer and build your applications with the latest version
  • TriCore v6.3r1 Inspector v1.0r8 - Save time and detect known issues before they get into your application
Contact us to get access

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

10-Jul-2025

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 the Support team to get the script.

Was this answer helpful?