Memory & Peripheral Interface
LH77790B User
’
s Guide
5-16
DRAM Refresh Register (DRR)
‘
CAS before RAS
’
, CBR, refresh cycles are performed periodically as determined by the
DRAM Refresh Register (DRR). During CBR refresh, the width of RAS0/RAS1 is the same
and is equal to the largest of the two FCAS values programmed in BCR6a and BCR7a.
The CAS cycle starts one XCLK cycle before the RAS cycle and remains active for 3.5
cycles. The DRR is a 16-bit wide register. A ZERO programmed in the DRR will disable
DRAM refresh. Low refresh values are not practical because CBR takes at least five cycles
and the 790B will be constantly performing CBR. The logical OR of [BCR6b(4),BCR7b(4)]
activates refresh for both Banks. Since both banks share the same DRR register, DRR
should be programmed to accommodate DRAMs connected to both banks. Upon Reset,
this register is initialized to all 0
’
s (refresh disabled).
To properly disable DRAM refresh, the following sequence must be followed:
1. Program DRR to all 0
’
s.
2. Program BCR6b(4) and BCR7b(4) to 0.
NOTES:
1. During Refresh, CAS, RAS and WE are valid (Figure 5-15). WE is HIGH during refresh.
2. CAS before RAS (CBR) refresh and DRAM accesses are mutually exclusive. CBR will take place either
before or after a DRAM access.
3. CAS before RAS (CBR) refresh and non-DRAM accesses can overlap. Non-DRAM accesses will be
stretched while refresh is taking place and will complete after refresh is done. If a refresh takes place during
a non-DRAM write access, WE will change from LOW state to HIGH state during refresh then back to LOW
state after refresh to complete the write access.
4. When software sets SWRST register to
‘
1
’
(see Chapter 16, Reset) to assert RESETO, DRAM refresh will
stop. DRAM refresh can
’
t be activated while SWRST register is set to
‘
1
’
. When SWRST is set to
‘
0
’
, DRAM
Refresh Register (DRR) must be written again with the refresh value to activate refresh.
The DRAM refresh rate relates to DRR as follows:
Refresh Rate = DRR
×
t
XCLK
Example 1
DRAM1 has a maximum refresh rate of 15.6 μs (1024 rows, 16 ms) and DRAM2 has a
maximum refresh rate of 125 μs (1024 rows, 128 ms) according to the DRAM data sheet.
The 790B is clocked with a 25 MHz clock (t
XCLK
= 40 ns). DRR should be programmed to
be less than 390 (15.6 μs/40 ns) to accommodate both DRAMs in the system.
NOTES:
1. t
XCLK
is the system input clock period. t
XCLK
is not affected by any internal division in the
Power Management Unit.
2. To guarantee proper operation, the DRR should be programmed to be < RAS (MAX.) as specified by the
DRAM manufacturer. This will guarantee that a refresh cycle will occur before RAS exceeds its pulse width
maximum limit. This becomes an issue in two situations:
a. 790A is running at a very small frequency (e.g. 80 KHz)
b. 790A is running in page mode since RAS remains active after the first access until a page boundary is
crossed or a fresh needs to be performed.
15
0
16-BIT REFRESH VALUE (DRR)