Mcan_Hal_RxFilterElementType

Module: HAL (AM13E232X) API / CAN HAL API

CAN RX Filter Element Configuration (FEC) More…

#include <Mcan_Hal.h>

Public Attributes

Name

uint8

FilterIndex
Filter element index (0 to MCAN_HAL_RX_STD_FILTER_ELEMENT_MAX-1 for standard, 0 to MCAN_HAL_RX_EXT_FILTER_ELEMENT_MAX-1 for extended)

boolean

Enable
Enable/Disable bit - tells the IP whether to use this filter element for filtering. Can be enabled/disabled anytime while the IP is in operation.

Mcan_Hal_RxFilterActionType

RxFilterAction
Filter action - determines what happens when this filter matches (SFEC/EFEC field). The target FIFO is implicit in the action: ACCEPT_FIFO0 / HIGH_PRIORITY_FIFO0 → RX FIFO 0 ACCEPT_FIFO1 / HIGH_PRIORITY_FIFO1 → RX FIFO 1 STORE_RX_BUFFER → dedicated RX buffer (see RxBufferIndex) REJECT / DISABLE → no storage.

uint8

RxBufferIndex
Dedicated RX buffer index - used when RxFilterAction is STORE_RX_BUFFER (SFID2[5:0] / EFID2[5:0]); must be < MCAN_HAL_RX_BUFFER_MAX.

uint32

MessageID
Message ID value to filter (standard 11-bit or extended 29-bit)

uint32

MessageIDMask
Message ID mask/range/Message ID 2 (based on filter type)

boolean

UseExtendedID
Extended identifier flag - FALSE for standard (11-bit), TRUE for extended (29-bit)

Mcan_Hal_RxFilterType

FilterType
Filter type - Range, Dual, Mask, or Range-no-XIDAM.

Detailed Description

struct Mcan_Hal_RxFilterElementType;

CAN RX Filter Element Configuration (FEC)

Filter Element Configuration ID + Mask. The IP supports up to 128 Standard ID Filter Elements and 64 Extended ID Filter Elements.

RX filtering is done to filter all incoming messages based on their identifiers. Filters can be configured to accept or reject messages with specific IDs, thereby reducing the number of messages that need to be processed by the software.

Public Attributes Documentation

variable FilterIndex

uint8 FilterIndex;

Filter element index (0 to MCAN_HAL_RX_STD_FILTER_ELEMENT_MAX-1 for standard, 0 to MCAN_HAL_RX_EXT_FILTER_ELEMENT_MAX-1 for extended)

variable Enable

boolean Enable;

Enable/Disable bit - tells the IP whether to use this filter element for filtering. Can be enabled/disabled anytime while the IP is in operation.

variable RxFilterAction

Mcan_Hal_RxFilterActionType RxFilterAction;

Filter action - determines what happens when this filter matches (SFEC/EFEC field). The target FIFO is implicit in the action: ACCEPT_FIFO0 / HIGH_PRIORITY_FIFO0 → RX FIFO 0 ACCEPT_FIFO1 / HIGH_PRIORITY_FIFO1 → RX FIFO 1 STORE_RX_BUFFER → dedicated RX buffer (see RxBufferIndex) REJECT / DISABLE → no storage.

variable RxBufferIndex

uint8 RxBufferIndex;

Dedicated RX buffer index - used when RxFilterAction is STORE_RX_BUFFER (SFID2[5:0] / EFID2[5:0]); must be < MCAN_HAL_RX_BUFFER_MAX.

variable MessageID

uint32 MessageID;

Message ID value to filter (standard 11-bit or extended 29-bit)

variable MessageIDMask

uint32 MessageIDMask;

Message ID mask/range/Message ID 2 (based on filter type)

variable UseExtendedID

boolean UseExtendedID;

Extended identifier flag - FALSE for standard (11-bit), TRUE for extended (29-bit)

variable FilterType

Mcan_Hal_RxFilterType FilterType;

Filter type - Range, Dual, Mask, or Range-no-XIDAM.