English
Language : 

LM3S2793 Datasheet, PDF (482/1194 Pages) Texas Instruments – Stellaris® LM3S2793 Microcontroller
External Peripheral Interface (EPI)
10.4.1.2
Refresh Configuration
The refresh count is based on the external clock speed and the number of rows per bank as well
as the refresh period. The RFSH field represents how many external clock cycles remain before an
AUTO-REFRESH is required. The normal formula is:
RFSH = (tRefresh_us / number_rows) / ext_clock_period
A refresh period is normally 64 ms, or 64000 μs. The number of rows is normally 4096 or 8192. The
ext_clock_period is a value expressed in μsec and is derived by dividing 1000 by the clock speed
expressed in MHz. So, 50 MHz is 1000/50=20 ns, or 0.02 μs. A typical SDRAM is 4096 rows per
bank if the system clock is running at 50 MHz with an EPIBAUD register value of 0:
RFSH = (64000/4096) / 0.02 = 15.625 μs / 0.02 μs = 781.25
The default value in the RFSH field is 750 decimal or 0x2EE to allow for a margin of safety and
providing 15 μs per refresh. It is important to note that this number should always be smaller or
equal to what is required by the above equation. For example, if running the external clock at 25
MHz (40 ns per clock period), 390 is the highest number that may be used. Note that the external
clock may be 25 MHz when the system clock is 25 MHz or when the system clock is 50 MHz and
configuring the COUNT0 field in the EPIBAUD register to 1 (divide by 2).
If a number larger than allowed is used, the SDRAM is not refreshed often enough, and data is lost.
10.4.1.3
Bus Interface Speed
The EPI Controller SDRAM interface can operate up to 50 MHz. The COUNT0 field in the EPIBAUD
register configures the speed of the EPI clock. For system clock (SysClk) speeds up to 50 MHz, the
COUNT0 field can be 0x0000, and the SDRAM interface can run at the same speed as SysClk.
However, if SysClk is running at higher speeds, the bus interface can run only as fast as half speed,
and the COUNT0 field must be configured to at least 0x0001.
10.4.1.4
Non-Blocking Read Cycle
Figure 10-2 on page 483 shows a non-blocking read cycle of n halfwords; n can be any number
greater than or equal to 1. The cycle begins with the Activate command and the row address on the
EPI0S[15:0] signals. With the programmed CAS latency of 2, the Read command with the column
address on the EPI0S[15:0] signals follows after 2 clock cycles. Following one more NOP cycle,
data is read in on the EPI0S[15:0] signals on every rising clock edge. The Burst Terminate
command is issued during the cycle when the next-to-last halfword is read in. The DQMH and DQML
signals are deasserted after the last halfword of data is received; the CSn signal deasserts on the
following clock cycle, signaling the end of the read cycle. At least one clock period of inactivity
separates any two SDRAM cycles.
482
January 20, 2012
Texas Instruments-Production Data