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.

Can you write to 6455 DDR2 Memory Config Regs over HPI?

I'm using a 6455 with external DDR2 memory.  The 6455 gets loaded via the HPI (HPI16 mode) by a host processor.
Currently,
 - the host processor loads the 6455 image into internal 6455 memory
 - the 6455 starts running from internal memory and initializes the DDR2 Memory Controller Config Registers
 - then external DDR2 memory is avaiable to use
 
Our application image size is getting large enough that we would like to be able to put some code in DDR2 memory rather than having to squeeze it all in internal 6455 memory.
I would like to have the host processor configure the 6455's DDR2 Memory Controller Config Registers before writing the 6455 image to the DSP.

I have tried this, but have not been successful.  It seems the host can write to internal memory but
can not write to the DDR2 Memory Controller Config Registers (0x7800****).

In 645x HPI User Guide (SPRU969B) it says "Note that the HPI cannot access all DSP resources or peripherals;
see the device-specific data manual for a list of resources accessible through the HPI."

I have not been able to find any 6455 specific info that says they are not accessible?

My questions are...
 - Should the host be able to write to the "DDR2 Memory Controller Config Registers" (prior to writing the 6455 image)?
 - If so, any tricks or ideas on what I may be doing wrong?
 
thanks,
Brad

  • Hi Brad,

    I think that you can't access the external DDR from host.

    After processor wakeup, the only internal memories are available for boot unless bootcode initialize the external memories (DDR).

    I would like to suggest to use "bootloader" with minimal code to boot from HPI with DDR initialization and copy the rest of the portion code into DDR then start to execute there like UBL -> U-boot -> linux does.

    What do you say about this ?

  • I was hoping the host could setup the DDR2 Memory Config Registers over HPI and then write to External RAM... to avoid implementing a bootloader.

    I was looking for confirmation that it was possible or not...  (to make sure I didn't just mess up my implementation of it) before I went down the bootloader road.

    If the bootloader is the only solution, I can do that.

    thanks,

    Brad

     

  • Hi Brad,

    I was hoping the host could setup the DDR2 Memory Config Registers over HPI and then write to External RAM... to avoid implementing a bootloader.

    How did you write DDR config register through HPI host ?

  • Here is the code I put in the host to write to the DDR config registers (0x7800****).  It is just before the host writes the DSP image into internal memory.  Those are the same values/registers that the DSP code writes shortly after booting up to configure external memory.

          /* Configure DSP’s External Memory interface registers */
          hpi_write(hpi, WORD_ADDR(0x78000008), 0x00D74822);
          hpi_write(hpi, WORD_ADDR(0x78000008), 0x00574822);
          hpi_write(hpi, WORD_ADDR(0x78000008), 0x0057C822);

          hpi_write(hpi, WORD_ADDR(0x78000010), 0x3CDB5351);
          hpi_write(hpi, WORD_ADDR(0x78000014), 0x00A1C722);

          hpi_write(hpi, WORD_ADDR(0x7800000C), 0x000003DE);
          hpi_write(hpi, WORD_ADDR(0x78000008), 0x00574822);
          hpi_write(hpi, WORD_ADDR(0x780000E4), 0x00000005);

          hpi_write(hpi, WORD_ADDR(0x9F7000), 0x12345678);

    I added the write to an unused internal memory address (0x9F7000) just to make sure the code was running, etc.

    thanks,

    Brad

  • I have the same question. For C647 and C6437 I sucessfully config ddr controller register by hpi_write, but c67xx disable some register write function, I dont known why Ti limited hpi ability, it`s very discommodious with another bootloader! I must load two *.out!
  • Ge Zhiming,

    Your question is not the same, so this needs to be moved to a new thread in which you ask the question that you have for the specific device in question. As you have indicated, different devices operate differently, so attaching your C67xx question to a C6455 thread is confusing and must be moved.

    Regards,
    RandyP