ECU States
Overview
There are several important states that the ECU can be in when controlling any connected systems (such as an engine).
States
Off
The ECU is not powered.
Powered
The ECU is powered, typically when turning the Ignition key to the ‘on’ position.
When the ECU is initially powered, it will run through the Boot process and then enter the Initialization state.
Boot
After powering on, the ECU will ‘boot’ up (short for ‘bootstrap’).
During boot, if the application firmware is considered valid (not corrupted), the ECU will run the ‘firmware’ and booting is complete.
If the application is not valid then the ECU will be in ‘bootloader’ mode, indicated by the Stat In Boot mode channel.
The bootloader provides facilities to update (load) the application firmware without specialized programming tools.
The application firmware could become invalid due to rare memory corruption events or due to a failed firmware update.
Initialization
When the application firmware begins execution, it will further initialize the ECU hardware and software.
Then Main Relay is On, and Main Relay Off timer = 0.
The Main Relay allows the ECU to have control over when power is fully cut for graceful shutdown.
If engine is not running, the Stopped channel counts up to 33 seconds.
Run Time timer will count from 0.
The
Fuel Pump will be On and run for
Fuel Pump Prime seconds.
Start Pulse Pending will be On.
The main relay can be shut off for safety reasons after Stopped exceeds
Safety Time if
Main Relay Safety is On, this will disable fans for instance.
Cranking
The cranking state is indicated by the Stat Cranking channel.
Note that the ECU will report that it is in the ‘Cranking’ state at power-up, before any input from Start Pulse pin is detected.
Starting / stopping of the engine is covered in more detail in the Starting the Engine / Ignition Key section.
Running
The ECU has detected that the engine / system is in motion, indicated by the Stat Running channel.
The running state is entered if any crank teeth are detected after the ECU has been powered on.
Stat Running is cleared after no crank events are detected for 4 seconds.
Some GWv4 actions are rejected by the ECU if it is in the running state:
Synchronized
The ECU has synchronized with the timing wheel input(s) and determined the engine cycle position.
This state is indicated by the Stat Sync'd channel.
Shutting Down
The ignition key is turned to Off, the shutdown process is initiated.
The ECU keeps itself alive for a configurable time to allow for graceful shutdown / cooling.
For more details on the Main Relay control during shutdown, see the Starting the Engine / Ignition Key section. data indicated by Error EE Checksum if option
Auto EE is On.
Programming NVM / Unsaved Changes
The Stat Prog EE state is entered whilst the ECU is saving calibration changes to non-volatile memory.
The
Error EE Checksum channel indicates a state where the ECU detects that it has un-committed calibration changes.
See Storing Calibration Changes Permanently for more information.