3.1 Bulk Erase

This algorithm erases the user Flash memory and the UCAx and UCB User Configuration pages. User OTP is retained and can never be erased. If hardware write-protect functions have been enabled in the UCAx and UCB page contents, the UCAx and UCB pages, and arbitrary Flash address ranges, defined by security region descriptors in UCB, may also be permanently retained and will survive Bulk Erase.

Table 3-1. Bulk Erase Algorithm
ICSP™ SequenceICSP Command CodeData/OpcodeInstruction Executed
Step 1: Initialize pointers. Move VISI address to W8 and NVMCON address to W9.
CMDEXEC000xA0001F03MOV.SL #VISI, W8
CMDEXEC000xA400C003MOV.SL #NVMCON, W9
Step 2: Write 0x400E to NVMCON to set up for the Bulk Erase NVM operation.
CMDEXEC000x8A9004E1MOVS.W #0x400E, [W9]
Step 3: Set WR bit (NVMCON[15]) to start the NVM operation and move NVMCON to VISI.
CMDEXEC000x8E9004E1MOVS.W #0xC00E, [W9]
CMDEXEC000x83892400MOV.L [W9], [W8]
Step 4: Provide clocks to complete execution of the prior move of NVMCON to VISI by executing a second move of NVMCON to VISI, then shift VISI on PGEDx.
CMDEXEC000x83892400MOV.L [W9], [W8]
CMDRD01VISI
Step 5: Repeat Step 4 to poll the WR bit (NVMCON[15]) until it is clear, indicating completion.