CAN Filter Changes on the Fly.
Posted: Fri Oct 11, 2024 10:50 am
Hi,
To ensure I capture the latest CAN data from a fast and busy datastream, I am setting the Mask to check all bits (2047) and Filter for a specific single ID,
Then progmaticaly changing the filter value and stepping through the three message ID's I require.
It seems a bit cumbersome but I cleanly get all messages updated.
(I can already see that with my method if one messge stopped being transmitted the system would brick, but i can add a work around for this)
Question: When I set the RX Filter (SetRxFilter 0), does this clear the RX buffer of old data?
Or should I also check the Rx Buffer first, as I believe this will clear the RX buffer.
CAN Macro is attached.
Thansk, j.
To ensure I capture the latest CAN data from a fast and busy datastream, I am setting the Mask to check all bits (2047) and Filter for a specific single ID,
Then progmaticaly changing the filter value and stepping through the three message ID's I require.
It seems a bit cumbersome but I cleanly get all messages updated.
(I can already see that with my method if one messge stopped being transmitted the system would brick, but i can add a work around for this)
Question: When I set the RX Filter (SetRxFilter 0), does this clear the RX buffer of old data?
Or should I also check the Rx Buffer first, as I believe this will clear the RX buffer.
CAN Macro is attached.
Thansk, j.