Re: [PATCH 2/2] serial: imx: Fix the CTS_B polarity in RS485 mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fabio,

On Sun, Feb 19, 2017 at 07:07:20PM -0300, Fabio Estevam wrote:
> On Sat, Feb 18, 2017 at 8:35 AM, Maarten Brock <m.brock@xxxxxxxxxxxxx> wrote:
> 
> > So setting the SER_RS485_RTS_ON_SEND flag sets CTS_B active high during
> > send.
> 
> Yes, correct.
> 
> > And setting the SER_RS485_RTS_AFTER_SEND flag sets CTS_B active low after
> > send ?
> 
> No, when SER_RS485_RTS_AFTER_SEND is cleared, the CTS_B is low after send.
> 
> >
> > I don't get it. First, isn't CTS an input instead of an output?
> 
> On i.MX CTS is an output. I know this sounds confusing and I will
> submit a readme entry about it to help clarify it.
> 
> > And if I follow this through and want CTS_B high during a transmit only then
> > I
> > must set both SER_RS485_RTS_ON_SEND and SER_RS485_RTS_AFTER_SEND.
> 
> In this case you need:
> 
> SER_RS485_RTS_ON_SEND set
> SER_RS485_RTS_AFTER_SEND cleared.

But CTS_B is an active-low output, according to the IMX6DQ reference
manual.

The CTS field in _UCR2 has the following description on page 5252:
0  The CTS_B pin is high (inactive)
1  The CTS_B pin is low (active)

We had to invert the signal in hardware before connecting it to the
active-high transceive-enable pin of a transceiver.

If you want CTS_B high during transmit, I think you need it the other
way around: SER_RS485_RTS_ON_SEND cleared and SER_RS485_RTS_AFTER_SEND
set.

Or did I miss something?

Very confusing indeed!

Thanks,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux