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.

请教6455 dsk的DDR‏



你好!

       我在使用TI 6455 DSK板的时候,发现其SDRAM使用起来不正常。在DSK板的例程Ddr_narrow_mode_read_write_example.pjt中加入往整个DDR中写入0,1,2,……的有序整数,然后再读取判断是否正确的程序,发现按8位和16位读写,整个DDR可正常读写,但是按照32位读写,则不能正确读写;Ddr_normal_mode_read_write_example.pjt中加入相同的程序,发现无论按8位、16位还是32位,都不能正确读写整个DDR。请问是怎么回事呢?

  • 你的程序中对narrow和normal的数据位宽已经定义好,那么就请遵循定义好的位宽。

    Enumeration values:

    CSL_DDR2_NORMAL_MODE DDR2 SDRAM data bus width is 32 bits

    CSL_DDR2_NARROW_MODE DDR2 SDRAM data bus width is 16 bits

  • Ddr_normal_mode_read_write_example.pjt中位宽定义为normal,也就是说数据应该按照32位读写,但实际上那个工程里加入按照32位先写整个SDRAM空间,然后再读,读取出的数不是写入的值,也就是说按照32位读写整个SDRAM空间是失败的。

  • Ddr_normal_mode_read_write_example.pjt中如下程序所示,写入,再读出来,都是正确的,我这边没有问题。  你可以检查你要下你是否程序修改的有问题?

    /* Write 'invalid' values into DDR2 SDRAM area. This is to overwrite the

        * previous valid values

        */

       tempData = 0xdeadbeef;

       for (index = 0; index < DATA_CNT; index++) {

           pDdr2Data[index] =  tempData;

       }

       /* Write **valid** values into SDRAM area. */

       tempData = 0x56780000;

       for (index = 0; index < DATA_CNT; index++) {

           pDdr2Data[index] = tempData + index ;

       }

       /* Verify that the data was indeed written */

       result = DATA_MATCH_SUCCESS;

       for (index = 0; index < DATA_CNT; index++) {

           if (pDdr2Data[index] != (tempData + index)) {

               result = DATA_MATCH_FAIL;                    

               break ;

           }

       }