在线时间0 小时
UID304999
注册时间2011-7-11
NXP金币0
该用户从未签到
新手上路

- 积分
- 35
- 最后登录
- 1970-1-1
|
RamTst_TestResultType RamTst_Device_Test(volatile uint32 * baseaddress, uint32 nbytes)
{
uint32 offset;
uint32 nWords;
uint32 pattern;
uint32 antipattern;
RamTst_Algorithm=RAMTST_DEVICE_TEST;
nWords = nbytes / sizeof(uint32);
// Fill memory with a known pattern.
for (pattern = 1, offset = 0; offset < nWords; pattern++, offset++)
{
// baseaddress[offset] = pattern;
}
// Check each location and invert it for the second pass.
for (pattern = 1, offset = 0; offset < nWords; pattern++, offset++)
{
// if (baseaddress[offset] != pattern)
//{
// return RAMTST_RESULT_NOT_OK; //((uint32 *) &baseaddress[offset]);
// }
antipattern = ~pattern;
baseaddress[offset] = antipattern;
}
// Check each location for the inverted pattern and zero it.
for (pattern= 1, offset = 0; offset < nWords; pattern++, offset++)
{
antipattern = ~pattern;
//if (baseaddress[offset] != antipattern)
// {
// return RAMTST_RESULT_NOT_OK; //((uint32 *) &baseaddress[offset]);
// }
}
return RAMTST_RESULT_OK;
}
内容 都注释掉了 三个空函数都飞,帮忙分析下,参数是ram的起始地址和大小,
|
|