ECU program operation sequence:
The 6803U4 microcontroller has a 16 bit timer with 2 input capture and 3 output compare registers. To maximise processing speed these are used to create interrupts which stop the processing of the main program when a crank / phase pulse is detected or an ignition / injection etc output is required. The program operates in two stages. A stopped / low rpm (cranking) stage where the crank / phase pulses are occurring relatively slowly. When the rpm gets high enough it then swaps to the running stage. If the period between crank pulses then exceeds a time threshold the engine will be deemed to have stopped and the program will restart to the initial stage again.
Shown below is a simplified flow chart of the program processing order for L1 - L8 ecus.