To execute a read verify command,
follow these steps:
- Select the command in the
CMDTYPE register:
- Set the COMMAND field
in the CMDTYPE register to READVERIFY.
- Set the SIZE field in
the CMDTYPE register to the desired size.
- Configure the read verify
command in the CMDCTL register:
- If the desire is to
manually provide ECC bits along with the data, set the ECCGENOVR bit
in the CMDCTL register. If ECCGENOVR is cleared, the flash
controller will generate ECC bits for comparison based on the
provided compare data.
- Select the target address to
verify on the CMDADDR register:
- Load the target
system address into the CMDADDR register to indicate the base
address to be verified. The flash controller will translate the
system address into the applicable flash region, bank ID, and bank
address. If desired, after the operation completes the flash region,
bank ID, and bank address can be read from the STATADDR register.
- Load the data to verify into
the CMDDATAx registers:
- For single word
verification, write the data to be verified to the CMDDATA0 and
CMDDATA1 registers. For multi-word verification, if available on the
target device, write the data to be verified to the appropriate
CMDDATAx registers beyond CMDDATA0 and CMDDATA1.
- Configure the byte enable
settings in the CMDBYTEN register:
- Any CMDBYTEN bit set
to logic “0” will mask the associated data byte from being compared
during the execution of the READVERIFY command. This can be used to
verify data less than one flash word (less than 64 bits).
- Execute the read verify
operation by writing 0x1 to the CMDEXEC register.
- Monitor for completion of the
read verify operation:
- The STATCMD register
can be polled to determine the status of the erase operation. The
CMDINPROGRESS bit will be set by hardware as soon as the command is
initiated. The CMDDONE bit will be set when the operation
terminates. When CMDDONE is set, the CMDPASS bit will be reset or
set at the same time to indicate whether the read verification
passed or failed.
- The FAILVERIFY bit in
STATCMD will be set if any data read from the flash did not match
the expected data loaded in CMDDATAx.
- After completion of the read
verify operation, the flash controller will configure several settings:
- All dynamic write
protection registers are set to a protected state (to protect
against inadvertent programming).
- All data registers
are set to ‘1’s.
- All program byte
enables are cleared to ‘0’s.