The S32 SDK provides a Peripheral Driver for the FlexCAN module of S32 SDK devices.
Hardware background
The FlexCAN module is a communication controller implementing the CAN protocol according to the ISO 11898-1 standard and CAN 2.0 B protocol specifications. The FlexCAN module is a full implementation of the CAN protocol specification, the CAN with Flexible Data rate (CAN FD) protocol and the CAN 2.0 version B protocol, which supports both standard and extended message frames and long payloads up to 64 bytes transferred at faster rates up to 8 Mbps. The message buffers are stored in an embedded RAM dedicated to the FlexCAN module.
The FlexCAN module includes these distinctive features:
- Full implementation of the CAN with Flexible Data Rate (CAN FD) protocol specification and CAN protocol specification, Version 2.0 B (see the FEATURE_CAN_HAS_FD define for the availability of this feature on each platform)
- Standard data frames
- Extended data frames
- Zero to sixty four bytes data length
- Programmable bit rate (see the chip-specific FlexCAN information for the specific maximum bit rate configuration)
- Content-related addressing
- Compliant with the ISO 11898-1 standard
- Flexible mailboxes configurable to store 0 to 8, 16, 32 or 64 bytes data length (payloads longer than 8 bytes are available only for some platforms, see the FEATURE_CAN_HAS_FD define)
- Each mailbox configurable as receive or transmit, all supporting standard and extended messages
- Individual Rx Mask registers per mailbox
- Full-featured Rx FIFO with storage capacity for up to six frames and automatic internal pointer handling with DMA support (DMA support is available only for some platforms, see the FEATURE_CAN_HAS_DMA_ENABLE define)
- Transmission abort capability
- Flexible message buffers (MBs) configurable as Rx or Tx (see the FEATURE_CAN_MAX_MB_NUM define for the specific maximum number of message buffers configurable on each platform)
- Programmable clock source to the CAN Protocol Interface, either peripheral clock or oscillator clock (this feature might differ depending on the platform, see FEATURE_CAN_HAS_PE_CLKSRC_SELECT define for the availability of this feature on each platform)
- RAM not used by reception or transmission structures can be used as general purpose RAM space
- Listen-Only mode capability
- Programmable Loop-Back mode supporting self-test operation
- Maskable interrupts
- Short latency time due to an arbitration scheme for high-priority messages
- Low power modes or matching with received frames - Pretended Networking (see FEATURE_CAN_HAS_PRETENDED_NETWORKING define for the availability of this feature on each platform)
- Transceiver Delay Compensation feature when transmitting CAN FD messages at faster data rates (see the FEATURE_CAN_HAS_FD define for the availability of this feature on each platform)
- Remote request frames may be handled automatically or by software
- CAN bit time settings and configuration bits can only be written in Freeze mode
- SYNCH bit available in Error in Status 1 register to inform that the module is synchronous with CAN bus
- CRC status for transmitted message
- Rx FIFO Global Mask register
- Selectable priority between mailboxes and Rx FIFO during matching process
- Powerful Rx FIFO ID filtering, capable of matching incoming IDs against either 128 extended, 256 standard, or 512 partial (8 bit) IDs, with up to 32 individual masking capability
- 100% backward compatibility with previous FlexCAN version
- Supports Pretended Networking functionality in low power: Stop mode (see FEATURE_CAN_HAS_PRETENDED_NETWORKING define for the availability of this feature on each platform)
- Supports detection and correction of errors in memory read accesses. Errors in one bit can be corrected and errors in 2 bits can be detected but not corrected (this feature might not be available on some platforms, see chip-specific FlexCAN information for details)
- Supports Self Wake Up feature when FlexCAN is in a low power mode: Stop mode (see FEATURE_CAN_HAS_SELF_WAKE_UP define for the availability of this feature on each platform)