Hi RISHI KUMAR,
Thank you for your interest in Freescale kinetis product, I would like to provide service for you!
1)Function FLEXCAN_DRV_SetRxFifoGlobalMask: Configure register CANx_RXFGMASK, this register is the Rx FIFO global mask register, If Rx FIFO is enabled RXFGMASK is used to mask the Rx FIFO ID Filter Table elements that do not have a corresponding RXIMR according to CTRL2[RFFN] field setting. 0, The corresponding bit in the filter is "don't care."; 1,The corresponding bit in the filter is checked.
2)Function FLEXCAN_DRV_SetRxMbGlobalMask: Configure register CANx_RXMGMASK, this register is the Rx Mailboxes Global Mask Register, RXMGMASK is used to mask the filter fields of all Rx MBs, excluding MBs 14-15,which have individual mask registers. 0, The corresponding bit in the filter is "don't care."; 1,The corresponding bit in the filter is checked.
More details, please refer to the K64 reference manual, Chapter 49 CAN (FlexCAN), the according register description.
So if you want to remove all kind of filter on receiving message, you just need to configure register CANx_RXFGMASK and CANx_RXMGMASK to 0.
Take an example:
Modify
result = FLEXCAN_DRV_SetRxFifoGlobalMask(flexcanInstance, kFlexCanMsgIdStd, 0x7FF);
to
result = FLEXCAN_DRV_SetRxFifoGlobalMask(flexcanInstance, kFlexCanMsgIdStd, 0);
Modify
result = FLEXCAN_DRV_SetRxMbGlobalMask(flexcanInstance, kFlexCanMsgIdStd, 0x123);
to
result = FLEXCAN_DRV_SetRxMbGlobalMask(flexcanInstance, kFlexCanMsgIdStd, 0);
Wish it helps you!
If you still have question, please contact me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------