The Modular Controller Area Network (MCAN) peripheral is a CAN Flexible Data-Rate (CAN FD) implementation on select devices within the Sitara™ MCUs, MPUs, Jacinto™ DRA8x, TDA4x Processors, and so forth. This application note describes the basic debug steps to check CAN hardware and software configuration. The objective is to help users who face a MCAN communication failure
Various TI devices do not have CAN Transceivers onboard. This requires external transceivers to be connected to form a complete CAN bus. All the CAN peripherals need a second CAN FD node for operation to verify the external data transmission. This requirement can be met by another device featuring CAN FD or any CAN bus analysis tool that is capable of working with both classic CAN and CAN FD protocols. Many USB-bus based tools are currently available. In addition to providing visibility to the bus traffic, these tools are also capable of generating frames and are an invaluable aid in debugging. An oscilloscope with built-in CAN FD triggering and decoding is essential for debugging. Throughout this document, the terms MCAN and CAN FD are used interchangeably. While CAN FD refers to the protocol, MCAN refers to the peripheral in the MCU that implements the protocol.
Sitara™ and Jacinto™ are trademarks of Texas Instruments.
All trademarks are the property of their respective owners.
CAN is a serial communication protocol that was originally developed for automotive applications. Due to the robustness and reliability, CAN is pertinent to applications in diverse areas such as industrial equipment, medical electronics, trains, aircraft, and so forth. CAN protocol features sophisticated error detection and confinement mechanisms and has simple wiring at the physical level. The original CAN protocol standard is now referred to as classical CAN to distinguish from the more recent CAN FD standard. CAN Flexible Data Rate (CAN FD) is an enhancement to the classical CAN in terms of higher bit rates and the number of bytes transferred in one frame, thus increasing the effective throughput of communication. While classical CAN supports bit rates up to 1Mbps and a payload size of 8 bytes per frame, CAN FD supports bit-rates up to 5Mbps and a payload size of up to 64 bytes per frame.
The following are the supported MCAN features:
Conforms with CAN Protocol (ISO 11898-1:2015)
Full CAN FD support (up to 64 data bytes)
Up to 32 dedicated transmit buffers
Configurable transmit FIFO, up to 32 elements
Configurable transmit queue, up to 32 elements
Configurable transmit Event FIFO, up to 32 elements
Up to 64 dedicated receive buffers
Two configurable receive FIFOs, up to 64 elements each
Up to 128 filter elements
Loop-back mode for self-test
ECC check for Message RAM
Clock stop and wakeup support
Timestamp counter
The MCAN module is capable to configure two types of acceptance filters - one for standard(11-bit ID) and one for extended identifiers(29-bit ID).
Acceptance filtering starts when complete Message ID is received. Acceptance filtering stops at the first matching enabled filter element or when the end of the filter list is reached. If a filter element matches, then the Rx Handler starts writing the received message data in portions of 32 bit to the matching Rx Buffer or Rx FIFO. If an error condition occurs (for example, CRC error), then this message is rejected. To receive message for a particular CAN ID: if the receptor CAN node is not configured for the same ID, then data gets rejected.
Configuration registers to check for filter elements are:
Global Filter Configuration (MCAN_GFC) register
Standard ID Filter Configuration (MCAN_SIDFC) register
Extended ID Filter Configuration (MCAN_XIDFC) register
Extended ID AND Mask (MCAN_XIDAM) register