<?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: MPC5606B Receiving all CAN IDs in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503216#M2907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;I had the same question but for the MPC5748G target. We found out that we also need 1 MB for regular ID and 1 for extended ID. Why is this necessary?&lt;/P&gt;&lt;P&gt;It makes receiving &lt;STRONG&gt;all CAN&lt;/STRONG&gt; data a bit more difficult, starting 2 receives at the same time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Ruud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jan 2019 07:21:57 GMT</pubDate>
    <dc:creator>ruudsiebierski</dc:creator>
    <dc:date>2019-01-10T07:21:57Z</dc:date>
    <item>
      <title>MPC5606B Receiving all CAN IDs</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503214#M2905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;I am trying to receive all possible (standard) CAN IDs with one FlexCAN module on MPC5606B.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;At the moment, I am using the following code, that, unfortunately, only works for receiving messages with one single CAN ID (see SetCanRxFilter). Is it possible to receive all CAN IDs on one message buffer or do I have to switch to RxFIFO instead of CAN Mailboxes? Is there any example code for receiving any CAN messages with arbitrary IDs?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;void SetCanRxFilter(uint32_t id, uint8_t mb, uint8_t ext)&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; if (ext) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_1.BUF[mb].CS.B.IDE = 1;/* MB for extended ID */ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_1.BUF[mb].ID.R = id;&amp;nbsp;&amp;nbsp; /* MB ID */ &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_1.BUF[mb].CS.B.IDE = 0; /* MB for standard ID */ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_1.BUF[mb].ID.B.STD_ID = (uint16_t)id; /* MB ID */ &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_1.BUF[mb].CS.B.CODE = CAN_RX_EMPTY; /* Set rx MB empty */ }&amp;nbsp; can_msg_struct CanRxMsg (uint8_t mb) { &amp;nbsp; uint8_t i; &amp;nbsp; uint32_t dummy; &amp;nbsp; uint32_t flagIFRL = 0; &amp;nbsp; uint32_t flagIFRH = 0; &amp;nbsp; can_msg_struct msg;&amp;nbsp;&amp;nbsp; &amp;nbsp; if (mb &amp;lt; 32) &amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; flagIFRL = ((uint32_t)(0x00000001 &amp;lt;&amp;lt; mb)); &amp;nbsp; } &amp;nbsp; else &amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; flagIFRH = ((uint32_t)(0x00000001 &amp;lt;&amp;lt; (mb - 32))); &amp;nbsp; }&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; msg.code&amp;nbsp;&amp;nbsp; = (uint8_t)CAN_1.BUF[mb].CS.B.CODE; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (CAN_1.BUF[0].CS.B.IDE) /* if extended ID */ &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg.id&amp;nbsp; = CAN_1.BUF[mb].ID.R; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; else /* if standard ID */ &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg.id&amp;nbsp; = (uint16_t)CAN_1.BUF[mb].ID.B.STD_ID; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; msg.length = (uint8_t)CAN_1.BUF[mb].CS.B.LENGTH; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (i = 0; i &amp;lt; msg.length; i++)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg.data[i] = CAN_1.BUF[mb].DATA.B[i]; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; dummy = CAN_1.TIMER.R;&amp;nbsp; /* Read TIMER to unlock MB */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_1.IFRL.R = flagIFRL; /* Clear MB flag */ &amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_1.IFRH.R = flagIFRH; /* Clear MB flag */ &amp;nbsp;&amp;nbsp;&amp;nbsp; return (msg); }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 10:53:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503214#M2905</guid>
      <dc:creator>fscheidl</dc:creator>
      <dc:date>2016-02-11T10:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606B Receiving all CAN IDs</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503215#M2906</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;You can just set a Mask acceptance register(s) properly, means clear all bits. In that case the received ID is “don’t care”. If you want to receive both standard and extended frames then 2 MBs should be set for receive, one for standard and other for extended frames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 12:18:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503215#M2906</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-02-11T12:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606B Receiving all CAN IDs</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503216#M2907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;I had the same question but for the MPC5748G target. We found out that we also need 1 MB for regular ID and 1 for extended ID. Why is this necessary?&lt;/P&gt;&lt;P&gt;It makes receiving &lt;STRONG&gt;all CAN&lt;/STRONG&gt; data a bit more difficult, starting 2 receives at the same time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Ruud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2019 07:21:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503216#M2907</guid>
      <dc:creator>ruudsiebierski</dc:creator>
      <dc:date>2019-01-10T07:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606B Receiving all CAN IDs</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503217#M2908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruud,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the MPC5748G you have an option to receive both standard and extended ID messages into single MB.&lt;/P&gt;&lt;P&gt;Just set CTRL2[EACEN] bit and clear all bits in mask register.&lt;/P&gt;&lt;P&gt;The EACEN enables the comparison of both Rx Mailbox filter’s IDE and RTR bit with their corresponding bits&lt;BR /&gt;within the incoming frame. Mask bits do apply.&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/76712i102B7C63E0085A54/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;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2019 06:10:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503217#M2908</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2019-01-11T06:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606B Receiving all CAN IDs</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503218#M2909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;Thank you for the answer, tested it and it worked, of course!&lt;/P&gt;&lt;P&gt;Too bad this functionality (setting the bit in the CTRL2 register) is not exposed in the SDK driver.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Ruud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2019 09:00:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606B-Receiving-all-CAN-IDs/m-p/503218#M2909</guid>
      <dc:creator>ruudsiebierski</dc:creator>
      <dc:date>2019-01-11T09:00:44Z</dc:date>
    </item>
  </channel>
</rss>

