No announcement yet.

RS485 with STM32

  • Time
  • Show
Clear All
new posts

  • RS485 with STM32

    Hello everyone,

    Please to configure RS485 bus witht stm32 using the stm32CubeIDE. I need the RS485 to communicate with some devices in my project (PC,senseros..) . Really it's my first time with RS485 and i don't know how to do it.
    Can someone helps me? who knows a library that i can downlood it or something ilke this...,?

  • #2
    I do not know how your board is connected and what is connected to your board, but I would start to use it as a standard UART and maybe tweak some settings (if there is some special support for RS485 in the registers or if you need a special way to control for example direction of the transceiver)


    • #3
      Thank you Robert, the board is conncted to a pc and 2 driver motor via the RS485 bus. The problem is that i don't know how to configure and programming RS485 with stm32IDE. So, i need a document tutorial... to know how exactelly start this task


      • #4
        First important question: are you using RS485 or RS422. RS485 is a two wire half duplex bus (D+ & D-). RS422 can be 4 wire and full duplex (Tx+, Tx-, Rx+ & Rx-). RS422 often allows the Tx and Rx be combined and so create RS485.
        RS422 is either point-to-point or one master to multiple slaves. RS485 is a bus, so all units can communicate with each other.
        RS485 being half duplex, needs a Drive Enable pin on the transceiver, although almost all RS422 drivers have this too.
        How many sensors? There is also a drive capability (or more a load question). Common values are 32 and 128 nodes.
        For the rest, both of them are simple UART.


        • #5
          Hello qdrives,it's RS485 half duplex bus (D+,D-). I use this tranciever SN65HVD3082EDGK.


          • #6
            You may need to know the protocol how to communicate with driver of your motors. Then try to send some commands through UART.


            • #7
              try this search: