Table Pointer Boundaries

TBLPTR is used in reads, writes and erases of the Program Flash Memory.

When a TBLRD is executed, all 22 bits of the TBLPTR determine which byte is read from program memory directly into the TABLAT register.

When a TBLWT is executed the byte in the TABLAT register is written, not to Flash memory, but to a holding register in preparation for a program memory write. The holding registers constitute a write block, which may vary depending on the device (see the "Flash Memory Organization by Device" table in the "Program Flash Memory" section). The LSbs of the TBLPTRL register determine which specific address within the holding register block is written to. The size of the write block determines the number of LSbs. The MSbs of the Table Pointer have no effect during TBLWT operations.

When a PFM sector write is executed the entire holding register block is written to the Flash memory sector at the address determined by the MSbs of the NVMADR. The LSbs are ignored during sector writes. For more detail, see the Writing to Program Flash Memory section.

The following figure illustrates the relevant boundaries of TBLPTR and NVMADR based on NVM control operations.

Figure 1. Table Pointer Boundaries Based on Operation
Note:
  1. 1.See the "Flash Memory Organization by Device" table in the "Program Flash Memory" section for the write holding registers block size.