29.4.11.8 Program Once Command
The Program Once command enables programming to special 96-byte fields in the
program flash 0 IFR (see
). 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
) or using the Read Resource command
). These records can be programmed only once since the
program flash 0 IFR cannot be erased.
Table 29-64. 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-65. 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
FSTAT[ACCERR]
Table continues on the next page...
Functional Description
K22F Sub-Family Reference Manual , Rev. 3, 7/2014
650
Freescale Semiconductor, Inc.