|
rusEFI
The most advanced open source ECU
|
Definition in file error_handling.cpp.
Variables | |
| static critical_msg_t | warningBuffer |
| static critical_msg_t | criticalErrorMessageBuffer |
| static critical_msg_t | configErrorMessageBuffer |
| bool | hasCriticalFirmwareErrorFlag = false |
| static bool | hasConfigErrorFlag = false |
| static bool | hasReportFile = false |
| bool | isInHardFaultHandler = false |
| const char * | dbg_panic_file |
| int | dbg_panic_line |
| static backupErrorState | lastBootError |
| static uint32_t | bootCount = 0 |
| bool | needErrorReportFile = false |
| uint32_t | lastLockTime |
| uint32_t | maxLockedDuration = 0 |
Definition at line 428 of file error_handling.cpp.

| void clearConfigErrorMessage | ( | ) |
Definition at line 62 of file error_handling.cpp.
| void configError | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 593 of file error_handling.cpp.
| void criticalErrorC | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 682 of file error_handling.cpp.

| void efiCriticalError | ( | const char * | message | ) |
Definition at line 50 of file error_handling.cpp.
Referenced by action_s::execute().

| const char * errorCookieToName | ( | ErrorCookie | cookie | ) |
Definition at line 134 of file error_handling.cpp.
| int errorHandlerCheckReportFiles | ( | ) |
Definition at line 343 of file error_handling.cpp.
Referenced by errorHandlerDeleteReports(), and sdReportStorageInit().


| void errorHandlerDeleteReports | ( | ) |
Definition at line 378 of file error_handling.cpp.
Referenced by sdModeExecuter().


|
static |
Definition at line 352 of file error_handling.cpp.
Referenced by errorHandlerDeleteReports().


|
static |
Definition at line 257 of file error_handling.cpp.
Referenced by errorHandlerDeleteTypedReport(), errorHandlerIsReportExist(), and errorHandlerWriteReportFile().

| void errorHandlerInit | ( | ) |
Definition at line 77 of file error_handling.cpp.
Referenced by runRusEfi().


|
static |
Definition at line 327 of file error_handling.cpp.
Referenced by errorHandlerCheckReportFiles().


| bool errorHandlerIsStartFromError | ( | ) |
Definition at line 126 of file error_handling.cpp.
|
static |
Definition at line 390 of file error_handling.cpp.
Referenced by chDbgPanic3(), firmwareErrorV(), and logHardFault().

| void errorHandlerShowBootReasonAndErrors | ( | ) |
Definition at line 232 of file error_handling.cpp.
Referenced by runRusEfi().

| void errorHandlerWriteReportFile | ( | FIL * | fd | ) |
Definition at line 275 of file error_handling.cpp.
Referenced by sdReportStorageInit().


Something really bad had happened - firmware cannot function, we cannot run the engine We definitely use this critical error approach in case of invalid configuration. If user sets a self-contradicting configuration we have to just put a hard stop on this.
see also warning()
Definition at line 670 of file error_handling.cpp.
Referenced by TriggerWaveform::addEvent(), applyEngineType(), assertInterruptPriority(), TriggerScheduler::assertNotInList(), assertTimeIsLinear(), TriggerWaveform::calculateExpectedEventCounts(), calculateTriggerSynchPoint(), MultiChannelStateSequence::checkSwitchTimes(), TripOdometer::consumeFuel(), AemXSeriesWideband::decodeRusefiStandard(), TriggerDecoderBase::decodeTriggerEvent(), EtbImpl< TBase >::doAutocal(), doInitElectronicThrottle(), efiExtiEnablePin(), ensureArrayIsAscending(), errorHandlerInit(), SingleTimerExecutor::executeAllPendingActions(), findIndexMsg(), TriggerCentral::findNextTriggerToothAngle(), TriggerStimulatorHelper::findTriggerSyncPoint(), getAdcChannelBrainPin(), getAirmassModel(), getCylinderNumberAtIndex(), getFiringOrderLength(), getFiringOrderTable(), getHwPin(), getHwPort(), getIgnitionPinForIndex(), getInjectionModeDurationMultiplier(), getMapCfg(), getNumberOfInjections(), getNumberOfSparks(), getPortIndex(), getPortIndex(), getPortIndex(), getSpiDevice(), gpio_pin_markUsed(), PwmConfig::handleCycleStart(), initAuxValves(), initEgoSensor(), initHistogram(), initializeSkippedToothTrigger(), OutputPin::initPin(), look_up_rpm_can_id(), look_up_vss_can_id(), onCliCaseError(), onCliDuplicateError(), onCliOverflowError(), TachometerModule::onFastCallback(), FLStack< T, MAXSIZE >::pop(), portSetHardwareSchedulerTimer(), FLStack< T, MAXSIZE >::push(), recalculateAuxValveTiming(), EventQueue::remove(), runBench(), SingleTimerExecutor::schedule(), setHardwareSchedulerTimer(), GppwmChannel::setOutput(), startCanPins(), swapOutputBuffers(), timerCallback(), timerValidationCallback(), turnOnTriggerInputPin(), InjectionEvent::update(), validateHardwareTimer(), validateThermistorConfig(), and wrapAngle().

