10 SDRAM CONTROLLER (SDRAMC)
10-16
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
In order to initialize the SDRAM, the PALL (Precharge All), REF (Auto-Refresh), and MRS (Mode
Register Set) commands must be executed sequentially. Note that the initialization sequence depends on
the SDRAM used. Refer to the specification of the SDRAM to be used for the initialization sequence.
Example 1: PALL
→
REF
→
REF
→
MRS (
→
EMRS)
Example 2: PALL
→
MRS
→
REF
→
REF (
→
REF
→
REF
→
REF
→
REF
→
REF
→
REF)
To execute the MRS/EMRS (Mode Register Set/Extended Mode Register Set) command, write 0x14 to this
register to set INIMRS to 1. Then write any data to a specific address of SDRAM shown below according to
the CAS latency (MRS) or extended mode parameters (EMRS).
7.2 Data Write Address to Execute the MRS/EMRS Command
Table 10.
CPU address
A15
A14
A13
A12
A11
A10
A9
A8
A7
A6
A5
A4
A3
A2
A1
SDRAM address
BA1
BA0
SDA12 SDA11 SDA10 SDA9
SDA8
SDA7
SDA6
SDA5
SDA4
SDA3
SDA2
SDA1
SDA0
MRS
Mode
Reserved
WB
Test mode
CAS latency
BT
Burst length
CAS latency = 1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
CAS latency = 2
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
CAS latency = 3
0
0
0
0
0
1
0
0
0
1
1
0
0
0
1
EMRS
Mode
Reserved
DS
TCSR
PASR
1
0
0
0
0
0
0
0
0
See the SDRAM specification.
For example, to execute an MRS command with CAS latency = 2, write any value to address
0x10000442 (when the SDRAM is mapped to Area 19) after writing 0x14 to the SDRAMC_INIT regis-
ter.
Note: The CAS latency specified in the MRS command must be the same as the setting for
CAS[1:0]/SDRAMC_APP register.
D1
INIPRE: PALL Command Enable for Initialization Bit
Enables to output the PALL (Precharge All) command for initializing the SDRAM.
1 (R/W): Enabled
0 (R/W): Disabled (default)
To execute the PALL (Precharge All) command, write 0x12 to this register to set INIPRE to 1. Then
write any data to any address in the SDRAM. This dummy write is required as the trigger to send the
PALL command to the SDRAM. See INIMRS for the initialization sequence.
D0
INIREF: REF Command Enable for Initialization Bit
Enables to output the REF (Auto-Refresh) command for initializing the SDRAM.
1 (R/W): Enabled
0 (R/W): Disabled (default)
To execute the REF (Auto-Refresh) command, write 0x11 to this register to set INIREF to 1. Then write
any data to any address in the SDRAM. This dummy write is required as the trigger to send the REF
command to the SDRAM. See INIMRS for the initialization sequence.
When executing the REF command twice or more, insert the nop instruction between the executions.
REF command execution
→
nop instruction execution
→
REF command execution (
→
REF
→
nop
→
REF...)
Notes: • The SDRAM timing parameters set in the SDRAMC_CFG register is disabled when the
initialization sequence is executed. Therefore, enough number of nop instructions must be
executed to satisfy the SDRAM timings.
• After the initial sequence commands are executed, the command enable bit must be set to
0. Write 0x10 to the SDRAMC_INIT register after the last initialization command has been
executed.
• The self-refresh function must be disabled until the SDRAM has finished initialization.