I'm sending a message by CAN using a Extend Id 0x2222. What the configuration I have to use in the Filter to receive only this Extend Id messages, setting the IDList filter?
I tried to configurate the Filter Low with 0x2222, but didn't works. CAN_FilterInitStructure.CAN_FilterNumber=0; CAN_FilterInitStructure.CAN_FilterMode=CAN_FilterMode_IdList; CAN_FilterInitStructure.CAN_FilterScale=CAN_FilterScale_32bit; CAN_FilterInitStructure.CAN_FilterIdHigh=0x0000; CAN_FilterInitStructure.CAN_FilterIdLow=0x2222; CAN_FilterInitStructure.CAN_FilterMaskIdHigh=0x0000; CAN_FilterInitStructure.CAN_FilterMaskIdLow=0x0000; CAN_FilterInitStructure.CAN_FilterFIFOAssignment=0; CAN_FilterInitStructure.CAN_FilterActivation=ENABLE; CAN_FilterInit(&CAN_FilterInitStructure); TxMessage.StdId=0x00; TxMessage.ExtId=0x2222; TxMessage.IDE=CAN_ID_EXT;
Thanks for that this helped me get this working. For the below, what is the purpose of the "<<3" bitwise move? I cannot see the need for this in the reference manual.
Oh wait I see.... RM0385 Rev 8, Figure 449, page 1307. You have to move the EXID 3 places bitwise to the left (<<3) as the [2:0] bits of EXID are for IDE, RTR & 0. It all makes sense now.