RM0090
Bit 3 CTB2: Command Target Bank 2
This bit indicates whether the command will be issued to SDRAM Bank 2 or not.
0: Command not issued to SDRAM Bank 2
1: Command issued to SDRAM Bank 2
Bits 2:0 MODE[2:0]: Command mode
These bits define the command issued to the SDRAM device.
000: Normal Mode
001: Clock Configuration Enable
010: PALL ("All Bank Precharge") command
011: Auto-refresh command
100: Load Mode Register
101: Self-refresh command
110: Power-down command
111: Reserved
Note: When a command is issued, at least one Command Target Bank bit ( CBT1 or CBT2) must be
set. If both banks are used, the commands must be issued to the two banks at the same time
by setting the CBT1 and CBT2 bits.
SDRAM Refresh Timer register (FMC_SDRTR)
Address offset:0x154
Reset value: 0x0000 0000
This register sets the refresh rate in number of SDCLK clock cycles between the refresh
cycles by configuring the Refresh Timer Count value.
Example
where 64 ms is the SDRAM refresh period.
The refresh rate must be increased by 20 SDRAM clock cycles (as in the above example) to
obtain a safe margin if an internal refresh request occurs when a read request has been
accepted. It corresponds to a COUNT value of '0000111000000' (448).
This 13-bit field is loaded into a timer which is decremented using the SDRAM clock. This
timer generates a refresh pulse when zero is reached. The COUNT value must be set at
least to 41 SDRAM clock cycles.
As soon as the FMC_SDRTR register is programmed, the timer starts counting. If the value
programmed in the register is '0', no refresh is carried out. This register must not be
reprogrammed after the initialization procedure to avoid modifying the refresh rate.
Each time a refresh pulse is generated, this 13-bit COUNT field is reloaded into the counter.
Refresh rate
(
SDRAM refresh rate
=
SDRAM refresh rate
SDRAM refresh rate
DocID018909 Rev 11
×
SDRAM clock frequency
SDRAM refresh period Number of rows
=
⁄
(
64 ms
8196rows
=
×
7,81μs
60MHz
468,6
=
Flexible memory controller (FMC)
) 20
–
⁄
)
7,81μs
=
1665/1731
1669
Need help?
Do you have a question about the STM32F405 and is the answer not in the manual?
Questions and answers