
AT32F435/437
Series Reference Manual
2022.11.11
Page 545
Rev 2.03
24.7.4.3 SDRAM command register (SDRAM_CMD)
Bit
Register
Reset value
Type
Description
Bit 31: 22 Reserved
0x000
resd
Kept at its default value.
Bit 22: 9
MRD
0x0000
rw
Mode Register data
Refer to the SDRAM specifications for details.
Bit 8: 5
ART
0x0
rw
Auto-refresh times
This field defines the number of consecutive auto-refresh
commands issued when MODE =“011”.
0000: 1 auto-refresh cycle
0001: 2 auto-refresh cycles
....
1110: 15 auto-refresh cycles
1111: Reserved
Bit 4
BK1
0x0
wo
SDRAM Bank 1
This bit indicates whether the command will be sent to the
SDRAM Bank 1.
0: Command not sent to SDRAM Bank 1
1: Command sent to SDRAM Bank 1
Bit 3
BK2
0x0
wo
SDRAM Bank 2
This bit indicates whether the command will be sent to the
SDRAM Bank 2.
0: Command not sent to SDRAM Bank 2
1: Command sent to SDRAM Bank 2
Bit 2: 0
CMD
0x0
wo
SDRAM Command
This field defines the command issued to the SDRAM
device.
000: Normal mode
001: Clock configuration enable
010: Precharge all banks
011: Auto refresh
100: Load mode register
101: Self refresh
110: Power-down command
111: Reserved
24.7.4.4 SDRAM refresh timer register (SDRAM_RCNT)
This register is used to set the refresh rate of the SDRAM, in number of SDRAM CLK clock cycles.
The RC has to be configured as a non-zero value in order to perform a correct refresh operation. The
RC value cannot be changed after initialization.
Refresh operation has priority over a read/write operation. However, if a read/write operation is in
progress while a new refresh request occurs, the refresh operation starts only after the read/write
operation is complete. It is recommended that the RC value is smaller than the calculated value in
order to ensure the anticipated refresh rate.
This register is shared by the SDRAM Bank 1 and Bank 2.
Bit
Register
Reset value
Type
Description
Bit
31: 15
Reserved
0x00000
resd
Kept at its default value.
Bit 14
ERIEN
0x0
rw
Error interrupt enable
0: Error interrupt disabled
1: Error interrupt enabled
Bit 13: 1 RC
0x0000
rw
Refresh counter
This 13-bit field defines the refresh rate of the SDRAM
device. It is expressed in number of clock cycles. It must
be set at least to 41 clock cycles.
Refresh rate = (RC + 1) x SDRAM clock frequency
RC = (SDRAM refresh period/number of rows) - 20
Bit 0
ERRC
0x0
wo
Error flag clear
This bit is used to clear the error flag (ER) in the status
register.
0: No effect
1: Refresh error flag is cleared.