<?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: How to use two UARTs in paralell using K60 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-use-two-UARTs-in-paralell-using-K60/m-p/314691#M13728</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;There was a documentation problem with UART3 pins which was already reported. Please try with PTE4 and PTE5. Please refer to the following thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/318524"&gt;https://community.freescale.com/thread/318524&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2014 21:03:15 GMT</pubDate>
    <dc:creator>Carlos_Musich</dc:creator>
    <dc:date>2014-07-08T21:03:15Z</dc:date>
    <item>
      <title>How to use two UARTs in paralell using K60</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-use-two-UARTs-in-paralell-using-K60/m-p/314690#M13727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to make the K60 MCU &lt;/P&gt;&lt;P&gt;-&amp;gt; Receive from a UART5(connected to PC) and send it to another UART3(connected to a device)&lt;/P&gt;&lt;P&gt;-&amp;gt; Receive from UART3(connected to device) and send it to UART5(connected to PC)&lt;/P&gt;&lt;P&gt;I set the AS1:serial_LDD to UART5 and AS2:serial_LDD to UART_3.&lt;/P&gt;&lt;P&gt;I referred typical usage of Serial_LDD component in processor expert at polling mode and wrote the following code. The AS1_serial component works. It receives the characters from PC and echoes back but I think AS2_component gets struck in receiving characters.&amp;nbsp; Please review and the code and help me debug. I would like to know If there is any problem with the code. Thank you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MySerialPtr1 = AS1_Init(NULL); /* Initialization of AS1 component * &lt;/P&gt;&lt;P&gt;MySerialPtr2 = AS2_Init(NULL); /* Initialization of AS2 component */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;(;;) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;(1) {&lt;/P&gt;&lt;P&gt;Error1 = AS1_ReceiveBlock(MySerialPtr1, InpData1, 1U); // Start reception of one character &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;while&lt;/STRONG&gt; (!DataReceivedFlg1) { // Wait until a character is received&lt;/P&gt;&lt;P&gt;AS1_Main(MySerialPtr1);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Error1 = AS1_SendBlock(MySerialPtr1, InpData1, &lt;STRONG&gt;sizeof&lt;/STRONG&gt;(InpData1)); // Echo to terminal in PC&lt;/P&gt;&lt;P&gt;Error2 = AS2_SendBlock(MySerialPtr2, InpData1, &lt;STRONG&gt;sizeof&lt;/STRONG&gt;(InpData1)); // Send to device &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if&lt;/STRONG&gt; (InpData1[0] == '\r') { // If enter key is received break from the while loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;break&lt;/STRONG&gt;; }&lt;/P&gt;&lt;P&gt;DataReceivedFlg1 = FALSE;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;(1) {&lt;/P&gt;&lt;P&gt;Error2 = AS2_ReceiveBlock(MySerialPtr2, InpData2, 1U); // Start reception of one character from the device&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;while&lt;/STRONG&gt; (!DataReceivedFlg2) { // Wait until a character is received&lt;/P&gt;&lt;P&gt;AS1_Main(MySerialPtr2); &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Error1 = AS1_SendBlock(MySerialPtr1, InpData2, &lt;STRONG&gt;sizeof&lt;/STRONG&gt;(InpData2)); // Send it to PC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;(InpData2[0] == '&amp;gt;') { //If '&amp;gt;' is received break from the while loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;break&lt;/STRONG&gt;; }&lt;/P&gt;&lt;P&gt;DataReceivedFlg2 = FALSE;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;DataReceivedFlg1 = FALSE;&lt;/P&gt;&lt;P&gt;DataReceivedFlg2 = FALSE;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 18:56:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-use-two-UARTs-in-paralell-using-K60/m-p/314690#M13727</guid>
      <dc:creator>dkarthik</dc:creator>
      <dc:date>2014-07-01T18:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use two UARTs in paralell using K60</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-use-two-UARTs-in-paralell-using-K60/m-p/314691#M13728</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;There was a documentation problem with UART3 pins which was already reported. Please try with PTE4 and PTE5. Please refer to the following thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/318524"&gt;https://community.freescale.com/thread/318524&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 21:03:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-use-two-UARTs-in-paralell-using-K60/m-p/314691#M13728</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2014-07-08T21:03:15Z</dc:date>
    </item>
  </channel>
</rss>

