<?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 for RS485 :: RTS timing in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-for-RS485-RTS-timing/m-p/450125#M15059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the input.&lt;/P&gt;&lt;P&gt;The RS485 example was my base to start. So the only difference to what I do is, that i am not writing things with the write(.) function&lt;/P&gt;&lt;P&gt;but I am using the printf function.&lt;/P&gt;&lt;P&gt;This should be a proper use from my understanding?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I tried to run the example and compare results and the problem seems to have vanished.&lt;/P&gt;&lt;P&gt;I then tried it with my project and I found out that i have a TimerInterrupt enabled in my bsp(with Processor Expert) on a 1ms&lt;/P&gt;&lt;P&gt;basis.&lt;/P&gt;&lt;P&gt;As soon as I am running my own methods in the connected TimerInterrupt event, the UART interruptions&lt;/P&gt;&lt;P&gt;occur again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So at that point I am not sure why this is happening&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2015 06:23:25 GMT</pubDate>
    <dc:creator>clenz</dc:creator>
    <dc:date>2015-06-18T06:23:25Z</dc:date>
    <item>
      <title>UART for RS485 :: RTS timing</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-for-RS485-RTS-timing/m-p/450123#M15057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everybody&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a K20 Chip (MK20DN512VMD10) with MQX 4.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to run a UART with a RS485 transmitterdevice which I am controlling with the RTS (request to send).&lt;/P&gt;&lt;P&gt;My Problem now is that, as soon as I use higher baudrates (i.e. more than 9600) on the UART the timing of the RTS seems to be messed up (see image) or the&lt;/P&gt;&lt;P&gt;UART itself has interruptions while sending bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="default.png"&gt;&lt;IMG alt="default.png" src="https://community.nxp.com/t5/image/serverpage/image-id/23535i5D41148F11290274/image-size/large?v=v2&amp;amp;px=999" title="default.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RTS goes down between some bytes which, in my case, deasserts the RTS and disables the transmission of the attached transmitter.&lt;/P&gt;&lt;P&gt;I don't think that this is actually wrong from the view of the RTS but either my RS485 Adapter or the Serial Console interprets the transmission interruption as a Stop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the question would be: How can i get my UART to run with high baudrates so that it doesn't have those interruptions in the transmission?&lt;/P&gt;&lt;P&gt;This never seemed to be a problem with the normal serial driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the polled serial driver which i am opening/configuring accordingly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14340088227221944 jive_text_macro" data-renderedposition="569_8_1232_40" jivemacro_uid="_14340088227221944" modifiedtitle="true"&gt;&lt;/PRE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;#define BSP_DEFAULT_IO_OPEN_MODE&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; &lt;/TD&gt;&lt;TD&gt;(void *) ( IO_SERIAL_XON_XOFF | IO_SERIAL_TRANSLATION&amp;nbsp; | IO_SERIAL_HW_485_FLOW_CONTROL /*| IO_SERIAL_ECHO*/)&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw. I found - and correct me if I am wrong - that one cannot use the IO_SERIAL_ECHO for RS485 with half-duplex use, since the driver (serl_pol.c) is implemented to echo each character&lt;/P&gt;&lt;P&gt;on the serial line and therefore deasserts the RTS and data loss occures if more than one byte should be received.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:22:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-for-RS485-RTS-timing/m-p/450123#M15057</guid>
      <dc:creator>clenz</dc:creator>
      <dc:date>2020-11-02T13:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: UART for RS485 :: RTS timing</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-for-RS485-RTS-timing/m-p/450124#M15058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please try using the example code located at the path: C:\Freescale\Freescale_MQX_4_1\mqx\examples\rs485&amp;nbsp; ??&lt;/P&gt;&lt;P&gt;The rs485 example demonstrates how to transmit and receive data through rs485 data’s channel. The baudrate for this example is 115200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol &lt;BR /&gt; &lt;BR /&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>Mon, 15 Jun 2015 17:44:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-for-RS485-RTS-timing/m-p/450124#M15058</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-06-15T17:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: UART for RS485 :: RTS timing</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-for-RS485-RTS-timing/m-p/450125#M15059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the input.&lt;/P&gt;&lt;P&gt;The RS485 example was my base to start. So the only difference to what I do is, that i am not writing things with the write(.) function&lt;/P&gt;&lt;P&gt;but I am using the printf function.&lt;/P&gt;&lt;P&gt;This should be a proper use from my understanding?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I tried to run the example and compare results and the problem seems to have vanished.&lt;/P&gt;&lt;P&gt;I then tried it with my project and I found out that i have a TimerInterrupt enabled in my bsp(with Processor Expert) on a 1ms&lt;/P&gt;&lt;P&gt;basis.&lt;/P&gt;&lt;P&gt;As soon as I am running my own methods in the connected TimerInterrupt event, the UART interruptions&lt;/P&gt;&lt;P&gt;occur again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So at that point I am not sure why this is happening&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 06:23:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-for-RS485-RTS-timing/m-p/450125#M15059</guid>
      <dc:creator>clenz</dc:creator>
      <dc:date>2015-06-18T06:23:25Z</dc:date>
    </item>
  </channel>
</rss>

