Sporadic error: FATAL error: handleCycleStart #1030

more details
This commit is contained in:
rusefi 2019-11-24 21:45:32 -05:00
parent 5292024a81
commit 612649e191
3 changed files with 13 additions and 8 deletions

View File

@ -2058,7 +2058,7 @@ typedef enum {
CUSTOM_ERR_ZERO_CRANKING_FUEL = 6694,
CUSTOM_ERR_6695 = 6695,
CUSTOM_ERR_6696 = 6696,
CUSTOM_ERR_6697 = 6697,
CUSTOM_PWM_CYCLE_START = 6697,
CUSTOM_ERR_ARRAY_IS_FULL = 6698,
CUSTOM_ERR_ARRAY_REMOVE_ERROR = 6699,
CUSTOM_ERR_INVALID_INPUT_ICU_PIN = 6700,
@ -2069,7 +2069,7 @@ typedef enum {
CUSTOM_ERR_6703 = 6703,
CUSTOM_ERR_BOTH_FRONTS_REQUIRED = 6704,
CUSTOM_TLE8888 = 6705,
CUSTOM_ERR_6706 = 6706,
CUSTOM_KNOCK_WINDOW = 6706,
CUSTOM_ERR_TIMER_TEST_CALLBACK_NOT_HAPPENED = 6707,
CUSTOM_ERR_TIMER_TEST_CALLBACK_WRONG_TIME = 6708,
CUSTOM_ERR_6709 = 6709,

View File

@ -137,10 +137,15 @@ void PwmConfig::stop() {
}
void PwmConfig::handleCycleStart() {
efiAssertVoid(CUSTOM_ERR_6697, safe.phaseIndex == 0, "handleCycleStart");
if (pwmCycleCallback != NULL) {
pwmCycleCallback(this);
}
if (safe.phaseIndex != 0) {
// https://github.com/rusefi/rusefi/issues/1030
firmwareError(CUSTOM_PWM_CYCLE_START, "handleCycleStart %d", safe.phaseIndex);
return;
}
if (pwmCycleCallback != NULL) {
pwmCycleCallback(this);
}
efiAssertVoid(CUSTOM_ERR_6580, periodNt != 0, "period not initialized");
if (safe.periodNt != periodNt || safe.iteration == ITERATION_LIMIT) {
/**

View File

@ -255,13 +255,13 @@ static void intHoldCallback(trigger_event_e ckpEventType, uint32_t index DECLARE
int structIndex = getRevolutionCounter() % 2;
// todo: schedule this based on closest trigger event, same as ignition works
scheduleByAngle(&startTimer[structIndex], engineConfiguration->knockDetectionWindowStart,
(schfunc_t) &startIntegration, NULL PASS_ENGINE_PARAMETER_SUFFIX);
(schfunc_t) &startIntegration, NULL);
#if EFI_PROD_CODE
hipLastExecutionCount = lastExecutionCount;
#endif /* EFI_PROD_CODE */
scheduleByAngle(&endTimer[structIndex], engineConfiguration->knockDetectionWindowEnd,
(schfunc_t) &endIntegration,
NULL PASS_ENGINE_PARAMETER_SUFFIX);
NULL);
engine->m.hipCbTime = getTimeNowLowerNt() - engine->m.beforeHipCb;
}