Load The Fccob Registers; Launch The Command By Clearing Ccif; Command Execution And Error Reporting - NXP Semiconductors freescale KV4 Series Reference Manual

Table of Contents

Advertisement

32.4.8.1.1 Load the FCCOB Registers

The user must load the FCCOB registers with all parameters required by the desired flash
command. The individual registers that make up the FCCOB data set can be written in
any order.

32.4.8.1.2 Launch the Command by Clearing CCIF

Once all relevant command parameters have been loaded, the user launches the command
by clearing FSTAT[CCIF] by writing a '1' to it. FSTAT[CCIF] remains 0 until the flash
command completes.
The FSTAT register contains a blocking mechanism that prevents a new command from
launching (can't clear FSTAT[CCIF]) if the previous command resulted in an access error
(FSTAT[ACCERR]=1) or a protection violation (FSTAT[FPVIOL]=1). In error
scenarios, two writes to FSTAT are required to initiate the next command: the first write
clears the error flags, the second write clears CCIF.

32.4.8.1.3 Command Execution and Error Reporting

The command processing has several steps:
1. The flash memory module reads the command code and performs a series of
parameter checks and protection checks, if applicable, which are unique to each
command.
If the parameter check fails, the FSTAT[ACCERR] (access error) flag is set.
FSTAT[ACCERR] reports invalid instruction codes and out-of bounds addresses.
Usually, access errors suggest that the command was not set-up with valid
parameters in the FCCOB register group.
Program and erase commands also check the address to determine if the operation is
requested to execute on protected areas. If the protection check fails,
FSTAT[FPVIOL] (protection error) flag is set.
Command processing never proceeds to execution when the parameter or protection
step fails. Instead, command processing is terminated after setting FSTAT[CCIF].
2. If the parameter and protection checks pass, the command proceeds to execution.
Run-time errors, such as failure to erase verify, may occur during the execution
phase. Run-time errors are reported in FSTAT[MGSTAT0]. A command may have
access errors, protection errors, and run-time errors, but the run-time errors are not
seen until all access and protection errors have been corrected.
3. Command execution results, if applicable, are reported back to the user via the
FCCOB and FSTAT registers.
Freescale Semiconductor, Inc.
KV4x Reference Manual, Rev. 2, 02/2015
Preliminary
Chapter 32 Flash Memory Module (FTFA)
631

Advertisement

Table of Contents
loading

Table of Contents