You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After performing some static code analysis on bms.c state machine, I wonder if I found a fatal flaw for general progression inside the "NORMAL" state.
It seems like BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR is only able to exit due to timeout, which should never occur due to constant reset in the entrance of the substate. So it seems to me that the whole BMS state machine will get stuck in the "NORMAL" state
elseif (bms_state.substate==BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR) {
contactorState=CONT_GetContactorState(nextStringNumber, CONT_MINUS);
if (contactorState==CONT_SWITCH_ON) {
/* First string contactor closed. Close second string contactor */CONT_CloseContactor(nextStringNumber, CONT_PLUS);
bms_state.timer=BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR;
bms_state.substate=BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR;
} elseif (bms_state.stringCloseTimeout==0u) {
/* String takes too long to close */bms_state.timer=BMS_STATEMACH_SHORTTIME;
bms_state.state=BMS_STATEMACH_OPEN_CONTACTORS;
bms_state.nextstate=BMS_STATEMACH_ERROR;
bms_state.substate=BMS_ENTRY;
break;
} else {
/* String minus contactor has not been closed successfully. Re-trigger closing */CONT_CloseContactor(nextStringNumber, CONT_MINUS);
bms_state.timer=BMS_STATEMACH_SHORTTIME;
}
The text was updated successfully, but these errors were encountered:
Hello,
After performing some static code analysis on bms.c state machine, I wonder if I found a fatal flaw for general progression inside the "NORMAL" state.
It seems like BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR is only able to exit due to timeout, which should never occur due to constant reset in the entrance of the substate. So it seems to me that the whole BMS state machine will get stuck in the "NORMAL" state
The text was updated successfully, but these errors were encountered: