Bus Layer-Architecture

This layer implements the buffered CAN message handling for one or more busses. All access to the CAN controller shall be done with this layer.


Figure - Bus Layer Architecture


The CAN bus layer is configurable during compile time to minimize memory footprint and optimize performance. The following list shows the configuration parameters and their functionality:


Configuration

Meaning

Range

Default

CANBUS_EN

This parameter enables (1) or disables (0) the CAN bus management, e.g. the usage of μC/CAN.

0 / 1

1

CANBUS_N

This parameter defines the maximal number of managed CAN busses.

1 ... 255

1


CANBUS_ARG_CHK_EN

This parameter enables (1) or disables (0) the argument checking of the CAN bus API functions.

0 / 1

1

CANBUS_TX_HANDLER_EN

This parameter enables (1) or disables (0) the usage of function CanBusTxHandler().

0 / 1

1

CANBUS_RX_HANDLER_EN

This parameter enables (1) or disables (0) the usage of function CanBusRxHandler().

0 / 1

1

CANBUS_NS_HANDLER_EN

This parameter enables (1) or disables (0) the usage of function CanBusNsHandler().

0 / 1

1

CANBUS_STAT_EN

This parameter enables (1) or disables (0) the statistic information collection.

0 / 1

0

CANBUS_RX_QSIZE

The size of the receive queues in CAN frames.

1 ... 65535

2

CANBUS_TX_QSIZE

The size of the transmit queues in CAN frames.

1 ... 65535

2

CANBUS_HOOK_NS_EN

Enable node status handler hook function.

0 / 1

0

CANBUS_HOOK_RX_EN

Enable receive handler hook function.

0 / 1

0