Other Parts Discussed in Thread: HALCOGEN
Hello,
I am trying to write some test code that simply tracks the total # of single bit ECC corrections and double bit uncorrectable errors. My code fills an array of RAM with known values and then just sits there reading it back checking for errors against the known value.
I've gone through HalCoGen to initialize everything and the checkRAMECC function appears to work. I've modified the instruction that branches to itself forever to
ramErrorReal
bl dataAbort2bit ; branch to custom abort handler in dAbortInterrupt.c
ldmfd r13!, {r0 - r12, lr}
subs pc, lr, #0x4
with my custom function simply increasing a global variable to track total 2 bit errors (when my test finds a value that's wrong, it corrects rewrites it to the known value, so I don't expect 1 double-bit error to increase my counter indefinitely:
void dataAbort2bit(void)
{
gioSetBit(hetPORT1, 17, 1);
ECC2_errors++;
}
However, I can't figure out how to do something similarly for the single bit errors sing the error handling is built into the CPU for speed purposes. I've thought about setting the RAMTHRESHOLD register really high and reading the RAMOCCUR register, but then my single bit errors won't actually be fixed by the CPU. Is there a way I can let the built-in process fix the single bit error, but still have an interrupt called that allows me to keep track of the single-bit event?
Thanks,
Andrew