fupsrl

04 – Engine Configuration and Channel Mapping

1 min read Updated 16 July 2026

Core/Inc/engine_config.h is the primary engine-adaptation file. It centralises the items that change per engine: cylinder count, firing order, channel assignment, dwell limit, boost timing and injector-comparator thresholds.

Included reference configuration

The repository defines an inline-four example with firing order 1-3-4-2 and 180 degree spacing. It is not a default for every engine. Do not copy its firing order, dwell limit, timing angles or injection assumptions into another build.

Configuration elements

Element Purpose
CYLINDER_COUNT Number of active cylinders represented by the firing table.
firing_order[] Physical cylinder ID, spacing in the 720 degree cycle, ignition channel and injector channel.
ign_hw[] Maps ignition channel numbers to MCU GPIO outputs.
inj_hw[] Maps injector channels to comparator, DAC, selection and boost resources.
Dwell and boost settings Hardware and load-dependent values requiring independent validation.
  1. Write the cylinder numbering and firing order for the target engine.
  2. Define the 0 to 720 degree convention and TDC reference.
  3. Map every coil and injector to the actual harness and board channel.
  4. Change one configuration dimension at a time, build, then test with passive loads.
  5. Review every channel after each change.

Suggested screenshot: annotated engine_config.h firing-order table after the configuration-elements table.