Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The power FSM governs the power state of the car. There are 4 main States:

  • POWER_OFF

  • POWER_MAIN

  • POWER_AUX

  • POWER_FAULT

For the main power states however, when we are transitioning there is a sequence of checks we run to make sure that the system is in a correct state to allow a transition. These steps typically involve sending a CAN message to another system, waiting for it to do its checks and balances and then receiving an acknowledgement (ACK) message. If these checks fail, we will transition back to the normal power state.

The sequence model for these states is along the following lines:

...

  1. confirm_aux_status

    1. Tell power select to check any aux faults before enabling power (Maybe not needed in main seq?)

  2. Turn on bms, wait for ack

    1. Tell Power distribution to power on BMS board (do this separately to run independent bms checks)

  3. confirm_battery_status

    1. Battery checks, waits for ack

  4. close_battery_relays

    1. Transmits to BMS to close relays

  5. confirm_dcdc

    1. Power Select confirms DCDC

  6. turn_on_everything

    1. Power Distribution enables all boards

  7. power_main_complete

    1. Sends “ready to drive” to MCI

    2. Start BPS watchdog

Power Off Sequence:

  1. Discharge Precharge

    1. Send message to MCI to discharge precharge

  2. Turn Off everything

    1. Tell Power distribution to turn off the relevant boards

  3. Open Relays (Transition to fault on BPS Fault)

    1. Tell BMS to open the relays (receive ack)

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)

...