![Texas Instruments AM1808 Скачать руководство пользователя страница 865](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_1094558865.webp)
Architecture
865
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
External Memory Interface A (EMIFA)
Care must be taken when performing a NAND read or write operation via the EDMA controller. See
for more details.
NOTE:
The EMIFA does not support NAND Flash devices that require the chip select signal to
remain low during the t
R
time for a read. See
for workaround.
19.2.5.6.5 NAND Data Read and Write via EDMA Controller
When performing NAND accesses, the EDMA controller is most efficiently used for the data phase of the
access. The command and address phases of the NAND access require only a few words of data to be
transferred and therefore do not take advantage of the EDMA controller's ability to transfer larger
quantities of data with a single request. In this section we will focus on using the EDMA controller for the
data phase of a NAND access.
There are two conditions that require care to be taken when performing NAND reads and writes via the
EDMA controller. These are:
•
The address lines used to drive CLE and ALE signals must be driven low
•
The EMIFA does not support constant addressing mode
Since the EMIFA does not support a constant addressing mode, when programming the EDMA, a linear
incrementing address mode must be used. When using a linear incrementing address mode, if the CLE
and ALE are driven by EMA_A[2] and EMA_A[1], respectively, care must be taken not to increase the
address into a range that drives CLE and/or ALE high. To prevent the address from incrementing into a
range that drives CLE and/or ALE high, the EDMA ACNT, BCNT, SIDX, DIDX, and synchronization type
must be programmed appropriately. Following is an example configuration of EDMA controller when
EMA_A[2] is connected to CLE and EMA_A[1] is connected to ALE.
EDMA setup for a NAND Flash data read:
•
ACNT
≤
8 bytes (this can also be set to less than or equal to the external data bus width)
•
BCNT = transfer size in bytes/ACNT
•
SIDX (source index) = 0
•
DIDX (destination index) = ACNT
•
AB synchronized
EDMA setup for a NAND Flash data write:
•
ACNT
≤
8 bytes (this can also be set to less than or equal to the external data bus width)
•
BCNT = transfer size in bytes/ACNT
•
SIDX (source index) = ACNT
•
DIDX (destination index) = 0
•
AB synchronized
19.2.5.6.6 ECC Generation
19.2.5.6.6.1 1-Bit ECC
If the CS
n
NAND (
n
= 2, 3, 4, or 5) bit in the NAND Flash control register (NANDFCR) is set to 1, the
EMIFA supports 1-bit ECC calculation for up to 512 bytes for the corresponding chip select. To perform
the ECC calculation, the CS
n
ECC (
n
= 2, 3, 4, or 5) bit in NANDFCR must be set to 1. It is the
responsibility of the software to start the ECC calculation by writing to the CS
n
ECC (
n
= 2, 3, 4, or 5) bit
prior to issuing a write or read to NAND Flash. It is also the responsibility of the software to read the
calculated ECC from the NAND Flash
m
ECC register (NANDF
m
ECC) (
m
= 1, 2, 3, or 4) once the transfer
to NAND Flash has completed. If the software writes or reads more than 512 bytes, the ECC will be
incorrect. Reading the NAND
m
ECC (
m
= 1, 2, 3, or 4) clears the CS
n
ECC (
n
= 2, 3, 4, or 5) bit in
NANDFCR. The NANDF
m
ECC (
m
= 1, 2, 3, or 4) is cleared upon writing a 1 to the CS
n
ECC (
n
= 2, 3, 4,
or 5) bit.
shows the algorithm used to calculate the ECC value for an 8-bit NAND Flash.