AnsweredAssumed Answered

Flexcan doesn't apply all filters

Question asked by Makarov on Jul 18, 2017
Latest reply on Jul 25, 2017 by Makarov

I use MK24F12. I adjusted Flexcan module to gather messages from device using Fleet Management Systems Interface.
I turned RxFIFO on and set ID acceptance mode as Format A. Then i filled filter table (it starts at 7th mailbox) with IDs and according RXIMR registers with Mask. The rest filters i filled with 0x40000000 and the rest mask registers with 0x5FFFFFFF.
When i start to listen to device i get some frames, but here's the problem i don't get all messages device sent, despite they match filters.
i know that because if i set any mask register as zero i get all of messages on bus.
i noticed that hit filter (RXFIR register) is (0,1,4,5,...), so in other words i get messages which match filters that stored in registers CSn and IDn of MailBox.

Below is log, here i added 7 filters and i got just 4 types of messages. Then i removed all filters and as you can see i skipped a lot of messages that supposed being caught.

 

[1.003] Filter added (Type: Ext, ID: 0x00FEE900, Mask: 0x00FFFF00)
[1.004] Filter added (Type: Ext, ID: 0x00FEFC00, Mask: 0x00FFFF00)
[1.005] Filter added (Type: Ext, ID: 0x00FEEE00, Mask: 0x00FFFF00)
[1.006] Filter added (Type: Ext, ID: 0x00FEC100, Mask: 0x00FFFF00)
[1.007] Filter added (Type: Ext, ID: 0x00F00400, Mask: 0x00FFFF00)
[1.008] Filter added (Type: Ext, ID: 0x00FEE500, Mask: 0x00FFFF00)
[1.008] Filter added (Type: Ext, ID: 0x00FEEA00, Mask: 0x00FFFF00)

[1.935] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 80 0C FF FF FF, Filter: 4)
[2.436] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 58 1C 00 00 FF FF FF FF, Filter: 5)
[2.938] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 59 1C 00 00, Filter: 0)
[3.439] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 48 FF FF FF FF FF FF, Filter: 1)
[4.944] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF C0 12 FF FF FF, Filter: 4)
[5.445] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 59 1C 00 00 FF FF FF FF, Filter: 5)
[6.950] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 5A 1C 00 00, Filter: 0)
[7.452] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 46 FF FF FF FF FF FF, Filter: 1)
[8.957] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 00 19 FF FF FF, Filter: 4)
[9.458] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 5A 1C 00 00 FF FF FF FF, Filter: 5)

 

at this point i removed all filters

[34.186] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 00 4B FF FF FF, Filter: 0)
[34.688] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 62 1C 00 00 FF FF FF FF, Filter: 0)
[35.190] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 63 1C 00 00, Filter: 0)
[35.691] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 34 FF FF FF FF FF FF, Filter: 0)
[36.193] CAN.Got frame (Type: Ext, ID: 0x18FEEE20, Data: 56 FF FF FF FF FF FF FF, Filter: 0)
[36.694] CAN.Got frame (Type: Ext, ID: 0x18FEC120, Data: AD 05 00 00 FF FF FF FF, Filter: 0)
[37.196] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 40 51 FF FF FF, Filter: 0)
[37.698] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 63 1C 00 00 FF FF FF FF, Filter: 0)
[39.203] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 64 1C 00 00, Filter: 0)
[39.704] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 32 FF FF FF FF FF FF, Filter: 0)
[40.206] CAN.Got frame (Type: Ext, ID: 0x18FEEE20, Data: 58 FF FF FF FF FF FF FF, Filter: 0)
[40.707] CAN.Got frame (Type: Ext, ID: 0x18FEC120, Data: AD 05 00 00 FF FF FF FF, Filter: 0)

Attachments

Outcomes