<?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>S32KのトピックRe: CAN FIFO Issues &amp; Questions</title>
    <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597828#M53</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremiah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a driver issue as Petr&amp;nbsp;correctly pointed out in another thread. The driver correctly&amp;nbsp;handles conversion to little endian in normal (mailbox) mode, but does not do it in RX FIFO mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Apr 2017 20:50:22 GMT</pubDate>
    <dc:creator>mikhail_l</dc:creator>
    <dc:date>2017-04-06T20:50:22Z</dc:date>
    <item>
      <title>CAN FIFO Issues &amp; Questions</title>
      <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597822#M47</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having some troubles filtering CAN messages. Specifically, the RX individual masks don't seem to be doing anything. I am using the global Rx Fifo mask which does work. I have my CAN configured with 16 Mailboxes, 16 RX FIFO Filters, Use Rx FIFO, and the Payload Size of 8. From what I read in the reference manual, Table Elements 0-9 should be affected by RX Individual Masks when enabled. What I don't know is how to enable them. I don't see any registers that enable them. I thought they're enabled when setting them using&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;FLEXCAN_DRV_SetRxIndividualMask&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;can_instance&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FLEXCAN_MSG_ID_EXT&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0U&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xff0000&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What exactly am I missing here? Right now the messages are only filtered based on the global mask and my ID table elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed something strange when switching from the normal Rx to FIFO Rx.&amp;nbsp;When a CAN messaged was received with the normal Rx, it would look like&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Identifier&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DATA:&amp;nbsp;&amp;nbsp;&amp;nbsp;B0&amp;nbsp;&amp;nbsp;&amp;nbsp;B1&amp;nbsp;&amp;nbsp;&amp;nbsp;B2&amp;nbsp;&amp;nbsp;&amp;nbsp;B3&amp;nbsp;&amp;nbsp;&amp;nbsp;B4&amp;nbsp;&amp;nbsp;&amp;nbsp;B5&amp;nbsp;&amp;nbsp;&amp;nbsp;B6&amp;nbsp;&amp;nbsp;&amp;nbsp;B7&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but when received via the Rx FIFO, it would like like&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;Identifier&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;DATA:&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B3&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B2&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B1&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B0&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B7&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B6&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B5&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B4&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I couldn't figure out why my CAN messages weren't functioning correctly until I found out the data needed to be swapped. The identifier was correct, but the data was not. I have not located anything in the reference manual that discusses &lt;SPAN&gt;endianness differences with the CAN FIFO.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I sending the messages with CANalyzer as&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;Identifier&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;DATA:&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B0&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B1&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B2&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B3&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B4&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B5&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B6&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;B7&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly, I just want to make sure I'm emptying the FIFO buffer correctly. I'm using ProcessorExpert functions. What I do is read&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FLEXCAN_DRV_GetReceiveStatus&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;indexCANPort&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; FLEXCAN_STATUS_SUCCESS‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then read my buffer with the received CAN message. Finally I start the next receive by&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;FLEXCAN_DRV_RxFifo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;FSL_CANCOM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;RxBuffer&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;indexCANPort&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I've put&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;FLEXCAN_DRV_GetReceiveStatus&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;indexCANPort&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; FLEXCAN_STATUS_SUCCESS‍&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;in a for loop with a maximum limit of 6 checks in case there is more than one message in the FIFO. This approach seems to work as I've seen times when at least two messages were pulled out of the FIFO. Is this the correct approach? I don't see any other PE functions that can tell me how many messages are in the FIFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using S32 Design Studio V1.2 with&amp;nbsp;S32_SDK_EAR_0.8.1 and my MCU is the S32K144 64-pin V1.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to see if anything changed with the next SDK version, but the only way to access the change log for the SDK is to installed&amp;nbsp;&lt;SPAN&gt;S32 Design Studio V1.3. This requires V2.0 MCUs. I actually installed it awhile back until I realized it doesn't support V1.0 MCUs. It also caused havoc&amp;nbsp;with my V1.2 install as the SDK links changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jeremiah&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Feb 2017 01:11:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597822#M47</guid>
      <dc:creator>jeremiahg</dc:creator>
      <dc:date>2017-02-25T01:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: CAN FIFO Issues &amp; Questions</title>
      <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597823#M48</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremiah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Individual masking is enabled by MCR[IRMQ] bit. Once set the individual RX masking is enabled. The ID Filter elements then use RX individual mask registers and RX FIFO global mask register as per setting of CTRL2[RFFN]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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/15926i46B20963D36FCCF4/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;For your setting above highlighted option is valid.&lt;/P&gt;&lt;P&gt;The FLEXCAN_DRV_SetRxMaskType (&lt;SPAN style="font-size: 10.0pt;"&gt;FSL_CANCOM1, 1) &lt;/SPAN&gt;is used to set the MCR[IRMQ] bit. Must be written in Freeze mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the data bytes swapping; the module itself does not do any byte swapping.&lt;/P&gt;&lt;P&gt;Seems the API does this. Not sure why. See more in functions &lt;A href="#gae370c5422baad0f2b8df2815cc6213c0"&gt;&lt;SPAN style="color: windowtext; text-decoration: none;"&gt;FLEXCAN_HAL_ReadRxFifo&lt;/SPAN&gt;&lt;/A&gt;() and &lt;A href="#ga4d1ff22c6f0c62e489756d8481638431"&gt;&lt;SPAN style="color: windowtext; text-decoration: none;"&gt;FLEXCAN_HAL_GetMsgBuff&lt;/SPAN&gt;&lt;/A&gt;(). But it looks the bytes are swapped when regular MB is read, not the RX FIFO.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code for clearing the RXFIFO could work.&lt;/P&gt;&lt;P&gt;You can also use CAN_IFLAG1[BUF0I] to empty FIFO content as written in chapter 47.5.8.2 "Clear FIFO Operation" of the RM. Writing 1 to CAN_IFLAG1[BUF0I] will empty the RXFIFO, but must be done in Freeze mode. The code could be following…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="#ga8f4bdb53b058742a64f1c1c3e60f173b"&gt;&lt;SPAN style="color: windowtext; text-decoration: none;"&gt;FLEXCAN_HAL_EnterFreezeMode&lt;/SPAN&gt;&lt;/A&gt;(FSL_CANCOM1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set Freeze mode&lt;/P&gt;&lt;P&gt;&lt;A href="#ga2fcecd4ed3682e784f97780aebd86733"&gt;&lt;SPAN style="color: windowtext; text-decoration: none;"&gt;FLEXCAN_HAL_ClearMsgBuffIntStatusFlag&lt;/SPAN&gt;&lt;/A&gt;(FSL_CANCOM1, 0xE1) // empty fifo and clear other RXFIFO flags&lt;/P&gt;&lt;P&gt;&lt;A href="#gaed6c6c3ee6e0d60aadd6637b835cc1a3"&gt;&lt;SPAN style="color: windowtext; text-decoration: none;"&gt;FLEXCAN_HAL_ExitFreezeMode&lt;/SPAN&gt;&lt;/A&gt;(FSL_CANCOM1); // exit Freeze mode&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>Wed, 01 Mar 2017 10:25:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597823#M48</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2017-03-01T10:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: CAN FIFO Issues &amp; Questions</title>
      <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597824#M49</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the information. I actually tried that before and the individual masking wasn't working. I did some testing with each bit in the message and learned something interesting. The individual mask value had to be shifting left by one bit. For example, I had ID Filter Tabe 0&amp;nbsp;as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;0x00E80000&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;an originally had Individual Mask Element 0 as&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;0x00FF0000&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I expected a CAN message with ID 0x00E8FF00 to be received. I didn't get the message. so I tried 0x00E84F00. I received this message. The CAN messages are correctly passed when the original&amp;nbsp;&lt;SPAN&gt;Individual Mask Element 0 was&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;0x01FE0000&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;All of my &lt;SPAN&gt;individual masks function correctly when I left shifted the mask value by 1. I didn't dig into the drivers. I am using the ProcessorExpert function&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;FLEXCAN_DRV_SetRxIndividualMask&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;can_instance&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FLEXCAN_MSG_ID_EXT&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0U&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xff0000&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&amp;lt;&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="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;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm going to write my own drivers for the Rx FIFO so I can react to the interrupts&amp;nbsp;provided by the FIFO, especially when it is almost full. I'm still having issues when the bus load is over 50%.&amp;nbsp;Either that or use DMA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jeremiah&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2017 00:54:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597824#M49</guid>
      <dc:creator>jeremiahg</dc:creator>
      <dc:date>2017-03-03T00:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: CAN FIFO Issues &amp; Questions</title>
      <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597825#M50</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeremiah,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you are correct I ran into the same thing. I am using the kinetis K20DX256 (KSDK 1.3) and&amp;nbsp;when we call&amp;nbsp;FlexCanDevice_SetRxIndividualMask() in the driver it calls&amp;nbsp;FLEXCAN_HAL_SetRxIndividualExtMask() which writes to the &amp;nbsp;CANx_RXIMRn register:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FLEXCAN_HAL_SetRxIndividualExtMask(){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;CAN_WR_RXIMR(base, msgBuffIdx, CAN_ID_EXT(extMask));&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;CAN_ID_EXT is defined as:&lt;/P&gt;&lt;P&gt;#define CAN_ID_EXT_MASK 0x3FFFFu&lt;BR /&gt;#define CAN_ID_EXT_SHIFT 0&lt;BR /&gt;#define CAN_ID_EXT(x) (((uint32_t)(((uint32_t)(x))&amp;lt;&amp;lt;CAN_ID_EXT_SHIFT))&amp;amp;CAN_ID_EXT_MASK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two issues with this:&lt;/P&gt;&lt;P&gt;1. CAN_ID_EXT_MASK would only set the extended ID part of the ID even though the maximum possible value of an extended mask would be 0x1fffffff&lt;/P&gt;&lt;P&gt;2. If RX is set up to use a FIFO then we need to look at RXFGMASK register to see what the bits mean. In the CANx_RXFGMASK definition, if we have selected to use full RXIDA format then the ID would be bits FGM[29:1]. So therefore we would need to shift by 1 bit (as you have done)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_18.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18409iCA26331E590CB536/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_18.png" alt="pastedImage_18.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the solution I had for this issue. I modified the driver so&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLEXCAN_HAL_SetRxIndividualStdMask{&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;CAN_WR_RXIMR(base, msgBuffIdx, ((CAN_ID_STD(stdMask))&amp;lt;&amp;lt;1));&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FLEXCAN_HAL_SetRxIndividualExtMask(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//The reason the value has been OR'ed by 0x40000000 is because we want to set the IDE bit since it is an extended message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CAN_WR_RXIMR(base, msgBuffIdx, (((extMask &amp;amp; 0x1FFFFFFF)&amp;lt;&amp;lt;1))| 0x40000000);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: This solution works for FIFO masks but will not work for mailboxes because CANx_RXMGMASK is defined as MG[28:0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:49:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597825#M50</guid>
      <dc:creator>abidbodal</dc:creator>
      <dc:date>2017-03-21T15:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: CAN FIFO Issues &amp; Questions</title>
      <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597826#M51</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremiah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also noticed CAN data byte swapping problem in RX FIFO mode. In normal (mailbox) mode it does not happen.&lt;/P&gt;&lt;P&gt;I am currently reversing received bytes in my&amp;nbsp;code to fix the problem, but it looks like a hardware bug to me.&lt;/P&gt;&lt;P&gt;Using debugger. I see swapped&amp;nbsp;bytes in dedicated CAN RAM memory even before driver code reads them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you learned anything new about this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mikhail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 01:26:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597826#M51</guid>
      <dc:creator>mikhail_l</dc:creator>
      <dc:date>2017-04-05T01:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: CAN FIFO Issues &amp; Questions</title>
      <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597827#M52</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mikhail,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, I have not learned regarding the byte swapping. I presenting what I was experiencing above. I've seen a few other threads here discussing byte swapping too. I have not seen official answer to why it is different when not using the FIFO. I'm going with the flow for now, swapping the bytes when I read the FIFO buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did learn that the global mask for the FIFO is just like the individual one where you need to shift the mask by one bit. My CAN filtering is working pretty well now with an ID table along with the global mask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know in a few weeks if anything has change when I move to S32 Design Studio V1.3 with Update 1. I have some boards coming with the V2.0 MCU&amp;nbsp;that supports V1.3 IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jeremiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 20:28:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597827#M52</guid>
      <dc:creator>jeremiahg</dc:creator>
      <dc:date>2017-04-06T20:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: CAN FIFO Issues &amp; Questions</title>
      <link>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597828#M53</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremiah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a driver issue as Petr&amp;nbsp;correctly pointed out in another thread. The driver correctly&amp;nbsp;handles conversion to little endian in normal (mailbox) mode, but does not do it in RX FIFO mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 20:50:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-FIFO-Issues-Questions/m-p/597828#M53</guid>
      <dc:creator>mikhail_l</dc:creator>
      <dc:date>2017-04-06T20:50:22Z</dc:date>
    </item>
  </channel>
</rss>

