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.

about DDR3 configuration during boot from Emac


Hi 
       As we know,there are two areas relate DDR3 configurations
way1. The ROM code reserves the last 0xD23F bytes for this purpose in all the CorePacs.
            This area of the RAM is used to store the initial configuration of the boot process
          like the boot parameter table.


 
way2.We can also config the DDR3 memory controller  registers,take 6614 for example,
#define CSL_BOOT_CFG_REGS        (0x02620000)
#define CSL_DDR3_EMIF_CONFIG_REGS  (0x21000000)


 
my questin is :1. About the EMAC second bootloader ,we need to config the DDR3,
 can we use the way2 to config the DDR3 ?
2.Are there any details that we should take care?

here I just use the way2 to config DDR3 in my boot project

#define CSL_BOOT_CFG_REGS        (0x02620000)

#define  DDR_Regs    ((CSL_Emif4fRegs *)CSL_DDR3_EMIF_CONFIG_REGS)
#define   pllc_regs  ((CSL_PllcRegs * )0x02310000)

#define CSL_DDR3_EMIF_CONFIG_REGS  (0x21000000)

#define  boot_cfg_regs  ((CSL_BootcfgRegs *)CSL_BOOT_CFG_REGS)

 CSL_BootCfgUnlockKicker();

  boot_cfg_regs->DDR3_PLL_CTL1 = 0x00000040      /*Set ENSAT bit = 1*/
   |(19/2)>>8; /*BWADJ[11:8]*/

  /*Set Bypass = 1*/
  boot_cfg_regs->DDR3_PLL_CTL0 |= (1<<23) ;

  boot_cfg_regs->DDR3_PLL_CTL1 |= 0x00002000;      //Set RESET bit = 1

  boot_cfg_regs->DDR3_PLL_CTL0 = (boot_cfg_regs->DDR3_PLL_CTL0&0x00780000)|
   ((19/2)<<24)|(19<<6)|0;
  for(i=0;i<1000;i++)
   asm(" nop");            //Wait >1000ns for reset to complete

..................

 
  for(i=0; i< 500000; i++)
  {
  asm(" nop 5");//delay 3ms
   }
  if((0==DDR_Fill_Test(0x80000000,256, 0))
   &&(0==DDR_Fill_Test(0x80000000,256, 0xFFFFFFFF))
   &&(0==DDR_Address_Test(0x80000000,256)))
   break;
  uiRetryCount++;

Unluckly ,it the configuration can not work,but  I can sure there no errors when I make the boottable,since I just  successfully write the A1 register  of CORE0 in the boot project.

Brs

Winston