<?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>Kinetis MicrocontrollersのトピックRe: Issue of UART DMA</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-of-UART-DMA/m-p/1063881#M57151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your advice and I figure out this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 May 2020 13:01:36 GMT</pubDate>
    <dc:creator>chhsu0229</dc:creator>
    <dc:date>2020-05-23T13:01:36Z</dc:date>
    <item>
      <title>Issue of UART DMA</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-of-UART-DMA/m-p/1063879#M57149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on UART DMA function and the UART2 baud rate is set as 115200. PC also set baud rate as 115200,&lt;/P&gt;&lt;P&gt;Both send and receive is correct. However, one of them set different&amp;nbsp; baud rate, for example, MK64F512 device sets 115200 and PC sets as 57600. I send a data from PC to device, the MK64F512 device could not receive any data from PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to re-call DMA function, re-enable UART2 DMS interrupt, ..... UART2 DMA could not receive any data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GetRemaining code is zero after PC sends once data to device with wrong baud rate and the GetRing code as below,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I fix the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;byteCount = GetRingBufferLengthEDMA_UART0();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint32_t GetRingBufferLengthEDMA_UART0(void)&lt;BR /&gt;{&lt;BR /&gt; uint32_t regPrimask = 0U;&lt;BR /&gt; uint32_t receivedBytes = 0U;&lt;/P&gt;&lt;P&gt;/* Disable IRQ, protect ring buffer. */&lt;BR /&gt; regPrimask = DisableGlobalIRQ();&lt;/P&gt;&lt;P&gt;receivedBytes =&lt;BR /&gt; UART_RING_BUFFER_SIZE - EDMA_GetRemainingMajorLoopCount(UART0_RX_DMA_BASEADDR, UART0_RX_DMA_CHANNEL);&lt;/P&gt;&lt;P&gt;/* If the received bytes is less than index value, it means the ring buffer has reached it boundary. */&lt;BR /&gt; if (receivedBytes &amp;lt; uart0_ringBufferIndex)&lt;BR /&gt; {&lt;BR /&gt; receivedBytes += UART_RING_BUFFER_SIZE;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;receivedBytes -= uart0_ringBufferIndex;&lt;/P&gt;&lt;P&gt;/* Enable IRQ if previously enabled. */&lt;BR /&gt; EnableGlobalIRQ(regPrimask);&lt;/P&gt;&lt;P&gt;return receivedBytes;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2020 11:21:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-of-UART-DMA/m-p/1063879#M57149</guid>
      <dc:creator>chhsu0229</dc:creator>
      <dc:date>2020-05-22T11:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Issue of UART DMA</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-of-UART-DMA/m-p/1063880#M57150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the UART receiver detects a framing error (eg. due to mismatch of Baud rate) it will suspend any further reception unti the error flag has been cleared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that you need to handle error interrupts and clear such flags and then also DMA will continue to work (it is not a problem with the DMA itself).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2020 16:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-of-UART-DMA/m-p/1063880#M57150</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-05-22T16:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue of UART DMA</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-of-UART-DMA/m-p/1063881#M57151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your advice and I figure out this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 May 2020 13:01:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Issue-of-UART-DMA/m-p/1063881#M57151</guid>
      <dc:creator>chhsu0229</dc:creator>
      <dc:date>2020-05-23T13:01:36Z</dc:date>
    </item>
  </channel>
</rss>

