Skip to content

RS-485 support #32733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
manoj153 opened this issue Mar 1, 2021 · 9 comments
Closed

RS-485 support #32733

manoj153 opened this issue Mar 1, 2021 · 9 comments
Assignees
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding Stale

Comments

@manoj153
Copy link
Contributor

manoj153 commented Mar 1, 2021

is there a special binding exclusive for RS-485?

I see Linux has support for it.
https://www.kernel.org/doc/html/latest/driver-api/serial/serial-rs485.html

How is this interface being or suppose to handle in zephyr from device tree, read-write API and binding perspective?

@carlescufi carlescufi added the area: Devicetree Binding PR modifies or adds a Device Tree binding label Mar 1, 2021
@mbolivar-nordic
Copy link
Contributor

Hi there. Zephyr doesn't have an equivalent devicetree binding or support as far as I can tell.

@jfischer-no
Copy link
Collaborator

AFAIK we do not have explicit support for this, even though some controllers have RS-485 mode. For MODBUS RTU support I have added optional GPIOs to control RS-485 transceiver.

@manoj153
Copy link
Contributor Author

manoj153 commented Mar 4, 2021

Guys what is the thought if I contribute a generic-rs_485 binding for zephyr.
A lot of industrial devices uses rs_485 and they might not necessarily leverage Modbus. FME, tons of vendor releases custom stream byte protocol. This planned binding should help out?

@jfischer-no
Copy link
Collaborator

Guys what is the thought if I contribute a generic-rs_485 binding for zephyr.
A lot of industrial devices uses rs_485 and they might not necessarily leverage Modbus. FME, tons of vendor releases custom stream byte protocol. This planned binding should help out?

I do not see how that could help currently. What do you want to describe with a generic-rx_485 binding, non-existing RS-485 support for optional feature of an UART controller?

@manoj153
Copy link
Contributor Author

manoj153 commented Mar 22, 2021

May need to set the registers for the SOC to generate the DE signal automatically as an alternative to IO toggling in the code

MODBUS RTU is exclusive to Modbus, and I suspect many users may need a custom one to support non-Modbus compliant devices that use RS-485 bus.

I can think we could have a generic sample as well in this case.

@manoj153
Copy link
Contributor Author

@erwango

@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@CraigBurden
Copy link

@manoj153 I would certainly be interested in that. My product uses a proprietary protocol over RS485 and so I am in the market for a generic driver that I can build on top of.

@jfischer-no I guess it could be an extension to the UART controller since all it would require is an addition to the existing flow control logic.

Any contribution made should be coupled with a refactor of the Modbus RTU implementation to use the new functionality.
I will build this at some stage so if it hasn't been upstreamed by then I will do so

@wniva
Copy link

wniva commented Apr 2, 2024

I would also be interested in such a solution (via UART + GPIO's). I use Nordic nRF52832/nRF52840.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding Stale
Projects
None yet
Development

No branches or pull requests

7 participants