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.

DDR SW leveling - non converge issue

Guru 20755 points

Hello,

I'm using DDR3 16-bit interface with DM8148.
It works OK with 250Mhz, but 400Mhz fails in DDR testing: reading fails sometimes - I read 0 instead of 0xa5a5, but the write is successful.

I've followed the instruction in 
http://processors.wiki.ti.com/index.php/TI814x-DDR3-Init-U-Boot_Wordwise_SWleveling
But I get each time different optimum vaslues, and the range is always very small ( 1 to 5).

This is the log of execution of the wording sw leveling utility in CCS5:

Enter 0 for DDR Controller 0 & 1 for DDR Controller 1
0
DDR START ADDR=0x80000000

Enter the Seed Read DQS Gate Ratio Value in Hex to search the RD DQS Gate Window
0x34

Enter the Seed Read DQS Ratio Value in Hex to search the RD DQS Ratio Window
0x38

Enter the Seed Write DQS Ratio Value in Hex to search the Write DQS Ratio Window
0x3
Enter the input file Name
0

*********************************************************
The Slave Ratio Search Program Values are
*********************************************************
PARAMETER MAX MIN OPTIMUM RANGE
*********************************************************
Read DQS 1d 1b 1c 2
Read DQS GATE 1a 15 17 5
Write DQS 4 2 3 2
Write DATA 7b 6 40 75
*********************************************************

===== END OF TEST =====
Enter 0 for DDR Controller 0 & 1 for DDR Controller 1
0
DDR START ADDR=0x80000000

Enter the Seed Read DQS Gate Ratio Value in Hex to search the RD DQS Gate Window
0x17

Enter the Seed Read DQS Ratio Value in Hex to search the RD DQS Ratio Window
0x1c

Enter the Seed Write DQS Ratio Value in Hex to search the Write DQS Ratio Window
0x3
Enter the input file Name
0

*********************************************************
The Slave Ratio Search Program Values are
*********************************************************
PARAMETER MAX MIN OPTIMUM RANGE
*********************************************************
Read DQS 0 3 1 fffffffd
Read DQS GATE 17 14 15 3
Write DQS 2 0 1 2
Write DATA 0 0 0 0
*********************************************************

===== END OF TEST =====


Thanks for any suggestion,

Ran

  • Finally, DDR works with 400Mhz.

    The issue was the TIM1,TIM2,TIM3 registers (and ofcourse bit 16 in DDR3_EMIF_SDRAM_CONFIG for 16 bit interface).  SW leveling now converge with great windows. It could not help before setting the right configuration for TIM1,TIM2,TIM3.

    ----------EMIF Timings (identical for 0 & 1)-------

    1. DDR3_EMIF_READ_LATENCY : 0x170209
    2. DDR3_EMIF_TIM1         : 0xAAAD4E3
    3. DDR3_EMIF_TIM2         : 0x40437FDC
    4. DDR3_EMIF_TIM3         : 0x50BF83FF
    5. DDR3_EMIF_REF_CTRL     : 0xC30
    6. DDR3_EMIF_SDRAM_CONFIG : 0x61C051B2
    7. DDR3_EMIF_SDRAM_ZQCR   : 0x50074BE1

    Thanks,

    Ran

  • Ran,

    Thank you for sharing this useful info with the community.

    Best regards,
    Pavel

  • Hi,

    I will add some more tips for anyone with DDR3 problems with DM814x:

    1. use CCS to view a short window of memory of DDR (start from 0x80000000) . If each refresh you see different values - you're in trouble. the next tips might help...

    2. use the given excel from TI for DM814x , every bit matters and can change the picture from failure to PASS.

     3. the method I used was to change the value in DDR3 Setting for certain frequency (400Mhz) in the GEL file (override the original DM8148 EVM), and than check memory, later I ran a script for DDR test, but the best was to test with the next tip testing.

    4. use DM814 EVM (from mistral) diagnostics for DDR. This testing is great for catching problems.

    5. I also use'd SW leveling but it only started working when the bits in the registers were correct. So the hard work is setting the right bits in excel.


    Hope it helps anyone with similar problems as I had.

    Ran