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.

AM3352 RS485 (Custom Driver)

Other Parts Discussed in Thread: AM3352

Hello Everyone,

I'm using a custom board with AM3352 processor and have 2 UARTs that are required for my application. UART0 is setup as default for console and debug purposes. UART1 is required to be a RS485 interface with custom hardware connected on this bus.

I would like to write a device driver that builds on top of the existing omap-serial.c driver for the UART to handle the custom hardware. To do this, I'd like to take the approach that other drivers have taken with I2C (eg: SHT21), where they use the built-in functions to send and receive data over a given i2c bus.

How can I do this for a UART and also set it up as a RS485 port? Is there any documentation that I can read or examples that I can use to understand the setup procedure.

Any help is much appreciated.

Thank you

Regards

Santhosh

  • Hi Santhosh,

    There are several threads regarding RS-485 drivers for the AM335X on this forum. You can search for them using the "Search Community" window on top right of the forum page.

  • Hello Biser,

    I've searched through the forum, and still not clear on how to approach the issue. I'm aware of how to use RS485 - used it several times with other processors. May be I need to add some additional information to my original question.

    0. I'm using SDK 06.00.00.00, so I don't have access to device trees.

    1. How do I setup a given UART as an RS485 port, how do I specify a gpio to used as Transmit Enable.

    2. I'd like to set this up in a kernel driver, so that the user space program talks to the kernel driver which translates the user data into data the hardware understands and sends it over RS485.

    3. The hardware connected to the RS485 interface runs at 9600 baud rate. How do I set up the UART to run at that baud rate in the kernel driver.

    4. Is this a viable option or do I have to write a user space driver?

    I was not able to find out these details in the forum - may be I didn't look close enough. Can you point me to the threads that deal with these questions.

    Thank you

    Regards

    Santhosh