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: DDR controller: beast way to to determine if it is already init or not

Part Number: TMS320C6678

Hi,

There is a reliable way to determine if the DDR has been already initialized?

My bool loader reprogram the main PLL and initialize the DDR controller, then load the application.

Since I want to use the same build when starting from the boot loader and when starting in no-boot with CCS debug, my application should include the code to perform some initialization normally performed by the boot-loader:

  • run directly from CCS (debug): initialize the DDR
  • run from the boot loader (operative): don't reinit
  • run from an older boot loader version that doesn't initialize the DDR

So far, I try to determine if the DDR works using a very simple memory test: I read two time the same location. If It read always the same value then the, DDR is initialized, otherwise it is not.

Is it this method reliable or it could give a wrong results (for instance, after a CPU reset, but not a DDR reset)?

  • Hi Alberto,

    I've forwarded this to the bootloader initialization experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Alberto,

    That is not a good solution.  The DDR access results are indeterminate if not initialized.  Yours is a system issue.  You can place information into internal memory during intermediate bootloader execution to know what has occurred previously.

    Tom

  • Hi,

    I already have the info in a internal memory reserved area, but I'm looking for another solution since I want to make the boot-loader/application independent. In particular, the application It is desirable for me to have an application that know nothing about the boot-loader.

    In the DDR documentation (note that I know more or less nothing about DDR and DDR controller) for me is not clear if I can always use the IFRDY bit in "DDR3 Memory Controller Status Register".
    That is, it is correct to assume that IFRDY==0 if the DDR controller has not been initialized?
    Well, maybe I cannot distinguish between a non-configured controller and an error condition, but for my need I thinks it is ok to risk for a seconds reconfiguration in presence of errors.
  • Alberto,

    Why not simply repeating the DDR initialization a second time?  This is a robust solution since you do not care about the DDR contents when you start running the application.

    Tom

  • Tom Johnson 16214 said:

    Alberto,

    Why not simply repeating the DDR initialization a second time?  This is a robust solution since you do not care about the DDR contents when you start running the application.

    Tom

    I would like to make the application independent on some board characteristic, such as the DDR (I have different versions of board with different DDR and DDR configuration parameters), by isolating the difference in the boot-loader. At the same time, I would like to be compatible with an  old boot-loader version (installed only on some old boards), that doesn't initialize the DDR.

    Well, I can find other way to resolve my issue.

    So far I guest the reply to my question is:  No, there is not a reliable way to determine if DDR controller has been already initialized. Is it correct?

  • Alberto,

    This is an unusual request.  I am not aware of anyone else trying to do this.  Therefore, I am reluctant to provide a 'validated' solution.  Checking the IFRDY bit should indicate that an init sequence has been executed (i.e. that the leveling state machine successfully completed).  However, it is not a robust indication that the DDR interface is currently functional.  You are welcome to use this solution if you wish.

    Tom