<?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 receive in twrk65f180m missing bytes? in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404103#M13549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have submitted a service request. Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 May 2015 00:46:57 GMT</pubDate>
    <dc:creator>viveksrinivasan</dc:creator>
    <dc:date>2015-05-08T00:46:57Z</dc:date>
    <item>
      <title>UART receive in twrk65f180m missing bytes?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404101#M13547</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'm using the following board and OS,&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;&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; Board : twrk65f180m&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;&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; OS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp; MQX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to communicate with the Bluetooth chip. I don't know how many bytes I will be receiving. For example this is my Tx and Rx bytes.&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tx&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; 0x01 0x03 0x0c 0x00&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;&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; Rx&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; 0x04 0x0E 0x04 0x01 0x03 0x0c 0x00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The receive bytes will come together and there are no delays in between them. When I try to read them one by one like below&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;&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; *lengthRead = _io_read((MQX_FILE_PTR)handle, (void*)buf, (_mqx_int) 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It just reads the first byte and then the next time it goes and waits for the next byte. Wheras there should be remaining 6 bytes that it should read. It seems like it has no buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to read them all at once like below.&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;&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; &lt;SPAN style="font-size: 13.3333330154419px;"&gt;*lengthRead = _io_read((MQX_FILE_PTR)handle, (void*)buf, (_mqx_int) 7);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It returns all the 7 bytes without any issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using ittyd to communicate with the bluetooth chip. I've even set the buffer size to a maximum of 256 bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define BSPCFG_SCI3_QUEUE_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me why can't I read those bytes one by one? If there is a buffer all those bytes should be stored and I can retrieve those bytes the next time right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I'm using two UART's for my application ittyc (default) and ittyd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is much appreciated. Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 08:28:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404101#M13547</guid>
      <dc:creator>viveksrinivasan</dc:creator>
      <dc:date>2015-05-06T08:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: UART receive in twrk65f180m missing bytes?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404102#M13548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please submit a Service request at &lt;A href="https://community.nxp.com/www.freescale.com/support" target="test_blank"&gt;www.freescale.com/support&lt;/A&gt; please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 22:27:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404102#M13548</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2015-05-07T22:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: UART receive in twrk65f180m missing bytes?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404103#M13549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have submitted a service request. Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 00:46:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404103#M13549</guid>
      <dc:creator>viveksrinivasan</dc:creator>
      <dc:date>2015-05-08T00:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: UART receive in twrk65f180m missing bytes?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404104#M13550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the below answer from David E Seymour, Please let me know if this helps,&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;Soledad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;I setup my MQX4.2 for the twrk65f180m to have the default (ITTYC) UART operate in a non-blocking mode since I was just using the default UART interface to send and receive characters to the terminal window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In twrk65f180m.h I made following change:&lt;/P&gt;&lt;P&gt;#ifndef BSP_DEFAULT_IO_OPEN_MODE&lt;/P&gt;&lt;P&gt;//DES #define BSP_DEFAULT_IO_OPEN_MODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void *) (IO_SERIAL_XON_XOFF | IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO)&lt;/P&gt;&lt;P&gt;&amp;nbsp; #define BSP_DEFAULT_IO_OPEN_MODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (void *) (IO_SERIAL_NON_BLOCKING | IO_SERIAL_XON_XOFF |IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO) //DES added IO_SERIAL_NON_BLOCKING&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some unknown read I had to modify the serl_int.c at line 187 as follows:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result == MQX_OK &amp;amp;&amp;amp; ((_mqx_uint)flags &amp;amp; IO_SERIAL_NON_BLOCKING)&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;//DES When I have flag set to IO_SERIAL_NON_BLOCKING it returns MQX_INVALID_PARAMTER???&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; (_mqx_uint)flags&amp;amp; (IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO | IO_SERIAL_XON_XOFF)) {&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;//DES should &amp;amp;&amp;amp; (_mqx_uint)flags.... be &amp;amp; (_mqx_uint)flags ???&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = MQX_INVALID_PARAMETER;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is my modified hello.c code from hello2 that is testing the UART interrupt receive buffer capability.&amp;nbsp; Default buffer size used of 64 byes.&lt;/P&gt;&lt;P&gt;If the code runs, then you can enter characters in the terminal windows and they get placed into the buffer.&lt;/P&gt;&lt;P&gt;If you enable a breakpoint at line 97 _time_delay(200); , then you can set the "lengthRead" variable to "4".&amp;nbsp; Now disable the breakpoint at line 97.&amp;nbsp; This will enable the code to read from the UART Rx Interrupt Buffer (fifo) until no more characters are present.&amp;nbsp; If you are fast to type you can add more character into the buffer before it completes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure this helps or hurts.&amp;nbsp; Let me know.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2015 19:08:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404104#M13550</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-05-18T19:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: UART receive in twrk65f180m missing bytes?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404105#M13551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soledad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Than you so much for your response. Please give me a couple of days as I'm busy with some work at the moment. I will get back to you by the end of this week. Once again thank you so much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 00:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-receive-in-twrk65f180m-missing-bytes/m-p/404105#M13551</guid>
      <dc:creator>viveksrinivasan</dc:creator>
      <dc:date>2015-05-19T00:13:14Z</dc:date>
    </item>
  </channel>
</rss>

