Information

Table 28-58. Swap Control Command FCCOB Requirements
FCCOB Number FCCOB Contents [7:0]
0 0x46 (SWAP)
1 Flash address [23:16]
2 Flash address [15:8]
3 Flash address [7:0]
1
4
Swap Control Code:
0x01 - Initialize Swap System
0x02 - Set Swap in Update State
0x04 - Set Swap in Complete State
0x08 - Report Swap Status
Returned values
5
Current Swap State:
0x00 - Uninitialized
0x01 - Ready
0x02 - Update
0x03 - Update-Erased
0x04 - Complete
6
Current Swap Block Status:
0x00 - Program flash block 0 at 0x0_0000
0x01 - Program flash block 1 at 0x0_0000
7
Next Swap Block Status (after any reset):
0x00 - Program flash block 0 at 0x0_0000
0X01 - Program flash block 1 at 0x0_0000
1. Must be phrase-aligned (Flash address [2:0] = 000).
Upon clearing CCIF to launch the Swap Control command, the FTFL will handle swap-
related activities based on the swap control code provided in FCCOB4 as follows:
0x01 (Initialize Swap System to UPDATE-ERASED State) - After verifying that the
current swap state is UNINITIALIZED and that the flash address provided is in
Program flash block 0 but not in the Flash Configuration Field, the flash address
(shifted with bits[2:0] removed) will be programmed into the IFR Swap Field found
in program flash 1 IFR. After the swap indicator address has been programmed into
the IFR Swap Field, the swap enable word will be programmed to 0x0000. After the
swap enable word has been programmed, the swap indicator, located within the
Program flash block 0 address provided, will be programmed to 0xFF00.
0x02 (Progress Swap to UPDATE State) - After verifying that the current swap state
is READY and that the flash address provided matches the one stored in the IFR
Swap Field, the swap indicator located within bits [15:0] of the flash address in the
currently active program flash block will be programmed to 0xFF00.
Chapter 28 Flash Memory Module (FTFL)
K20 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc. 643