i'm looking for a Example how to use the CAN acceptance filter.
According to the logical circuit in the documentations from the SJA1000 CAN Controller:
acc(0,31) = ((message_bit(0,31) XOR acceptance_code(0,31)) OR acceptance_mask(0,31)
message_accepted = acc(0) AND acc(1) AND ... AND acc(31)
-> message_accepted = logical 1 => accepted
-> message_accepted = logical 0 => not accepted
I try to filter all Messages except for id = 0x30. But i don't get the right result.
- #define CAN_FILTER_CONFIG_ACCEPT() {.acceptance_code = 0x30, .acceptance_mask = 0xffff8000, .single_filter = true}
Thank you
Philipp