Design Decisions
Informative
The rationale behind the LIN driver contract. This helps implementers get the behavior right; it is not itself a requirement. Each entry points to the requirement it explains.
Why responder mode only?
Governs CHI-LIN-MUST-01.
The driver targets small, cost-sensitive ECUs that act as LIN responders (formerly “slaves”). Commander (master) behavior — running a schedule table and originating headers — adds significant state and timing machinery that those nodes do not need. Restricting the driver to responder mode keeps it small and predictable; the commander role belongs to a dedicated node or a higher layer.
Implication for implementers: do not implement schedule tables or header generation; react to
received headers via LinIf_OnHeader.
Why does Lin_Init take only NULL_PTR?
Relates to CHI-LIN-MUST-14.
Configuration variants are selected at build time (a generated configuration set), not passed as a
runtime pointer. Requiring configPtr == NULL_PTR keeps the interface stable and avoids implying
a runtime variant-selection mechanism that the driver does not provide.
Implication for implementers: bind the active configuration at build time; reject a non-null
configPtr as a development error.
Why no software PID-parity verification?
Governs CHI-LIN-MUST-07.
PID parity is cheap to check in hardware and redundant to re-check in software; on hardware that
does not expose parity errors, a software check cannot see the raw bits reliably. The driver
therefore reports LIN_ERR_PID_PARITY only where the hardware detects it, rather than mandating a
software check that would add cost without dependable coverage.
Implication for implementers: surface hardware parity errors where available; do not add a software parity path.
Why are system resources external?
Relates to CHI-LIN-MUST-02.
Input clock, port pins, and the interrupt controller are shared, board-level resources configured once by a dedicated module. Having the LIN driver assume they are ready — rather than own them — avoids conflicts with other drivers and keeps the driver portable across boards.
Implication for implementers: assume clock/port/interrupt are set up before Lin_Init; do not
configure them in the LIN driver.