01.08.2013 Views

Chapter 10 Memory Subsystem.pdf

Chapter 10 Memory Subsystem.pdf

Chapter 10 Memory Subsystem.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Public Version<br />

www.ti.com General-Purpose <strong>Memory</strong> Controller<br />

The FIFO control is made easier through the use of interrupts or DMA requests associated with the<br />

FIFOTHRESHOLD bit field. The GPMC.GPMC_PREFETCH_STATUS[30:24] FIFOPOINTER field<br />

monitors the number of available bytes to be read in prefetch mode or the number of free empty slots<br />

which can be written in write-posting mode. The GPMC.GPMC_PREFETCH_STATUS[13:0]<br />

COUNTVALUE field monitors the number of remaining bytes to be read or written by the engine according<br />

to the TRANSFERCOUNT value. The FIFOPOINTER and COUNTVALUE bit fields are always expressed<br />

as a number of bytes even if a 16-bit wide NAND device is attached to the linked chip-select.<br />

In prefetch mode, when the FIFOPOINTER equals 0, that is, the FIFO is empty, a host read access<br />

receives the byte last read from the FIFO as its response. In case of Word32 or Word16 read accesses,<br />

the last byte read from the FIFO is copied the required number of times to fit the requested word size. In<br />

write-posting mode, when the FIFOPOINTER equals 0 (that is, the FIFO is full, a host write overwrites the<br />

last FIFO byte location). There is no underflow or overflow error reporting in the GPMC.<br />

<strong>10</strong>.1.5.14.4.2 Prefetch Mode<br />

The prefetch mode is selected when the GPMC.GPMC_PREFETCH_CONFIG1[0] ACCESSMODE bit is<br />

cleared.<br />

The MCU NAND software driver must issue the block and page opening (READ) command with the<br />

correct data address pointer initialization before the engine can be started to read from the NAND memory<br />

device. The engine is started by asserting the GPMC.GPMC_PREFETCH_CONTROL[0] STARTENGINE<br />

bit. The STARTENGINE bit automatically clears when the prefetch process completes.<br />

If required, the ECC calculator engine must be initialized (configured, reset, and enabled) before the<br />

prefetch engine is started, so that the ECC is correctly computed on all data read by the prefetch engine.<br />

When the GPMC.GPMC_PREFETCH_CONFIG1[3] SYNCHROMODE bit is cleared, the prefetch engine<br />

starts requesting data as soon as the STARTENGINE bit is set. If using this configuration, the host must<br />

monitor the NAND device-ready pin so that it only sets the STARTENGINE bit when the NAND device is<br />

in a ready state, meaning data is valid for prefetching.<br />

When the GPMC.GPMC_PREFETCH_CONFIG1[3] SYNCHROMODE bit is set, the prefetch engine starts<br />

requesting data when an active to inactive wait signal trnasition is detected. The transition detector must<br />

be cleared before any transition detection; see Section <strong>10</strong>.1.5.14.2.2. The<br />

GPMC.GPMC_PREFETCH_CONFIG1[5:4] WAITPINSELECTOR field selects which gpmc_wait pin edge<br />

detector triggers the prefetch engine in this synchronized mode.<br />

If the STARTENGINE bit is set after the NAND address phase (page opening command), the engine is<br />

effectively started only after the actual NAND address phase completion. To prevent GPMC stall during<br />

this NAND address phase, set the STARTENGINE bit field before NAND address phase completion when<br />

in synchronized mode. The prefetch engine will start when an active to inactive wait signal transition is<br />

detected. The STARTENGINE bit is automatically cleared on prefetch process completion.<br />

The prefetch engine issues a read request to ensure that the FIFO is always filled with as much data as<br />

acceptable, until the programmed GPMC.GPMC_PREFETCH_CONFIG2[13:0] TRANSFERCOUNT field is<br />

completed.<br />

Table <strong>10</strong>-15. Prefetch Mode Configuration<br />

Bit Field Register Value Comments<br />

STARTENGINE GPMC_PREFETCH_CONTROL[0] 0 Prefetch engine can be configured only if<br />

STARTENGINE is set to 0.<br />

ENGINECSSELECTOR GPMC_PREFETCH_CONFIG1[26:24] 0 to 7 Selects the chip-select associated with a<br />

NAND device where the prefetch engine is<br />

active.<br />

ACCESSMODE GPMC_PREFETCH_CONFIG1[0] 0 Selects prefetch mode<br />

FIFOTHRESHOLD GPMC_PREFETCH_CONFIG1[14:8] Selects the maximum number of bytes read<br />

or written by the host on DMA or interrupt<br />

request<br />

TRANSFERCOUNT GPMC_PREFETCH_CONFIG2[13:0] Selects the number of bytes to be read or<br />

written by the engine to the selected<br />

chip-select<br />

SPRUGN4L–May 20<strong>10</strong>–Revised June 2011 <strong>Memory</strong> <strong>Subsystem</strong>2163<br />

Copyright © 20<strong>10</strong>–2011, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!