backup RAM error code integration with TS #5325

This commit is contained in:
rusefi 2023-06-14 18:40:03 -04:00
parent 25b05bbf08
commit 9c9f6f3009
2 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,7 @@ void setHyundaiPb() {
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
engineConfiguration->hpfpCamLobes = 4;
engineConfiguration->rethrowHardFault = true;
engineConfiguration->highPressureFuel.v1 = 0.5; /* volts */;
engineConfiguration->highPressureFuel.value1 = 0;

View File

@ -34,6 +34,9 @@ void checkLastBootError() {
break;
case ErrorCookie::HardFault: {
efiPrintf("Last boot had hard fault type: %x addr: %x CSFR: %x", sramState->FaultType, sramState->FaultAddress, sramState->Csfr);
if (engineConfiguration->rethrowHardFault) {
firmwareError(ObdCode::OBD_PCM_Processor_Fault, "Last boot had hard fault type: %x addr: %x CSFR: %x", sramState->FaultType, sramState->FaultAddress, sramState->Csfr);
}
// Print out the context as a sequence of uintptr
uintptr_t* data = reinterpret_cast<uintptr_t*>(&sramState->FaultCtx);