CAN ExtID filter for exactly two IDs
Dear Community,
even after reading what feels like 100 posts, I still can't manage to set the filter so that exclusively 2 IDs are let through.
I use the extendet ID, 1 Byte IDs and have managed to let exactly one ID through with the MASK_MODE, as you can see here:
canfilterconfig.FilterActivation = CAN_FILTER_ENABLE;
canfilterconfig.FilterFIFOAssignment = CAN_FILTER_FIFO0;
canfilterconfig.FilterBank = 1;
canfilterconfig.FilterMode = CAN_FILTERMODE_IDMASK;
canfilterconfig.FilterScale = CAN_FILTERSCALE_32BIT;
canfilterconfig.FilterIdHigh = CAN_ModuleAddr<<3;
canfilterconfig.FilterIdLow = 0;
canfilterconfig.FilterMaskIdHigh = 0xF<<3; //Only the Address Bits will be compared
canfilterconfig.FilterMaskIdLow = 0x0000;
canfilterconfig.FilterFIFOAssignment = CAN_RX_FIFO0;
canfilterconfig.SlaveStartFilterBank = 1;
Now I not only want to let the CAN_ModuleAddr through, but also the ID 0xFF.
I would be infinitely grateful for any tips, illustrative material or further help.
Warmest regards
Anno