in case of simple error message let's reduce stack usage chvsnprintf could cause an overflow if we're already low
Definition at line 605 of file error_handling.cpp.
Referenced by criticalErrorC(), and firmwareError().


| const char * getConfigErrorMessage | ( | ) |
Definition at line 601 of file error_handling.cpp.
Referenced by handleGetConfigErorr().

| const char * getCriticalErrorMessage | ( | ) |
Definition at line 54 of file error_handling.cpp.
Referenced by handleGetConfigErorr(), handleTestCommand(), and updateDevConsoleState().

| bool hasConfigError | ( | ) |
Definition at line 58 of file error_handling.cpp.
Referenced by updateTunerStudioState().

| bool hasErrorReportFile | ( | ) |
Definition at line 66 of file error_handling.cpp.
Referenced by updateTunerStudioState().

| void logHardFault | ( | uint32_t | type, |
| uintptr_t | faultAddress, | ||
| void * | sp, | ||
| port_extctx * | ctx, | ||
| uint32_t | csfr | ||
| ) |
Definition at line 402 of file error_handling.cpp.
Referenced by HardFault_Handler_C(), MemManage_Handler_C(), and UsageFault_Handler_C().


| PUBLIC_API_WEAK void onBoardWriteErrorFile | ( | FIL * | ) |
Definition at line 254 of file error_handling.cpp.
Referenced by errorHandlerWriteReportFile().

| void onLockHook | ( | void | ) |
this depends on chdebug.h patch #if CH_DBG_SYSTEM_STATE_CHECK == TRUE -#define _dbg_enter_lock() (ch.dbg.lock_cnt = (cnt_t)1) -#define _dbg_leave_lock() (ch.dbg.lock_cnt = (cnt_t)0) +#define _dbg_enter_lock() {(ch.dbg.lock_cnt = (cnt_t)1); ON_LOCK_HOOK;} +#define _dbg_leave_lock() {ON_UNLOCK_HOOK;(ch.dbg.lock_cnt = (cnt_t)0);} #endif
Definition at line 562 of file error_handling.cpp.

| void onUnlockHook | ( | void | ) |
Definition at line 572 of file error_handling.cpp.

