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.

AM3359: DDR sample code is an empty function

Part Number: AM3359


Two questions:

1. I'm trying to find example code for setting up DDR3 memory on the AM3359 ICE v2.1 board.  I've looked in icev2AM335x.c in the PDK, and found this:

/* Set the desired DDR3 configuration -- assumes 66.67 MHz DDR3 clock input */
Board_STATUS Board_DDR3Init()
{
    return BOARD_SOK;
}

/* Set the desired DDR3 configuration -- assumes 66.67 MHz DDR3 clock input */
Board_STATUS Board_PLLInit()
{
    return BOARD_SOK;
}

This clearly does nothing!  Where can I find some real sample code?

2. When I start a debug session in Code Composer, somehow the DDR3 memory is already set up, even though I've deleted all the set-up code from my GEL file.  How is DDR configured at the start of a debug session?

  • What software is this? RTOS? Which version?
  • Hi, this is sample code in pdk_am335x_1_0_5.  No RTOS.

  • My 2nd question is just general - at what point in a Code Composer debug session does it configure the target's DDR3 and EMIF registers? I thought this was the GEL file TMDXICE3359_v2_1A.gel, but it still works without any GEL file.
  • Matt,

    This depends on the booting and use case. If you are debugging and have no boot image in the boot media then the GEL is used to initialize the DDR and DPLL on the device. If you are booting an application from flash media then the ROM boot loader and subsequently the secondary user bootloader sets up the clocks and the DDR.

    As you noticed for AM335x and AM437x the Board function for setting up PLL and DDR in the board library are empty. Due to legacy software stack reasons the AM335x and AM437x board and secondary bootloader perform initialization that is done from starterware package. which you can locate here:
    pdk_am335x_1_0_7\packages\ti\starterware\board
    C:\ti\AM335x_PRSDK_404\pdk_am335x_1_0_7\packages\ti\starterware\bootloader\src\am335x

    Locate the function SBLPlatformConfig in a file called sbl_am335x_platform.c in the package to look at DDR initialization

    Hope this helps.

    Regards,

    Rahul