Hi,
I am trying to test the ECC logic and the code is something like below:
/* Double-bit error in Data */
FECC_CTRL.bit.ECC_TEST_EN = 0;
FADDR_TEST.all = <Address>;
FDATAH_TEST = <SomeData>
FDATAL_TEST = <SomeData with double bit error>
FECC_TEST.all = <ECC>;
FECC_CTRL.bit.ECC_SELECT = 0;
FECC_CTRL.bit.ECC_TEST_EN = 1;
FECC_CTRL.bit.DO_ECC_CALC = 1;
NMIFLGCLR.all = 0x0E7F; /* Clear NMI flags */
if(FECC_STATUS.bit.UNC_ERR != 1)
{
/* ECC logic did not work, error */
}
The above code works fine without generating processor reset. But if I move the instruction "NMIFLGCLR.all = 0x0E7F;" after the if condition, the processor keeps getting reset.
I want to first check if "NMIINT" flag has been set and then I want to clear the flag, not just clear the flag. But as soon as I do any small operation (even a simple assignment) after "DO_ECC_CALC = 1", the processor gets reset.
When I check NMIWDCNT at the time of reset, it is only either "0xAA" or 0xAB" which is not even close to NMIWDPRD that is set to 0xFFFF,
I am able to test the single bit errors in data and in ECC without any problem. The only problem is with Uncorrectable errors (double bit error in data/ECC or single bit error in address).
I am using CCS8.1.0.00011.
Thank you.