SPRAD59 October   2023 TMS320F280039

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. Introduction
  5. Key Differences Between DCAN and MCAN
  6. Module Initialization
    1. 3.1 DCAN Initialization
    2. 3.2 MCAN Initialization
    3. 3.3 Initialization sequence
    4. 3.4 Code Snippets for Module Initialization
  7. Bit Timing Configuration
  8. Message RAM Configuration
  9. Interrupt handling
    1. 6.1 MCAN Interrupt Sources
    2. 6.2 DCAN Interrupt Handling
    3. 6.3 MCAN Interrupt Handling
  10. Transmitting data
    1. 7.1 Basic Transmission Process
      1. 7.1.1 Transmission with DCAN
      2. 7.1.2 Transmission with MCAN
    2. 7.2 MCAN Vs DCAN Transmit Procedural Differences
    3. 7.3 MCAN Transmit Concepts
      1. 7.3.1 Tx Event FIFO
  11. Receiving Data
    1. 8.1 Introduction to Reception
    2. 8.2 Basic Reception Process
      1. 8.2.1 DCAN Reception
      2. 8.2.2 MCAN Reception
    3. 8.3 Filter Elements
      1. 8.3.1 Filter Element Structure
    4. 8.4 Rx Buffer
      1. 8.4.1 Receiving in Rx Buffer
    5. 8.5 Rx FIFO
      1. 8.5.1 Receiving in Rx FIFO
    6. 8.6 Receiving High Priority Messages
  12. Avoiding network errors
  13. 10References

Filter Elements

Filter Elements are defined structures, which need to be configured in the Message RAM to determine which frames are to be received and where these frames need to be stored within the Message RAM.

Standard Filter Elements are used to store Standard ID frames, and the module can be configured to have up to 128 elements. Extended Filter Elements are used to store Extended ID frames, and the module can be configured to have up to 64 elements. The structure for both Standard and Extended Filter Elements is identical except for the Message ID type. The following description given for Standard Filter Elements is valid for Extended Filter Elements as well.

The module has certain Global Filter Configurations (set in the MCAN_GFC register during initialization) which determines whether to accept or reject remote frames and non-matching frames (independent configurations for both Standard and Extended IDs).

Each received frame is sequentially compared to the list of configured Filter Elements (Standard ID frames are compared to Standard Filter Elements and so on). On getting a match, based on the configuration of the corresponding filter element, the frame is accepted or rejected, and is stored in the Message RAM as configured (if accepted).

Note:

MCAN has a separate register (MCAN_XIDAM) that can be used as an Extended ID "AND" Mask. By default, the register (mask) has all bits set to one, which disables the mask.

However, during initialization, on enabling the mask, all received extended IDs are ANDed with this mask before the filter list is executed. This register is intended for masking of 29-bit IDs in SAE J1939.

By setting Extended Filter Type (eft) = 0x3 for a particular Extended Filter Element, a Range Filter can be implemented such that the Extended ID AND Mask is not applied.