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 />

Bits 15:8 DATAST: Data-phase duration<br />

These bits are written by software to define the duration of the data phase (refer to<br />

Figure 162 to Figure 172), used in SRAMs, ROMs <strong>and</strong> asynchronous multiplexed NOR Flash<br />

accesses:<br />

0000 0000: Reserved<br />

0000 0001: DATAST phase duration = 2 × HCLK clock cycles<br />

0000 0010: DATAST phase duration = 3 × HCLK clock cycles<br />

...<br />

1111 1111: DATAST phase duration = 256 × HCLK clock cycles (default value after reset)<br />

For each memory type <strong>and</strong> access mode data-phase duration, please refer to the respective<br />

figure (Figure 162 to Figure 172).<br />

Example: Mode1, read access, DATAST=1: Data-phase duration= DATAST+3 = 4 HCLK<br />

clock cycles.<br />

Bits 7:4 ADDHLD: Address-hold phase duration<br />

These bits are written by software to define the duration of the address hold phase (refer to<br />

Figure 170 to Figure 172), used in mode D <strong>and</strong> multiplexed accesses:<br />

0000: Reserved<br />

0001: ADDHLD phase duration = 2 × HCLK clock cycle<br />

0010: ADDHLD phase duration = 3 × HCLK clock cycle<br />

...<br />

1111: ADDHLD phase duration = 16 × HCLK clock cycles (default value after reset)<br />

For each access mode address-hold phase duration, please refer to the respective figure<br />

(Figure 170 to Figure 172).<br />

Example: ModeD, read access, ADDHLD=1: Address-hold phase duration = ADDHLD + 1 =2<br />

HCLK clock cycles.<br />

Note: In synchronous accesses, this value is not used, the address hold phase is always 1<br />

memory clock period duration.<br />

Bits 3:0 ADDSET: Address setup phase duration<br />

These bits are written by software to define the duration of the address setup phase (refer to<br />

Figure 162 to Figure 172), used in SRAMs, ROMs <strong>and</strong> asynchronous NOR Flash:<br />

0000: ADDSET phase duration = 1 × HCLK clock cycle<br />

...<br />

1111: ADDSET phase duration = 16 × HCLK clock cycles (default value after reset)<br />

For each access mode address setup phase duration, please refer to the respective figure<br />

(refer to Figure 162 to Figure 172).<br />

Example: Mode2, read access, ADDSET=1: Address setup phase duration = ADDSET + 1 =<br />

2 HCLK clock cycles.<br />

Note: In synchronous accesses, this value is not used, the address hold phase is always 1<br />

memory clock period duration.<br />

Note:<br />

PSRAMs (CRAMs) have a variable latency due to internal refresh. Therefore these<br />

memories issue the NWAIT signal during the whole latency phase to prolong the latency as<br />

needed.<br />

With PSRAMs (CRAMs) the filed DATLAT must be set to 0, so that the FSMC exits its<br />

latency phase soon <strong>and</strong> starts sampling NWAIT from memory, then starts to read or write<br />

when the memory is ready.<br />

This method can be used also with the latest generation of synchronous Flash memories<br />

that issue the NWAIT signal, unlike older Flash memories (check the datasheet of the<br />

specific Flash memory being used).<br />

Doc ID 13902 Rev 9 439/995

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

Saved successfully!

Ooh no, something went wrong!