linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Nandor Han" <nandor.han@ge.com>,
	"Lucas Stach" <l.stach@pengutronix.de>,
	"Fabio Estevam" <fabio.estevam@freescale.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: imx: RS-485 problems during TX, maybe DMA related
Date: Fri, 6 Jan 2017 19:22:32 -0200	[thread overview]
Message-ID: <CAOMZO5C3enuThR1DpcwNnqFdxd8tGoBwd76O62Gnviz8x1_a9w@mail.gmail.com> (raw)
In-Reply-To: <20170104160024.GA13442@archie.localdomain>

Hi Clemens,

On Wed, Jan 4, 2017 at 2:00 PM, Clemens Gruber
<clemens.gruber@pqgruber.com> wrote:
> Hi,
>
> I observed odd behavior of the current tty/serial/imx.c driver in RS-485
> mode.
>
> RX works fine, but TX does not: When sending data, it arrives multiple

I am also trying to get rs485 in half-duplex mode to work on mx6dl
with kernel 4.9.

RX also works for me, but TX does not.

On my board it is the MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B pin that
controls the rs485 transceiver flow, but I do not
see RTS to toggle to 1 during transmit. It stays always at 0.

I see you use CTS pin instead, but I thought RTS pin should be used.

On my userspace application I have:

/* enable RS485 mode: */
rs485conf.flags |= SER_RS485_ENABLED;

/* set logical level for RTS pin equal to 1 when sending: */
rs485conf.flags |= SER_RS485_RTS_ON_SEND;

/* set logical level for RTS pin equal to 0 after sending: */
rs485conf.flags &= ~(SER_RS485_RTS_AFTER_SEND);

Any ideas as to how to make RTS go to one so that the data can go
through the rs485 transceiver?

Thanks

  reply	other threads:[~2017-01-06 21:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 16:00 imx: RS-485 problems during TX, maybe DMA related Clemens Gruber
2017-01-06 21:22 ` Fabio Estevam [this message]
2017-01-06 22:50   ` Clemens Gruber
2017-01-07  0:31     ` Fabio Estevam
2017-01-07 13:45       ` Clemens Gruber
2017-01-07 14:57         ` Fabio Estevam
2017-01-07 15:34           ` Clemens Gruber
2017-01-07 16:48             ` Fabio Estevam
2017-01-07 20:59               ` Clemens Gruber
2017-01-07 21:43                 ` Fabio Estevam
2017-01-07 23:06                   ` Clemens Gruber
2017-01-08  2:30                     ` Fabio Estevam
2017-01-08 18:06                       ` Clemens Gruber
2017-01-08 21:46                         ` Fabio Estevam
2017-01-11  0:33                           ` Clemens Gruber
2017-01-11 11:51                             ` Fabio Estevam
2017-01-08 15:12                     ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOMZO5C3enuThR1DpcwNnqFdxd8tGoBwd76O62Gnviz8x1_a9w@mail.gmail.com \
    --to=festevam@gmail.com \
    --cc=clemens.gruber@pqgruber.com \
    --cc=fabio.estevam@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nandor.han@ge.com \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).