/*----------------------------------------------------- DDR3A : DDR1600, 64bit,TEST--------------------------------------------------------------------------*/ ddr3A_64bit_DDR1600_setup2() { unsigned int multiplier = 39; unsigned int divider = 0; int temp,i, delay=1000; unsigned int OD_val = 10; KICK0 = 0x83E70B13; KICK1 = 0x95A4F1E0; //1. Poll for IDONE=1 in the PHY General Status Register 0 (address offset 0x010). do { read_val = DDR3A_PGSR0; } while ((read_val&0x00000001) != 0x00000001); // Clocks are enabled and frequency is stable--------------------------------------- // DDR3A PLL setup GEL_TextOut ( "DDR3 PLL Setup ... \n"); // DDR3APLLCTL0 = DDR3APLLCTL0 & 0xFF7FFFFF; // Set ENSAT = 1 DDR3APLLCTL1 |= 0x00000040; // Put the PLL in PLL Mode DDR3APLLCTL0 |= 0x00800000; // Program the necessary multipliers/dividers and BW adjustments // Set the divider values DDR3APLLCTL0 &= ~(0x0000003F); DDR3APLLCTL0 |= (divider & 0x0000003F); // Program OD[3:0] in the SECCTL register DDR3APLLCTL0 &= OUTPUT_DIVIDE_MASK; // clear the OD bit field DDR3APLLCTL0 |= ~OUTPUT_DIVIDE_MASK & (OD_val - 1) << OUTPUT_DIVIDE_OFFSET; // set the OD[3:0] bit field of PLLD to OD_val // Set the Multipler values DDR3APLLCTL0 &= ~(0x0007FFC0); DDR3APLLCTL0 |= ((multiplier << 6) & 0x0007FFC0 ); temp = ((multiplier + 1) >> 1) - 1; DDR3APLLCTL0 &= ~(0xFF000000); DDR3APLLCTL0 |= ((temp << 24) & 0xFF000000); DDR3APLLCTL1 &= ~(0x0000000F); DDR3APLLCTL1 |= ((temp >> 8) & 0x0000000F); // In PLL Controller, reset the PLL (bit 13 in DDR3APLLCTL1 register) DDR3APLLCTL1 |= 0x00004000; for(i=0;is. DDR3A_SDCFG = 0x6200CE62; // Single-Rank //DDR3A_SDCFG = 0x6200CE6A; // Dual-Rank DDR3A_SDTIM1 = 0x166C9875; DDR3A_SDTIM2 = 0x00001D4A; DDR3A_SDTIM3 = 0x435DFF53; DDR3A_SDTIM4 = 0x543F0CFF; DDR3A_ZQCFG = 0x70073200; // Single-Rank //DDR3A_ZQCFG = 0xF0073200; // Dual-Rank //8.b. Program reg_initref_dis=0 in the SDRAM Refresh Control Register (address offset 0x10). DDR3A_SDRFC = 0x00001869; GEL_TextOut("DDR3A initialization complete \n"); /* End DDR3A EMIF Configuration */ }