<?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 fgetc halting MQX in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193567#M3929</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a strange problem where certain received characters are causing my program to halt.&amp;nbsp; The code has been working very nicely, but I started to receive conditions that caused this problem, which I believe I've narrowed down to the fgetc command.&amp;nbsp; The relevant snippets are below.&amp;nbsp; This receives all other characters OK, but when a 0x13 character is received execution stops at the fgetc line.&amp;nbsp; I don't see the significance of 0x13. I realize it has significance in relation to interrupt vectors on x86 based processors, but I can't imagine it's related to that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The UART is connected to a peripheral that sends a variable data stream and I haven't tried to simulate all other input characters yet, but it has had no trouble with every other character the peripheral has sent, from 0x00 to 0xFF and many in between.&amp;nbsp; So far this (0x13) is the only character it seems to have a problem with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;char c;
FILE_PTR fh_ptr = NULL;

fh_ptr = (pointer) fopen("ttyb:", (pointer) (IO_SERIAL_XON_XOFF));

do {   if (fstatus(fh_ptr)) {      c = fgetc(fh_ptr);      printf("%02X", c);   }
} while (...)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:47:30 GMT</pubDate>
    <dc:creator>ARQuattr</dc:creator>
    <dc:date>2020-10-29T09:47:30Z</dc:date>
    <item>
      <title>fgetc halting MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193567#M3929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a strange problem where certain received characters are causing my program to halt.&amp;nbsp; The code has been working very nicely, but I started to receive conditions that caused this problem, which I believe I've narrowed down to the fgetc command.&amp;nbsp; The relevant snippets are below.&amp;nbsp; This receives all other characters OK, but when a 0x13 character is received execution stops at the fgetc line.&amp;nbsp; I don't see the significance of 0x13. I realize it has significance in relation to interrupt vectors on x86 based processors, but I can't imagine it's related to that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The UART is connected to a peripheral that sends a variable data stream and I haven't tried to simulate all other input characters yet, but it has had no trouble with every other character the peripheral has sent, from 0x00 to 0xFF and many in between.&amp;nbsp; So far this (0x13) is the only character it seems to have a problem with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;char c;
FILE_PTR fh_ptr = NULL;

fh_ptr = (pointer) fopen("ttyb:", (pointer) (IO_SERIAL_XON_XOFF));

do {   if (fstatus(fh_ptr)) {      c = fgetc(fh_ptr);      printf("%02X", c);   }
} while (...)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:47:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193567#M3929</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2020-10-29T09:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: fgetc halting MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193568#M3930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Angelo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You opened the port as XON/XOFF mode. 0x13 is XOFF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you open the port as IO_SERIAL_RAW_IO, the problem should go away.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 19:15:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193568#M3930</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2011-03-28T19:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: fgetc halting MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193569#M3931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeff,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wow, I should have caught that.&amp;nbsp; Thank you so much for solving that for me!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; By the way, I've seen IO_SERIAL_NON_BLOCKING used also, but I haven't seen much documentation on that (and a lot of other things really).&amp;nbsp; Do you know where I can find more detail on usage of this flag?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 23:29:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193569#M3931</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2011-03-28T23:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: fgetc halting MQX</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193570#M3932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I normally read the source code to figure out ( or guess) the usage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 23:39:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/fgetc-halting-MQX/m-p/193570#M3932</guid>
      <dc:creator>eGuy</dc:creator>
      <dc:date>2011-03-28T23:39:20Z</dc:date>
    </item>
  </channel>
</rss>

