<?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 K60 UART4 with HW-FlowControl in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244291#M6935</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 try to enable the HW-FlowControl on UART4 on a K60DN512. Therefore I use the PE Component Init_UART. After initialising the component I open the device with fopen:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13596421151591769" jivemacro_uid="_13596421151591769"&gt;
&lt;P&gt;MODEMUART_Init(); &amp;lt;= PE init function&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;pfile = fopen("ittye:", (pointer)(IO_SERIAL_RAW_IO | IO_SERIAL_HW_FLOW_CONTROL | IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO));&lt;/P&gt;
&lt;P&gt;ioctl(pfile, IO_IOCTL_SERIAL_SET_FLAGS, (pointer)(IO_SERIAL_RAW_IO | IO_SERIAL_HW_FLOW_CONTROL | IO_SERIAL_TRANSLATION | IO_SERIAL_ECO));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (pfile == NULL) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; printf("Cannot open the other IO device\n");&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; for(;;){&lt;/P&gt;
&lt;P&gt;&amp;nbsp; write(pfile, "AT\n", 4);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _time_delay(1000);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;

&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can see that there are some bits on the tx line of the UART4 but RTS and CTS lines are not working.&lt;/P&gt;&lt;P&gt;I found out that in the command function _kuart_polled_ioctl in the file serl_pol_kuart.c there is no implementation for the case IO_IOCTL_SERIAL_SET_HW_SIGNAL. If I understand it right there is no implementation for HW-FlowControl for a UART in MQX. Is that right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an example of using HW-FlowControl on a UART?&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added PE component settings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2013 14:16:20 GMT</pubDate>
    <dc:creator>TobiasBystricky</dc:creator>
    <dc:date>2013-01-31T14:16:20Z</dc:date>
    <item>
      <title>K60 UART4 with HW-FlowControl</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244291#M6935</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 try to enable the HW-FlowControl on UART4 on a K60DN512. Therefore I use the PE Component Init_UART. After initialising the component I open the device with fopen:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13596421151591769" jivemacro_uid="_13596421151591769"&gt;
&lt;P&gt;MODEMUART_Init(); &amp;lt;= PE init function&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;pfile = fopen("ittye:", (pointer)(IO_SERIAL_RAW_IO | IO_SERIAL_HW_FLOW_CONTROL | IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO));&lt;/P&gt;
&lt;P&gt;ioctl(pfile, IO_IOCTL_SERIAL_SET_FLAGS, (pointer)(IO_SERIAL_RAW_IO | IO_SERIAL_HW_FLOW_CONTROL | IO_SERIAL_TRANSLATION | IO_SERIAL_ECO));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (pfile == NULL) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; printf("Cannot open the other IO device\n");&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; for(;;){&lt;/P&gt;
&lt;P&gt;&amp;nbsp; write(pfile, "AT\n", 4);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _time_delay(1000);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;

&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can see that there are some bits on the tx line of the UART4 but RTS and CTS lines are not working.&lt;/P&gt;&lt;P&gt;I found out that in the command function _kuart_polled_ioctl in the file serl_pol_kuart.c there is no implementation for the case IO_IOCTL_SERIAL_SET_HW_SIGNAL. If I understand it right there is no implementation for HW-FlowControl for a UART in MQX. Is that right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an example of using HW-FlowControl on a UART?&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added PE component settings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 14:16:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244291#M6935</guid>
      <dc:creator>TobiasBystricky</dc:creator>
      <dc:date>2013-01-31T14:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: K60 UART4 with HW-FlowControl</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244292#M6936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PUSH!&lt;/P&gt;&lt;P&gt;Anyone an idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 10:14:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244292#M6936</guid>
      <dc:creator>TobiasBystricky</dc:creator>
      <dc:date>2013-02-01T10:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: K60 UART4 with HW-FlowControl</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244293#M6937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tobias Bystricky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this might help you, there're more posts dedicated to HW FLOW control here on the forum :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/303115"&gt;Define &amp;amp;amp; control UART Signals (RTS / CTS / DTR / DTS)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know :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>Fri, 01 Feb 2013 18:02:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244293#M6937</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-02-01T18:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: K60 UART4 with HW-FlowControl</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244294#M6938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;Thanks! I've tried this but it doesn't work. Do you have a full source code implementing a interrupted UART Wirth hw-flow control?&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 08:13:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244294#M6938</guid>
      <dc:creator>TobiasBystricky</dc:creator>
      <dc:date>2013-02-05T08:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: K60 UART4 with HW-FlowControl</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244295#M6939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have the same issue - the solution is to add a call to setup the CTS/RTS function first in serl_pol_kuart.c (ioctl) which need to be implemented for the signal you are using - see _bsp_serial_rts_init( io_info_ptr-&amp;gt;INIT.DEVICE ) - in you case INIT.DEVICE is 4 (UART4) - but the signal might be PTC12/PTC13 or others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;else if (*param_ptr &amp;amp; IO_SERIAL_HW_FLOW_CONTROL) {&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; &lt;/TD&gt;&lt;TD&gt;// RTS, CTS hw flow control&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; &lt;/TD&gt;&lt;TD&gt;/* get serial device index and set GPIO pin functionality to RTS */&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; &lt;/TD&gt;&lt;TD&gt;_bsp_serial_rts_init( io_info_ptr-&amp;gt;INIT.DEVICE );&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; &lt;/TD&gt;&lt;TD&gt;sci_ptr-&amp;gt;MODEM &amp;amp;= ~UART_MODEM_TXRTSE_MASK;&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; &lt;/TD&gt;&lt;TD&gt;sci_ptr-&amp;gt;MODEM |= (UART_MODEM_RXRTSE_MASK | UART_MODEM_TXCTSE_MASK);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 May 2014 00:04:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K60-UART4-with-HW-FlowControl/m-p/244295#M6939</guid>
      <dc:creator>David_Wu</dc:creator>
      <dc:date>2014-05-10T00:04:42Z</dc:date>
    </item>
  </channel>
</rss>

