CAN Bus filter Rules: The filter mask is used to determine which bits in the identifier of the received frame are compared with the filter If a mask bit is set to a zero, the corresponding ID bit will automatically be accepted, regardless of the ...
I tried get rid of "|8" from extid & mask, it seems works now. still do not know why, anyway thank for your great help !!!uint32 extid = 0x0EAEC00; // 00=Source ID EXTID[7..0], EC=PDU Specifc EXTID[15..8], EA=PDU Format EXID[23..16]uint32 mask = 0x0F...
Thanks very much. I tried your code, it seems does not work, looks like it filter out ExtID = 0x0EAEC00 also.I am going back to check the STM32f2xx_hal_can.c file date, it dated 2017, I am wondering is that the cause of out-dated file version?
Sorry, that's my mistake, I need filter PDU and destination Address (not source Address), because my device only care the message from Master contains with PDU and destination address of my device, for example: any message on the Canbus line with de...
That is not possible due to the unknown Canbus ID condition, Because my device's source Address=0xEC, so I only need to take care of any message contains source address 0xEC which is Extended ID format: xxxxECxx (xx means any hex value).
Right now, I use CAN2 as slave communication and it works fine. the only thing I need to do is filter out some none-related CanID,I use Extended ID, I want to only allow ID format xxEAECxx to pass through, which means 2nd and 3rd byte is EAEC.