Part Number: TMS320F280025
Hi
I am going to write a RAM Testing for UL1998. Below is my code...
x++;
if (pattern_index < 12)
{
ramR1_Copy = *ramR1Address_pr;
ramR1_NextCopy = *ramR1AddressNext_pr;
*ramR1AddressNext_pr = 0x00;
*ramR1Address_pr = pattern_array[pattern_index];
error_R1 = (*ramR1Address_pr != pattern_array[pattern_index]) ? true : false;
error_R1 = (*ramR1AddressNext_pr != 0x00) ? true : false;
*ramR1Address_pr = 0x00;
*ramR1AddressNext_pr = pattern_array[pattern_index];
error_R1 = (*ramR1AddressNext_pr != pattern_array[pattern_index]) ? true : false;
error_R1 = (*ramR1Address_pr != 0x00) ? true : false;
*ramR1Address_pr = ramR1_Copy;
*ramR1AddressNext_pr = ramR1_NextCopy;
pattern_index++;
}
else
{
if (x > 4000)
{
if (ramR1Address_pr == (uint32_t *)0x000007F2) // the pointer must be even number because pointer increases by 2
{
ramR1Address_pr = (uint32_t *)0x0000A000;
ramR1AddressNext_pr = (uint32_t *)0x0000A002;
} else if (ramR1Address_pr == (uint32_t *)0x0000C7B2)
{
ramR1Address_pr = (uint32_t *)0x00000128;
ramR1AddressNext_pr = (uint32_t *)0x000012A;
}
else
{
ramR1AddressNext_pr++;
ramR1Address_pr++;
}
pattern_index = 0;
x = 0;
}
}
where ramR1_Copy/ramR1_NextCopy /pattern_index is defined in range of RAM where no need to test.
It run in main loop is no problem. However, illegalOperationHandler() will be triggered if it run in ISR funcation.
Any suggestion?
