Configuration

Informative

A worked LIN channel configuration. The full property tables are in Configuration Reference; the binding rule is CHI-LIN-MUST-19.

A channel configuration

general:
  enable_development_error_reporting: true      # detect and log wrong API usage

config_set:
  - config_set_name: "LinCfg"
    channel:
      - channel_id: 0                           # logical id, starts at 0
        hw_channel: 0                           # target LIN hardware instance
        clock_divider: 16                       # derives LIN bit timing from the input clock
        event_handling_mode: "Interrupt"        # or "Polling" (serviced by Lin_PollFunction)
        enable_wakeup_detection: true           # detect wakeup pulses in SLEEP

Notes

  • No baudrate or frame tables. A responder derives timing from clock_divider and adapts to each received header at runtime — there is no schedule table to configure.

  • Event handling is per channel. With Polling you must call Lin_PollFunction cyclically (see Handle a transaction); with Interrupt the driver services events in Lin_Interrupt.

  • Wakeup detection must be enabled if the channel has to detect bus wakeups while asleep.