Something is wrong, but we can live with it: some minor sensor is disconnected or something like that
see also firmwareError()
Definition at line 528 of file error_handling.cpp.
Referenced by TriggerWaveform::addEvent(), TriggerScheduler::assertNotInList(), assertPinAssigned(), TriggerStimulatorHelper::assertSyncPosition(), buildTimingMap(), FlexSensor::callback(), check(), customTrigger(), CanTsListener::decodeFrame(), AemXSeriesWideband::decodeRusefiDiag(), Engine::efiWatchdog(), findIndexMsg(), fireSparkBySettingPinLow(), IgnitionState::getAdvance(), SpeedDensityAirmass::getAirmass(), getBaroCorrection(), getCrankingFuel3(), getCylinderNumberAtIndex(), InjectorModelWithConfig::getFuelDifferentialPressure(), getInjectionOffset(), getInternalAdcValue(), getRunningAdvance(), IgnitionState::getSparkDwell(), IFuelComputer::getTCharge(), Pid::getUnclampedOutput(), TriggerCentral::handleShaftSignal(), handleVvtCamSignal(), interpolateMsg(), TriggerCentral::isToothExpectedNow(), mapAveragingAdcCallback(), PrimaryTriggerDecoder::onNotEnoughTeeth(), VvtTriggerDecoder::onNotEnoughTeeth(), SensorChecker::onSlowCallback(), PrimaryTriggerDecoder::onTooManyTeeth(), VvtTriggerDecoder::onTooManyTeeth(), onTriggerEventSparkLogic(), InjectionEvent::onTriggerTooth(), overFireSparkAndPrepareNextSchedule(), EngineState::periodicFastCallback(), prepareIgnitionSchedule(), readFromFlash(), sdFormat(), sdLoggerCreateFile(), setHardwareSchedulerTimer(), OutputPin::setOnchipValue(), SimplePwm::setSimplePwmDutyCycle(), startDwellByTurningSparkPinHigh(), startSimplePwm(), MapAverager::stop(), tooSoonToHandleSignal(), InjectionEvent::update(), LimpManager::updateState(), validateBaroMap(), and TriggerCentral::validateCamVvtCounters().

Same as above, but also report to user by pop-up window in TunerStudio
Definition at line 536 of file error_handling.cpp.
Referenced by Engine::periodicSlowCallback().


Definition at line 496 of file error_handling.cpp.
Referenced by warning(), and warningTsReport().


|
static |
Definition at line 74 of file error_handling.cpp.
Referenced by errorHandlerInit(), and errorHandlerWriteReportFile().
|
static |
Definition at line 33 of file error_handling.cpp.
Referenced by configError(), and getConfigErrorMessage().
|
static |
Definition at line 32 of file error_handling.cpp.
Referenced by firmwareErrorV(), and getCriticalErrorMessage().
| const char* dbg_panic_file |
Definition at line 46 of file error_handling.cpp.
Referenced by chDbgPanic3().
| int dbg_panic_line |
Definition at line 47 of file error_handling.cpp.
Referenced by chDbgPanic3().
|
static |
not critical error: TS would display text error message until clearConfigErrorMessage() is invoked
Definition at line 39 of file error_handling.cpp.
Referenced by clearConfigErrorMessage(), configError(), and hasConfigError().
| bool hasCriticalFirmwareErrorFlag = false |
Definition at line 35 of file error_handling.cpp.
Referenced by firmwareErrorV(), and warningVA().
|
static |
Definition at line 40 of file error_handling.cpp.
Referenced by errorHandlerCheckReportFiles(), and hasErrorReportFile().
| bool isInHardFaultHandler = false |
Definition at line 44 of file error_handling.cpp.
Referenced by gpiochips_writePad(), and logHardFault().
|
static |
Definition at line 73 of file error_handling.cpp.
Referenced by errorHandlerInit(), errorHandlerIsStartFromError(), errorHandlerShowBootReasonAndErrors(), and errorHandlerWriteReportFile().
| uint32_t lastLockTime |
Definition at line 545 of file error_handling.cpp.
Referenced by onLockHook(), and onUnlockHook().
| uint32_t maxLockedDuration = 0 |
Maximum time before requesting lock and releasing lock at the end of critical section
Definition at line 549 of file error_handling.cpp.
Referenced by onUnlockHook(), printRuntimeStats(), resetMaxValues(), and updateTunerStudioState().
| bool needErrorReportFile = false |
Definition at line 273 of file error_handling.cpp.
Referenced by errorHandlerWriteReportFile().
|
static |
Definition at line 31 of file error_handling.cpp.
Referenced by warningVA().