This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question about AM335x DDR2 Refresh rate configuration

Guru 15520 points

Hi,

I have a question about configuration of AM335x DDR2 Refresh rate.

In bl_platform.c(included in AM335x StarterWare), EMIF_SDRAM_REF_CTRL register
is been configured twice with different value as follow:
//////////////////////////////////////////////////////////////
#define DDR2_EMIF_SDRAM_REF_CTRL_VAL1    (0x00004650)
#define DDR2_EMIF_SDRAM_REF_CTRL_SHDW_VAL1 (0x00004650)

#define DDR2_EMIF_SDRAM_REF_CTRL_VAL2    (0x0000081a)
#define DDR2_EMIF_SDRAM_REF_CTRL_SHDW_VAL2 (0x0000081a)

void DDR2Init(void)
{

HWREG(SOC_EMIF_0_REGS + EMIF_SDRAM_REF_CTRL)   = DDR2_EMIF_SDRAM_REF_CTRL_VAL1;
HWREG(SOC_EMIF_0_REGS + EMIF_SDRAM_REF_CTRL_SHDW) =
                                             DDR2_EMIF_SDRAM_REF_CTRL_SHDW_VAL1;
while(delay--);

HWREG(SOC_EMIF_0_REGS + EMIF_SDRAM_REF_CTRL) = DDR2_EMIF_SDRAM_REF_CTRL_VAL2;
HWREG(SOC_EMIF_0_REGS + EMIF_SDRAM_REF_CTRL_SHDW) =
                                           DDR2_EMIF_SDRAM_REF_CTRL_SHDW_VAL2;
}
/////////////////////////////////////////////////////////////////

But in GEL file for AM335x, it's only configured once and the value is 0x81a.
My question is why it's configured twice in bl_platform.c?
Which should customer refer to, the bl_platform.c or Gel configuration?

From following TI wiki page, I guess refer  to Gel is fine.
http://processors.wiki.ti.com/index.php/AM335x_EMIF_Configuration_tips#Setting_Refresh_rate

best regards,
g.f.