NXP MCX A SiErase

From SEGGER Knowledge Base
Jump to navigation Jump to search

NXP MCX A Secure Installer erase is supported by Device Provisioner command line tool. To use it, PCode_DevPro_NXP_MCXA.pex script file must be specified as a command line argument.

Important notes

The CMPA header must be programmed with the following values in front of the Device Provisioner:

  • Flash access control for the last sector: DEFAULT_RW_UNLOCKED
  • ERASE_TOKEN0, ERASE_TOKEN1, ERASE_TOKEN2, ERASE_TOKEN3 = 0xFFFFFFFF
  • DELETE_INSTALLER = 0xFFFFFFFF


After the secure installer is deleted the ERASE_TOKEN may not be erased, otherwise the device gets bricked.

Usage

DevPro -operation [operation_name] -if SWD -speed 4000 [-SetConfigVal parameter_name=value] -ScriptFile PCode_DevPro_NXP_MCXA.pex
Operation Parameters Description
SiErase n/a Erases the secure installer

Examples

Erase the secure installer

Example
C:\Program Files\SEGGER\JLink\DevPro.Exe --operation EraseSI -if SWD -speed 4000 -ScriptFile PCode_DevPro_NXP_MCXA.pex
SEGGER Device Provisioner V9.28
Compiled Mar 18 2026 14:17:48
Command line: -operation EraseSI -if SWD -speed 1000 -ScriptFile PCode_DevPro_NXP_MCXA.pex
Firmware: J-Link Pro V5-1 compiled Apr 27 2026 10:28:36
S/N: 175103947

J-Link log: DAP initialized successfully.
J-Link log:   DMAP_REG_ID: DM-AP IDCODE detected: 0x002A0000
J-Link log: Reset via SYSRESETREQ + halt after bootloader
J-Link log:   Halting at application.
J-Link log:   Erase prepared, resetting device.
J-Link log: Reset via SYSRESETREQ + halt after bootloader
J-Link log:   Halting at application.
J-Link log:   Secure Installer region is available.
J-Link log:   Attention: Keep the erase token at offset 0xD0 to 0xDF in CMPA flash bank forever present!