<?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: Receiving CAN FD frame when FDEN is disabled in S32 SDK</title>
    <link>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327274#M2264</link>
    <description>&lt;P&gt;Hi@&lt;A id="link_9" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180782" target="_self" aria-label="View Profile of nathand"&gt;&lt;SPAN class=""&gt;nathand&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yes, you right!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rx FIFO does not support CAN FD, because the message data of the mailbox contained in the Rx FIFO structure is 8 bytes ，so you can only use MB when using CAN FD.&lt;/P&gt;
&lt;P&gt;S32K-RM&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1629682380970.png" style="width: 515px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153618i6CC7C48DF5AF1B89/image-dimensions/515x193?v=v2" width="515" height="193" role="button" title="Senlent_0-1629682380970.png" alt="Senlent_0-1629682380970.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Jim，&lt;/P&gt;</description>
    <pubDate>Mon, 23 Aug 2021 01:33:46 GMT</pubDate>
    <dc:creator>Senlent</dc:creator>
    <dc:date>2021-08-23T01:33:46Z</dc:date>
    <item>
      <title>Receiving CAN FD frame when FDEN is disabled</title>
      <link>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327079#M2263</link>
      <description>&lt;P&gt;Using an S32K148, what happens when the FlexCAN MCR-&amp;gt;FDEN (flexible datarate enable) bit is not set, and the MCU receives a FD frame with DLC &amp;gt; 8? We've installed our device, containing this MCU, in many vehicles, and we're seeing failures with one specific very-recent vehicle model. Using SDK 4.0.1, our code is crashing in flexcan_hw_access.c around line 1616, in FLEXCAN_ReadRxFifo(). One of these two lines&lt;/P&gt;&lt;LI-CODE lang="c"&gt;          mbWord = flexcan_mb_data_32[databyte &amp;gt;&amp;gt; 2U];
          FlexcanSwapBytesInWord(mbWord, msgData_32[databyte &amp;gt;&amp;gt; 2U]);&lt;/LI-CODE&gt;&lt;P&gt;seems to be causing the MCU to crash when a frame arrives with a data length greater than 8, since we're only supplying an 8-byte buffer. When FDEN is disabled, why does the MCU still receive frames with a data length code greater than 8? What's the correct workaround here - do I need to pass a larger buffer when I start the read, or will this still crash because I'm using the Rx FIFO which only has space for 8 bytes of data?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 18:57:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327079#M2263</guid>
      <dc:creator>nathand</dc:creator>
      <dc:date>2021-08-20T18:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving CAN FD frame when FDEN is disabled</title>
      <link>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327274#M2264</link>
      <description>&lt;P&gt;Hi@&lt;A id="link_9" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180782" target="_self" aria-label="View Profile of nathand"&gt;&lt;SPAN class=""&gt;nathand&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yes, you right!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rx FIFO does not support CAN FD, because the message data of the mailbox contained in the Rx FIFO structure is 8 bytes ，so you can only use MB when using CAN FD.&lt;/P&gt;
&lt;P&gt;S32K-RM&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1629682380970.png" style="width: 515px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153618i6CC7C48DF5AF1B89/image-dimensions/515x193?v=v2" width="515" height="193" role="button" title="Senlent_0-1629682380970.png" alt="Senlent_0-1629682380970.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;BR!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Jim，&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 01:33:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327274#M2264</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2021-08-23T01:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving CAN FD frame when FDEN is disabled</title>
      <link>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327401#M2265</link>
      <description>&lt;P&gt;Thanks. This does not quite answer my question, though. What is expected to happen when FDEN is 0 (FD not enabled) and the FlexCAN module receives a CAN FD frame? It seems like that causes a CPU exception in the SDK, which is not ideal.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 05:28:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327401#M2265</guid>
      <dc:creator>nathand</dc:creator>
      <dc:date>2021-08-23T05:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving CAN FD frame when FDEN is disabled</title>
      <link>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327710#M2267</link>
      <description>&lt;P&gt;Hi@&lt;A id="link_13" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180782" target="_self" aria-label="View Profile of nathand"&gt;&lt;SPAN class=""&gt;nathand&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;My thoughts may not be right, but it should also be a possible cause of the exception.&lt;/P&gt;
&lt;P&gt;This is Rx FIFO structure.&lt;/P&gt;
&lt;P&gt;The region 0x80-0x8C contains the output of the FIFO which must be read by the CPU as&lt;BR /&gt;a message buffer. This output contains the oldest message that has been received but not&lt;BR /&gt;yet read. The region 0x90-0xDC is reserved for internal use of the FIFO engine.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_0-1629709462482.png" style="width: 524px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153695i15C7A2B05880A780/image-dimensions/524x287?v=v2" width="524" height="287" role="button" title="Senlent_0-1629709462482.png" alt="Senlent_0-1629709462482.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_2-1629712316172.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153711i63F7E98A11DF6EF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Senlent_2-1629712316172.png" alt="Senlent_2-1629712316172.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As long as the data length exceeds 8, can_real_payload will also be greater than 8（=12，16，20，24，32，48，64）. The following function will access the Reserved space of 0x90~0xDC, causing an exception.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Senlent_1-1629712144888.png" style="width: 487px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153708i05C2F095B5F8089F/image-dimensions/487x84?v=v2" width="487" height="84" role="button" title="Senlent_1-1629712144888.png" alt="Senlent_1-1629712144888.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;This is the possible reason I thought of . If you have any questions about this answer, you can ask again in the community forum, and some of my colleagues will help you answer it.&lt;/P&gt;
&lt;P&gt;BR!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Jim.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 10:03:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1327710#M2267</guid>
      <dc:creator>Senlent</dc:creator>
      <dc:date>2021-08-23T10:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving CAN FD frame when FDEN is disabled</title>
      <link>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1612085#M2958</link>
      <description>&lt;P&gt;Hello, I have encountered this problem at present. Do you need to change RX FIFO to MB format? Because CAN FD is not supported at present&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 03:40:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/Receiving-CAN-FD-frame-when-FDEN-is-disabled/m-p/1612085#M2958</guid>
      <dc:creator>1069466534</dc:creator>
      <dc:date>2023-03-09T03:40:55Z</dc:date>
    </item>
  </channel>
</rss>

