<?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: Simple UART - Clear RX Buffer in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507347#M5074</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And this function call (UART_DRV_ReceiveData) can be used instead of (UART_DRV_InstallRxCallback)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jan 2016 04:28:50 GMT</pubDate>
    <dc:creator>kyizawwin</dc:creator>
    <dc:date>2016-01-01T04:28:50Z</dc:date>
    <item>
      <title>Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507337#M5064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am now receiving UART data in the rx callback buffer using the rx interrupt callback routine.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that I have "processed" the byte of data, how do I clear the buffer?&amp;nbsp; I have tried to set the first byte to '/0' or strcpy a null string and the buffer doesn't clear. I suspect that the buffer is a copy of the uartState-&amp;gt;rxBuff when the rx callback routine is called. So, how do I clear the real rx buffer properly?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little more detail:&amp;nbsp; When I type "a" then send out the resulting rx buffer I get "a", just as expected. But, after the subsequent character is entered, such as "b", printing out the rx buffer returns "ab"...and so on. The rx buffer is not getting cleared.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Incidentally, does the SDK implement a FIFO buffer by default?&amp;nbsp; Is this a FIFO clearing problem?&amp;nbsp; I didn't intentionally implement a FIFO is that is the case.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 19:33:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507337#M5064</guid>
      <dc:creator>philhale</dc:creator>
      <dc:date>2015-12-28T19:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507338#M5065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which chip do you used ?&lt;/P&gt;&lt;P&gt;About the&amp;nbsp; function when receive one character , then send it , you can refer to the demo under the ksdk1.3 :&lt;/P&gt;&lt;P&gt;Freescale\KSDK_1.3.0\examples\frdmk64f\driver_examples\uart\uart_non_blocking&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;If this demo could not meet your requirement ,&amp;nbsp; please send you project to me , i will help you check it on my side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;ALice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 03:08:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507338#M5065</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-12-29T03:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507339#M5066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also facing the same problem with KL25Z freedom board platform. Since I set the buffer to 16 and my sting is variable between 5-11, the next data fill up till the array is filled up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The driver file won't help as the re-initialization of data need to be done in user side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 15:05:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507339#M5066</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2015-12-29T15:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507340#M5067</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;I had re-initialized call back function and able to re-set the buffer but I don't think this is the correct and efficient way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UART_DRV_InstallRxCallback(FSL_BLE, BLE_RxCallback, recBuffCall, (void *)recCnt, true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 15:12:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507340#M5067</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2015-12-29T15:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507341#M5068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alice,&lt;/P&gt;&lt;P&gt;I am using my own board utilizing the MK64FX512VLL12. In my code, I am utilizing the RxCallback interrupt routine to receive the incoming data from the UART. This allows me to accept UART data from an outside source (RS232 in my case) through non-polling methods. The routine works and I receive data in my rx buffer but after processing the data I do not know how to clear the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what displays on my RS232 screen when I type "abc":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ScreenHunter_115 Dec. 29 08.49.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31521i11C22EB8998BCCD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="ScreenHunter_115 Dec. 29 08.49.jpg" alt="ScreenHunter_115 Dec. 29 08.49.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 16:52:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507341#M5068</guid>
      <dc:creator>philhale</dc:creator>
      <dc:date>2015-12-29T16:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507342#M5069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kyi Zaw Win,&lt;/P&gt;&lt;P&gt;We are close. I tried what you suggested but I got a slightly different result.&lt;/P&gt;&lt;P&gt;Here is what I see when I type "12345" into PuTTY:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ScreenHunter_116 Dec. 29 09.22.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31687i98324B9F2B21697F/image-size/large?v=v2&amp;amp;px=999" role="button" title="ScreenHunter_116 Dec. 29 09.22.jpg" alt="ScreenHunter_116 Dec. 29 09.22.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is like the first byte is kept in the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my RxCallback():&lt;/P&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;void uartCom0_RxCallback(uint32_t instance, void * uartState)&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;{&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;&amp;nbsp; /* Write your code here ... */&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;&amp;nbsp; //GPIO_DRV_ClearPinOutput(LED_GREEN);&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;&amp;nbsp; GPIO_DRV_TogglePinOutput(LED_RED);&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;&amp;nbsp; UART_DRV_SendData(instance, rx_callback_buff, sizeof(rx_callback_buff));&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;&amp;nbsp; UART_DRV_InstallRxCallback(uartCom0_IDX, uartCom0_RxCallback, rx_callback_buff, NULL, true);&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier; color: #2873ee;"&gt;}&lt;/SPAN&gt;&lt;/H6&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 17:27:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507342#M5069</guid>
      <dc:creator>philhale</dc:creator>
      <dc:date>2015-12-29T17:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507343#M5070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please change the code here :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31553iA13E52C80F8366F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;then it will work well .&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;Alice Yang&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>Thu, 31 Dec 2015 10:57:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507343#M5070</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-12-31T10:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507344#M5071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Alice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it didn't help to me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first data was stubbornly left in my case also. And my case I need to trigger two tx to get 1st tx which may be due to my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's keep on working! Hope I will get it on New Year Day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Dec 2015 16:25:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507344#M5071</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2015-12-31T16:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507345#M5072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry. Didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typing an "a" returns an "a". Next, typing a "b" returns an "a". Next typing a "c" returns an "a".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The buffer is not getting cleared. If the buffer was getting cleared then your change would certainly work. Where and when is this buffer cleared?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, Alice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Dec 2015 17:19:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507345#M5072</guid>
      <dc:creator>philhale</dc:creator>
      <dc:date>2015-12-31T17:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507346#M5073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Btw, Phil. Somewhere in the forum, Alice mentioned that the following routine need to modify as in &lt;STRONG&gt;bold . &lt;/STRONG&gt;Have u tried that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UART_DRV_IRQHandler&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (uartState-&amp;gt;rxCallback != NULL)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //uartState-&amp;gt;rxCallbackParam++; // to keep track no of counter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uartState-&amp;gt;rxCallback(instance, uartState);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++uartState-&amp;gt;rxBuff; //fix according to &lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="11234" data-containertype="14" data-objectid="382455" data-objecttype="1" href="https://community.freescale.com/thread/382455"&gt;https://community.freescale.com/thread/382455&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --uartState-&amp;gt;rxSize;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++uartState-&amp;gt;rxBuff;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --uartState-&amp;gt;rxSize;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 02:38:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507346#M5073</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2016-01-01T02:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507347#M5074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And this function call (UART_DRV_ReceiveData) can be used instead of (UART_DRV_InstallRxCallback)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 04:28:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507347#M5074</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2016-01-01T04:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507348#M5075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I re-initialized the receive buffer for 2nd time, it seems like the pointer was incremented. So, the next receiving data start from incremented address. Thus, the first cell always keep the old data. i couldn't find a way yet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 04:33:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507348#M5075</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2016-01-01T04:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507349#M5076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I copy the call back buffer to another buffer (strcpy(recData,recBuffCall);), the first bogus data was not there. Definitely some bugs are there but I guess I can ignore this problem for the time being.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 09:47:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507349#M5076</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2016-01-01T09:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507350#M5077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kyi Zaw Win,&lt;/P&gt;&lt;P&gt;Regarding the &lt;SPAN style="color: #51626f; font-weight: inherit; font-family: inherit; font-style: inherit;"&gt;++uartState-&amp;gt;rxBuff;&lt;/SPAN&gt; routines. Yes. I implemented that modification. It wouldn't work without it.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 15:05:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507350#M5077</guid>
      <dc:creator>philhale</dc:creator>
      <dc:date>2016-01-01T15:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507351#M5078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Re: "&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;And this function call (UART_DRV_ReceiveData) can be used instead of (UART_DRV_InstallRxCallback)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This true but I want to get RS232 commands from the user and don't want to use polling. Interrupts are really the way to go.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 15:08:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507351#M5078</guid>
      <dc:creator>philhale</dc:creator>
      <dc:date>2016-01-01T15:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507352#M5079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Re: "&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;When I copy the call back buffer to another buffer..."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Glad you could find a work-around.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Thank you for being a part of this conversation. It was nice to know I was not the only one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Phil&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 15:13:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507352#M5079</guid>
      <dc:creator>philhale</dc:creator>
      <dc:date>2016-01-01T15:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507353#M5080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also try to get string of data from UART using Rx Interrupt CallBack. My data is a string of character ended by "\n". I just copy data from callback buffer to my receive buffer upon receiving "\n". I could manage to grab whole string now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2016 15:20:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507353#M5080</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2016-01-01T15:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507354#M5081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Kyi Zaw Win,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I too facing the same problem. &lt;/SPAN&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; line-height: 1.5;"&gt;I also need similar implementation where I have to grab a string which is ended by "\n".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; line-height: 1.5;"&gt;I am always finding the first character of the string in my rx_callback buffer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Even after making the &lt;STRONG style="color: #51626f; font-family: inherit; font-style: inherit;"&gt;++uartState-&amp;gt;rxBuff;&lt;/STRONG&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; routine modification also I am not able to clear the rx_callback buffer.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Do I need to &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;copy the call back buffer to another buffer (strcpy(recData,recBuffCall) to clear &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;rx_callback buff&lt;/SPAN&gt; ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I would appreciate suggestions from you &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Cabha&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2016 16:43:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507354#M5081</guid>
      <dc:creator>cabharufusbaska</dc:creator>
      <dc:date>2016-01-11T16:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507355#M5082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cabha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. I did strcpy data and then re-initialized call back buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;strcpy(recData,recBuffCall);&lt;/P&gt;&lt;P&gt;UART_DRV_ReceiveData(FSL_BLE, recBuffCall, sizeof(recBuffCall));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2016 14:20:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507355#M5082</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2016-01-18T14:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Simple UART - Clear RX Buffer</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507356#M5083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, now my received data [1] is corrupted instead of [0]. looks like root cause need to be fixed. If not, the error will be running around everywhere&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:39:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Simple-UART-Clear-RX-Buffer/m-p/507356#M5083</guid>
      <dc:creator>kyizawwin</dc:creator>
      <dc:date>2016-01-26T15:39:36Z</dc:date>
    </item>
  </channel>
</rss>

