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.

AM3352 and DDR3 Issue

Other Parts Discussed in Thread: AM3352

Hello,
We have designed two custom boards based around the AM3352 using DDR3 (MT41K256M16HA-107:E).


The first board we made worked fine, we used the AM3352BZCZ80 as the processor. We were able to run the software leveling routine on it and get the optimal values. We setup SPL, U-boot, Linux and everything went fine.


Now we are working on a new board design, and we thought it would be smart to copy over the routing from our known good design. This time we are using the AM3352BZCZD60 as the processor. Other than that the RAM side of the board should be identical. One thing of note is that we are doing our own power sequencing on this board, but it seems from all of our measurements to be working as expected. We can run the software leveling routine over JTAG and then put those values back into the Gel script, and this seems to make the memory work fine. We can change values, and run all of the scripted tests. We see no errors after doing this. When we transfer these settings to SPL we get an error "at env_common.c:125/set_default_env()" "## Can't malloc 4 bytes". I have tried putting in a while loop after the call to config_ddr() and then attaching to it with the JTAG. When I do this and I try to read values from the RAM they change with every refresh.


When we use the DDR3 settings from the BBB configuration (Since we are using the same family of RAM we tried this.) we are able to get into U-boot, and even get to loading the kernel (it never successfully loads). This doesn't seem to make sense to us.


I have also tried using the +1 settings in the config spread sheet, and also tried running it at 303 MHz instead of 400 MHz. These seem to provide the same results.


Any help with what to try next would be appreciated.


Thanks,
John

  • John, if it is the exact same layout between the 2 boards, and the same memory and speed, the results of the software leveling should be similar.  Are these values drastically different?  What topology between AM3352 and the memory do you have on these boards? T-configuration, point to point? 

    Also, your design that doesn't work is using a slower rated AM3352 (max ARM freq is 600MHz).  Did SPL/u-boot change to comprehend this new maximum?

    Another debug method may be to break in with JTAG after ddr_config executes, run the GEL to re-configure the DDR, and see how far it gets.

    Regards,

    James

  • James, 

    When we compared the values they are almost identical. It is point to point routing with the single memory chip that is on board. 

    For the PLL/Clock settings I configured it as follows:

    void am33xx_spl_board_init(void)

    {

    dll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);

    do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);

    do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);

    }

    I will try to do the JTAG test with the GEL script still set and see what happens. 

    Thanks for your help, 

    John

  • James,

    I tried what you suggested, and running the JTAG with the GEL script to initialize the registers again makes it work just fine. 

    So I did a little bit of digging into that and found that the GEL file had the DDR PLL value set to 303 MHz!

    So oddly enough, even though all of my calculations are based on 400 MHz that file seems to be ok with 303 MHz. 

    Next I changed my DDR PLL in U-Boot to 303 MHz, and now I can get it to boot up to a point when the kernel hangs, or panics. 

    Finally I tried editing the GEL file to increase the MPU speed to 600 MHz and the DDR PLL to 400 MHz and re-running the software leveling tools. This produces all 0's which means something is configured wrong. I am fairly certain I have the correct register values though. 

    Any thoughts?

    Thanks, 

    John

  • John, can you send me the values of SDRAM_TIM_1 thru 3 and the SDRAM _CONFIG registers?  I'll take a look...

    Regards,

    James

  • James, 

    Here are the values being used.

    Tim_1: 0x0AAAD4DB

    Tim_2: 0x266B7FDA

    Tim_3: 0x501F867F

    Config: 0x61C05332

    REF_CTRL: 0xC30

    ZQ_CONFIG: 0x50074BE4

    PHY_INVERT_CLOCK: 1

    PHY_CTRL_SLAVE_RATIO: 0x100

    I also tried to use the +1 non optimal values with the GEL script set to 400 MHZ and it still doesn't work. I am guessing I have a config value wrong in here somewhere. 

    Thanks for all the help, 

    John

  • OK these look good.  Forgot to ask you for one more DDR_PHY_CTRL_1.

    Regards,

    James

  • The read_latency bits of DDR_PHY_CTRL_1 register should be 0x7 when running at 400MHz.  This may be your issue and the reason why you things work better at 303MHz.

    Regards,

    James

  • James, 

    We are setting ddr_phy_ctrl_1 = 0x100007;

    So in theory that should be setting the latency to 7.

    John

  • OK, thanks John.  So far it looks like everything is configured correctly.  I'd like to go back to the GEL files which you said didn't work at 400MHz

    -On the original working board, can you configure the GEL file to run at MPU = 600MHz and DDR = 400MHz.  Run the software leveling and see if you get valid results.  If you do, plug those back into the GEL, reinitialize your board, and run the GEL scripts with the DDR tests.  Once you have a working GEL on the original board, use that GEL on the new boards and see if the DDR tests pass. 

    I'm just trying to get to a point where the GELs work solid on both boards before trying to move back to linux. 


    -what voltage level are you using for DDR on both boards?  Are both at DDR3L (1.35V)?  Check the level of VREF to ensure this is 1/2 that value and stable.

    Regards,

    James