Other Parts Discussed in Thread: HALCOGEN
When checkRAMECC(void) is being called in sys_startup.c (HalCoGen 4.05.02) a data-abort is being generated when testing double bit errors (which is good).
When I try to recover stack in abort handler (code below) the remains of checkRAMECC(void) is being executed but then a reset occurs at end of function.
Why would that be?
I also run in problems when recovering from data-abort in other situations but chose this example as OS is not loaded yet and all code except abort-handler is auto-generated.
Many Thanks - Christian
void vDataAbort( void )
{
volatile portUInt32Type ulDataFaultStatusReg = 0;
volatile portUInt32Type ulDataFaultAddressReg = 0;
ulDataFaultStatusReg = ulGetDataFaultStatusRegister();
ulDataFaultAddressReg = ulGetDataFaultAddressRegister();
boolean resume = FALSE;
// determine whether to resume execution
processAbortError(ulDataFaultStatusReg, ulDataFaultAddressReg, DATA_ABORT, &resume);
if (resume == FALSE)
{
// enter endless loop
prvAbortLoop();
}
else
{
// recover callstack
// from https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/170682
asm(" ldr r0,[sp,#8]");
asm(" add r0,r0,#4");
asm(" str r0,[sp,#8]");
}
}