| FORUM

FEDEVEL
Platform forum

RS485 with STM32

abdelkarim , 09-21-2021, 01:43 AM
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...,?
robertferanec , 09-23-2021, 07:32 AM
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)
abdelkarim , 09-24-2021, 04:52 AM
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
qdrives , 09-24-2021, 05:51 PM
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.
abdelkarim , 09-27-2021, 01:46 AM
Hello qdrives,it's RS485 half duplex bus (D+,D-). I use this tranciever SN65HVD3082EDGK.
robertferanec , 09-27-2021, 07:07 AM
You may need to know the protocol how to communicate with driver of your motors. Then try to send some commands through UART.
qdrives , 10-05-2021, 07:48 AM
Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?