Programming Standard Message ID CAN Filters
If space is reserved for Standard Message ID CAN filters in device tree node, then standard filters can be configured using following sys interface:
/sys/devices/platform/c310000.mttcan/net/can0/std_filter
- Enter echo help(h) to the sys interface to obtain the format for the parameters to be
provided in
dmesg
.# echo h > /sys/devices/platform/c310000.mttcan/net/can0/std_filter bash: /sys/devices/platform/c310000.mttcan/net/can0/std_filter: No such file or directory
Where:
- The sfid1 and sfid2 are in HEX.
- The sft, sfec, and idx are in unsinged integers.
- The idx field is optional.
- If index is provided, then the given index filter is updated; otherwise the filters are assigned incrementally.
For example:
echo "sft=0 sfec=1 sfid1=123 sfid2=123 idx=0" > /sys/devices/platform/c310000.mttcan/net/can0/std_filter