This command set filters to select CAN bus frames by their identifiers. Filters values have the same format of identifiers and bits must to match to get message selected (filtered-in). No message will be received if no filter is set. Bits comparison must satisfied if the same position bit in mask value is set (1 = “care”). If mask bit is reset (0 = “don't care”) then comparison will be considered always satisfied.

Synopsis

CAN USER FILTER CH<1/2> <index (0..31)> <standard part of ID>[:<extended part of ID>]

Return OK

Examples

Setting a filter to receive a frames with standard ID = 1220 from Channel #1

CAN USER FILTER CH1 0 1220
OK

Setting a filter to receive a frames with extended ID = C6C0:FFBC40 from Channel #2

CAN USER FILTER CH2 0 C6C0:FFBC40 
OK

Setting a filter to receive a frames with standard ID = 1220, 1320 from Channel #1

CAN USER FILTER CH1 0 1220
OK
CAN USER FILTER CH1 1 1320
OK
Notes
  1. Each channel has its 32 filters set.
  2. Sending the command <standard part of ID> and <extended part of ID> follow the alignment format currently selected. Please refer to CAN USER ALIGN command.
  3. At power on reset all filters are disabled and values are cleared.
  4. At power on reset mask value is 0, then setting a filter will result in receiving all messages.