Name

FlexCAN — CAN Driver

Description

This driver supports the FlexCAN CAN devices available in some NXP i.MXRT microprocessors.

Filter

The device provides filtering support that is compatible with the filter model defined by the CAN subsystem, and therefore hardware filtering is employed.

Baud Rates

The following baud rates are supported: 1Mb/s, 500kb/s, 250kb/s, 125kb/s, 100kb/s, 50kb/s, and 20kb/s.

Configuration

This driver requires an external package to configure it for the particular microcontroller, normally the platform (PLF) or variant (VAR) HAL. Each CAN channel is then implemented by a controller instance as specified.

For each channel # supported the CDL script in this package will provide the following configuration options:

cdl_component CYGPKG_DEVS_CAN_CHANNEL#

This defines whether the channel is included. It depends on the associated FLEXCAN controller being implemented for the platform.

[Note]Note

The CAN channels are numbered logically from 0, whereas the physical FLEXCAN controllers are numbered from 1. So if the platform supports the FLEXCAN2 controller the correspoding CAN channel device name will be “can1” by default.

cdl_option CYGPKG_DEVS_CAN_CHANNEL#_NAME
This defines the name of the channel. This is the name that an eCos application should use to access the device via the I/O API.
cdl_option CYGPKG_DEVS_CAN_CHANNEL#_INTERRUPT_PRI
This option defines the interrupt priority for the FLEXCAN controller interrupts.
cdl_option CYGPKG_DEVS_CAN_CHANNEL#_MB_RX

This option defines the number of MailBox (MB) slots available for use as RX buffers. The minimum acceptable setting allowed being 2 dedicated RX buffers. However, for normal application configurations it is expected that more RX buffers will be required than TX buffers, so the default reflects such “normal” ratio.

The number of available TX mailboxes (CYGPKG_DEVS_CAN_CHANNEL#_MB_TX) is calculated as the number of remaining mailboxes after the RX allocation.

cdl_option CYGPKG_DEVS_CAN_CHANNEL#_BITRATE
This option defines the start-of-day (default) bitrate for the CAN channel.