...
Validation Steps | Initial Conditions | Outputs | |
---|---|---|---|
| Check for each power state, ensure only the correct outputs are set
| N/A | See Power Distribution Design doc for expected outputs |
| On startup, output group enabled is POWER_FSM_OUTPUT_OFF | Initial Power On | Initial state is Power FSM OFF (BMS and Centre Console Outputs Enabled) LOG: STATE = POWER_OFF |
| Both centre console messages
should cause a transition to TRANSMIT_BMS_CLOSE_RELAYS. After 3sec with no relay message, we should return to POWER_OFF | From POWER_OFF send | CAN TX: relay_request_set_relays == EE_RELAY_STATE_CLOSED LOG: STATE = BMS_RELAYS after 3 seconds LOG: STATE = POWER OFF OUTPUT: POWER_OFF |
| If PD receives a PWR_CTL_EVENT_BTN and then a relays_closed state from BMS, we should transition to POWER_ON, and stay there | From POWER_OFF send and battery_relay_info_state == EE_RELAY_STATE_CLOSED | CAN_TX:
LOG: Transitioned to DRIVE STATE OUTPUT: POWER_ON |
| Centre console message
should cause a transition to POWER_OFF | From POWER_ON, send either of the two PWR_CTL_EVENTS to the controller board | CAN_TX:
LOG: Transitioned to OFF STATE OUTPUT: POWER_OFF |
| If we receive EE_CC_PWR_CTL_EVENT_BTN_AND_BRAKE in POWER_ON state, we should transition to TURN_ON_DRIVE_OUTPUTS. If we don’t receive a message from MCI, we should return to POWER_ON | From POWER_ON, send EE_CC_PWR_CTL_EVENT_BTN_AND_BRAKE. We should transition to TURN_ON_DRIVE_OUTPUTS which sets the output group to POWER_DRIVE, and then after 3 cycles return to POWER_ON | CAN_TX:
LOG: transition to TURN_ON_OUTPUTS OUTPUT: POWER_DRIVE *after 3 cycle timeout* LOG: transition to POWER_ON OUTPUT: POWER_ON |
| A successful transition to POWER_DRIVE from POWER_OFF requires the following in order:
| Start in POWER_OFF, send 3 messages described | CAN_TX: (each updated state will send a new message)
|
| If we are in power drive, and we receive either PWR_CTL_EVENT, we should transition to POWER_ON. receiving a second event (EE_CC_PWR_CTL_EVENT_BTN without brake) will transition us to POWER_OFF | Start in POWER_DRIVE. Send:
| CAN_TX: (each updated state will send a new message)
LOG (look for each state printed as we transition)
|
| If we are in power drive, and we receive either PWR_CTL_EVENT, we should transition to POWER_ON. Receiving EE_CC_PWR_CTL_EVENT_BTN_AND_BRAKE should send us back to POWER_DRIVE | Start in POWER_DRIVE. Send:
| |
Fault Conditions | Faults occur, only when we lose communication with BMS. For each state, we need to see that it successfully transitions to fault on not receiving the BMS Message | ||
| On startup, if no BMS status message is received for 3 cycles we should automatically transition to the fault state | Start in POWER_OFF (automatically done on startup) | |
| if no BMS status message is received for 3 cycles we should automatically transition to the fault state | Start in BMS_RELAYS | |
| if no BMS status message is received for 3 cycles we should automatically transition to the fault state | Start in POWER_ON | |
| if no BMS status message is received for 3 cycles we should automatically transition to the fault state | Start in TURN_ON_DRIVE_OUTPUTS | |
| if no BMS status message is received for 3 cycles we should automatically transition to the fault state | Start in POWER_DRIVE |
...