<?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: How does FlexCAN CAN-ID matching mechanism work ? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896757#M52879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CAN buffer filter mask has to be set to specify which bits are checked.&lt;/P&gt;&lt;P&gt;For standard ID filtering (0..0x7ff) the filter mask is 0x7ff so that all bits of the 11 bit ID must match - if you have set the mask to equal your standard ID it will only be checking the bits that are '1' and allowing all other to be either '0' or '1', which is not what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also need to check the library that you are using because it may need 0x7ff or it may need (0x7ff &amp;lt;&amp;lt; 18), depending on whether to does the shift or it expects you to deliver the mask in the form as required by the FlexCAN register (for standard ID filtering).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note also that there are three filters/masks that can be used. The global mask is used by buffers 0..13 and buffers 14 and 15 can use their own unique filters/masks which allows mixing standard and extended IDs and such.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Check also carefully the library implementation because some are unreliable at setting filters due to clock domain synchronisation issues (if in doubt, read back the values written to the register and rewrite them until they correctly match).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Complete Kinetis solutions for professionals, training and support: &lt;A href="http://www.utasker.com/kinetis.html" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Turn-key CANopen for Kinetis FlexCAN - &lt;A href="http://www.utasker.com/index.html" target="test_blank"&gt;http://www.utasker.com/index.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FlexCAN simulation: &lt;A href="https://www.youtube.com/watch?v=Ha8cv_XEvco" target="test_blank"&gt;https://www.youtube.com/watch?v=Ha8cv_XEvco&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Apr 2019 16:14:51 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2019-04-30T16:14:51Z</dc:date>
    <item>
      <title>How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896756#M52878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the provided SDK examples for CAN and I initialized the FlexCAN-Driver in my own example like shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;

    flexcan_config_t flexcanConfig&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    flexcan_rx_mb_config_t mbConfig&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;



    txIdentifier &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x080&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    rxIdentifier &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x0A0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Get FlexCAN module default Configuration. */&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;/*
     * flexcanConfig.clksrc=kFLEXCAN_ClkSrcOsc;
     * flexcanConfig.baudRate = 1000000U;
     * flexcanConfig.maxMbNum = 16;
     * flexcanConfig.enableLoopBack = false;
     * flexcanConfig.enableSelfWakeup = false;
     * flexcanConfig.enableIndividMask = false;
     * flexcanConfig.enableDoze = false;
     * flexcanConfig.timingConfig = timingConfig;
     */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_GetDefaultConfig&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;flexcanConfig&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    flexcanConfig&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;baudRate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;500000U&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    flexcanConfig&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;clkSrc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; kFLEXCAN_ClkSrcPeri&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Init FlexCAN module. */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_Init&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PE900_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;flexcanConfig&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; PE900_CAN_CLK_FREQ&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Create FlexCAN handle structure and set call back function. */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_TransferCreateHandle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PE900_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;flexcanHandle&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; flexcan_callback&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; NULL&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Set Rx Masking mechanism. */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_SetRxMbGlobalMask&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PE900_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FLEXCAN_RX_MB_STD_MASK&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;rxIdentifier&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Setup Rx Message Buffer. */&lt;/SPAN&gt;
    mbConfig&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; kFLEXCAN_FrameFormatStandard&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    mbConfig&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; kFLEXCAN_FrameTypeData&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    mbConfig&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FLEXCAN_ID_STD&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;rxIdentifier&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_SetRxMbConfig&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PE900_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; RX_MESSAGE_BUFFER_NUM&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;mbConfig&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Setup Tx Message Buffer. */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_SetTxMbConfig&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PE900_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; TX_MESSAGE_BUFFER_NUM&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    txframe&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataByte0 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x0F&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    txframe&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataByte1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xFF&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    txframe&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataByte2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x0F&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    txframe&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataByte3 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xFF&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    txframe&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataByte4 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x01&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;


    &lt;SPAN class="comment token"&gt;/* Start receiving and wait for can messages */&lt;/SPAN&gt;
    rxXfer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mbIdx &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; RX_MESSAGE_BUFFER_NUM&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    rxXfer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;frame &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;rxframe&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_TransferReceiveNonBlocking&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PE900_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;flexcanHandle&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;rxXfer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would expect that now only frames with CAN-ID 0x0A0 will be received but instead a lot of other ID's will be received all from 0xA0 to 0xBF.&amp;nbsp; I think relevant steps are:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;    &lt;SPAN class="comment token"&gt;/* Set Rx Masking mechanism. */&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;FLEXCAN_SetRxMbGlobalMask&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PE900_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FLEXCAN_RX_MB_STD_MASK&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;rxIdentifier&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;    mbConfig&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FLEXCAN_ID_STD&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;rxIdentifier&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second step is clear, nothing can be done wrongly here. But I would think the first step enables generally ID's but its usage is really clear to me. At this point the source code is also not documented well, no comment explains the meaning of rtr, ide.&amp;nbsp; See:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;/*! @brief FlexCAN Rx Message Buffer Mask helper macro. */&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#define FLEXCAN_RX_MB_STD_MASK(id, rtr, ide) &lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Fall back to the reference manual helps me also not really.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to setup the flexCAN driver to receive messages only from one CAN-ID ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is welcome !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2019 08:11:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896756#M52878</guid>
      <dc:creator>jbrud</dc:creator>
      <dc:date>2019-04-30T08:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896757#M52879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CAN buffer filter mask has to be set to specify which bits are checked.&lt;/P&gt;&lt;P&gt;For standard ID filtering (0..0x7ff) the filter mask is 0x7ff so that all bits of the 11 bit ID must match - if you have set the mask to equal your standard ID it will only be checking the bits that are '1' and allowing all other to be either '0' or '1', which is not what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also need to check the library that you are using because it may need 0x7ff or it may need (0x7ff &amp;lt;&amp;lt; 18), depending on whether to does the shift or it expects you to deliver the mask in the form as required by the FlexCAN register (for standard ID filtering).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note also that there are three filters/masks that can be used. The global mask is used by buffers 0..13 and buffers 14 and 15 can use their own unique filters/masks which allows mixing standard and extended IDs and such.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Check also carefully the library implementation because some are unreliable at setting filters due to clock domain synchronisation issues (if in doubt, read back the values written to the register and rewrite them until they correctly match).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Complete Kinetis solutions for professionals, training and support: &lt;A href="http://www.utasker.com/kinetis.html" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Turn-key CANopen for Kinetis FlexCAN - &lt;A href="http://www.utasker.com/index.html" target="test_blank"&gt;http://www.utasker.com/index.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FlexCAN simulation: &lt;A href="https://www.youtube.com/watch?v=Ha8cv_XEvco" target="test_blank"&gt;https://www.youtube.com/watch?v=Ha8cv_XEvco&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2019 16:14:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896757#M52879</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-04-30T16:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896758#M52880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to ask what board are you using for your project, and what is the name of the SDK example you described, so I can see why the RX is receiving messages from more than one ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ricardo Delsordo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:57:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896758#M52880</guid>
      <dc:creator>nxf51211</dc:creator>
      <dc:date>2019-04-30T17:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896759#M52881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I' using the FRDM-K64F with a CAN-Driver IC and a USB-CAN-Adapter . But the example I&amp;nbsp;referred is&amp;nbsp; twrk64f120m/driver_examples/flexcan/interrupt_transfer.&amp;nbsp; The initialization &amp;amp; configuration is from this example so you should able to reproduce it with this example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 08:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896759#M52881</guid>
      <dc:creator>jbrud</dc:creator>
      <dc:date>2019-05-02T08:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896760#M52882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I noted, one should not set the ID as mask so I checked the example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set Rx Masking mechanism. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, FLEXCAN_RX_MB_STD_MASK(rxIdentifier, 0, 0));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is incorrect and could instead be set to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set Rx Masking mechanism. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, FLEXCAN_RX_MB_STD_MASK(0x7ff, 0, 0));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to achieve unique ID matching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that the example FlexCAN interface sets all filter masks with the same value so it is not possible to mix extended and standard IDs as it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 14:19:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896760#M52882</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-05-02T14:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896761#M52883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the FRDM-K64F, I recommend you install its SDK and use it instead of the one for the TWRK64F120M. I've tried one of the examples from this SDK (loop back transfer) and the project was able to only receive the frames from the device with the ID desired.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ricardo Delsordo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2019 16:27:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896761#M52883</guid>
      <dc:creator>nxf51211</dc:creator>
      <dc:date>2019-05-02T16:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896762#M52884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ! Now I got it. In my case I only have to support standard IDs. With FLEXCAN_RX_MB_STD_MASK(0x7ff, 0, 0)); it receives only messages from one ID. It would be still helpful if someone could clarify the usage of this macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2019 12:23:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896762#M52884</guid>
      <dc:creator>jbrud</dc:creator>
      <dc:date>2019-05-03T12:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896763#M52885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think it's meaningful to use the loop back mode for reproducing this issue. I'm sure if you take two TWRK64F120M on your desk and try the example flexcan_interrupt_transfer you will obtain the same behavior as I had.&lt;/P&gt;&lt;P&gt;Since this example sets:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/* Set Rx Masking mechanism. */
FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, FLEXCAN_RX_MB_STD_MASK(rxIdentifier, 0, 0));‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2019 12:27:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896763#M52885</guid>
      <dc:creator>jbrud</dc:creator>
      <dc:date>2019-05-03T12:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896764#M52886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The usage of this macro is to only organize the ID, IDE and RTR parameters that you are going to use for the configuration of the &lt;STRONG&gt;CANx_RXMGMASK&lt;/STRONG&gt; register which is set when you call the &lt;STRONG&gt;FLEXCAN_SetRxMbGlobalMask&lt;/STRONG&gt; function:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;/*! @brief FlexCAN Rx Message Buffer Mask helper macro. */&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#define FLEXCAN_RX_MB_STD_MASK(id, rtr, ide)                                   \
    (((uint32_t)((uint32_t)(rtr) &amp;lt;&amp;lt; 31) | (uint32_t)((uint32_t)(ide) &amp;lt;&amp;lt; 30)) | \
     FLEXCAN_ID_STD(id)) &lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;/*!&amp;lt; Standard Rx Message Buffer Mask helper macro. */&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IDE indicates if it is standard frame or extended frame, and the RTR indicates if it is remote frame or data frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ricardo Delsordo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 16:10:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896764#M52886</guid>
      <dc:creator>nxf51211</dc:creator>
      <dc:date>2019-05-06T16:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: How does FlexCAN CAN-ID matching mechanism work ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896765#M52887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have seen that there is another set of macros that can be used when working with extended CAN IDs although the example code doesn't allow multiple IDs or mixing extended with standard ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the CAN interface as used by the uTasker project (compatible with Coldfire, Kinetis and i.MX RT) when configuring for CANopen operation (using standard and extended IDs for objects directories) which shows that it is simple to define the IDs, the buffers that are to be used with them, and allow efficient masking of extended node ID, standard node ID and also the broadcast ID so that dedicated Rx buffers and handlers are assigned to each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="property macro token"&gt;#define CANOPEN_RX_NODE_ID                  0x7a                         &lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;// we receive this node-ID&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#define CANOPEN_TX_NODE_ID                  0x37                         &lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;// this is the node-ID hat we use when transmitting&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Configure the CAN interface&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;//&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; QUEUE_HANDLE &lt;SPAN class="token function"&gt;fnInitCANopenInterface&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    CANTABLE tCANParameters&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                             &lt;SPAN class="comment token"&gt;// table for passing information to driver&lt;/SPAN&gt;
    QUEUE_HANDLE CANopenHandle&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Channel &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                          &lt;SPAN class="comment token"&gt;// CAN1 interface&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulSpeed &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;250000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                     &lt;SPAN class="comment token"&gt;// 250k speed&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulTxID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                         &lt;SPAN class="comment token"&gt;// default ID of destination (not used by CANopen)&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulRxID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;CAN_EXTENDED_ID &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x00080000&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; CANOPEN_RX_NODE_ID&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// extended node ID that we receive&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulRxIDMask &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0x00080000&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; CANOPEN_RX_NODE_ID&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;       &lt;SPAN class="comment token"&gt;// receive extended address with 0x80000 set and exactly matching the node ID&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;usMode &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                           &lt;SPAN class="comment token"&gt;// use normal mode&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ucTxBuffers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                      &lt;SPAN class="comment token"&gt;// assign two tx buffers for use&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ucRxBuffers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                      &lt;SPAN class="comment token"&gt;// assign one rx buffers for extended ID use&lt;/SPAN&gt;
    CANopenHandle &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;fnOpen&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;TYPE_CAN&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FOR_I_O&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;tCANParameters&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;          &lt;SPAN class="comment token"&gt;// open CAN interface for extended ID usage&lt;/SPAN&gt;

    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulRxID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                           &lt;SPAN class="comment token"&gt;// broadcast address&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulRxIDMask &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; CAN_STANDARD_MASK&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                       &lt;SPAN class="comment token"&gt;// accept ID 0&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ucTxBuffers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ucRxBuffers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;fnConfigCAN&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;CANopenHandle&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;tCANParameters&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                         &lt;SPAN class="comment token"&gt;// configure 1 further rx buffer for this logical channel&lt;/SPAN&gt;

    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulRxID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; CANOPEN_RX_NODE_ID&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                          &lt;SPAN class="comment token"&gt;// node ID that we receive&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ulRxIDMask &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0x7f&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                    &lt;SPAN class="comment token"&gt;// accept only exact node ID&lt;/SPAN&gt;
    tCANParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ucRxBuffers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;fnConfigCAN&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;CANopenHandle&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;tCANParameters&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                         &lt;SPAN class="comment token"&gt;// configure 1 further rx buffer for this logical channel&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; CANopenHandle&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                                                &lt;SPAN class="comment token"&gt;// open CAN interface&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Complete Kinetis solutions for professionals needs, training and support: &lt;A href="http://www.utasker.com/kinetis.html" rel="nofollow noopener noreferrer" target="test_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Turn-key CANopen for Kinetis - &lt;A href="http://www.utasker.com/index.html" rel="nofollow noopener noreferrer" target="test_blank"&gt;http://www.utasker.com/index.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FlexCAN simulation: &lt;A href="https://www.youtube.com/watch?v=Ha8cv_XEvco" rel="nofollow noopener noreferrer" target="test_blank"&gt;https://www.youtube.com/watch?v=Ha8cv_XEvco&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 18:22:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-does-FlexCAN-CAN-ID-matching-mechanism-work/m-p/896765#M52887</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-05-06T18:22:48Z</dc:date>
    </item>
  </channel>
</rss>

