6.4.6 Modifying Flash Program Memory
When modifying existing data in a program memory, data within the memory row
must be read and saved in a RAM image. Program memory is modified using the following
steps:
- Load the starting address of the row to be modified.
- Read the existing data from the row into a RAM image.
- Modify the RAM image to contain the new data to be written into program memory.
- Load the starting address of the row to be rewritten.
- Erase the program memory row.
- Load the write latches with data from the RAM image.
- Initiate a programming operation.