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.

DDR using CCS

Hi,

 

I am working on writing code for DDR - (write and read test) using CCS and not via Linux.

I understood the control registers required, but  while writing the data and reading it back I am not clear about which address to access(read/write).

 

If I take a look @ dm6467 datasheet- I guess 0x8000 0000 to 0x8FFF FFFF which is mentioned as DDR memory controller , I should be writting over this space to write/read in DDR .

 

Can you please comment?

 

Regards,

Onkar

  • patki.onkar said:

    I am working on writing code for DDR - (write and read test) using CCS and not via Linux.

    I understood the control registers required, but  while writing the data and reading it back I am not clear about which address to access(read/write).

    If I take a look @ dm6467 datasheet- I guess 0x8000 0000 to 0x8FFF FFFF which is mentioned as DDR memory controller , I should be writting over this space to write/read in DDR .

    Yes, but only if the MMU from the ARM9 is turned off.  Secondly, you should only read and write from the span of memory from 0x80000000 to 0x???????? that is the size of your DRAM, unless you actually have a 256MByte DRAM on the bus.

  • Hi...

    Currently I am working on DVEVM6446 Board which is having DDR on it and trying to write/read it via CCS.

    my flow to write and read is

    1. Write control registers - (which is also done in GEL file)

    2. Check status register for- PHY ready

    3. Write data

    this is done as

        regdata_DDR  = (Uint32 *)( DDR_DATA_BASE + 0x00);
        *regdata_DDR = 0x55555555;
        regdata_DDR  = (Uint32 *)( DDR_DATA_BASE + 0x04);
        *regdata_DDR = 0xAAAAAAAA;
        regdata_DDR  = (Uint32 *)( DDR_DATA_BASE + 0x08);
        *regdata_DDR = 0x55555555;

    ----= DDR_DATA_BASE=0x80000000

     

    4. Read data

        readata_DDR  = (Uint32 *)( DDR_DATA_BASE + 0x00);
        arr[0] = *readata_DDR ;
       
        readata_DDR  = (Uint32 *)( DDR_DATA_BASE + 0x04);
        arr[1] = *readata_DDR ;
       
        readata_DDR  = (Uint32 *)( DDR_DATA_BASE + 0x08);
        arr[2] = *readata_DDR ;

     

    ====================END OF CODE===========================

    Here I am getting the data which I have written into DDR back. I just want to confirm by above code I am writing into DDR memory and not some internal memory of DM6446.

     

     

    Regards,

    Onkar

     

  • Yes, that looks correct.

  • Hi Brandon,

     

    This gives me confidence that I am through with DDR using CCS....[:Y]

    Thanks a lot!!!

     

    Regards,

    Onkar