<?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>LPC MicrocontrollersのトピックCAN message acceptance filtering -- C_CAN on-chip driver</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-message-acceptance-filtering-C-CAN-on-chip-driver/m-p/647666#M25677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;does anybody know how the message filtering works, using the C_CAN on-chip driver?&lt;/P&gt;&lt;P&gt;In the example &amp;nbsp;from "nxp_lpcxpresso_11c24_periph_ccan_rom" there is written value 0x700 to the mask register and 0x400 to the mode_id register, to accept message with id's from 0x400 to 0x4FF.&lt;/P&gt;&lt;P&gt;But still I could&amp;nbsp;not figure out e.g. how to create an acceptance filter range from 0x100 to 0x129?&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the logic relation from mode_id and mask register to accept message id ranges???&lt;/P&gt;&lt;P&gt;I apreciate any hint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ekki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Oct 2016 13:14:55 GMT</pubDate>
    <dc:creator>ekki</dc:creator>
    <dc:date>2016-10-18T13:14:55Z</dc:date>
    <item>
      <title>CAN message acceptance filtering -- C_CAN on-chip driver</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-message-acceptance-filtering-C-CAN-on-chip-driver/m-p/647666#M25677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;does anybody know how the message filtering works, using the C_CAN on-chip driver?&lt;/P&gt;&lt;P&gt;In the example &amp;nbsp;from "nxp_lpcxpresso_11c24_periph_ccan_rom" there is written value 0x700 to the mask register and 0x400 to the mode_id register, to accept message with id's from 0x400 to 0x4FF.&lt;/P&gt;&lt;P&gt;But still I could&amp;nbsp;not figure out e.g. how to create an acceptance filter range from 0x100 to 0x129?&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the logic relation from mode_id and mask register to accept message id ranges???&lt;/P&gt;&lt;P&gt;I apreciate any hint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ekki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 13:14:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-message-acceptance-filtering-C-CAN-on-chip-driver/m-p/647666#M25677</guid>
      <dc:creator>ekki</dc:creator>
      <dc:date>2016-10-18T13:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message acceptance filtering -- C_CAN on-chip driver</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-message-acceptance-filtering-C-CAN-on-chip-driver/m-p/647667#M25678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ekkehard,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP LPC product, I would like to provide service for you!&lt;BR /&gt;You are misunderstanding the CAN filter range.&lt;BR /&gt;Actually, it is not the range for the acceptance filter, the acceptance filter is judge whether the receive ID bit should the same with mode_id.&lt;BR /&gt;Now, use the example to describe it.&lt;BR /&gt;1.&amp;nbsp; receive all 11-bit messages 0x400-0x4ff&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.msgobj = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.mode_id = 0x400;//// define the ID compare data&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.mask = 0x700; //define which receive ID bit should be ignored, and which ID bit should be the same as the according bit in mod_id.0, ignored, 1, must the same as mod_id.&lt;/P&gt;&lt;P&gt;=======================================================================&lt;/P&gt;&lt;P&gt;msg_obj.mode_id = 0x400 = 0b&lt;SPAN style="color: #ff0000;"&gt;100&lt;/SPAN&gt; 0000 0000&amp;nbsp; (11bits)&lt;/P&gt;&lt;P&gt;msg_obj.mask&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x700&amp;nbsp; = 0b&lt;SPAN style="color: #ff0000;"&gt;111&lt;/SPAN&gt; 0000 0000&amp;nbsp; (11bits) 1, means receive the standard ID bit9,10,11 must be the same as 100.&lt;/P&gt;&lt;P&gt;So, MCU can receive&amp;nbsp; standard ID is:0b100 xxxx xxxx , it is 0x400- 0x4ff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. receive all 11-bit message 00x400-0x40f&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.msgobj = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.mode_id = 0x400;// define the ID compare data&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.mask = 0x7f0;&lt;/P&gt;&lt;P&gt;=======================================================================&lt;/P&gt;&lt;P&gt;msg_obj.mode_id = 0x400 = 0b&lt;SPAN style="color: #ff0000;"&gt;100&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;0000&lt;/SPAN&gt; 0000&amp;nbsp; (11bits)&lt;/P&gt;&lt;P&gt;msg_obj.mask&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x7f0&amp;nbsp;&amp;nbsp; = 0b&lt;SPAN style="color: #ff0000;"&gt;111&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;1111&lt;/SPAN&gt; 0000&amp;nbsp; (11bits) 1, means receive the standard ID bit9,10,11 must be the same as 100.&lt;/P&gt;&lt;P&gt;So, MCU can receive&amp;nbsp; standard ID is:0b100 0000 xxxx , it is 0x400- 0x40f.&lt;/P&gt;&lt;P&gt;msg_obj.mask is defined 11bits data, this data is used to define the MSK1, MSK2 register, this two register is defining whether the received ID bit should for acceptance filter.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6132iC11EEE584765933A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to receive the standard ID:0X100 ~0X129, you can't configure it directly, the closely data is 0x100-0x13f, let me tell you why.&lt;/P&gt;&lt;P&gt;0X100= 0b 001 0000 0000 (11bits)&lt;/P&gt;&lt;P&gt;0x129= 0b 001 0010 1001 (11 bits)&lt;/P&gt;&lt;P&gt;As you know, you should configure msg_obj.mask to 0b111 1100 0000, because in your 0X100-0X129 range, bit0- bit5 all can be 0 or 1, so you should ignore bit0- bit5.&lt;/P&gt;&lt;P&gt;Then configure your code like this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg_obj.msgobj = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.mode_id = &lt;SPAN style="color: #ff0000;"&gt;0x100&lt;/SPAN&gt;;//&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;msg_obj.mask = &lt;SPAN style="color: #ff0000;"&gt;0x7c0&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;So, actually, you can receive the standard ID from 0X100 to 0x13f.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question, please contact me!&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&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>Thu, 20 Oct 2016 09:15:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-message-acceptance-filtering-C-CAN-on-chip-driver/m-p/647667#M25678</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-10-20T09:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: CAN message acceptance filtering -- C_CAN on-chip driver</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-message-acceptance-filtering-C-CAN-on-chip-driver/m-p/647668#M25679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect answer. Thank you very much for the efford&amp;nbsp;you spend for the detailed explanation.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ekkehard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2016 09:36:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CAN-message-acceptance-filtering-C-CAN-on-chip-driver/m-p/647668#M25679</guid>
      <dc:creator>ekki</dc:creator>
      <dc:date>2016-10-20T09:36:12Z</dc:date>
    </item>
  </channel>
</rss>

