<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Flexcan doesn't apply all filters in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673216#M41368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found that I read CODE bits of MB's CS register and it was 1 for filters 2,3,6,7... that means BUSY. But if MB is used by FIFO engine it doesn't contain CODE bits and we shouldn't check &lt;SPAN class=""&gt;Message Buffer Code&lt;/SPAN&gt; at all.&lt;BR /&gt;They might if don't use some bits keep them clear.&lt;/P&gt;&lt;P&gt;Question is closed.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MB_and_FIFO_structure.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28598i998C5EC8097CAAC1/image-size/large?v=v2&amp;amp;px=999" role="button" title="MB_and_FIFO_structure.png" alt="MB_and_FIFO_structure.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jul 2017 08:41:18 GMT</pubDate>
    <dc:creator>georgemakarov</dc:creator>
    <dc:date>2017-07-25T08:41:18Z</dc:date>
    <item>
      <title>Flexcan doesn't apply all filters</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673214#M41366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use MK24F12. I adjusted Flexcan module to gather messages from device using Fleet Management Systems Interface.&lt;BR /&gt;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.&lt;BR /&gt;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.&lt;BR /&gt;i know that because if i set any mask register as zero i get all of messages on bus.&lt;BR /&gt;i noticed that hit filter (&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;RXFIR register&lt;/SPAN&gt;) is (0,1,4,5,...), so in other words i get messages which match filters that stored in registers CSn and IDn of MailBox.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;[1.003] Filter added (Type: Ext, ID: 0x00FEE900, Mask: 0x00FFFF00)&lt;BR /&gt;[1.004] Filter added (Type: Ext, ID: 0x00FEFC00, Mask: 0x00FFFF00)&lt;BR /&gt;[1.005] Filter added (Type: Ext, ID: 0x00FEEE00, Mask: 0x00FFFF00)&lt;BR /&gt;[1.006] Filter added (Type: Ext, ID: 0x00FEC100, Mask: 0x00FFFF00)&lt;BR /&gt;[1.007] Filter added (Type: Ext, ID: 0x00F00400, Mask: 0x00FFFF00)&lt;BR /&gt;[1.008] Filter added (Type: Ext, ID: 0x00FEE500, Mask: 0x00FFFF00)&lt;BR /&gt;[1.008] Filter added (Type: Ext, ID: 0x00FEEA00, Mask: 0x00FFFF00)&lt;BR /&gt;&lt;BR /&gt;[1.935] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 80 0C FF FF FF, Filter: 4)&lt;BR /&gt;[2.436] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 58 1C 00 00 FF FF FF FF, Filter: 5)&lt;BR /&gt;[2.938] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 59 1C 00 00, Filter: 0)&lt;BR /&gt;[3.439] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 48 FF FF FF FF FF FF, Filter: 1)&lt;BR /&gt;[4.944] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF C0 12 FF FF FF, Filter: 4)&lt;BR /&gt;[5.445] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 59 1C 00 00 FF FF FF FF, Filter: 5)&lt;BR /&gt;[6.950] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 5A 1C 00 00, Filter: 0)&lt;BR /&gt;[7.452] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 46 FF FF FF FF FF FF, Filter: 1)&lt;BR /&gt;[8.957] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 00 19 FF FF FF, Filter: 4)&lt;BR /&gt;[9.458] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 5A 1C 00 00 FF FF FF FF, Filter: 5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at this point i removed all filters&lt;BR /&gt;&lt;BR /&gt;[34.186] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 00 4B FF FF FF, Filter: 0)&lt;BR /&gt;[34.688] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 62 1C 00 00 FF FF FF FF, Filter: 0)&lt;BR /&gt;[35.190] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 63 1C 00 00, Filter: 0)&lt;BR /&gt;[35.691] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 34 FF FF FF FF FF FF, Filter: 0)&lt;BR /&gt;[36.193] CAN.Got frame (Type: Ext, ID: 0x18FEEE20, Data: 56 FF FF FF FF FF FF FF, Filter: 0)&lt;BR /&gt;[36.694] CAN.Got frame (Type: Ext, ID: 0x18FEC120, Data: AD 05 00 00 FF FF FF FF, Filter: 0)&lt;BR /&gt;[37.196] CAN.Got frame (Type: Ext, ID: 0x18F00420, Data: FF FF FF 40 51 FF FF FF, Filter: 0)&lt;BR /&gt;[37.698] CAN.Got frame (Type: Ext, ID: 0x18FEE520, Data: 63 1C 00 00 FF FF FF FF, Filter: 0)&lt;BR /&gt;[39.203] CAN.Got frame (Type: Ext, ID: 0x18FEE920, Data: FF FF FF FF 64 1C 00 00, Filter: 0)&lt;BR /&gt;[39.704] CAN.Got frame (Type: Ext, ID: 0x18FEFC20, Data: FF 32 FF FF FF FF FF FF, Filter: 0)&lt;BR /&gt;[40.206] CAN.Got frame (Type: Ext, ID: 0x18FEEE20, Data: 58 FF FF FF FF FF FF FF, Filter: 0)&lt;BR /&gt;[40.707] CAN.Got frame (Type: Ext, ID: 0x18FEC120, Data: AD 05 00 00 FF FF FF FF, Filter: 0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 12:00:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673214#M41366</guid>
      <dc:creator>georgemakarov</dc:creator>
      <dc:date>2017-07-18T12:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Flexcan doesn't apply all filters</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673215#M41367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking the CANregisters.png, looks like the value setting for RXIMRn has some issue, Did you use the following macro to set the mask value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define FLEXCAN_RX_FIFO_EXT_MASK_TYPE_A(id, rtr, ide)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (((uint32_t)((uint32_t)(rtr) &amp;lt;&amp;lt; 31) | (uint32_t)((uint32_t)(ide) &amp;lt;&amp;lt; 30)) | \&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (FLEXCAN_ID_EXT(id) &amp;lt;&amp;lt; 1)) /*!&amp;lt; Extend Rx FIFO Mask helper macro Type A helper macro. */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you will left shift 0x00FFFF00 by 1 bit before feeding it into the RXIMRn, which should be 0x41FFFE00 at last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try with this macro and kindly let me know if the issue is still there.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 08:05:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673215#M41367</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2017-07-25T08:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Flexcan doesn't apply all filters</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673216#M41368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found that I read CODE bits of MB's CS register and it was 1 for filters 2,3,6,7... that means BUSY. But if MB is used by FIFO engine it doesn't contain CODE bits and we shouldn't check &lt;SPAN class=""&gt;Message Buffer Code&lt;/SPAN&gt; at all.&lt;BR /&gt;They might if don't use some bits keep them clear.&lt;/P&gt;&lt;P&gt;Question is closed.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MB_and_FIFO_structure.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28598i998C5EC8097CAAC1/image-size/large?v=v2&amp;amp;px=999" role="button" title="MB_and_FIFO_structure.png" alt="MB_and_FIFO_structure.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 08:41:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673216#M41368</guid>
      <dc:creator>georgemakarov</dc:creator>
      <dc:date>2017-07-25T08:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Flexcan doesn't apply all filters</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673217#M41369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right! I forgot to shift mask left by 1 bit.&lt;/P&gt;&lt;P&gt;I has written code to work with FIFO by myself based on Processor Expert code, but not KSDK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 09:13:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flexcan-doesn-t-apply-all-filters/m-p/673217#M41369</guid>
      <dc:creator>georgemakarov</dc:creator>
      <dc:date>2017-07-25T09:13:38Z</dc:date>
    </item>
  </channel>
</rss>

