cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to not have a filter when receiving CAN messages?

PSing.5
Associate II

Is it possible to not have a filter when receiving CAN messages? I want to create a gateway and transfer ALL messages from one CAN bus to another CAN bus. Do I just have to add 1000 messages to my list of allowed messages to ensure everything is accepted?

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

Hello ,

Assuming , you have a SPC560D device

You should set your acceptance mask as 0xFFFFFFFF (Cf Below)

Rx Global Mask (RXGMASK)

RXGMASK is used as acceptance mask for all Rx MBs, excluding MBs 14–15, which have

individual mask registers. When the FEN bit in MCR is set (FIFO enabled), the RXGMASK

also applies to all elements of the ID filter table, except elements 6–7, which have individual

masks.

RX14MASK (Rx 14 Mask) and RX15MASK (Rx 15 Mask) have the same structure as the

RXGMASK.

For others devices , please refer to the corresponding RM.

Best regards

Erwan

View solution in original post

2 REPLIES 2
Erwan YVIN
ST Employee

Hello ,

Assuming , you have a SPC560D device

You should set your acceptance mask as 0xFFFFFFFF (Cf Below)

Rx Global Mask (RXGMASK)

RXGMASK is used as acceptance mask for all Rx MBs, excluding MBs 14–15, which have

individual mask registers. When the FEN bit in MCR is set (FIFO enabled), the RXGMASK

also applies to all elements of the ID filter table, except elements 6–7, which have individual

masks.

RX14MASK (Rx 14 Mask) and RX15MASK (Rx 15 Mask) have the same structure as the

RXGMASK.

For others devices , please refer to the corresponding RM.

Best regards

Erwan

DCARR
Associate III

Hi,

if your CAN controller is using the global mask, just write zero to the global mask value and every configured filter will accept all incoming frames identifiers (standard or extended on the base of filter configuration).

To do this please find the RXGMASK initialization and modify it in order to give zero value.

You should find something like this (maybe in function "can_lld_start" in file "can_lld.c"):

canp->flexcan->RXGMASK.R = 0x0FFFFFFF;

and replace it with --> canp->flexcan->RXGMASK.R = 0x00000000;

Best regards

Domenico