cancel
Showing results for 
Search instead for 
Did you mean: 

MCSDK 5.y serial communication RS-485?

Asantos
Senior

Hi,

My custom board has an STM32G474RE with an RS-485 port that I would like to use to communicate with the Motor Pilot software. Is it possible? I tried to use the STM32CubeMX to activate the UART5 hardware flow control (DE) but the connection failed.

4 REPLIES 4
cedric H
ST Employee

Hello,

Could you describe the RS-485 transceiver do you use ?

The new Motor control protocol provided from the 5.Y release makes use of UART full duplex capabilities.

Regards

Cedric

Asantos
Senior

Hi. Cedric

I use the SN65HVD08. Its a generic RS-485 transceiver. I'm sure that is working.

I found that the protocol used by the Motor Pilot software was synchronous. The Motor Pilot sends a command to the Microcontroller and waits for a response. In this case, it shouldn't make any difference to use UART full-duplex (RS-232) or RS-485. As the MC Workbench does not allow configuring the UART with hardware flow control, I opened the code generated in the STM32CubeMX and modified the UART configuration, generated the code again, but the connection failed.

cedric H
ST Employee

Hello,

The protocol used by the Motor Pilot is synchronous if you do not use the data log capabilities, accessible through the "Async config" tab.

Datalog are not mandatory to control the motor, it allows you to dump data produced at PWM frequency like current measured, like an oscilloscope.

So, without Datalog, your transceiver should be OK.

Would you be able to do an oscilloscope screenshot of DE,RE,D and R signals ?

Regards

Cedric

TOMTANG0329
Associate

HI

Asantos

Did you succeed with rs485?? i am facing the same issue