Hi,
I'm using 128MB DDR2 memory on our custom board. The highest bytes are using for status counter and I read them to check the status. The counters are 32bits long and started from 0x87FFFFE0.
When the first time I read the counters, an exception error would occur. Here's my code;
#define CORE_COUNTER_NUMBER (6)
#define COUNTER_BASE_ADDRESS (0x87FFFFE0)
UINT32 *pPt[CORE_COUNTER_NUMBER];
UINT32 ulIndex;
for (ulIndex=0; ulIndex<CORE_COUNTER_NUMBER; ulIndex++)
{
pPt[ulIndex]=(UINT32 *)COUNTER_BASE_ADDRESS+ulIndex;
}
sprintf(Msg, "DSP Counter: 0X%08X,\t VIDEO-M3 Counter: 0x%08X\r\n", *pPt[0], *pPt[1]);
... ...
The exception would occur at sprintf. But writing to those bytes are okay.
If I start to read from 0x87FFFFC0, there's no such problem.
The problem is strange and anyone has idea on that? Thanks.
Eric