NXP MCX L SiErase

From SEGGER Knowledge Base
Jump to navigation Jump to search

NXP MCX L Secure Installer erase is supported by Device Provisioner command line tool. To use it, PCode_DevPro_NXP_MCXL.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


Note:
We recommend the use of NXP MCUXpresso Secure Provisioning Tool for this purpose. The Device Provisioner was tested with the default values except the above mentioned changes. 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_MCXL.pex
Operation Parameters Description
EraseSI 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_MCXL.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_MCXL.pex
Firmware: J-Link / Flasher Compact V7 compiled Aug 12 2026 10:44:41
S/N: 1017000335

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:   Sequence successful, adjust flash access control settings to you requirements.
J-Link log:   Attention: Keep the erase token at offset 0xD0 to 0xDF in CMPA flash bank forever present!