mirror of
https://github.com/rvtr/twl_wrapsdk.git
synced 2025-10-31 06:11:10 -04:00
add aging test
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/twl_wrapsdk/trunk@267 4ee2a332-4b2b-5046-8439-1ba90f034370
This commit is contained in:
parent
084fd9e0d4
commit
922323f06b
@ -182,6 +182,38 @@ static void test_tuning(void)
|
||||
SVC_WaitByLoop(max);
|
||||
OS_TPrintf("== %d usec\n", (int)OS_TicksToMicroSeconds(OS_GetTick()-begin));
|
||||
}
|
||||
// aging
|
||||
OS_TPrintf("\naging...");
|
||||
for (k = 0; k < times; k++)
|
||||
{
|
||||
for (j = 0; j < nums; j++)
|
||||
{
|
||||
wdata[j]++;
|
||||
}
|
||||
|
||||
if (!MCU_GetFreeRegisters(offset, wdata, nums) || !MCU_SetFreeRegisters(offset, rdata, nums))
|
||||
{
|
||||
(*pInterval)++;
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < nums; j++)
|
||||
{
|
||||
if (wdata[j] != rdata[j])
|
||||
{
|
||||
(*pInterval)++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
max = *pInterval;
|
||||
{
|
||||
OSTick begin;
|
||||
OS_InitTick();
|
||||
OS_TPrintf("\n\nResult: interval = 0x%08X (%d) ", max, max);
|
||||
begin = OS_GetTick();
|
||||
SVC_WaitByLoop(max);
|
||||
OS_TPrintf("== %d usec\n", (int)OS_TicksToMicroSeconds(OS_GetTick()-begin));
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
@ -202,7 +234,7 @@ void TwlMain()
|
||||
test_normal();
|
||||
|
||||
// tune I2C interval
|
||||
//test_tuning();
|
||||
test_tuning();
|
||||
|
||||
// done
|
||||
OS_TPrintf("\nARM7 ends.\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user