29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

RM0008<br />

Flexible static memory controller (FSMC)<br />

When this functionality is needed, it can be guaranteed by programming the MEMHOLD<br />

value to meet the t WB timing, however any CPU read or write access to the NAND Flash<br />

then has the hold delay of (MEMHOLD + 1) HCLK cycles inserted from the rising edge of<br />

the NWE signal to the next access.<br />

To overcome this timing constraint, the attribute memory space can be used by<br />

programming its timing register with an ATTHOLD value that meets the t WB timing, <strong>and</strong><br />

leaving the MEMHOLD value at its minimum. Then, the CPU must use the common memory<br />

space for all NAND Flash read <strong>and</strong> write accesses, except when writing the last address<br />

byte to the NAND Flash device, where the CPU must write to the attribute memory space.<br />

19.6.6 Error correction code computation ECC (NAND Flash)<br />

The FSMC PC-Card controller includes two error correction code computation hardware<br />

blocks, one per memory bank. They are used to reduce the host CPU workload when<br />

processing the error correction code by software in the system.<br />

These two registers are identical <strong>and</strong> associated with bank 2 <strong>and</strong> bank 3, respectively. As a<br />

consequence, no hardware ECC computation is available for memories connected to bank<br />

4.<br />

The error correction code (ECC) algorithm implemented in the FSMC can perform 1-bit error<br />

correction <strong>and</strong> 2-bit error detection per 256, 512, 1 024, 2 048, 4 096 or 8 192 bytes read<br />

from or written to NAND Flash.<br />

The ECC modules monitor the NAND Flash databus <strong>and</strong> read/write signals (NCE <strong>and</strong> NWE)<br />

each time the NAND Flash memory bank is active.<br />

The functional operations are:<br />

● When access to NAND Flash is made to bank 2 or bank 3, the data present on the<br />

D[15:0] bus is latched <strong>and</strong> used for ECC computation.<br />

● When access to NAND Flash occurs at any other address, the ECC logic is idle, <strong>and</strong><br />

does not perform any operation. Thus, write operations for defining comm<strong>and</strong>s or<br />

addresses to NAND Flash are not taken into account for ECC computation.<br />

Once the desired number of bytes has been read from/written to the NAND Flash by the<br />

host CPU, the FSMC_ECCR2/3 registers must be read in order to retrieve the computed<br />

value. Once read, they should be cleared by resetting the ECCEN bit to zero. To compute a<br />

new data block, the ECCEN bit must be set to one in the FSMC_PCR2/3 registers.<br />

Doc ID 13902 Rev 9 447/995

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

Saved successfully!

Ooh no, something went wrong!