I think you should consider how often cal data changes
and if less then 10,000 times in the product life time
10.1 PFM - Program Flash Memory
[lang="ja"][lang="ja"]The Program Flash Memory is readable, writable, and erasable during normal operation over the entire V[lang="ja"][lang="ja"]DD [lang="ja"][lang="ja"]range.
A read from program memory is executed either one word, one byte, or a 128-word page at a time. A program
memory erase is executed on a 128-word page at a time. A Bulk Erase operation cannot be issued from user code. A
write to program memory can be executed as either 1 or 128 words at a time.
Writing or erasing program memory will cease instruction fetches until the operation is complete. The program
memory cannot be accessed during the write or erase, therefore, code cannot execute. An internal programming
timer controls the write time of program memory writes and erases.
A value written to program memory does not need to be a valid instruction. Executing a program memory location
that forms an invalid instruction results in a .
It is important to understand the PFM memory structure for erase and programming operations. Program memory
word size is 16 bits wide. A 128-word PFM page is the only size that can be erased by user software.
create a shadow buffer, copy flash data in to it
make any changes then write it back (very fast)