29.4.11.10 Program Once Command
The Program Once command enables programming to special 96-byte fields in the
program flash 0 IFR (see Program Flash IFR Map and Program Once Field). Access to
the Program Once ID field is via 16 records (index values 0x00 - 0x0F), each 4 bytes
long. Access to the Program Once XACC and SACC fields are via 4 records (index
values 0x10 - 0x13), each of which is 8 bytes long. These records can be read using the
Read Once command (see Read Once Command) or using the Read Resource command
(see Read Resource Command). These records can be programmed only once since the
program flash 0 IFR cannot be erased.
Table 29-27. Program Once Command FCCOB Requirements
FCCOB Number FCCOB Contents [7:0]
0 0x43 (PGMONCE)
1 Program Once record index (0x00 - 0x13)
2 Not Used
3 Not Used
4 Program Once byte 0 value
5 Program Once byte 1 value
6 Program Once byte 2 value
7 Program Once byte 3 value
8 Program Once byte 4 value (index 0x10 - 0x13)
9 Program Once byte 5 value (index 0x10 - 0x13)
10 Program Once byte 6 value (index 0x10 - 0x13)
11 Program Once byte 7 value (index 0x10 - 0x13)
After clearing CCIF to launch the Program Once command, the flash memory module
first verifies that the selected record is erased. If erased, then the selected record is
programmed using the values provided. The Program Once command also verifies that
the programmed values read back correctly. The CCIF flag is set after the Program Once
operation has completed.
Any attempt to program one of these records when the existing value is not Fs (erased) is
not allowed. Valid record index values for the Program Once command range from 0x00
- 0x13. During execution of the Program Once command, any attempt to read addresses
within the program flash block containing the selected record index returns invalid data.
Table 29-28. Program Once Command Error Handling
Error Condition Error Bit
Command not available in current mode/security FSTAT[ACCERR]
An invalid record index is supplied FSTAT[ACCERR]
The requested record has already been programmed to a non-FFFF value
1
FSTAT[ACCERR]
Table continues on the next page...
Functional Description
K22F Sub-Family Reference Manual, Rev. 4, 08/2016
672 NXP Semiconductors