4.4.2 Erasing Executive Memory
The procedure for erasing each page of executive memory is similar to that of erasing program memory and is shown in Figure 2-6. It consists of setting NVMCON to 0x4003 and then executing the programming cycle.
Table 4-15 shows the ICSP programming process for erasing the executive code memory.
| Command (Binary) | Data (Hex) | Description |
|---|---|---|
|
Step 1: Exit the Reset vector. | ||
|
|
|
|
|
Step 2: Set the NVMADRU/NVMADR register pair to point to the correct page of executive memory to be erased. | ||
|
|
|
|
|
Step 3: Set the NVMCON register to erase the first page of executive memory. | ||
|
|
|
|
|
Step 4: Initiate the erase cycle. | ||
|
|
|
|
|
Step 5: Generate clock pulses for the Page Erase operation to complete until the WR bit is cleared. | ||
|
— |
— |
Clock out contents of the VISI register.
Repeat until the WR bit is clear. |
|
Step 6: Repeat Steps 2-5 for all pages of executive memory. | ||
