<?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: Serial IO_SERIAL_NON_BLOCKING flag</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163525#M1407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The _io_serial_int_read function is clear, but it's not clear for me why there is the test to have not both IO_SERIAL_NON_BLOCKING and IO_SERIAL_TRANSLATION flags (for example) set in the _io_serial_int_open (lines 296-297 in serl_int.c) and _io_serial_polled_open (lines 270-271 in serl_int.c) functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MQX 3.8.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Nov 2012 10:02:42 GMT</pubDate>
    <dc:creator>Teckna</dc:creator>
    <dc:date>2012-11-13T10:02:42Z</dc:date>
    <item>
      <title>Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163517#M1399</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 would like to know why the serial drivers (both polled and interrupt) open function tests the IO_SERIAL_NON_BLOCKING flag to be non simultaneous with the IO_SERIAL_TRANSLATION, IO_SERIAL_ECHO or IO_SERIAL_XON_XOFF flags. Which problem can arise if a device is opened with IO_SERIAL_NON_BLOCKING flag and one of the other IO_SERIAL_TRANSLATION, IO_SERIAL_ECHO or IO_SERIAL_XON_XOFF flags?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 14:11:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163517#M1399</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-11-05T14:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163518#M1400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Teckna,&lt;/P&gt;&lt;P&gt;Not 100% certain of an answer.&lt;/P&gt;&lt;P&gt;A clue might be in the MQXIOUG.pdf:&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale MQX 3.8\doc\mqx\MQXIOUG.pdf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.6 I/O Open Flags&lt;/P&gt;&lt;P&gt;This section describes the flagvalues you can pass when you call_io_fopen()for a particular&lt;/P&gt;&lt;P&gt;interrupt-driven or polled serial-device driver. They are defined in serial.h.&lt;/P&gt;&lt;P&gt;Command Description&lt;/P&gt;&lt;P&gt;IO_SERIAL_RAW_IO No processing of I/O done.&lt;/P&gt;&lt;P&gt;IO_SERIAL_XON_XOFF Software flow control enabled.&lt;/P&gt;&lt;P&gt;IO_SERIAL_TRANSLATION Translation of:&lt;/P&gt;&lt;P&gt;outgoing \n to CRLF&lt;/P&gt;&lt;P&gt;incoming CR to \n&lt;/P&gt;&lt;P&gt;incoming backspace outputs backspace&lt;/P&gt;&lt;P&gt;space backspace and drops the input.&lt;/P&gt;&lt;P&gt;IO_SERIAL_ECHO Echoes incoming characters.&lt;/P&gt;&lt;P&gt;IO_SERIAL_HW_FLOW_CONTROL Enables hardware flow control (RTS/CTS)&lt;/P&gt;&lt;P&gt;where available.&lt;/P&gt;&lt;P&gt;IO_SERIAL_NON_BLOCKING Open the serial driver in non blocking mode.&lt;/P&gt;&lt;P&gt;In this mode the _io_read() function doesn’t&lt;/P&gt;&lt;P&gt;wait till the receive buffer is full, but it&lt;/P&gt;&lt;P&gt;immediately returns received characters&lt;/P&gt;&lt;P&gt;and number of received characters.&lt;/P&gt;&lt;P&gt;IO_SERIAL_HW_485_FLOW_CONTROL Enables hardware support for RS485 if it is&lt;/P&gt;&lt;P&gt;available on target processor. Target HW&lt;/P&gt;&lt;P&gt;automatically asserts RTS signal before&lt;/P&gt;&lt;P&gt;transmit message and deasserts it after&lt;/P&gt;&lt;P&gt;transmission is done.&lt;/P&gt;&lt;P&gt;&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>Thu, 08 Nov 2012 17:07:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163518#M1400</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2012-11-08T17:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163519#M1401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did read the document you told me, but I stil don't understand why I can't call the _io_fopen function with both&lt;/P&gt;&lt;P&gt;IO_SERIAL_NON_BLOCKING and IO_SERIAL_TRANSLATION flags (for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 14:28:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163519#M1401</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-11-09T14:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163520#M1402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Teckna,&lt;/P&gt;&lt;P&gt;From a high level the polled UART mode is blocking by definitiion.&lt;/P&gt;&lt;P&gt;The interrupt UART mode is non-blocking by definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used both polled and interrupt and know that when I have used interrupt that the translation works.&lt;/P&gt;&lt;P&gt;Have you tried using the interrupt mode?&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>Fri, 09 Nov 2012 16:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163520#M1402</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2012-11-09T16:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163521#M1403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the interrupt mode.&lt;/P&gt;&lt;P&gt;My original question came because i tried to call the _io_fopen function with both IO_SERIAL_NON_BLOCKING and IO_SERIAL_TRANSLATION flags and the result was ko. I read the source code and I saw that the _io_serial_int_open and _io_serial_polled_open functions return MQX_INVALID_PARAMETER in this condition.&lt;/P&gt;&lt;P&gt;I'd want to modify the source code to handle my condition, but I'm not sure if this can get some problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 16:52:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163521#M1403</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-11-09T16:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163522#M1404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Teckna,&lt;/P&gt;&lt;P&gt;Why would you want to setup the interrupt mode to be polled?&amp;nbsp; That is defeating the purpose of the driver (I think).&lt;/P&gt;&lt;P&gt;If you want polled use the polled driver mode and not the interrupt mode.&amp;nbsp; Or am I missing something in the post?&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>Fri, 09 Nov 2012 17:03:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163522#M1404</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2012-11-09T17:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163523#M1405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"The interrupt UART mode is non-blocking by definition."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it's not correct, because if I call _io_fopen with NULL pointer to the flags parameter and then I call _io_fread to read, for example, 20 bytes, if there are not at least 20 bytes in the receive buffer, the task is put in a waiting state until all the 20 bytes are received: this way the task is blocked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 09:08:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163523#M1405</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-11-12T09:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163524#M1406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Teckna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please review code in function _io_serial_int_read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If IO_SERIAL_NON_BLOCKING is set, interrupts are enabled, and data are passed directly to buffer, without any interventions.&lt;/P&gt;&lt;P&gt;On the other hand, if NON_BLOCKING flag is not set, while loop continues and those 3 flags IO_SERIAL_TRANSLATION, IO_SERIAL_ECHO or IO_SERIAL_XON_XOFF are checked and appropriate actions are carried out in case of any of those flags are enabled .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, you can customize interrupt mode to your needs. Share with us your code :smileywink:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 06:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163524#M1406</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-11-13T06:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163525#M1407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The _io_serial_int_read function is clear, but it's not clear for me why there is the test to have not both IO_SERIAL_NON_BLOCKING and IO_SERIAL_TRANSLATION flags (for example) set in the _io_serial_int_open (lines 296-297 in serl_int.c) and _io_serial_polled_open (lines 270-271 in serl_int.c) functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MQX 3.8.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 10:02:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163525#M1407</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-11-13T10:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163526#M1408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have explained you why there's test of those flags in open function. If you set IO_SERIAL_NON_BLOCKING, none of IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO | IO_SERIAL_XON_XOFF flags are functional therefore you get an error as return value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your intention is for example SERIAL_ECHO flag functionality, you have to edit ISR to change directly data before they are stored into buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 10:21:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163526#M1408</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-11-13T10:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Serial IO_SERIAL_NON_BLOCKING flag</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163527#M1409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kojto is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't use &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;IO_SERIAL_NON_BLOCKING&lt;/SPAN&gt; whit &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;IO_SERIAL_TRANSLATION, IO_SERIAL_ECHO or IO_SERIAL_XON_XOFF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If you need a translation or an echo you must implement it manually.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 07:41:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Serial-IO-SERIAL-NON-BLOCKING-flag/m-p/163527#M1409</guid>
      <dc:creator>ivanpajuelo</dc:creator>
      <dc:date>2012-11-22T07:41:08Z</dc:date>
    </item>
  </channel>
</rss>

