See the
Acceptance Filter section of the docs.
What essentially when you set
is that the
acceptance_code and
acceptance_mask will be interpreted differently by the CAN peripheral. Therefore instead using a 32-bit value to define a single code/mask, the each 32-bit value will be used to define two codes/masks. See the docs to see how the 32-bit code/masks are interpreted under single/dual filter mode when receiving standard/extended messages.
To filter out multiple IDs, you'll need to bit wise XNOR each of your IDs to find which bit positions of the multiple IDs conflict (where one ID has a 1 in that position, and another has a 0). Then for those bit positions, set them as
don't care using the acceptance mask. Then for the non conflicting bit positions, you can set it as your acceptance code.
For example
ID1 = 101 1010 0000
ID2 = 101 1010 0001
ID3 = 101 1010 0010
ID4 = 101 1010 0100
ID5 = 101 1010 1000
ID6 = 101 1110 0000
ID7 = 101 0010 0000
The XNOR would be
XNOR = 111 0011 0000
This means the zero bits of the XNOR are places which you need to set as
don't care in your acceptance mask.
Hence the acceptance mask and code would be
MASK = 000 1100 1111
CODE = 101 XX10 XXXX where X means "don't care" since those bits conflict and are hence masked out by the acceptance mask