GT-64260A Design Guide
Doc. No. MV-S300165-00, Rev. A
CONFIDENTIAL
Copyright © 2002 Marvell
Page 40
Document Classification: Proprietary Information
May 21, 2002, Preliminary
4.4
SDRAM Initialization
The DRAM controller executes the SDRAM initialization sequence as soon as the GT-64260A goes out of reset
(SysRst* de-assert). The DRAM controller performs a MRS (Mode Register Setting) cycle based on the default
DRAM parameters (CL = 3, burst length = 4, burst order = linear). If the serial ROM initialization is enabled, the
DRAM controller postpones the above DRAM initialization sequence until the serial ROM initialization completes.
To achieve better performance, the software can change CL to ‘2’ if the DRAM device is capable of this CAS
latency. Changing the CL requires setting the mode register of the SDRAM device. To update the mode register on
the SDRAM, use the following procedure:
1.
Write the new configuration data to the SDRAM Timing Parameters register (Offset: 0x4B4).
2.
Write the value 0x3 (mode register command enable) to the SDRAM Operation Mode register’s
SDRAMOp
bits
[2:0], at offset 0x474.
3.
Read the SDRAM Operation Mode register. This read guarantees that the following step is executed after the
register value is updated.
4.
Perform dummy word (32-bit) writes to an SDRAM bank. This eventually causes the required cycle to be
driven to the selected DRAM bank.
5.
Poll the SDRAM Operation Mode register’s
Active
bit [31], at offset 0x474, until it is sampled ‘1’.This indi-
cates that the MRS cycle is done.
6.
Write a 0x0 value to the
SDRAMOp
bits. This value returns the register to Normal SDRAM Mode.
7.
Read the SDRAM Operation Mode register. This read guarantees the execution of the following access to the
DRAM, after the register value is updated.
For an example of this code, see
Appendix B. "SDRAM Mode Register/Code" on page 149
4.5
ECC Support
Note
For more information about the ECC operation and error report, see the GT-64260A datasheet’s "SDRAM
ECC" section.
The GT-64260A supports a force ECC capability. When the SDRAM ECC Control register’s
ForceECC
bit [8], at
offset: 0x494, is set to ‘1’, any write to the SDRAM also writes to the ECC bank the data defined in the ForceECC
field.
Considerations when using the force ECC feature:
•
Use this feature for ECC initialization, only. Do not use it in regular operation modes.
•
When using force ECC, only 64-bit transaction are allowed.
•
When initializing the ECC, only run the code from cacheable memory space or from the ROM/RAM devices.
Do not run the code from SDRAM.
If the SDRAM controller detects an ECC error, the controller can generate an interrupt to the CPU. Writing of 0x0
to the ErrType bits [1:0] in the SDRAM Error Address register clears the interrupt.
Note
The error type can hold a value of 0x3. This means that the SDRAM controller detected at least two ECC
error events, when one of them is a single-bit error event and the other is double-bit error event. In this