cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723 RS-485

Grozea.Ion
Associate II

Hi,

I am trying to create a reliable communication in a noisy environment using RS-485 between 2 STM32 boards, one with STM32F302 that is receiving data from several sensors, performs some calculations and then send the data to a STM32H723 Board.

 

On both MCU I have set the UART in RS-485 mode. The Rx, Tx, De are connected to a TXS0104E level shifter and then to ST485EBDR Transceiver.

 

In the initialization code (for both boards) of the UART the DE pin is also initialized, however I was not able to find where the pin is set high or low to transmitting or receiving.

 

Did I missed anything, or I have to manually set the pin state when transmitting or receiving?

 

Thank you.

 

2 REPLIES 2
Grozea.Ion
Associate II

To answer my own question - the DE pin state is automatically  set.

Grozea.Ion
Associate II

I have bought a logic analyzer from SparFun and tried to debug the fact that I am not receiving the proper data in my UART buffer.

At the input of ST485E I am getting the proper array of bytes but on the RO pin (connected to UART8 Rx) I am missing  one byte

GrozeaIon_0-1729445709633.png

In my case the data sent by a different board starts with < and ends with >, in the attached image you can see that on the input (A, B terminals) I am getting the proper data but on the output (RO, DI terminals or UART8 Rx Tx) I am missing one byte and the first 2 bytes are different comparing with the input.

Any idea why this is happening and how to solve this?