• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » ARM® Processors » Sitara™ ARM® » AM3x Sitara ARM Processors Forum » AM335x LPDDR configuration
Share
Sitara™ ARM®
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

AM335x LPDDR configuration

This question is answered
JayWhy
Posted by JayWhy
on Aug 13 2012 14:56 PM
Intellectual330 points

I am trying to bring up a custom board with AM3359 and MT46H64M16LF-6 LPDDR. I am having some issues with data read back.

My simple test writes a value to every address (0x00, 0x01, 0x02, etc), and then attempts to read back the value. The lower word for most addresses reads back correctly. The upper word for every memory location reads back as 0x0000.

Every fourth address always reads as a "0x00000000".

If I read the same memory address repeatedly, it does not always return the same value.

I have followed the steps outlined here:

http://processors.wiki.ti.com/index.php/AM335x_EMIF_Configuration_tips

Yet I believe I am still missing something. 

Can anyone out there point me in the right direction?

Thank you in advance. 

AM335x am3359 EMIF lpddr
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • JayWhy
    Posted by JayWhy
    on Aug 15 2012 07:16 AM
    Intellectual330 points

    Update: 

    The Upper word always reads back the same value. For my original test, I was writting 0x0000, but I switched it to 0xDEAD and it reads back 0xDEAD in every upper word as well as every 4th address will read back as "0xDEADDEAD".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on Aug 15 2012 09:16 AM
    Intellectual330 points

    I have verified that the DDR CK signals are running at 166 MHz. 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on Aug 15 2012 09:48 AM
    Intellectual330 points

    I modified the timing registers and am having some success. 

    Here is my test: 

    for ( k = 0; k < RAM_LENGTH; k++ )
    {
    pRam[k] = k + ((k+1) << 16);
    }
    for ( k = 0; k < RAM_LENGTH; k++ )
    {
    if ( pRam[k] != (k + ((k+1) << 16)) )
    err[i]++;
    }

    Failures are about 25% of the time, or every 4th 32-bit address. 

    If I use a Memory Browser in CCS set to address 0x8000_0000, with continuous refresh enabled, Some values are changed. These are predominately in at every fourth 32-bit address (offsets of 0x0C, 0x1C, 0x2C, 0x3c...).

    Additionally, the value at address 0x8000_0000 is being returned as 0xFFFF_FFFF.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JJD
    Posted by JJD
    on Aug 15 2012 10:40 AM
    Genius9210 points

    It looks like you still have a timing issue.  Double check both the DDR PHY Register settings (use the Ratio Seed Spreadsheet to obtain the proper values for your board) and the AC timing register settings (use the AM335x DDR Calculation too for the proper values for your board)

    If you think you have all of those correct and are still seeing errors, try adjusting CMDx_PHY_CTRL_SLAVE_RATIO higher:  0x100 or 0x200.

    Regards,

    James

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on Aug 15 2012 10:55 AM
    Intellectual330 points

    Increasing CMDx_PHY_CTRL_SLAVE_RATIO make the issue worse. 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on Aug 15 2012 11:00 AM
    Intellectual330 points

    Using the Ratio Seed spreadsheet, I get these values:

    Seed values (byte lane)
    WR DQS 0 0
    RD DQS 40 40
    RD DQS GATE 50 4E
    Seed Values
    WR_DQS_SLAVE_RATIO 0
    RD_DQS_SLAVE_RATIO 40
    FIFO_WE_SLAVE_RATIO 4F

    I am using Starerware as a base, so I followed the same code as in the AM335x bootloader DDR configuration:

    HWREG(DATA0_RD_DQS_SLAVE_RATIO_0) = ((0x40 << 30)|(0x40 << 20)|(0x40 << 10)|(0x40 << 0));
    HWREG(DATA0_RD_DQS_SLAVE_RATIO_1) = (0x40 >> 2);

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on Aug 15 2012 16:08 PM
    Intellectual330 points

    I've adjusted the PHY timings to reduce my errors, but I still have errors. For my simple test above, I get occasional failures ( < 1%). However, if I read the memory location again, the expected value is returned.

    Here are my DATA phy seed values:

    #define BSP_EMIF_RD_DQS_SEED (0x12)
    #define BSP_EMIF_WR_DQS_SEED (0x01)
    #define BSP_EMIF_PHY_WRLVL_SEED (0x00)
    #define BSP_EMIF_PHY_GATELVL_SEED (0x00)
    #define BSP_EMIF_PHY_FIFO_WE_SEED (0x80)
    #define BSP_EMIF_PHY_WR_DATA_SEED (0x40)
    #define BSP_EMIF_PHY_LOCK_DIFF (0x00)
    #define BSP_EMIF_PHY_RANK0_DELAY (0x01)

    more work to continue tomorrow....

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JJD
    Posted by JJD
    on Aug 16 2012 15:37 PM
    Genius9210 points

    Jay, you shouldn't need to touch any other PHY registers other than the ones explained in the wiki.  Here is an example from an EVM with LPDDR:

    #define  CMD_PHY_CTRL_SLAVE_RATIO        0x80
    #define  CMD_PHY_INVERT_CLKOUT           0x0

    #define  DATA_PHY_RD_DQS_SLAVE_RATIO     0x40
    #define  DATA_PHY_FIFO_WE_SLAVE_RATIO    0x52  //RD_DQS_GATE
    #define  DATA_PHY_WR_DQS_SLAVE_RATIO     0x0
    #define  DATA_PHY_WR_DATA_SLAVE_RATIO    0x40  //WRITE_DATA

    #define  DDR_IOCTRL_VALUE                (0x18B)

    Your values may be different, but these are the only ones that need to be modified. 

    Then, you also need to adjust the AC timing registers in the EMIF controller. based on the memory datasheet values.

    Regards,

    James

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • JayWhy
    Posted by JayWhy
    on Aug 17 2012 09:27 AM
    Verified Answer
    Verified by JayWhy
    Intellectual330 points

    I got my application running from LPDDR. These are the settings I have for PHY, the do NOT match the values that were generated by the Ratio Spreadsheet.

    #define BSP_EMIF_RD_DQS_SEED (0x12)
    #define BSP_EMIF_WR_DQS_SEED (0x00)
    #define BSP_EMIF_PHY_WRLVL_SEED (0x00)
    #define BSP_EMIF_PHY_GATELVL_SEED (0x00)
    #define BSP_EMIF_PHY_FIFO_WE_SEED (0x4F)
    #define BSP_EMIF_PHY_WR_DATA_SEED (0x40)
    #define BSP_EMIF_PHY_LOCK_DIFF (0x00)
    #define BSP_EMIF_PHY_RANK0_DELAY (0x01)

    The real secret however was setting drive strength to Full. The wiki page says LPDDR should be set to 1/2, with this exception: "Some boards with LPDDR may require full drive strength depending on board size and trace impedances". It would be nice if TI could provide more guidance on that note.


    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Santhosh Ramani
    Posted by Santhosh Ramani
    on Oct 29 2012 17:19 PM
    Expert1525 points

    Hello JayWhy, JJD,

    I've also been trying to set up my mDDR registers, and I have a question..

    1. The Ratio seed only provided 4 values of the 5 that was mentioned in the chain...the 1 value that it didn't provide is the CMDx_PHY_CTRL_SLAVE_RATIO. This value is seem to be set to 0x80 for mDDR - is that a standard value or does it need to be calculated.

    Thanks a lot for your replies.

    Regards

    Santhosh

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use