S12ZVC IFR Program Once Field

cancel
Showing results for 
Search instead for 
Did you mean: 

S12ZVC IFR Program Once Field

S12ZVC IFR Program Once Field

Program Once Field is a part of Flash IFR which can be used to store non-volatile data.

This field consists from 8 phrases (64 bytes), where each phrase has an index (0-7).
  phrase index 0      0x1F_C0C0 - 0x1F_C0C7
  phrase index 1      0x1F_C0C8 - 0x1F_C0CF
  phrase index 2      0x1F_C0D0 - 0x1F_C0D7
  phrase index 3      0x1F_C0D8 - 0x1F_C0DF
  phrase index 4      0x1F_C0E0 - 0x1F_C0E7
  phrase index 5      0x1F_C0E8 - 0x1F_C0EF
  phrase index 6      0x1F_C0F0 - 0x1F_C0F7
  phrase index 7      0x1F_C0F8 - 0x1F_C0FF

The attached example code presents Flash commands to access the IFR Program Once Field.

Program Once command takes a single phrase (8 bytes) of data and one phrase index.

Each phrase can be programmed independently but only once since the non-volatile information register in P-Flash cannot be erased.

On attempt to overwrite a phrase that has been once written, ACCERR flag is set in FSTAT register and the command is terminated.
 
Similarly, Read Once command takes one phrase index and returns a phrase of data.

After this command is executed data are available in FCCOBx registers and can be read by software.

The Program Once and Read Once commands must not be executed from the Flash block

containing the IFR Program Once reserved field to avoid conflicts.

Therefore, a function that launches Flash commands is placed into RAM.

Tags (3)
Attachments
Version history
Revision #:
1 of 1
Last update:
‎05-31-2017 10:54 AM
Updated by: