![]() |
![]() |
Structure for MCAN Standard Message ID Filter Element. More...
#include <MCAN.h>
Data Fields | |
uint32_t | sfec |
uint32_t | sft |
uint32_t | sfid1 |
uint32_t | sfid2 |
Structure for MCAN Standard Message ID Filter Element.
uint32_t MCAN_StdMsgIDFilterElement::sfec |
Standard Filter Element Configuration (3-bits)
0 = Disable filter element
1 = Store in Rx FIFO 0 if filter matches
2 = Store in Rx FIFO 1 if filter matches
3 = Reject ID if filter matches
4 = Set priority if filter matches
5 = Set priority and store in FIFO 0 if filter matches
6 = Set priority and store in FIFO 1 if filter matches
7 = Store into Rx Buffer or as debug message, configuration of SFT field is ignored as the ID must match SFID1 exactly.
If SFEC = 4-6, a match sets high priority message status and generates an interrupt.
uint32_t MCAN_StdMsgIDFilterElement::sft |
Standard Filter Type (2-bits)
0 = Range filter from SFID1 to SFID2 (SFID2 >= SFID1)
1 = Dual ID filter for SFID1 or SFID2
2 = Classic filter: SFID1 = filter, SFID2 = mask
3 = Filter element disabled
uint32_t MCAN_StdMsgIDFilterElement::sfid1 |
Standard Filter ID 1 (11-bits). First ID of standard ID filter element. When filtering for Rx Buffers or for debug messages this field defines the ID of a standard message to be stored. The received identifiers must match exactly, no masking mechanism is used.
uint32_t MCAN_StdMsgIDFilterElement::sfid2 |
Standard Filter ID 2 (11-bits). This field has a different meaning depending on the value of SFEC:
SFEC = 1-6: Second ID of standard ID filter element
SFEC = 7: Filter for Rx Buffers or for debug messages
SFID2[10:9] decides whether the received message is stored into an Rx Buffer or treated as message A, B, or C of the debug message sequence.
0 = Store message into an Rx Buffer
1 = Debug Message A
2 = Debug Message B
3 = Debug Message C
SFID2[8:6] is used to control the filter event pins at the Extension Interface.
SFID2[5:0] defines the offset to the Rx Buffer Start Address RXBC.RBSA for storage of a matching message.