<?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 Flow control, K64 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650323#M39558</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The K64 has a modem register which controls some part of RTS/CTS HW flow control automatically.&lt;BR /&gt;Eg. Set TXCTSE in UARTx_MODEM register and it will only send when the CTS input is asserted.&lt;BR /&gt;You can control the RTS output with the RXRTSE bit in the same register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some background:&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerUART.PDF" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerUART.PDF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do it in the uTasker project with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;tInterfaceParameters.Config |= RTS_CTS;&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; // enable RTS/CTS operation (HW flow control)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;if ((SerialPortID = fnOpen(TYPE_TTY, ucDriverMode, &amp;amp;tInterfaceParameters)) != NO_ID_ALLOCATED) { // open or change the channel with defined configurations (initially inactive)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnDriver(SerialPortID, (TX_ON | RX_ON), 0);&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; // enable rx and tx&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((tInterfaceParameters.Config &amp;amp; RTS_CTS) != 0) {&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; // if HW flow control is being used&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnDriver(SerialPortID, (MODIFY_INTERRUPT | ENABLE_CTS_CHANGE), 0); // activate CTS operation when working with HW flow control&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnDriver(SerialPortID, (MODIFY_CONTROL | SET_RTS), 0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // activate RTS line when working with HW flow control&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;}&lt;/SPAN&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Professional support for Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Findex.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/index.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Remote desktop one-on-one coaching: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fservices.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Getting started to expert videos: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fresults%3Fsearch_query%3Dutasker%2Bshorts" rel="nofollow" target="_blank"&gt;https://www.youtube.com/results?search_query=utasker+shorts&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Mar 2017 21:40:43 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2017-03-14T21:40:43Z</dc:date>
    <item>
      <title>UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650322#M39557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From looking at various posts, I've understood there is no HW flow support for UART. I'm working with KSDK 2.1 (I've read no support for earlier versions).&lt;/P&gt;&lt;P&gt;Nevertheless, in MK64F12.h there's:&lt;/P&gt;&lt;P&gt;/* @brief Hardware flow control (RTS, CTS) is supported. */&lt;BR /&gt;#define FSL_FEATURE_UART_HAS_MODEM_SUPPORT (1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. So, does it mean there is HW Flow support?&lt;/P&gt;&lt;P&gt;2. How do I use it?&lt;/P&gt;&lt;P&gt;I &amp;nbsp;connected TX_Enable to pin 71, PTC1 (UART1_RTS), still I do not get any uart interrupt... (Where as in FRDM board all is ok). I defined this pin to be a UART1_RTS functionality)&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;P&gt;See more info below. It seems the RTS is high (even though I tried changing its polarity), and by that avoiding data from being received by the chip. Mystery....&lt;/P&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15165iEBE37EDAEFA11E51/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:16:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650322#M39557</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-14T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650323#M39558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The K64 has a modem register which controls some part of RTS/CTS HW flow control automatically.&lt;BR /&gt;Eg. Set TXCTSE in UARTx_MODEM register and it will only send when the CTS input is asserted.&lt;BR /&gt;You can control the RTS output with the RXRTSE bit in the same register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some background:&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fdocs%2FuTasker%2FuTaskerUART.PDF" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerUART.PDF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do it in the uTasker project with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;tInterfaceParameters.Config |= RTS_CTS;&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; // enable RTS/CTS operation (HW flow control)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;if ((SerialPortID = fnOpen(TYPE_TTY, ucDriverMode, &amp;amp;tInterfaceParameters)) != NO_ID_ALLOCATED) { // open or change the channel with defined configurations (initially inactive)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnDriver(SerialPortID, (TX_ON | RX_ON), 0);&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; // enable rx and tx&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((tInterfaceParameters.Config &amp;amp; RTS_CTS) != 0) {&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; // if HW flow control is being used&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnDriver(SerialPortID, (MODIFY_INTERRUPT | ENABLE_CTS_CHANGE), 0); // activate CTS operation when working with HW flow control&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnDriver(SerialPortID, (MODIFY_CONTROL | SET_RTS), 0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // activate RTS line when working with HW flow control&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;}&lt;/SPAN&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Professional support for Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Findex.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/index.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Remote desktop one-on-one coaching: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fservices.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Getting started to expert videos: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fresults%3Fsearch_query%3Dutasker%2Bshorts" rel="nofollow" target="_blank"&gt;https://www.youtube.com/results?search_query=utasker+shorts&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 21:40:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650323#M39558</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-03-14T21:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650324#M39559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;I'm using the RTS only (you can have a look at my elec. scheme above). so I wanted to configure the&amp;nbsp;&lt;SPAN&gt;TXRTSE register.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I'm writing straight to the registers:&lt;/P&gt;&lt;P&gt;UART1-&amp;gt;S1 &amp;amp; UART_MODEM_TXRTSPOL(1); //setting it as active high&lt;BR /&gt; UART1-&amp;gt;S1 &amp;amp; UART_MODEM_TXRTSE(1);&lt;/P&gt;&lt;P&gt;1. Is this the correct way to do it?&lt;/P&gt;&lt;P&gt;2. If so, when I connect a scope, I see the RTS line is getting high right pass this line:&lt;/P&gt;&lt;P&gt;PORT_SetPinMux(PORTC, PIN1_IDX, kPORT_MuxAlt3); /* PORTC1 (pin 71) is configured as UART1_RTS_b */&lt;/P&gt;&lt;P&gt;which is strange by itself (&lt;STRONG&gt;why does setting this pin as a RTS asserted it to '1'?&lt;/STRONG&gt;),&lt;/P&gt;&lt;P&gt;and also, it stays there as '1' for good (why did my previous lines did not changed it back to '0'?)&lt;/P&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:07:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650324#M39559</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-15T15:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650325#M39560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the subject is in fact RS485 mode rather than HW flow control since you are using the RTS to control the transceiver's drive. This is described in Chapter 8 of the document that I linked to.&lt;BR /&gt;The code to do it is very simple since this is automatically controlled by the UART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;_CONFIG_PERIPHERAL(C, 1, (PC_1_UART1_RTS));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;UART1_MODEM = (UART_MODEM_TXRTSE | UART_MODEM_TXRTSPOL);&lt;/SPAN&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Professional support for Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Findex.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/index.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Remote desktop one-on-one coaching: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fservices.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/services.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Getting started to expert videos: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fresults%3Fsearch_query%3Dutasker%2Bshorts" rel="nofollow" target="_blank"&gt;https://www.youtube.com/results?search_query=utasker+shorts&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:23:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650325#M39560</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-03-15T15:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650326#M39561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, a newbie question here... When you write:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;UART1_MODEM = (UART_MODEM_TXRTSE | UART_MODEM_TXRTSPOL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #3d3d3d; font-weight: inherit;"&gt;Don't you need to pass a parameter to the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;UART_MODEM_TXRTSE and&amp;nbsp;&lt;SPAN&gt;UART_MODEM_TXRTSPOL?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;as writte in the h file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;#define UART_MODEM_TXRTSE(x) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (((uint8_t)(((uint8_t)(x)) &amp;lt;&amp;lt; UART_MODEM_TXRTSE_SHIFT)) &amp;amp; UART_MODEM_TXRTSE_MASK)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:34:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650326#M39561</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-15T15:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650327#M39562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It depends on how the macros are defined. I use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;#define UART_MODEM_TXRTSE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x02&amp;nbsp;&amp;nbsp;&amp;nbsp; // transmit request-to-send enable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;#define UART_MODEM_TXRTSPOL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x04&amp;nbsp;&amp;nbsp;&amp;nbsp; // transmit request-to-send polarity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;In your case &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: courier new,courier,monospace;"&gt;#define UART_MODEM_TXRTSE(x) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (((uint8_t)(((uint8_t)(x)) &amp;lt;&amp;lt; UART_MODEM_TXRTSE_SHIFT)) &amp;amp; UART_MODEM_TXRTSE_MASK)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;where supposedly UART_MODEM_TXRTSE_SHIFT is 1 and UART_MODEM_TXRTSE_MASK is 0x02, and you MUST use a value of x of 1 otherwise it will fail...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Your framework uses a certain philosophy which is possible over-complicated in this case and more prone to error since you also need to know what width the mask is and what 1, 0, etc. actually mean.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;At the end of the day &lt;BR /&gt;UART1_MODEM = 0x06;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;is what you want, &lt;EM&gt;sogar dann wenn die Macros versuchen "Knüppel zwischen die Beine werfen"..... [assuming you are of German tongue]&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Mark&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 16:45:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650327#M39562</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-03-15T16:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650328#M39563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Mark.&lt;/P&gt;&lt;P&gt;As I'm not working with uTasker I'm afraid your answer (&lt;SPAN style="background-color: #ffffff;"&gt;UART1_MODEM ) is less good for me... And my project works flawlessly on the FRDM board but not with my custom board, which is pretty annoying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Anyway, still I cannot communicate. As I've written earlier, the RTS line stays high indefinitely avoiding data from being received (it locks the transceiver on driver mode).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Roy&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 20:45:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650328#M39563</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-15T20:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650329#M39564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UART1_MODEM is not 'uTasker' - it is a physical register in the K64:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15935i4C5761CFEA575074/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Using your headers it is probably&lt;/P&gt;&lt;P&gt;UART1-&amp;gt;MODEM&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, 15 Mar 2017 21:30:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650329#M39564</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-03-15T21:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650330#M39565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;Sorry for my latest post, too tired yesterday, wrote some nonsense... Deleted it.&lt;/P&gt;&lt;P&gt;Anyway,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote:&lt;/P&gt;&lt;P&gt;UART1-&amp;gt;MODEM&amp;nbsp;|&amp;nbsp;UART_MODEM_TXRTSPOL(1) ;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;UART1-&amp;gt;MODEM &lt;/SPAN&gt;&lt;SPAN&gt;|&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;UART_MODEM_TXRTSE(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;This seems to work untill the data start passing. Once the first packet of data is passed (and I see it as the correct data), alot of garbage data is passing without stopping, and the&amp;nbsp;RTS line keeps set and reset continously.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;This phenomenon was shown also when I implemented the RTS by myself (without using the&amp;nbsp;&lt;SPAN style="color: #3d3d3d;"&gt;TXRTSE registers). The scope shows the RTS line goes up and down endlessly. If I disconnect the USB (I use USB to RS485 dongle, to a transceiver on my board:MAX3362EKA) it doesn't stop and keeps passing data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/17636i2D36A99CD325C751/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.jpg" alt="pastedImage_1.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Roy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 08:21:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650330#M39565</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-16T08:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650331#M39566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;UART1-&amp;gt;S1 &amp;amp; UART_MODEM_TXRTSPOL(1) | UART_MODEM_TXRTSE(1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code looks to have nothing to do with setting the mode.&lt;BR /&gt;Why are you using the status register rather than the MODEM register?&lt;BR /&gt;If this is the real code it is just reading the status register and masking it with 0x06 which doesn't write anything to any register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Write the value directly in the MODEM register in the register view and test the operation first so that you have a working reference.&lt;BR /&gt;2. Then write code to set the bits correctly. If you are having problem with the macros in your framework you can also simply do:&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;*(unsigned char *)0x4006b00d = 0x06;&lt;/SPAN&gt;&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>Thu, 16 Mar 2017 10:10:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650331#M39566</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-03-16T10:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650332#M39567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If &lt;SPAN style="background-color: #ffffff;"&gt;your project works flawlessly on the FRDM board but not with my custom board. Are there any difference between FRDM board and the custom board?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Have you check the mask of the MCU on your custom board?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="MASK K64.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15514i8DA6D7358346816B/image-size/large?v=v2&amp;amp;px=999" role="button" title="MASK K64.png" alt="MASK K64.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;For the 1N83J mask, e4647: UART: Flow control timing issue can result in loss of characters if FIFO is not enabled&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="e4647 1N83J.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15552iD4A6958722E34F8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="e4647 1N83J.png" alt="e4647 1N83J.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;About the Hardware flow control, you can refer the uart_txrts_test() in attached "uart_flow_control_tests.c"file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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>Fri, 17 Mar 2017 03:23:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650332#M39567</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-03-17T03:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: UART Flow control, K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650333#M39568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankd Robin &amp;amp; Mark. Once I've swapped between R188 and R189 like a typical RS485 half duplex comm. it all went fine and all is working.&lt;/P&gt;&lt;P&gt;Thanks for the test file. I will keep it... ;-)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2017 06:49:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/UART-Flow-control-K64/m-p/650333#M39568</guid>
      <dc:creator>roymessinger</dc:creator>
      <dc:date>2017-03-17T06:49:20Z</dc:date>
    </item>
  </channel>
</rss>

