...
The diagram is shown below, hexagons representing the sequence steps. The states themselves have no real functionality in their output functions.
...
...
Power Aux Sequence
...
Transmit CONFIRM_AUX_STATUS and receive ack OK
...
checking any aux faults before enabling power
...
*
Confirm a valid aux status has been received from Power Select Info message
Correct status bits should be set in the message
No fault bits should be set
confirm_aux_status
Tell power select to check any aux faults before enabling power (Maybe not needed in main seq?)
Transmit TURN_ON_EVERYTHING to Power Distribution and receive ack OK
Sent to power distribution, which turns on outputs needed for aux state
Power Main Sequence:
Power main sequence needs to send the following messages and receive an ack for each.
Turn on bms, wait for ackBPS heartbeat
Once Power Distribution has turned everything on, we wait for BMS to power up and send heartbeat message, indicating that the power on was successful
*From Power Aux, if a fault condition is detected (ie invalid power select status message) we should return to off
Power main sequence
Confirm Aux Status
Confirm no issues with aux supply at Power Select
Check power select message for valid aux status, and no faults
Power on boards
Tell Power distribution to power on BMS board (do this separately to run independent bms checks)
confirm_battery_status
Battery checks, waits for ack
- close_battery_relays
all outputs
Confirm battery status
Wait for BMS to start up and reply with a Heartbeat and status message
This indicates initial state is all good
Close Relays
Transmit message to BMS to close relays and switch to main power
Transmits to BMS to close relays
confirm_dcdc
Power Select confirms DCDC
turn_on_everything
Power Distribution enables all boards
power_main_complete
Confirm DCDC
Check at power select that main power (DCDC) is now in use
Power Main Complete
Sends “ready to drive” to MCI
Start BPS watchdog
Power Off Sequence:
Discharge Precharge
Send message to MCI to discharge precharge
Tell Power distribution to turn off the relevant boards
Open Relays (Transition to fault on BPS Fault)
Tell BMS to open the relays (receive ack)
Confirm Back to Aux with power select
Turn Off everything
Tell Power distribution to turn off everything except for power select, centre console, and pedal
Fault
This state covers a BPS fault during operation. It occurs if we receive a message from BMS saying that we have a fault condition, or a timeout occurs on the BPS heartbeat message
If a message is received saying that a fault has occurred, then we can attempt to handle the specific fault
If a BPS timeout has occurred, we must discharge MCI and loop until BPS communication resumes, or the car is power cycled.
BPS indicator is on during this time (and hazard lights flash as well I believe)
...