CAN filter - STM8AF5288
Alright, I got my CAN stuff working in ID/mask mode, with 'all accepted' values.
I need to setup a CAN filter to only receive STD ID of 1512 (0x5e8).
I'm confused why this doesn't work. Using SPL looking at the CAN examples. I saw IDList, and this seemed appropriate because I only need 1 ID. But, after setting to IDList, and entering 0x5e8, it doesn't work.
/* CAN filter init */
CAN_FilterNumber = CAN_FilterNumber_0;
CAN_FilterActivation = ENABLE;
CAN_FilterMode = CAN_FilterMode_IdList;
CAN_FilterScale = CAN_FilterScale_16Bit;
CAN_FilterID1=0x5e8;
CAN_FilterID2=0;
CAN_FilterID3=0;
CAN_FilterID4=0;
CAN_FilterIDMask1=0;
CAN_FilterIDMask2=0;
CAN_FilterIDMask3=0;
CAN_FilterIDMask4=0;
CAN_FilterInit(CAN_FilterNumber, CAN_FilterActivation, CAN_FilterMode,
CAN_FilterScale,CAN_FilterID1, CAN_FilterID2, CAN_FilterID3,
CAN_FilterID4,CAN_FilterIDMask1, CAN_FilterIDMask2,
CAN_FilterIDMask3, CAN_FilterIDMask4);I've seen mention of needing to include other bits, but I don't fully understand. If it's an ID list, why would any bits other than the ID need to be included?
