<?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 LPC55xx CAN TX Fifo usage in fsl_mcan in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1530942#M50313</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to use the TX fifo function of the CAN (FD) controller on the LPC55xx.&lt;/P&gt;&lt;P&gt;Unfortunately i didn't fine any example for this.&lt;/P&gt;&lt;P&gt;A fast check of the driver code seems to confirm that the driver fsl_mcan don't support the use if the TX fifo. While it possible to configure the controller via the Config tool in MCUXpresso, the fifo is handle as a single TX Buffer.&lt;/P&gt;&lt;P&gt;Has somebody an example how to use the TX fifo on this controller?&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 07:34:24 GMT</pubDate>
    <dc:creator>MartinHo</dc:creator>
    <dc:date>2022-09-30T07:34:24Z</dc:date>
    <item>
      <title>LPC55xx CAN TX Fifo usage in fsl_mcan</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1530942#M50313</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to use the TX fifo function of the CAN (FD) controller on the LPC55xx.&lt;/P&gt;&lt;P&gt;Unfortunately i didn't fine any example for this.&lt;/P&gt;&lt;P&gt;A fast check of the driver code seems to confirm that the driver fsl_mcan don't support the use if the TX fifo. While it possible to configure the controller via the Config tool in MCUXpresso, the fifo is handle as a single TX Buffer.&lt;/P&gt;&lt;P&gt;Has somebody an example how to use the TX fifo on this controller?&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 07:34:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1530942#M50313</guid>
      <dc:creator>MartinHo</dc:creator>
      <dc:date>2022-09-30T07:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx CAN TX Fifo usage in fsl_mcan</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1532924#M50326</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/55953"&gt;@MartinHo&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;I hope you are doing well,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Please check the LPC550x, 1x, or 3x SDK MCAN examples.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_0-1664998908317.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195839i6E6560E62E912C01/image-size/large?v=v2&amp;amp;px=999" role="button" title="RaulRomero_0-1664998908317.png" alt="RaulRomero_0-1664998908317.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;RaulRomero_0-1664998908317.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Please make sure that txBuffer.mode equals 0 before initializing the MCAN Tx buffer (refer to the main function of the examples)&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_1-1664999161093.png" style="width: 631px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195840iBDF43C7B19B62E0C/image-dimensions/631x279?v=v2" width="631" height="279" role="button" title="RaulRomero_1-1664999161093.png" alt="RaulRomero_1-1664999161093.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;RaulRomero_1-1664999161093.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;This will set the Tx FIFO operation mode in the TXBC register:&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_2-1664999240664.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195841i9495BAA61CBCDF9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="RaulRomero_2-1664999240664.png" alt="RaulRomero_2-1664999240664.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;RaulRomero_2-1664999240664.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Additionally, you can modify the dedicated Tx Buffers; refer to txBuffer.dedicatedSize member of Tx Buffer config. structure.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Please let us know, if there is anything else where we could help you.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 20:09:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1532924#M50326</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2022-10-05T20:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx CAN TX Fifo usage in fsl_mcan</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1533242#M50328</link>
      <description>&lt;P&gt;Hi Raul,&lt;/P&gt;&lt;P&gt;Thanks for Your answer, the *.mode value is set automaticaly by the configuration tool (I have check and its set to&amp;nbsp;kMCAN_txFifo = 0).&lt;/P&gt;&lt;P&gt;But my problem was that when You decide to configure, for example, 32 TX FIFO Buffers, the driver will only use 1 element of the FIFO, because the only possibility to write a new TX Message is when the state machine inside the driver is in&amp;nbsp;kMCAN_StateIdle (for a given buffer Index), an this is set only when&amp;nbsp;MCAN_TransferAbortSend is called. But this function is called only when the&amp;nbsp;kMCAN_TxTransmitCompleteFlag is set in the IR register, so I can only wite a new TX Message once the prior message was transmitted.&lt;/P&gt;&lt;P&gt;Newer mind, I have decided to use 32 single TX Buffers and handle the filling of the buffers by my self. This works ok because 32 different buffer index's are used.&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 08:02:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1533242#M50328</guid>
      <dc:creator>MartinHo</dc:creator>
      <dc:date>2022-10-06T08:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55xx CAN TX Fifo usage in fsl_mcan</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1618670#M51972</link>
      <description>&lt;P&gt;Through pain and suffering I've found that the MCAN driver in FSL v2.1.4 does not support Tx FiFo operation, despite the API suggesting it does.&lt;/P&gt;&lt;P&gt;Deep down in the comments of the&amp;nbsp;MCAN_TransferHandleIRQ implementation on lines 1632 through 1652 I've found the following:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;        else
        {
            /* Handle the interrupt flag unsupported in current version of MCAN driver.
             * User can get these unsupported interrupt flags by callback function,
             * we can clear directly in the handler to prevent endless loop.
             */
            result = valueIR;
            result &amp;amp;= ~((uint32_t)kMCAN_ErrorWarningIntFlag | (uint32_t)kMCAN_ErrorPassiveIntFlag |
                        (uint32_t)kMCAN_BusOffIntFlag | (uint32_t)kMCAN_TxTransmitCompleteFlag |
                        (uint32_t)kMCAN_RxFifo0NewFlag | (uint32_t)kMCAN_RxFifo0LostFlag |
                        (uint32_t)kMCAN_RxFifo1NewFlag | (uint32_t)kMCAN_RxFifo1LostFlag);
        }

        /* Clear Error interrupt, resolved Rx FIFO, Tx Buffer IRQ and other unsupported interrupt flags. */
        MCAN_ClearStatusFlag(base, result);

        /* Calling Callback Function if has one. */
        if (handle-&amp;gt;callback != NULL)
        {
            handle-&amp;gt;callback(base, handle, status, result, handle-&amp;gt;userData);
        }&lt;/LI-CODE&gt;&lt;P&gt;As suggested in the comment, you could implement the missing interrupt handling in a callback instead.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 18:16:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-CAN-TX-Fifo-usage-in-fsl-mcan/m-p/1618670#M51972</guid>
      <dc:creator>Peter-M2PRO</dc:creator>
      <dc:date>2023-03-20T18:16:52Z</dc:date>
    </item>
  </channel>
</rss>

