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问题

Other Parts Discussed in Thread: TMS320C6748

配置DDR2/mDDR Memory Controller读写DDR,出现一个奇怪的问题。通过Memory Browser监视,往DDR中写入数据没有问题,但在读取数据时,勾选L1D Cache和不勾选L1D Cache时,显示的数据不同。

读写DDR数据的代码如下:

unsigned int i;
unsigned long t1, t2;
Src_StartAdd = (unsigned int *) 0xc0010000;

TSCL = 0;
t1 = TSCL;
/* Write data in the chip. */
for (i = 0; i < 0x8000; i++) {
*(Src_StartAdd++) = i;
}

t2 = TSCL;
printf("# cycles == %d\n", (t2 - t1));

Src_StartAdd = (unsigned int *) 0xc0010000;

/* Read data from Dst_StartAdd. */
for (i = 0; i < 0x8000; i++) {
TempData = *(Src_StartAdd++);
if (TempData != i) {
printf("\nAddress 0x%x is error!", i);
}
}


想请教一下,大致是哪方面的问题?跟哪些部分有关?