This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: RS485

Part Number: AM3358


Hi,

SDK: linux-rt-4.1.18

Customer want to use uart2 as rs485, and gpio0_5 as contol signal. He can only realize transmit/receive when pull up/down gpio0_5 manually. Please help give some advice.

uart2_pins_default: pinmux_uart2_pins  {
    pinctrl-single,pins = <
        0x150 (PIN_INPUT_PULLUP | MUX_MODE1) /* (A17) spi0_sclk.uart2_rxd */
        0x154 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (B17) spi0_d0.uart2_txd */
        0x15c (PIN_OUTPUT | MUX_MODE7) /* (A16) spi0_cs0.gpio0[5] */
    >;
};
&uart2 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart2_pins_default>;
    rts-gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
    rs485-rts-active-high;
    rs485-rts-delay = <1 1>;
    linux,rs485-enabled-at-boot-time;
    status = "okay";
};