MAX485 wrong data output

rs485serialuart

I want to convert USART signals to RS485 with the circuit below:
enter image description here

I log the data on the USART6_TX and 485A/485B at the same time, but the data on the output pins of the MAX485 is wrong and it's not similar to data on USART6_TX.
the DE/RE pin of the IC is connected to the GPIO pin of the microcontroller. the microcontroller pulls up the pin while transferring data.

I transmit the data every 3seconds. the picture below is captured from USART6_TX pin and this is the data I expect to see on RS485:
(this is in HEX mode)

enter image description here

but I get this on MAX485 output:

enter image description here

  • I use USBtoRS485 converter to log the rs485 data.
  • I've tried some MAX485 ICs to make sure the reason is not the IC itself.
  • my microcontroller is STMH750
  • I use buadrate 9600bps , no parity, 8 data bits, 1 stop bit
  • the output of RS485 stops to work on buadrate 1200bps.

Would you please give me some solutions to find the reason and solve it?

Best Answer

TX and RX is swapped and the floating input receives noise.