2

On an embedded system (STM32MP1 w/ Yocto environment) I need to control an rs485 transceiver. Unfortunately, the DE pin of the transceiver is connected to a generic GPIO pin of the MPU and not to the built-in DE/RTS alternate function pin.

That means I need to manually control that pin during transmissions. Of course it's not so easy especially when the remote device answers very fast!

I read some resources about how to use rs485 in Linux, i.e.:

https://www.acmesystems.it/28

https://armbedded.taskit.de/node/322

but I don't understand how to specify which pin should be assigned to the DE function. I also checked the kernel source code here:

https://docs.huihoo.com/doxygen/linux/kernel/3.7/include_2uapi_2linux_2serial_8h_source.html

but still the struct serial_rs485 seems to lack the definition of the DE pin. Perhaps they want to use the RTS signal, but as said I cannot use it. I need to select a specific GPIO.

2
  • 1
    Can you provide more information on the RS485 transceiver? Because that's the piece of hardware the kernel is actually talking to. Jun 30, 2020 at 15:32
  • @EduardoTrápani, it's a common SN65HVD178 transceiver, nothing special. The DE and ~RE pins are connected together to a generic GPIO pin of the MPU (without any related alternate function).
    – Mark
    Jun 30, 2020 at 15:35

0

You must log in to answer this question.

Browse other questions tagged .