<?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: LPUART DMA Tx + Interrupt RX in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1983316#M32381</link>
    <description>&lt;P&gt;Thanks for your interest in NXP tools.&lt;/P&gt;
&lt;P&gt;Config Tools is only for configuration, you can initialize the interrupt and change priority of the peripheral, however the content of the IRQ depends of the implementation an should be made manually.&lt;/P&gt;
&lt;P&gt;In the following images you can see where you can enable and change the priority level for LPUART1 and DMA0.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_0-1730156502758.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307341iAD539A5FFABC04E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_0-1730156502758.png" alt="Pablo_Ramos_0-1730156502758.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_1-1730156509121.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307342iDDB132EA4D47034A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_1-1730156509121.png" alt="Pablo_Ramos_1-1730156509121.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;These changes are reflected on the NVIC configuration&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_2-1730156515665.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307343iDCA90E8D26A2FE1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_2-1730156515665.png" alt="Pablo_Ramos_2-1730156515665.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps you!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2024 23:02:46 GMT</pubDate>
    <dc:creator>Pablo_Ramos</dc:creator>
    <dc:date>2024-10-28T23:02:46Z</dc:date>
    <item>
      <title>LPUART DMA Tx + Interrupt RX</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1981966#M32357</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I'm developing an application in which RT 1050 is the master MCU over an UART communication bus, while another MCU is slave.&lt;/P&gt;&lt;P&gt;Since there's a sort of data encoding/decoding in-between the two MCUs, on the master MCU I'm able to make the application more efficient by sending out a request using eDMA because I'm generating the request payload on the master MCU itself then I can put all the encoded data in a buffer and send it out by programming a DMA transfer, while for receiving the response packet I'm unable to use a DMA transfer because I don't know in advance the lenght of the response and I cannot read response lenght straight from response header since received data needs decoding BEFORE the actual content could be read.&lt;/P&gt;&lt;P&gt;To optimize the isolation between application code and LPUART peripheral, my idea was then to use DMA for Tx, while using interrupt for Rx, putting each received byte inside a FreeRTOS queue inside Rx ISR.&lt;/P&gt;&lt;P&gt;My question is: how this mixed configuration (eDMA + interrupt) could be achieved, possibly using Peripheral Config Tool?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 10:39:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1981966#M32357</guid>
      <dc:creator>SpoonMan</dc:creator>
      <dc:date>2024-10-25T10:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART DMA Tx + Interrupt RX</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1982081#M32359</link>
      <description>&lt;P&gt;Ok, it looks like I figured out how to achieve the desired mixed configuration in subject, but manually.&lt;/P&gt;&lt;P&gt;In Peripherals Config Tool, I configured LPUART in eDMA mode and disabled "Enable RX eDMA channel" flag, then I specified my own "transfer callback function name" in "LPUART eDMA handle" section to catch when Tx DMA transfer finishes.&lt;/P&gt;&lt;P&gt;To start queueing data in FreeRTOS queue through Rx interrupt mode, I then had to manually enable Rx interrupt:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;LPUART_EnableInterrupts(LPUART1, kLPUART_RxDataRegFullInterruptEnable);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then I had to implement my own&amp;nbsp;LPUART1_IRQHandler() to fill the Rx FreeRTOS queue with received data:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;SPAN&gt;uint8_t temp =&amp;nbsp;LPUART_ReadByte(LPUART1);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;xStreamBufferSendFromISR(rxQueue, (void*)&amp;amp;temp, 1&lt;/SPAN&gt;&lt;SPAN&gt;, &amp;amp;xHigherPriorityTaskWoken);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Another very annoying thing is that I had to manually add ISR priority initialization to avoid FreeRTOS to get stuck because of priority too high by manually calling after peripheral initialization:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;NVIC_SetPriority(DMA0_DMA16_IRQn, 5);&lt;BR /&gt;NVIC_SetPriority(LPUART1_IRQn, 5);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;since it looks there's no way to specify them from Config Tool.&lt;/P&gt;&lt;P&gt;Suggestions to improve the above workflow, which honestly I don't like so much?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 13:57:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1982081#M32359</guid>
      <dc:creator>SpoonMan</dc:creator>
      <dc:date>2024-10-25T13:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART DMA Tx + Interrupt RX</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1983111#M32373</link>
      <description>bump?</description>
      <pubDate>Mon, 28 Oct 2024 16:07:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1983111#M32373</guid>
      <dc:creator>SpoonMan</dc:creator>
      <dc:date>2024-10-28T16:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART DMA Tx + Interrupt RX</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1983316#M32381</link>
      <description>&lt;P&gt;Thanks for your interest in NXP tools.&lt;/P&gt;
