diff --git a/firmware/config/engines/hyundai.cpp b/firmware/config/engines/hyundai.cpp index b9a48a10de..a1940f476a 100644 --- a/firmware/config/engines/hyundai.cpp +++ b/firmware/config/engines/hyundai.cpp @@ -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; diff --git a/firmware/controllers/core/error_handling.cpp b/firmware/controllers/core/error_handling.cpp index c77b26e02b..81806cd3ea 100644 --- a/firmware/controllers/core/error_handling.cpp +++ b/firmware/controllers/core/error_handling.cpp @@ -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(&sramState->FaultCtx);