<?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 keep CAN-FD reception order without fifo? in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/keep-CAN-FD-reception-order-without-fifo/m-p/1994497#M32568</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to implement a gateway from CAN-FD to ethernet in the IMXRT1176. The gateway should forward all can-message-id's, so obviously I cannot assign one ID to one mailbox.&lt;/P&gt;&lt;P&gt;From the documents I see that a RX-Fifo is not supported when CAN-FD is activated. This means that for CAN-FD operation I need to use mailboxes. Correct?&lt;/P&gt;&lt;P&gt;What is the correct concept to receive ANY CAN-FD frames (without changing the receive order of the messages in the firmware)?&lt;/P&gt;&lt;P&gt;if I need to use mailboxes, I can activate all mailboxes, set a filter to "accept all". Then the CAN-engine will put the first received message into the first free mailbox. If the second message arrives before I read the first mailbox, I assume the engine will put the message into the second mailbox, because the first one is still full. Correct?&lt;/P&gt;&lt;P&gt;Now the firmware reads the first mailbox and puts the message into an internal software-fifo and frees that mailbox. If now a new CAN-message is received, the CAN-engine would store the new message into the first mailbox. At this point my firmwre needs to make sure that the second mailbox is read&amp;nbsp; before the first mailbox is read to keep the correct message order. This means the order of the full mailboxes does not represent the receive order, which is important.&lt;/P&gt;&lt;P&gt;Is there a easier to implement option available that keeps the correct received order of the CNA-messages?&lt;BR /&gt;It would be much simpler to have a built-in fifo that supports CAN-FD...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 08:58:25 GMT</pubDate>
    <dc:creator>gunnarbohlen</dc:creator>
    <dc:date>2024-11-14T08:58:25Z</dc:date>
    <item>
      <title>keep CAN-FD reception order without fifo?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/keep-CAN-FD-reception-order-without-fifo/m-p/1994497#M32568</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to implement a gateway from CAN-FD to ethernet in the IMXRT1176. The gateway should forward all can-message-id's, so obviously I cannot assign one ID to one mailbox.&lt;/P&gt;&lt;P&gt;From the documents I see that a RX-Fifo is not supported when CAN-FD is activated. This means that for CAN-FD operation I need to use mailboxes. Correct?&lt;/P&gt;&lt;P&gt;What is the correct concept to receive ANY CAN-FD frames (without changing the receive order of the messages in the firmware)?&lt;/P&gt;&lt;P&gt;if I need to use mailboxes, I can activate all mailboxes, set a filter to "accept all". Then the CAN-engine will put the first received message into the first free mailbox. If the second message arrives before I read the first mailbox, I assume the engine will put the message into the second mailbox, because the first one is still full. Correct?&lt;/P&gt;&lt;P&gt;Now the firmware reads the first mailbox and puts the message into an internal software-fifo and frees that mailbox. If now a new CAN-message is received, the CAN-engine would store the new message into the first mailbox. At this point my firmwre needs to make sure that the second mailbox is read&amp;nbsp; before the first mailbox is read to keep the correct message order. This means the order of the full mailboxes does not represent the receive order, which is important.&lt;/P&gt;&lt;P&gt;Is there a easier to implement option available that keeps the correct received order of the CNA-messages?&lt;BR /&gt;It would be much simpler to have a built-in fifo that supports CAN-FD...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 08:58:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/keep-CAN-FD-reception-order-without-fifo/m-p/1994497#M32568</guid>
      <dc:creator>gunnarbohlen</dc:creator>
      <dc:date>2024-11-14T08:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: keep CAN-FD reception order without fifo?</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/keep-CAN-FD-reception-order-without-fifo/m-p/1995094#M32590</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/111978"&gt;@gunnarbohlen&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;I suggest you refer to MIMXRT1170RM reference manual, especially chapter 66.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=IMXRT1170RM" target="_blank"&gt;https://www.nxp.com/webapp/Download?colCode=IMXRT1170RM&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question1&lt;/STRONG&gt;: From the documents I see that a RX-Fifo is not supported when CAN-FD is activated. This means that for CAN-FD operation I need to use mailboxes. Correct?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer1:&lt;/STRONG&gt; Yes,&amp;nbsp; &amp;nbsp;in MIMXRT1170RM described that "Rx FIFO cannot be used in FD mode", but you can use&amp;nbsp;mailboxes.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1731639015490.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/310695i3C1BD2B3FEA15D84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1731639015490.png" alt="mayliu1_0-1731639015490.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question2:&lt;/STRONG&gt; What is the correct concept to receive ANY CAN-FD frames (without changing the receive order of the messages in the firmware)?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer2:&lt;/STRONG&gt; I am sorry that I don't understand your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;You mean to receive all the CAN ID?&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;If so, you can receive all CAN ID by&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; setting&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;FLEXCAN_SetRxMbGlobalMask(EXAMPLE_CAN, 0);&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question3:&lt;/STRONG&gt; if I need to use mailboxes, I can activate all mailboxes, set a filter to "accept all". Then the CAN-engine will put the first received message into the first free mailbox. If the second message arrives before I read the first mailbox, I assume the engine will put the message into the second mailbox, because the first one is still full. Correct?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer3:&lt;/STRONG&gt;&amp;nbsp; chapter 66.3.5 Matching process described more detail.&lt;/P&gt;
&lt;P&gt;Please pay attention about Registers setting.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_1-1731639077153.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/310696iB4C1A5D20AE0C7B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_1-1731639077153.png" alt="mayliu1_1-1731639077153.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question4:&lt;/STRONG&gt; Is there a easier to implement option available that keeps the correct received order of the CNA-messages?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer4:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1：&lt;SPAN&gt;I strongly recommend that you use timestamps. Timestamps can record the time when CAN data frame reaches the receiver.&amp;nbsp; you can comparing the timestamps to get know that the receiving order of the data frames .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2：Please c&lt;SPAN&gt;onfigure CAN filters and mask bits reasonably, it is also very import.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question5:&lt;/STRONG&gt; It would be much simpler to have a built-in fifo that supports CAN-FD...&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer5:&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp;I am sorry about that, and MIMXRT1170RM tell us that CANFD can not use &lt;SPAN&gt;RX FIFO.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish it helps you.&lt;BR /&gt;If you still have question about it, please kindly let me know.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mayliu&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 03:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/keep-CAN-FD-reception-order-without-fifo/m-p/1995094#M32590</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-11-15T03:17:34Z</dc:date>
    </item>
  </channel>
</rss>

