HELP!How to set these registers of DDR3-1600?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HELP!How to set these registers of DDR3-1600?

1,898 Views
baijack
Contributor II

Hi,

We developed a board based on P2020E professor. We changed the capacity of DDR3 from 1GB DDR3-1333 to 4GB DDR3-1600, compare with P2020RDB-PC. Now we need to modify the registers of DDR3 in uboot source code. The file is named p1_p2_rdb_pc.h .

I have a problem about the configuration of two DDR3 registers, which are named DDR_TIMING_CFG_1 and DDR_TIMING_CFG_3 in the file P2020RM.

Could you tell us how to set these registers? Especially, we do not know how to set the two fields of EXT_REFREC in DDR_TIMING_CFG_3 and REFREC in DDR_TIMING_CFG_1, so please tell us how to set these two fields?What is more, we do not know the meaning of the sequence “tRFC= {EXT_REFREC || REFREC} + 8”, we need your help.

The datasheet of the two fields are as follows.

DDR_TIMING_CFG_3:

DDR_TIMING_CFG_3.png

DDR_TIMING_CFG_1:

DDR_TIMING_CFG_1.png

We are looking forward to your reply.

Thank you very much.

Labels (1)
Tags (2)
0 Kudos
Reply
2 Replies

1,315 Views
lunminliang
NXP Employee
NXP Employee

1. To set the two fields "REFREC" and "EXT_REFREC", first you need to know the recommended settings of tRFC, which is obtained from DDR manufacturer's document.

If it's larger than 23 clocks, which is "1111" of TIMING_CFG_1[REFREC], then TIMING_CFG_3[EXT_REFREC] could be used.

See below example in AN4039http://cache.freescale.com/files/32bit/doc/app_note/AN4039.pdf:

For example, if tRFC = 127.5 ns from the DDR3 data sheet, and the frequency of operation is an 800-MHz data rate (that is, tCK = 2.5 ns) the result is: number of

clock cycles for refresh recovery = 127.5 ns/2.5 ns = 51 clks

if EXT_REFREC = 4’b0010 is set (that is, 32 clock cycles) then 51 – 32 = 19 clock cycles remain.

Set REFREC = 4’b1011 (that is, 19 clock cycles, 11 + 8)

The same example by using the formula is as follows:

tRFC = {EXT_REFREC || REFREC} + 8 = {4’b0010 || 4’b1011} + 8 = 8’b00101011+ 8 = 43 + 8 = 51

2. To understand the sequence “tRFC= {EXT_REFREC || REFREC} + 8”, as Bulat has explained, those two fields are combined to form an 8 bit binary value for tRFC, if EXT_REFREC is b0010, and REFREC is b1011, then the total tRFC is b00101011, which is 43, plus 8 clocks by hardware, it's 51.

    Or you can simply add two field together to calculate, EXT_REFREC b0010 is 32 clocks as in the table, and REFREC b1011 is 19 clocks, 32+19=51 clocks.

0 Kudos
Reply

1,315 Views
Bulat
NXP Employee
NXP Employee

“tRFC= {EXT_REFREC || REFREC} + 8” means following:

tRFC = EXT_REFREC * 16 + REFREC + 8

Hopefully this calculation is clear enough. Also please take a look at AN4039 application note, it addresses details of the DDR3 controller settings.

0 Kudos
Reply