&lt;P&gt;Config Tools is only for configuration, you can initialize the interrupt and change priority of the peripheral, however the content of the IRQ depends of the implementation an should be made manually.&lt;/P&gt;
&lt;P&gt;In the following images you can see where you can enable and change the priority level for LPUART1 and DMA0.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_0-1730156502758.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307341iAD539A5FFABC04E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_0-1730156502758.png" alt="Pablo_Ramos_0-1730156502758.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_1-1730156509121.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307342iDDB132EA4D47034A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_1-1730156509121.png" alt="Pablo_Ramos_1-1730156509121.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;These changes are reflected on the NVIC configuration&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_2-1730156515665.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307343iDCA90E8D26A2FE1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_2-1730156515665.png" alt="Pablo_Ramos_2-1730156515665.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps you!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 23:02:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1983316#M32381</guid>
      <dc:creator>Pablo_Ramos</dc:creator>
      <dc:date>2024-10-28T23:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART DMA Tx + Interrupt RX</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1983653#M32390</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/231808"&gt;@Pablo_Ramos&lt;/a&gt;&lt;/P&gt;&lt;P&gt;thanks for your interest in my problem.&lt;/P&gt;&lt;P&gt;First of all, sorry if in my first post I forgot to mention I'm sticked to MCUXpresso IDE v11.7.0 build 9198 with&amp;nbsp;Config Tools - Peripherals Tool v10.0.0.202301120728.&lt;/P&gt;&lt;P&gt;Secondly, if I choose eDMA mode for LPUART peripheral, config tool appears like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SpoonMan_0-1730192216529.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307427iD3C25CB26CB3EF52/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpoonMan_0-1730192216529.png" alt="SpoonMan_0-1730192216529.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SpoonMan_1-1730192250131.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307428i4BA3A4B6ABEF0975/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpoonMan_1-1730192250131.png" alt="SpoonMan_1-1730192250131.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SpoonMan_2-1730192281882.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307429i445403A4628F1446/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpoonMan_2-1730192281882.png" alt="SpoonMan_2-1730192281882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and, as you can see, there's no way to set interrupts priorities.&lt;/P&gt;&lt;P&gt;I already tried to switch Mode to "interrupt", "transfer" or "freertos" but none of them is showing the settings you're showing to me in your screenshots.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 09:01:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1983653#M32390</guid>
      <dc:creator>SpoonMan</dc:creator>
      <dc:date>2024-10-29T09:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART DMA Tx + Interrupt RX</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1985819#M32427</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/208015"&gt;@SpoonMan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can try configured it directly on the NVIC peripheral.&lt;/P&gt;
&lt;P&gt;You just need to add an interrupt and select the LPUART you want to use.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_3-1730413139357.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307989i043580601B13D2F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_3-1730413139357.png" alt="Pablo_Ramos_3-1730413139357.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the generated code you will find that the priority is set and IRQ is enable.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_1-1730413125655.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307987i0F7D35C1E688A0BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_1-1730413125655.png" alt="Pablo_Ramos_1-1730413125655.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pablo_Ramos_2-1730413132025.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/307988i0B5A6C22915508D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pablo_Ramos_2-1730413132025.png" alt="Pablo_Ramos_2-1730413132025.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 22:19:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LPUART-DMA-Tx-Interrupt-RX/m-p/1985819#M32427</guid>
      <dc:creator>Pablo_Ramos</dc:creator>
      <dc:date>2024-10-31T22:19:52Z</dc:date>
    </item>
  </channel>
</rss>

