<?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: UART transmit error in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-transmit-error/m-p/614956#M36571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can refer the attached test project. I test it on TWR-K60F120M board with CodeWarrior10.7.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="UART Transmission Complete Interrupt TWR-K60F120M CW10.7 PE.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15109i5C1C4D6A9A055597/image-size/large?v=v2&amp;amp;px=999" role="button" title="UART Transmission Complete Interrupt TWR-K60F120M CW10.7 PE.png" alt="UART Transmission Complete Interrupt TWR-K60F120M CW10.7 PE.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Mar 2017 04:30:27 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2017-03-07T04:30:27Z</dc:date>
    <item>
      <title>UART transmit error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-transmit-error/m-p/614954#M36569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a TWR-K60F120M Board and my problem is the uart interrupt routine.&lt;/P&gt;&lt;P&gt;In my main i created an array with 4 numbers&lt;/P&gt;&lt;P&gt;int a[4]={1 , 2 , 3, 4};&lt;/P&gt;&lt;P&gt;UART0_C2 |= UART_C2_TCIE_MASK;&lt;/P&gt;&lt;P&gt;i wanted to start the interrupt with the transmission complete flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my interrupt routine&lt;/P&gt;&lt;P&gt;extern int a[];&lt;/P&gt;&lt;P&gt;int i =0;&lt;/P&gt;&lt;P&gt;void UART_IRQ&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;while(i&amp;lt;4)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;UART0_D=a[i];&lt;/P&gt;&lt;P&gt;i++&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;UART0_C2 &amp;amp;= ~UART_C2_TCIE_MASK;&lt;/P&gt;&lt;P&gt;i=0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't receive the numbers from the uart and i don't know why .&lt;/P&gt;&lt;P&gt;Maybe someone know where i'm mistaken.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 18:10:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-transmit-error/m-p/614954#M36569</guid>
      <dc:creator>philippadolph</dc:creator>
      <dc:date>2017-03-02T18:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: UART transmit error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-transmit-error/m-p/614955#M36570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;References:&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K60F120M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K60F120M.html&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerUART.PDF" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerUART.PDF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to use the transmit data register empty interrupt to start transmission like this (the complete interrupt is set after the final bit of a character is sent).&lt;BR /&gt;Also you need to send one byte at a time and wait for the output FIFO to be free before sending the next (depends on the FIFO depth).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the uTasker UART driver as reference which allows interrupt and DMA operation on all LPUART and UARTs.&lt;BR /&gt;To save time just use the uTasker K60F120 Open Source project which includes all that you need, is documented and allows the K60F120 to be simulated, including UART interrupts/DMA.&lt;BR /&gt;&lt;SPAN&gt;Complete code is available at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fforum%2Findex.php%3Ftopic%3D1721.msg7086%23msg7086" rel="nofollow" target="_blank"&gt;http://www.utasker.com/forum/index.php?topic=1721.msg7086#msg7086&lt;/A&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 21:52:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-transmit-error/m-p/614955#M36570</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-03-02T21:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: UART transmit error</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-transmit-error/m-p/614956#M36571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can refer the attached test project. I test it on TWR-K60F120M board with CodeWarrior10.7.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="UART Transmission Complete Interrupt TWR-K60F120M CW10.7 PE.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15109i5C1C4D6A9A055597/image-size/large?v=v2&amp;amp;px=999" role="button" title="UART Transmission Complete Interrupt TWR-K60F120M CW10.7 PE.png" alt="UART Transmission Complete Interrupt TWR-K60F120M CW10.7 PE.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 04:30:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-transmit-error/m-p/614956#M36571</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-03-07T04:30:27Z</dc:date>
    </item>
  </channel>
</rss>

