ESP32 CAN acceptance filter
Posted: Tue Jun 04, 2019 2:20 pm
Hello,
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.
How should the acceptance filter Registers described for id = 0x30?
Thank you
Philipp
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