<?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: IMXRT1024 DMA Multiple UART Usage in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1024-DMA-Multiple-UART-Usage/m-p/1335506#M179623</link>
    <description>&lt;P&gt;Hi Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/56840"&gt;@jeremyzhou&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Sep 2021 12:40:04 GMT</pubDate>
    <dc:creator>Lukas_Frank</dc:creator>
    <dc:date>2021-09-06T12:40:04Z</dc:date>
    <item>
      <title>IMXRT1024 DMA Multiple UART Usage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1024-DMA-Multiple-UART-Usage/m-p/1335023#M179567</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just trying to use multiple UART modules on my board. I just added UART2 requirements to default&amp;nbsp;&lt;STRONG&gt;lpuart_edma_transfer(SDK)&lt;/STRONG&gt; example. I will be sharing &lt;STRONG&gt;lpuart_edma_transfer.c&lt;/STRONG&gt; file below. Here is the following updates that I have been added to default file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Handlers for EDMA and UART2 RX and TX :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;lpuart_edma_handle_t g_lpuartEdmaHandle2;
edma_handle_t g_lpuartTxEdmaHandle2;
edma_handle_t g_lpuartRxEdmaHandle2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Usercallbacks&amp;nbsp;for UART2 :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;volatile bool rxBufferEmpty2                                          = true;
volatile bool txBufferFull2                                           = false;
volatile bool txOnGoing2                                              = false;
volatile bool rxOnGoing2                                              = false;

void LPUART_UserCallback_2(LPUART_Type *base, lpuart_edma_handle_t *handle, status_t status, void *userData)
{

    if (kStatus_LPUART_TxIdle == status)
    {
        txBufferFull2 = false;
        txOnGoing2    = false;
    }

    if (kStatus_LPUART_RxIdle == status)
    {
        rxBufferEmpty2 = false;
        rxOnGoing2    = false;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;DMA Source and Channel operations for UART2 :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    DMAMUX_SetSource(EXAMPLE_LPUART_DMAMUX_BASEADDR, LPUART_TX_DMA_CHANNEL2, LPUART_TX_DMA_REQUEST2);
    DMAMUX_SetSource(EXAMPLE_LPUART_DMAMUX_BASEADDR, LPUART_RX_DMA_CHANNEL2, LPUART_RX_DMA_REQUEST2);
    DMAMUX_EnableChannel(EXAMPLE_LPUART_DMAMUX_BASEADDR, LPUART_TX_DMA_CHANNEL2);
    DMAMUX_EnableChannel(EXAMPLE_LPUART_DMAMUX_BASEADDR, LPUART_RX_DMA_CHANNEL2);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;DMA Create Handle for UART2 :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    EDMA_CreateHandle(&amp;amp;g_lpuartTxEdmaHandle2, EXAMPLE_LPUART_DMA_BASEADDR, LPUART_TX_DMA_CHANNEL2);
    EDMA_CreateHandle(&amp;amp;g_lpuartRxEdmaHandle2, EXAMPLE_LPUART_DMA_BASEADDR, LPUART_RX_DMA_CHANNEL2);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LPUART Create Transfer Handle for UART2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    LPUART_TransferCreateHandleEDMA(DEMO_LPUART2, 
    								&amp;amp;g_lpuartEdmaHandle2, 
									LPUART_UserCallback_2, 
									NULL, 
									&amp;amp;g_lpuartTxEdmaHandle2,
                                    &amp;amp;g_lpuartRxEdmaHandle2);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sending operations:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    while(1)
    {
		LPUART_ReceiveEDMA(DEMO_LPUART, &amp;amp;g_lpuartEdmaHandle, &amp;amp;receiveXfer);

		LPUART_SendEDMA(DEMO_LPUART2, &amp;amp;g_lpuartEdmaHandle2, &amp;amp;sendXfer);
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After the whole change, I connect my UART2(TX) and UART1(RX) with jumpers. But there is no&amp;nbsp; data communication. What is wrong with that? Could you help me please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 12:08:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMXRT1024-DMA-Multiple-UART-Usage/m-p/1335023#M179567</guid>
      <dc:creator>Lukas_Frank</dc:creator>
      <dc:date>2021-09-04T12:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: IMXRT1024 DMA Multiple UART Usage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1024-DMA-Multiple-UART-Usage/m-p/1335142#M179583</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.&lt;BR /&gt;After having a brief review of the lpuart_edma_transfer.c, I find that you don't initialize the LPUART2 prior to configuring the DMA channel, so please check it carefully.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jeremyzhou_0-1630898161251.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/155144iA77CF39D914A8F04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jeremyzhou_0-1630898161251.png" alt="jeremyzhou_0-1630898161251.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 03:19:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMXRT1024-DMA-Multiple-UART-Usage/m-p/1335142#M179583</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2021-09-06T03:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: IMXRT1024 DMA Multiple UART Usage</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMXRT1024-DMA-Multiple-UART-Usage/m-p/1335506#M179623</link>
      <description>&lt;P&gt;Hi Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/56840"&gt;@jeremyzhou&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 12:40:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMXRT1024-DMA-Multiple-UART-Usage/m-p/1335506#M179623</guid>
      <dc:creator>Lukas_Frank</dc:creator>
      <dc:date>2021-09-06T12:40:04Z</dc:date>
    </item>
  </channel>
</rss>

