<?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: LPC5506 USART DMA TX causes IRQHandler stuck in loop with kUSART_TxIdleFlag in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1789038#M55148</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suggest you use interrupt mode to transfer data for both transmitter and receiver, or use interrupt mode to transfer data for receiver and use DMA to transfer data for transmitter.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2024 01:57:25 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-01-16T01:57:25Z</dc:date>
    <item>
      <title>LPC5506 USART DMA TX causes IRQHandler stuck in loop with kUSART_TxIdleFlag</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1785917#M55122</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have setup USART DMA using the SDK and Config Tools on the LPC55S06-EVK board, and I'm trying to send something on FLEXCOMM1. I also have interrupts enabled so that I can feed RX bytes as they come in, which works great by checking&amp;nbsp;kUSART_RxFifoNotEmptyFlag in&amp;nbsp;FLEXCOMM1_IRQHandler().&lt;BR /&gt;&lt;BR /&gt;However, once I send something on TX using DMA, it does send the data out but as soon as the data has finished sending the&amp;nbsp;FLEXCOMM1_IRQHandler() is called constantly with the flag&amp;nbsp;kUSART_TxIdleFlag. The loop causes other code to no longer being able to run.&lt;BR /&gt;&lt;BR /&gt;I understand from the docs that&amp;nbsp;USART_TransferSendDMA() sets up an interrupt that should notify that the transfer is complete, and I have a callback function setup for that aswell, however it never gets there since the&amp;nbsp;FLEXCOMM1_IRQHandler() loop is stuck.&lt;BR /&gt;&lt;BR /&gt;Inside the&amp;nbsp; FLEXCOMM1_IRQHandler(), if I try to disable the interrupt like this once the flag&amp;nbsp;kUSART_TxIdleFlag is reached:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;USART_DisableInterrupts(USART1, kUSART_TxIdleInterruptEnable);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;It stops the loop, but then additional DMA transfers stops working. It only works for the first one.&lt;BR /&gt;&lt;BR /&gt;The reason I cannot also use DMA or non-blocking interrupt method for RX also is because I don't know the expected number of bytes that are incoming, I just want to get them directly with the interrupt. Sending should be non-blocking so I want to use DMA for that.&lt;BR /&gt;&lt;BR /&gt;Any ideas on what I should do when TX transfer is complete to make the interrupt handler loop not get stuck without breaking additional DMA transfers? It's worth to also mention that I don't have any interrupts enabled for TX, but I'm guessing the DMA transfer enables some.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 09:49:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1785917#M55122</guid>
      <dc:creator>JoakimA</dc:creator>
      <dc:date>2024-01-10T09:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5506 USART DMA TX causes IRQHandler stuck in loop with kUSART_TxIdleFlag</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1787720#M55134</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;For uart transmitting character, I suppose that you can select either uart transmitting interrupt mode or DMA mode, but not both. Assume the scenario, when you transmit a char with both DMA and interrupt, after the char transfer is over, if you enable both interrupt and DMA, the uart transmitting ISR is entered, in the ISR, you write a char to transmitter reg of uart, the DMA is also requested, the DMA will read a char from memory and write the char to transmitter reg of uart,it conflicts.&lt;/P&gt;
&lt;P&gt;Pls try to use either either uart transmitting interrupt mode or DMA mode. If you use DMA, you can enable the DMA interrupt, disable uart interrupt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pls have a try&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 05:33:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1787720#M55134</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-01-12T05:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5506 USART DMA TX causes IRQHandler stuck in loop with kUSART_TxIdleFlag</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1787869#M55137</link>
      <description>&lt;P&gt;Hello and thanks for the reply,&lt;BR /&gt;&lt;BR /&gt;What I try to achieve is:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;TX&lt;/STRONG&gt;&lt;BR /&gt;I want to send data non-blocking (Either with Interrupt or DMA, whatever works best).&lt;BR /&gt;So either USART_TransferSendNonBlocking() or&amp;nbsp;USART_TransferSendDMA().&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;RX&lt;/STRONG&gt;&lt;BR /&gt;Whenever I get a new byte, I want to get it and feed it to processing functions. I don't know the expected amount of bytes, so I cannot use&amp;nbsp;USART_TransferReceiveDMA().&lt;BR /&gt;&lt;BR /&gt;What is the best way to accomplish this, since enabling the IRQ causes conflict?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 08:42:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1787869#M55137</guid>
      <dc:creator>JoakimA</dc:creator>
      <dc:date>2024-01-12T08:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5506 USART DMA TX causes IRQHandler stuck in loop with kUSART_TxIdleFlag</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1789038#M55148</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suggest you use interrupt mode to transfer data for both transmitter and receiver, or use interrupt mode to transfer data for receiver and use DMA to transfer data for transmitter.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 01:57:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5506-USART-DMA-TX-causes-IRQHandler-stuck-in-loop-with-kUSART/m-p/1789038#M55148</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-01-16T01:57:25Z</dc:date>
    </item>
  </channel>
</rss>

