S12ZVC IFR Program Once Field

Document created by Daniel Martynek Employee on May 31, 2017Last modified by ebiz_ws_prod on Dec 13, 2017
Version 3Show Document
  • View in full screen mode

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.

Original Attachment has been moved to: Example_S12ZVC128_IFR_Program_Once_Field_CW10.7_v1.zip

Attachments

    Outcomes