<?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中的主题 K66 UART problem</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66-UART-problem/m-p/774337#M47087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'va already posted this problem in &lt;A href="https://community.nxp.com/space/11553"&gt;MCUXpresso Software and Tools&lt;/A&gt;&amp;nbsp;section(&lt;A href="https://community.nxp.com/thread/474306"&gt;Going crazy with UART (witch hunt)&lt;/A&gt;), but maybe this a better section to post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I'm using a custom board with MK66F2M0 device, MCUXpresso 10.1.1, SDK 2.3.0 and UART FreeRTOS driver: the UART is connected to a GSM modem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I've made&amp;nbsp;a test with an oscilloscope, recording all the signals.&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;The three images show what I found.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;T&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;he packet is&amp;nbsp;the&amp;nbsp;byte 0x01 repeated 144 times received from a GSM modem connected to the UART. The waves&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;are&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;the RX signal, the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;TX signal, the CTS signal and the RTS signal respectively. The UART is configured with RX FIFO enabled with a watermark&amp;nbsp;of 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Start.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12446i54C1D02BD4E202B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Start.PNG" alt="Start.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;This image shows the packet start: at the end of the stop bit of the first byte, the RTS signal goes high because the RXFIFO watermark is configured to 1 byte: the interrupt routine handle the RDRF flag, it reads the D register so the RTS signal goes low. At the end of every byte there is the same&amp;nbsp;behaviour: after the stop bit there is the start bit of the subsequent character&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Error.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12490i341F6D5D72A97009/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error.PNG" alt="Error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;This image shows the error: the first RTS rise is at the end of the stop bit, then there is the start bit of another character. The strange thing is that the second RST rise is not at the end of the stop bit, but at the end of the first data bit of the subsequent character. From this point forward, all the charcters are received as 0x40, as if the first bit of data were actually the start bit.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="End.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12492i01AB48505B6C38C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="End.PNG" alt="End.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;This image shows the packet end:&amp;nbsp;the last character is received as 0xC0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;I don't know how it can be generated: all the previous characters are received correctly and the waveforms are ever the same; I don't know why&amp;nbsp;suddenly the RTS signal goes hig in the wrong place.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;What esle can I verify?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Many thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Biafra&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Apr 2018 14:01:31 GMT</pubDate>
    <dc:creator>biafra</dc:creator>
    <dc:date>2018-04-27T14:01:31Z</dc:date>
    <item>
      <title>K66 UART problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66-UART-problem/m-p/774337#M47087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'va already posted this problem in &lt;A href="https://community.nxp.com/space/11553"&gt;MCUXpresso Software and Tools&lt;/A&gt;&amp;nbsp;section(&lt;A href="https://community.nxp.com/thread/474306"&gt;Going crazy with UART (witch hunt)&lt;/A&gt;), but maybe this a better section to post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I'm using a custom board with MK66F2M0 device, MCUXpresso 10.1.1, SDK 2.3.0 and UART FreeRTOS driver: the UART is connected to a GSM modem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I've made&amp;nbsp;a test with an oscilloscope, recording all the signals.&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;The three images show what I found.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;T&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;he packet is&amp;nbsp;the&amp;nbsp;byte 0x01 repeated 144 times received from a GSM modem connected to the UART. The waves&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;are&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;the RX signal, the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;TX signal, the CTS signal and the RTS signal respectively. The UART is configured with RX FIFO enabled with a watermark&amp;nbsp;of 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Start.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12446i54C1D02BD4E202B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Start.PNG" alt="Start.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;This image shows the packet start: at the end of the stop bit of the first byte, the RTS signal goes high because the RXFIFO watermark is configured to 1 byte: the interrupt routine handle the RDRF flag, it reads the D register so the RTS signal goes low. At the end of every byte there is the same&amp;nbsp;behaviour: after the stop bit there is the start bit of the subsequent character&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Error.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12490i341F6D5D72A97009/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error.PNG" alt="Error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;This image shows the error: the first RTS rise is at the end of the stop bit, then there is the start bit of another character. The strange thing is that the second RST rise is not at the end of the stop bit, but at the end of the first data bit of the subsequent character. From this point forward, all the charcters are received as 0x40, as if the first bit of data were actually the start bit.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="End.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12492i01AB48505B6C38C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="End.PNG" alt="End.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;This image shows the packet end:&amp;nbsp;the last character is received as 0xC0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;I don't know how it can be generated: all the previous characters are received correctly and the waveforms are ever the same; I don't know why&amp;nbsp;suddenly the RTS signal goes hig in the wrong place.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;What esle can I verify?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Many thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Biafra&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:01:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K66-UART-problem/m-p/774337#M47087</guid>
      <dc:creator>biafra</dc:creator>
      <dc:date>2018-04-27T14:01:31Z</dc:date>
    </item>
  </channel>
</rss>

