imx: RS-485 problems during TX, maybe DMA related

Fabio Estevam festevam at gmail.com
Fri Jan 6 16:31:16 PST 2017


Hi Clemens,

On Fri, Jan 6, 2017 at 8:50 PM, Clemens Gruber
<clemens.gruber at pqgruber.com> wrote:

> But according to the i.MX Pins tool, they can be muxed vice-versa too.
> So if you connected the transceiver-enable to ball L4 (CSI0_DAT16), you
> could mux MX6QDL_PAD_CSI0_DAT16__UART4_CTS_B and
> MX6QDL_PAD_CSI0_DAT17__UART4_RTS_B instead?

Yes, I have tried like this:

&uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart4>;
    uart-has-rtscts;
    status = "okay";
};

pinctrl_uart4: uart4grp {
fsl,pins = <
    MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
    MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
   MX6QDL_PAD_CSI0_DAT16__UART4_CTS_B 0x1b0b1
>;
};

In this case the DE pin of the rs485 transceiver is always at 0 then
RX works and TX does not.

Then I tried to use a gpio for controling the rts line:

&uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart4>;
    rts-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
    status = "okay";
};

pinctrl_uart4: uart4grp {
fsl,pins = <
    MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
    MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
    MX6QDL_PAD_CSI0_DAT16__GPIO6_IO02 0x1b0b1
>;
}

In this case the DE pin of the rs485 transceiver is always at 1, then
TX works and RX does not.

So I was never able to observe the DE pin toggling correctly.

Maybe you could share your userspace application with me offline?

Thanks



More information about the linux-arm-kernel mailing list