Hello,
I my project I use FlexCAN_T4.
I would line FlexCAN_T4 to filter out all standard messages except 0x123 and 0x124.
But if I send another message, then 0x123 or 0x124 I receive them too.
How can I achieve that FlexCAN_T4 filter works.
Here is an example.
------------
FlexCAN_T4 <CAN1, RX_SIZE_256, TX_SIZE_16> Can1 = FlexCAN_T4 <CAN1, RX_SIZE_256, TX_SIZE_16>();
CanMsg rxMsg;
void setup(void)
{
Can1.begin();
Can1.setBaudRate(250000);
Can1.setFIFOFilter(REJECT_ALL);
Can1.enableFIFO();
Can1.setFIFOFilterRange(0, 0x123, 0x124, STD);
}
void loop()
{
if(Can1.read(rxMsg))
Serial.printf("Msg.ID 0x%06X\n", rxMsg.id);
}
I my project I use FlexCAN_T4.
I would line FlexCAN_T4 to filter out all standard messages except 0x123 and 0x124.
But if I send another message, then 0x123 or 0x124 I receive them too.
How can I achieve that FlexCAN_T4 filter works.
Here is an example.
------------
FlexCAN_T4 <CAN1, RX_SIZE_256, TX_SIZE_16> Can1 = FlexCAN_T4 <CAN1, RX_SIZE_256, TX_SIZE_16>();
CanMsg rxMsg;
void setup(void)
{
Can1.begin();
Can1.setBaudRate(250000);
Can1.setFIFOFilter(REJECT_ALL);
Can1.enableFIFO();
Can1.setFIFOFilterRange(0, 0x123, 0x124, STD);
}
void loop()
{
if(Can1.read(rxMsg))
Serial.printf("Msg.ID 0x%06X\n", rxMsg.id);
}