<?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>MQX Software SolutionsのトピックRe: Receiving data using UART</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317736#M10127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Opening it with the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IO_SERIAL_NON_BLOCKING&lt;/SPAN&gt; flag works for me. I am using the interrupt-driver version of the driver but I don't know if that makes a difference; I wouldn't think so. Do you have any other flags set on the port; hardware handshaking for example? I wonder if that could cause it to block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nothing is obvious I would suggest using the debugger to pause execution at a time when you think it is blocked and seeing where that thread is (presumably somewhere down in the driver). If it is not clear how it got there run it again with a breakpoint on the fgetc() call then step into it to see why it blocks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jul 2014 19:47:42 GMT</pubDate>
    <dc:creator>matthewkendall</dc:creator>
    <dc:date>2014-07-10T19:47:42Z</dc:date>
    <item>
      <title>Receiving data using UART</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317731#M10122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I am using a K60D100M tower system with MQX4.0.2. I have successfully sent data using UART3 and am now trying to receive data. I have tried using fread() and _io_read() in order to do so and the data transfer works, but both functions block the task until data is received. Is there a way to receive data without blocking the task while waiting for it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 12:32:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317731#M10122</guid>
      <dc:creator>andreeaignat</dc:creator>
      <dc:date>2014-07-09T12:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving data using UART</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317732#M10123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend posting in the MQX forum since the issue is related to the use of MQX SW rather than the Kinetis itself.&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;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 16:19:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317732#M10123</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-07-09T16:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving data using UART</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317733#M10124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fgetc is non-blocking:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14049541268468896" jivemacro_uid="_14049541268468896" modifiedtitle="true"&gt;
&lt;P&gt;int c;&lt;/P&gt;
&lt;P&gt;while ((c = fgetc(fp)) != -1) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* do something with (char)c */&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 01:03:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317733#M10124</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-07-10T01:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Receiving data using UART</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317734#M10125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I should clarify that a bit. Both fgetc() and fread() are blocking or non-blocking depending on how you open the port.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14049572226482770" jivemacro_uid="_14049572226482770"&gt;
&lt;P&gt;fp = fopen("ittyc:", (pointer)(IO_SERIAL_NON_BLOCKING));&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IO_SERIAL_NON_BLOCKING flag is explained in the MQX I/O Drivers User's Guide, which is in ...\Freescale\Freescale_MQX_4_0\doc\mqx\MQXIOUG.pdf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 01:54:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317734#M10125</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-07-10T01:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving data using UART</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317735#M10126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried opening the port with &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IO_SERIAL_NON_BLOCKING&lt;/SPAN&gt;, but the task is still blocked if no data is received. Do you have any other suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 08:39:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317735#M10126</guid>
      <dc:creator>andreeaignat</dc:creator>
      <dc:date>2014-07-10T08:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving data using UART</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317736#M10127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Opening it with the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IO_SERIAL_NON_BLOCKING&lt;/SPAN&gt; flag works for me. I am using the interrupt-driver version of the driver but I don't know if that makes a difference; I wouldn't think so. Do you have any other flags set on the port; hardware handshaking for example? I wonder if that could cause it to block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nothing is obvious I would suggest using the debugger to pause execution at a time when you think it is blocked and seeing where that thread is (presumably somewhere down in the driver). If it is not clear how it got there run it again with a breakpoint on the fgetc() call then step into it to see why it blocks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 19:47:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317736#M10127</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-07-10T19:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Receiving data using UART</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317737#M10128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andreea,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition please check the below thread.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/301627"&gt;Serial IO_SERIAL_NON_BLOCKING flag&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol&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>Wed, 16 Jul 2014 17:27:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Receiving-data-using-UART/m-p/317737#M10128</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2014-07-16T17:27:21Z</dc:date>
    </item>
  </channel>
</rss>

