<?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: Linux4.1 for  IMX6UL ，RS232 driver does not use CTS, use an additional GPIO control to receive and send, which changed the RS485 driver? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Linux4-1-for-IMX6UL-RS232-driver-does-not-use-CTS-use-an/m-p/661720#M101593</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;if you are trying replace CTS flow control signal with gpio one can try below changes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;&amp;amp;=&amp;nbsp;~UCR2_CTS;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----- replace with gpio assert&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;else&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;|=&amp;nbsp;UCR2_CTS;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;writel(temp,&amp;nbsp;port-&amp;gt;membase&amp;nbsp;+&amp;nbsp;UCR2); &amp;lt;----- replace with gpio deassert&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&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;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 11 Dec 2016 23:27:46 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2016-12-11T23:27:46Z</dc:date>
    <item>
      <title>Linux4.1 for  IMX6UL ，RS232 driver does not use CTS, use an additional GPIO control to receive and send, which changed the RS485 driver?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux4-1-for-IMX6UL-RS232-driver-does-not-use-CTS-use-an/m-p/661719#M101592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found &amp;nbsp;a function which named - static void imx_start_tx (struct uart_port * port) &amp;nbsp;in &amp;nbsp;the &amp;nbsp;source code of the linux nernel 4.1 for IMX6UL, here &amp;nbsp;how to changed &amp;nbsp;the RS232 driver code &amp;nbsp;to &amp;nbsp;control the GPIO port used to control RS485 send and receive?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;The code file name and directory：Imx.c (linux-src\drivers\tty\serial)&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function code：&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;static&amp;nbsp;void&amp;nbsp;imx_start_tx(struct&amp;nbsp;uart_port&amp;nbsp;*port)&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;{&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;struct&amp;nbsp;imx_port&amp;nbsp;*sport&amp;nbsp;=&amp;nbsp;(struct&amp;nbsp;imx_port&amp;nbsp;*)port;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;unsigned&amp;nbsp;long&amp;nbsp;temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;if&amp;nbsp;(port-&amp;gt;rs485.flags&amp;nbsp;&amp;amp;&amp;nbsp;SER_RS485_ENABLED)&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;/*&amp;nbsp;enable&amp;nbsp;transmitter&amp;nbsp;and&amp;nbsp;shifter&amp;nbsp;empty&amp;nbsp;irq&amp;nbsp;*/&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;=&amp;nbsp;readl(port-&amp;gt;membase&amp;nbsp;+&amp;nbsp;UCR2);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;if&amp;nbsp;(port-&amp;gt;rs485.flags&amp;nbsp;&amp;amp;&amp;nbsp;SER_RS485_RTS_ON_SEND)&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;&amp;amp;=&amp;nbsp;~UCR2_CTS;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;else&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;|=&amp;nbsp;UCR2_CTS;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;writel(temp,&amp;nbsp;port-&amp;gt;membase&amp;nbsp;+&amp;nbsp;UCR2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;=&amp;nbsp;readl(port-&amp;gt;membase&amp;nbsp;+&amp;nbsp;UCR4);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;|=&amp;nbsp;UCR4_TCEN;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;writel(temp,&amp;nbsp;port-&amp;gt;membase&amp;nbsp;+&amp;nbsp;UCR4);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;if&amp;nbsp;(!sport-&amp;gt;dma_is_enabled)&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;=&amp;nbsp;readl(sport-&amp;gt;port.membase&amp;nbsp;+&amp;nbsp;UCR1);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;writel(temp&amp;nbsp;|&amp;nbsp;UCR1_TXMPTYEN,&amp;nbsp;sport-&amp;gt;port.membase&amp;nbsp;+&amp;nbsp;UCR1);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;if&amp;nbsp;(sport-&amp;gt;dma_is_enabled)&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;if&amp;nbsp;(sport-&amp;gt;port.x_char)&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;/*&amp;nbsp;We&amp;nbsp;have&amp;nbsp;X-char&amp;nbsp;to&amp;nbsp;send,&amp;nbsp;so&amp;nbsp;enable&amp;nbsp;TX&amp;nbsp;IRQ&amp;nbsp;and&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&amp;nbsp;*&amp;nbsp;disable&amp;nbsp;TX&amp;nbsp;DMA&amp;nbsp;to&amp;nbsp;let&amp;nbsp;TX&amp;nbsp;interrupt&amp;nbsp;to&amp;nbsp;send&amp;nbsp;X-char&amp;nbsp;*/&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;=&amp;nbsp;readl(sport-&amp;gt;port.membase&amp;nbsp;+&amp;nbsp;UCR1);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;&amp;amp;=&amp;nbsp;~UCR1_TDMAEN;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;|=&amp;nbsp;UCR1_TXMPTYEN;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;writel(temp,&amp;nbsp;sport-&amp;gt;port.membase&amp;nbsp;+&amp;nbsp;UCR1);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;return;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;schedule_delayed_work(&amp;amp;sport-&amp;gt;tsk_dma_tx,&amp;nbsp;0);&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;return;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;}&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f5f5f5; color: #3d3d3d; font-size: 15px;"&gt;Thanks again !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2016 14:50:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux4-1-for-IMX6UL-RS232-driver-does-not-use-CTS-use-an/m-p/661719#M101592</guid>
      <dc:creator>jsj2000lyz</dc:creator>
      <dc:date>2016-12-10T14:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Linux4.1 for  IMX6UL ，RS232 driver does not use CTS, use an additional GPIO control to receive and send, which changed the RS485 driver?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux4-1-for-IMX6UL-RS232-driver-does-not-use-CTS-use-an/m-p/661720#M101593</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;if you are trying replace CTS flow control signal with gpio one can try below changes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;&amp;amp;=&amp;nbsp;~UCR2_CTS;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----- replace with gpio assert&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;else&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;temp&amp;nbsp;|=&amp;nbsp;UCR2_CTS;&lt;/SPAN&gt;&lt;BR style="color: #333333; background-color: #f5f5f5; font-size: 14px;" /&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;writel(temp,&amp;nbsp;port-&amp;gt;membase&amp;nbsp;+&amp;nbsp;UCR2); &amp;lt;----- replace with gpio deassert&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&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;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2016 23:27:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux4-1-for-IMX6UL-RS232-driver-does-not-use-CTS-use-an/m-p/661720#M101593</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-12-11T23:27:46Z</dc:date>
    </item>
  </channel>
</rss>

