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.

TMS320C6678: DDR3 Leveling

Genius 13655 points
Part Number: TMS320C6678


Hello Champs,

Own board:C6678 + 4 DDR3(MT41K256M16HA 125IT)DDR3 speed: 800M

DDR3 can't work after configuring 《DDR3 Register Calc v4.xlsx》、《DDR3 PHY Calc v11.xlsx》. After adjusting the write leveling、gate leveling value, some boards can work. 

For example, according to 《DDR3 PHY Calc v11.xlsx》, we calulated and get the DDR Leveling initialized value (WR0, WR1, …, WR7, GT0, GT1, .., GT7),  then we need to adjust the value to WR0+offset_wr, WR1+offset_wr, …, WR7+offset_wr, gate leveling initial value using GT0+offset_gt, GT1+offset_gt, …, GT7+offset_gt to make some boards to work.

But the range of offset_wr 、offset_gt are different among different boards. 

Below are the offset value for board#1 and board#2. 



The pcb layout are the same for all of the boards. Attached are the DDR3 PHY Calc v11.xlsxDDR3 Register Calc v4.xlsx and DDR3 length. Please help to check . Thanks.
DDR3 Register Calc v4 (1).xlsxddr线长.xls

Best Regards
Shine

  • Shine,

    The C6678 is rated for up to DDR3-1333 operation with a 666MHz clock.  Why are you running it so slow -  with a 400MHz clock?  Alternately, have you verified that you have a proper 400MHz clock using an oscilloscope?  What are your PLL settings?

    Please also provide a length matching report as shown in KeyStone I DDR3 interface bring-up Application Report (SPRACL8).

    Tom

  • Hi Tom,

    Thanks for your quick reply.

    Customer thought the lower frequency 400MHz, the more reliable. But he has tested the higher frequency 800、1066、1333Mhz, it is the same result.

    Attached is the PLL configuration and the DDR PCB layout, the DDR sequence is U32、U33、U61、U34、U35.

    ddr3_pll_init(11, 0);
    
    static void ddr3_pll_init(unsigned int multiplier, unsigned int divider)
    {
        LOG("DDR3 PLL (PLL2) Setup, mul: %d, div: %d, output Clock: %d Mhz\r\n", multiplier, divider, (int)(66.667*(multiplier+1)/(divider+1)/2.0));
        /*Unlock Boot Config*/
        KICK0 = KICK0_UNLOCK;
        KICK1 = KICK1_UNLOCK;
    
        /* Usage Note 9: For optimal PLL operation, the ENSAT bit in the PLL control *
         * registers for the Main PLL, DDR3 PLL, and PA PLL should be set to 1.      *
         * The PLL initialization sequence in the boot ROM sets this bit to 0 and    *
         * could lead to non-optimal PLL operation. Software can set the bit to the  *
         * optimal value of 1 after boot                                             *
         * DDR3PLLCTL1 Bit map                                                         *
         * |31...7   |6     |5 4       |3...0      |                                 *
         * |Reserved |ENSAT |Reserved  |BWADJ[11:8]|                                 */
        DDR3PLLCTL1 |= 0x00000040;
    
        /* Put the PLL in BYPASS Mode                                                   *
         * DDR3PLLCTL0 Bit map                                                         *
         * |31...24    |23     |22...19       |18...6   |5...0 |                     *
         * |BWADJ[7:0] |BYPASS |Reserved      |PLLM     |PLLD  |                     */
        DDR3PLLCTL0 |= 0x00800000; /* Set the Bit 23 */
    
        /* Program the necessary multipliers/dividers and BW adjustments             */
        /* Set the divider values */
        DDR3PLLCTL0 &= ~(0x0000003F);
        DDR3PLLCTL0 |= (divider & 0x0000003F);
    
        /* Set the Multipler values */
        DDR3PLLCTL0 &= ~(0x0007FFC0);
        DDR3PLLCTL0 |= ((multiplier << 6) & 0x0007FFC0 );
    
        /* Set the BWADJ */
        uint32_t temp = ((multiplier + 1) >> 1) - 1;
        DDR3PLLCTL0 &= ~(0xFF000000);
        DDR3PLLCTL0 |= ((temp << 24) & 0xFF000000);
        DDR3PLLCTL1 &= ~(0x0000000F);
        DDR3PLLCTL1 |= ((temp >> 8) & 0x0000000F);
    
        /* In PLL Controller, reset the PLL (bit 13 in DDR3PLLCTL1 register)         */
        DDR3PLLCTL1 |= 0x00002000;
    
        /* Wait for the PLL Reset time (min: 5 us)                                */
        Delay_milli_seconds(1);
    
        /*In DDR3PLLCTL1, write PLLRST = 0 to bring PLL out of reset */
        DDR3PLLCTL1 &= ~(0x00002000);
    
        /* Wait at least 500 * REFCLK cycles * PLLD (this is the PLL lock time) */
        Delay_milli_seconds(1);
    
        /* Put the PLL in PLL Mode                                                   *
         * DDR3PLLCTL0 Bit map                                                         *
         * |31...24    |23     |22...19       |18...6   |5...0 |                     *
         * |BWADJ[7:0] |BYPASS |Reserved      |PLLM     |PLLD  |                     */
        DDR3PLLCTL0 &= ~(0x00800000); /* ReSet the Bit 23 */
        LOG("DDR3 PLL Setup... Done.\r\n");
    
        xmc_setup();
    }
    
    
    
    8358.SPRACL8_KeyStone DDR3 Length Rules .xlsx

    Thanks.
    Rgds
    Shine

  • Shine,

    The spreadsheet tools and the GEL file are all mature.  If you have used them as instructed, your design will work without any adjustment at the rated speeds.  Since you are not seeing success, there must be something fundamental that is not correct.  Have you measured the DDR clock and verified that the frequency is correct?  Did you route the signals with proper spacing and with proper reference planes?  Did you isolate the DDR routing from other aggressors?  How many boards have you produced and tested?

    Tom

  • Shine,

    Do you have updates to any of my questions?

    Tom

  • Hi Tom,

    I just received the reply from customer.

    He said he will work with hardware engineer to check the details for the 20 pieces boards. He will contact us again if he has further questions in future.

    Thank you very much.

    Best Regards

    Shine

  • Hi Tom,

    The resistor between PTV15 and GND is 45.3 ohm. After replacing the 45.3 ohm with 22 ohm or removed the 45.3 ohm,   all the boards DDR3 can work now.  But the recommendation for this resistor is 45.3 ohm. Why the resistor may cause the DDR initialization fail?

    Thanks.

    Rgds
    Shine

  • Shine,

    The PTV15 resistor is used by the dynamic impedance control logic in the DDR buffers.  Setting this resistor at the rated value of 45 Ohms allows the buffers to properly adjust to the impedances required for proper termination and impedance matching as shown in section 6.5.1 of the DDR3 Design Requirements for KeyStone Devices Application Report (SPRABI1C).  Operating the C6678 with a PTV15 resistor set to 22 ohms is outside the characterized operation.  We cannot predict its performance and we cannot guarantee this operation.  We also cannot guarantee the long term reliability with this setting.

    I assume that the drive impedance is much lower and that this is allowing the DDR implementation to overcome the signal distortion that is causing the bit errors.  This distortion may be from crosstalk or reflections.  I recommend that you revise your layout to prevent the signal distortion so that you can operate with the rated settings.

    Tom