<?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: A UART problem in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678403#M41779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I work with TWR-K70F120M. As a starting point I took an example provided on site. But I experimented with it and as a result...;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jul 2017 06:13:28 GMT</pubDate>
    <dc:creator>john71</dc:creator>
    <dc:date>2017-07-05T06:13:28Z</dc:date>
    <item>
      <title>A UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678398#M41774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The functions I use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void UART_SendByte (UART_MemMapPtr channel, char ch)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!(UART_S1_REG(channel) &amp;amp; UART_S1_TC_MASK) ) {}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Send the character */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UART_D_REG(channel) = ch;&lt;BR /&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void UART_SendString(UART_MemMapPtr uartChannel, const char *str)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (*str)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;UART_SendByte(uartChannel, *str++);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I test it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;UART_SendString(UART2_BASE_PTR, "hello\r");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem - the first char is not displayed on a terminal. I see 'ello'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2017 08:44:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678398#M41774</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2017-06-29T08:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: A UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678399#M41775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well... It doesn't print some chars.&lt;/P&gt;&lt;P&gt;I send &amp;nbsp;UART_SendString(UART2_BASE_PTR, "AOK"); - get&amp;nbsp; 'AK'&lt;/P&gt;&lt;P&gt;I send &amp;nbsp;UART_SendString(UART2_BASE_PTR, "AhK"); - get&amp;nbsp; 'AK'&lt;/P&gt;&lt;P&gt;I send &amp;nbsp;UART_SendString(UART2_BASE_PTR, "ABK"); - get&amp;nbsp; 'ABK' - all chars OK.&lt;/P&gt;&lt;P&gt;I tried on two different terminals - the same result.&lt;/P&gt;&lt;P&gt;How can it be? I don't understand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2017 15:15:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678399#M41775</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2017-06-29T15:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: A UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678400#M41776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Evgeny Erenburg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I don't know what the board and kinetis chip you are using, and how you configure your uart module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Actually, you can refer to our official code, there has a lot of uart code for kinetis, you can refer to the KSDK sample code which can be downloaded from this link:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuxpresso.nxp.com/en/welcome" title="https://mcuxpresso.nxp.com/en/welcome"&gt;Welcome to MCUXpresso | MCUXpresso Config Tools&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;SDK Builder, choose the board or chip which you are using, generate the code and download it.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Take KL25 as an example, you can find the uart code in folder:SDK_2.2_FRDM-KL25Z\boards\frdmkl25z\driver_examples\uart&lt;/P&gt;&lt;P&gt;Please refer to our official code at first.&lt;/P&gt;&lt;P&gt;If you still have question after you refer to it, please let me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&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>Fri, 30 Jun 2017 03:00:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678400#M41776</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-06-30T03:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: A UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678401#M41777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OMG. The problem was my sloppy code. Somehow after the line&lt;/P&gt;&lt;P&gt;/* Configure the UART for 8-bit mode, no parity */&lt;BR /&gt;UART_C1_REG(uartch) = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* We need all default settings, so entire register is cleared */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; uncommented the line&lt;/P&gt;&lt;P&gt;//set odd parity + parity enable + 9-bit&lt;BR /&gt;UART_C1_REG(uartch) |= UART_C1_PT_MASK | UART_C1_PE_MASK | UART_C1_M_MASK;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Jul 2017 06:19:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678401#M41777</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2017-07-02T06:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: A UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678402#M41778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Evgeny Erenburg,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thank you for the solutions sharing.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Next time when you post the question, please also tell us what the chip and code you are using, then we can help you to check it directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&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>Mon, 03 Jul 2017 09:14:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678402#M41778</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-07-03T09:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: A UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678403#M41779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I work with TWR-K70F120M. As a starting point I took an example provided on site. But I experimented with it and as a result...;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 06:13:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678403#M41779</guid>
      <dc:creator>john71</dc:creator>
      <dc:date>2017-07-05T06:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: A UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678404#M41780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Evgeny Erenburg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The TWR-K70F120M have the according sample code, you can refer to it:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/webapp/sps/download/license.jsp?colCode=KINETIS_120MHZ_SC&amp;amp;Parent_nodeId=1322538641013716882290&amp;amp;Parent_pageType=product&amp;amp;Parent_nodeId=1322538641013716882290&amp;amp;Parent_pageType=product&amp;amp;Parent_nodeId=1322538641013716882290&amp;amp;Parent_pageType=product"&gt;http://www.nxp.com/webapp/sps/download/license.jsp?colCode=KINETIS_120MHZ_SC&amp;amp;Parent_nodeId=1322538641013716882290&amp;amp;Parent_pageType=product&amp;amp;Parent_nodeId=1322538641013716882290&amp;amp;Parent_pageType=product&amp;amp;Parent_nodeId=1322538641013716882290&amp;amp;Parent_pageType=product&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&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>Wed, 05 Jul 2017 07:04:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/A-UART-problem/m-p/678404#M41780</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-07-05T07:04:03Z</dc:date>
    </item>
  </channel>
</rss>

