States

If an error occurs and is detected by the MCU, it will set a violation to report the error and it may also change to the ERROR or CRITICAL_ERROR state depending on the severity. This information is transmitted over the CAN Bus.

  • OFF: Default power-up state

  • INIT: Initialization

  • STANDBY: Waiting for torque sensor signal

  • DRIVE: Normal Operation

  • ERROR: Bypass operation

  • CRITICAL_ERROR: Silent Operation

When the MCU exits the bootloader, the MCU is in the OFF state. When the main loop starts it enters the INIT state. This happens before the initialization of the peripherals and interrupts. After successful initialization, the MCU will then enter STANDBY. When the MCU receives a valid message from the torque sensor it will enter the DRIVE state.

OFF -> INIT -> STANDBY -> DRIVE

All states can be overridden by the CRITICAL_ERROR state.

All states except CRITICAL_ERROR can be overridden by ERROR state

STANDBY state can be overridden by a DRIVE state.

INIT state can be overridden by the STANDBY state.

OFF state can be overridden by the INIT state.

Last updated