Configuration Reference

Normative

The minimum configuration items a conformant CAN driver MUST support (CHI-CAN-MUST-26). This does not fix the configuration toolchain, data structure, or file schema — those are implementation-defined. Vendor-specific extensions are allowed. For a worked example, see Configuration. Ranges marked implementation-defined are bounded by the target hardware.

General
General options

Property

Type

Description

enable_development_error_reporting

bool

If true, development error checking and reporting is enabled (see Errors).

enable_set_baud_rate_api

bool

If true, Can_SetBaudrate is supported (CHI-CAN-SHOULD-01).

Configuration set and channel
ConfigSet

Property

Type

Description

config_set_name

str

Name of the configuration set; must be a valid C identifier.

channel

List[Channel]

Per-channel configurations. Size ≥ 1; maximum is implementation-defined.

Channel

Property

Type

Description

channel_id

int

Logical channel id. Starts at 0, unique within a ConfigSet.

hw_channel

impl-defined

Hardware channel assigned to this logical channel (typically an integer or HW enum).

tx_processing

EventHandlingMode

Interrupt or Polling for transmit events.

rx_processing

EventHandlingMode

Interrupt or Polling for reception events.

bus_off_processing

EventHandlingMode

Interrupt or Polling for bus-off events.

input_clock_freq

int

CAN channel input clock frequency in Hz (range implementation-defined).

baud_rate_config

BaudRateConfig | BaudRateConfigFd

Baudrate configuration for the channel.

mailbox_config

List[TxMailbox | RxMailbox]

Mailbox configurations (size implementation-defined).

Baudrate configuration
BaudRateConfig (classic CAN)

Property

Type

Description

Range

baud_rate_config_id

int

Identifies this baudrate set (used by Can_SetBaudrate).

[0, 65535]

baud_rate

int

Channel baudrate in kbps.

[1, 2000]

prop_seg

int

Propagation delay in time quanta.

[0, 255]

seg_1

int

Phase segment 1 in time quanta.

[0, 255]

seg_2

int

Phase segment 2 in time quanta.

[0, 255]

sync_jump_width

int

Synchronization jump width in time quanta.

[0, 255]

mode

Literal[‘CAN’]

Selects classic CAN mode.

BaudRateConfigFd (CAN FD)

As BaudRateConfig (baud_rate_config_id, baud_rate, prop_seg, seg_1, seg_2, sync_jump_width), plus:

Property

Type

Description

fd_baud_rate_config

FdBaudRateConfig

CAN FD data-phase baudrate settings.

mode

Literal[‘CANFD’]

Selects CAN FD mode.

FdBaudRateConfig

Property

Type

Description

Range

fd_baud_rate

int

Data-phase baudrate in kbps.

[1, 16000]

tx_bit_rate_switch

bool

Enable bitrate switching for transmit.

prop_seg / seg_1 / seg_2 / sync_jump_width

int

Data-phase bit timing in time quanta.

[0, 255]

ssp_offset

int | null

Transmitter delay-compensation offset in min. time quanta (optional; for fast bit rates).

[0, 255]

Mailboxes and filters
TxMailbox

Property

Type

Description

Range

mailbox_id

int

Mailbox id; starts at 0, consecutive within a ConfigSet.

[0, impl]

id_type

IdType

Identifier type.

Standard | Extended | Mixed

hw_object_count

int

Number of hardware objects implementing this TX mailbox.

[1, 65535]

object_payload_length

ObjectPayloadLength

Payload length of the object.

8…64 bytes

fd_padding_value

int | null

Padding for CAN FD frames > 8 bytes (required when payload > 8 bytes).

[0, 255]

mailbox_type

Literal[‘Transmit’]

Marks the mailbox as transmit.

RxMailbox

Property

Type

Description

Range

mailbox_id

int

Mailbox id; starts at 0, consecutive within a ConfigSet.

[0, impl]

id_type

IdType

Identifier type.

Standard | Extended | Mixed

hw_object_count

int

Number of hardware objects implementing this RX mailbox.

[1, 65535]

object_payload_length

ObjectPayloadLength

Payload length of the object.

8…64 bytes

mailbox_type

Literal[‘Receive’]

Marks the mailbox as receive.

hw_filter

List[HwFilter]

Acceptance filter configuration (size ≥ 1; maximum implementation-defined).

Filter types other than BasicHwFilter are allowed as extensions; an extended class must carry a filter_type literal distinct from Basic.

HwFilter

Property

Type

Description

Range

hw_filter_code

int

Identifier range that passes the filter (with the mask).

[0, 4294967295]

hw_filter_mask

int

Mask for hardware-based CAN identifier filtering.

[0, 4294967295]

filter_type

Literal[‘Basic’]

Filter type represented by the class.