<?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: i.MX6UL RS485 Linux driver in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/802304#M123948</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately, these patches don't solve the main problem, which is that &lt;/P&gt;&lt;P&gt;when UART peripheral gets disabled (Linux does this, but I don't &lt;/P&gt;&lt;P&gt;understand why, so can't tell anything more except that it happens) the &lt;/P&gt;&lt;P&gt;CTS_B signal, commonly used for control of RS485 transmitter, gets its &lt;/P&gt;&lt;P&gt;default value, which is logic '0' ie. "high voltage".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That happens on boot, and after each transmission, like&lt;/P&gt;&lt;P&gt;echo -n x &amp;gt; /dev/ttymxc4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to fix the problem "after transmission", but not fully "on &lt;/P&gt;&lt;P&gt;boot", because for that I need to configure UART before its pins get &lt;/P&gt;&lt;P&gt;muxed, and Linux seems to do that first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;W dniu 2018-09-11 o&amp;nbsp;02:25, igorpadykov pisze:&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;  NXP Community&lt;/P&gt;&lt;P&gt;  &amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Re: i.MX6UL RS485 Linux driver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from igorpadykov &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/igorpadykov?et=watches.email.thread&amp;gt; &lt;/P&gt;&lt;P&gt;in /i.MX Processors/ - View the full discussion &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/1055435?commentID=1055435&amp;amp;et=watches.email.thread#comment-1055435&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2018 05:32:43 GMT</pubDate>
    <dc:creator>a_r_f_</dc:creator>
    <dc:date>2018-09-11T05:32:43Z</dc:date>
    <item>
      <title>i.MX6UL RS485 Linux driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/802302#M123946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an i.MX6UL design in which I have an RS485 transceiver connected to the processor. The RS485 bus is supposed to be handled by UART5, ie. /dev/ttymxc4 in Linux. The "driver enable" line of the transceiver is connected to CTS_B output, ie. the same pin as GPIO1_09.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any version of the SERIAL_IMX driver (drivers/tty/serial/imx.c) known to correctly control the driver enable line? If someone has a working setup of this kind, please, let me know what system version is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my design, no matter what I try, the driver enable signal is brought high on boot and it stays this way. I've tried kernels 4.9, 4.12 and 4.14 with their version of the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have spent some time digging in the driver, and in theory that should work correctly. I have added printk's to see when the driver initializes RS485, and attempts to bring driver enable signal high or low, and these debugs appear at correct moments. The driver tries to write values which make sense to the UART's control register 2, but the signal doesn't change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I have noticed that if the transmitting process gets killed, no debug message (generated by one of my added printk's) related to bringing the driver enable to inactive state (low) appears. Maybe this is the matter of just a not displaying the debug message, but it can be also a bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2018 20:22:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/802302#M123946</guid>
      <dc:creator>a_r_f_</dc:creator>
      <dc:date>2018-09-08T20:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6UL RS485 Linux driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/802303#M123947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try to use patches on&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/384114"&gt;[imx6] RS485 could be supported on Imx6 series ? &lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&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>Tue, 11 Sep 2018 00:24:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/802303#M123947</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-09-11T00:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6UL RS485 Linux driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/802304#M123948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately, these patches don't solve the main problem, which is that &lt;/P&gt;&lt;P&gt;when UART peripheral gets disabled (Linux does this, but I don't &lt;/P&gt;&lt;P&gt;understand why, so can't tell anything more except that it happens) the &lt;/P&gt;&lt;P&gt;CTS_B signal, commonly used for control of RS485 transmitter, gets its &lt;/P&gt;&lt;P&gt;default value, which is logic '0' ie. "high voltage".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That happens on boot, and after each transmission, like&lt;/P&gt;&lt;P&gt;echo -n x &amp;gt; /dev/ttymxc4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've managed to fix the problem "after transmission", but not fully "on &lt;/P&gt;&lt;P&gt;boot", because for that I need to configure UART before its pins get &lt;/P&gt;&lt;P&gt;muxed, and Linux seems to do that first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;W dniu 2018-09-11 o&amp;nbsp;02:25, igorpadykov pisze:&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;  NXP Community&lt;/P&gt;&lt;P&gt;  &amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Re: i.MX6UL RS485 Linux driver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from igorpadykov &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/igorpadykov?et=watches.email.thread&amp;gt; &lt;/P&gt;&lt;P&gt;in /i.MX Processors/ - View the full discussion &lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/1055435?commentID=1055435&amp;amp;et=watches.email.thread#comment-1055435&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2018 05:32:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/802304#M123948</guid>
      <dc:creator>a_r_f_</dc:creator>
      <dc:date>2018-09-11T05:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6UL RS485 Linux driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/1160064#M162632</link>
      <description>&lt;P&gt;I am having the same problem on dunfell with an i.MX8 nano. How did you manage to get the driver to do the right thing with CTS_B when the driver isn't opened?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:47:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6UL-RS485-Linux-driver/m-p/1160064#M162632</guid>
      <dc:creator>simon_pettersso</dc:creator>
      <dc:date>2020-09-28T11:47:37Z</dc:date>
    </item>
  </channel>
</rss>

