4.4.3 Program the Programming Executive
Storing the PE to executive memory is similar to normal programming of code memory. The executive memory must first be erased and then programmed using two-word writes (two instruction words). The control flow for this method is summarized in Figure 4-6.
Table 4-16 provides the ICSP programming processes for PE memory. To minimize programming time, the same packed data format that the PE uses is utilized. See Programming Executive Commands for more details on the packed data format.
| Command (Binary) | Data (Hex) | Description |
|---|---|---|
|
Step 1: Exit the Reset vector. | ||
|
|
|
|
|
Step 2: Initialize the TBLPAG register for writing to the latches. | ||
|
|
|
|
|
Step 3: Load W0:W2 with the next two packed instruction words to program. | ||
|
|
|
|
|
Step 4: Set the Read Pointer (W6) and the Write Pointer (W7), and load the write latches. | ||
|
|
|
|
|
Step 5: Set the NVMADRU/NVMADR register pair to point to the correct row. | ||
|
|
|
|
|
Step 6: Set the NVMCON register to program two instruction words. | ||
|
|
|
|
|
Step 7: Initiate the write cycle. | ||
|
|
|
|
|
Step 8: Wait for program operation to complete and make sure the WR bit is cleared. | ||
|
|
|
Clock out contents of the VISI register.
Repeat until the WR bit is cleared. |
|
Step 9: Repeat Steps 3-8 until all code memory is programmed. | ||
