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.

OMAP4 DDR Initialization

Other Parts Discussed in Thread: 4460

Using TI CCS 5.2.1, I have developed a small bare-metal application running on the dual-core Cortex-A9 on the PandaBoard ES.  Right now, I am using the internal RAM for code and data; I would like to migrate some of this to the DDR memories.  The issue I am having is with DDR initialization; when I try to relocate a data array to DDR memory, the array is not initialized properly (it is initialized properly when it is in internal RAM). 

I have tried the following things:

1. starting a debug session with no SD card (that is, no x-loader image)

2.  starting a debug session with an SD card x-loader image that executes the sdram_init() routine

3.  starting a debug session with an SD card x-loader image that does not execute the sdram_init routine

In all cases, the debugger is executing the default GEL scripts for the OMAP 4460.  And in all cases, the DDR memory does not function properly.  What initializtions do and do not need to occur in order for the DDR to work? 

Thanks,

Errett

  • Hi Errett,

    Errett Hogrefe said:
    In all cases, the debugger is executing the default GEL scripts for the OMAP 4460.

    Which scripts are you using? omap4460_startup_common.gel? The DDR initialization should be done in one of the gel files

    ki

  • Yes, I am using the omap4460_startup_common.gel. 

    I have a PandaBoard ES, which apparently has a slightly different OMAP silicon version than what is supported in the .gel file.  I had to make some minor tweaks to this file in order to get further.  Here is some more info:

    Without an SD card, I can hardcode the .gel file to do the configuration for my version of silicon, and get the DDR to work.  However, when I do this I cannot access any of the L4 peripherals (specifically my program fails on any access to a UART or GPIO).

    With an SD card plugged in, and the x-loader MLO image file executing some minimal initializations then hanging in a loop, I can try to begin a debug session executing the same .gel file(s).  However, if I attempt to do the ddr_config_top() configuration this time, there is an error writing to the DDR shadow registers that also results in the loss of my debug connection.  If I do not attempt to do the ddr_config_top() initializations, I can load and run my program (including access to peripherals), but I cannot use DDR.

    Maybe what I need to do is use the recommended .gel file, but perhaps add code (or ideally, a reference to an existing gel file) that would allow me to access the L4 peripherals...?  If this is indeed what you recommend, which .gel files/functions would I need to execute as part of the startup sequence in order to get L4 peripheral access?

    Alternatively, if the environment requires an SD card, what initializations should be done by the x-loader, and what initializations should be reserved for the debugger (.gel files)?

    Thanks,

    Errett

  • Ok, I think I figured this out, at least enough to get a program working.  The main issue is that the GEL files that are distributed with CCS 5.2.1 do not fully support all flavors of silicon on OMAP4460.  For example, the chip on the PandaBoard ES yields an unknown silicon_type/device_type combination in "omap4460_startup_common.gel".  Also, the GEL files are incomplete; I did not see an easy way to extend the existing GEL script to configure power/clocks for "non-essential" L3/L4 peripherals. 

    The solution that I ended up using had two parts:

    1. Have the x-loader code do everything it normally does, except the dram initialization.

    2. Have the GEL files do everything they normally do for an OMAP4460 with 8GB of Elpida DDR including dram initialization, but not the opp_default_config_board_OPP100 (or similar) initialization. 

    I just downloaded the latest (beta) version of CCS; hopefully there is improved GEL support for the 4460, though it's not mentioned specifically in the release notes...

    Thanks,

    Errett