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.

AM3356: UART1 - Full modem RS232, RS485 operation with RTS as direction control

Part Number: AM3356

Hi,

Was checking with the UART1 of the AM3356 and in one of our designs we require to use this port as Full modem in RS232 configuration and half duplex mode in RS485 configuration.

can we use the RTS signal for direction control in RS485 mode and the same RTS signal for hardware handshaking in RS232 mode.

Is there any issue in configuring and dynamically changing the functionality of RTS for different functionalities according to RS232/ RS485 mode of operation.

Please let me know if anyone have any info on this.

--

Regards,

Akshay V

  • Hello Akshay,

    What software are you running on the AM3356?

    Regards,

    Nick

  • Hi Nick,

    we are running Linux Kernal on AM335x.

    Is there any software reference for using the same RTS pin for RS485 direction control and as RTS in RS232 mode..?

    Please guide on how to configure the pin for this purpose.

    ---

    Thanks & Regards,

    Akshay V

  • Hi Nick,

    Linux kernal is running on AM3356.

    Our requirement is to use the UART ports of AM3356 for both RS232/485 operation.

    and the switching needs to be done as per the customer input under runtime.

    We are not sure on how to configure the mode of this pin on the pinmux configuration to either as GPIO or as dedicated RTS.
    If we use it as GPIO, RTS functionality will not be available in RS232 mode.
    If we use it as RTS, direction control functionality will not be available in RS485 mode.

    Please provide some clarity into this.

    If you have any sample code or reference on how to configure this RTS pin for both the functionality of UART, it will be very much helpfull.

    ---

    Thanks & Regards,

    Akshay V

  • Hi,
    Is there any solution to this query..?

  • Hello Akshay,

    Apologies for the delayed response, I lost your thread for a couple weeks. Reassigning to the Linux UART owner. Please ping the thread if you don't have another reply by the end of the week.

    Regards,

    Nick

  • Hi Akshay,

    Yes, it is possible to choose between RS232 and RS485 mode at runtime. Please see the following program to understand how to select the mode when initialize the UART port in your user space program.

    https://github.com/cbrake/linux-serial-test

    Please set the pinmux of the RTS pin in RTS mode, not GPIO mode. The kernel UART driver knows how to control the RTS pin for RS232 hw flow control or RS485 direction control.