cancel
Showing results for 
Search instead for 
Did you mean: 

Receive issue with USART and RS-485 transceiver

element
Associate II
Posted on July 21, 2016 at 21:47

We have a custom board with an STM32F107 processor which we have interfaced with a MAX14840 RS-485 transceiver.

When interfacing with this using a USB to RS-485 interface on a PC, the STM32 -> PC (transmit) direction works fine, but the PC -> STM32 (receive) does not.  The UART3 interrupt occurs, but the read character is wrong.  It appears that the USB to RS-485 interface has a rather short start bit, which is not being recognized by the STM32 USART peripheral and therefore causes the data byte to be shifted off (first least significant 0 bit in the data gets interpreted as the start bit).

Is there any way to shorten the requirement of the STM32 USART3 interface in regards to start bit detection?  I have captured the traffic on a scope and it shows the analog signals for the differential pair and the resulting logic level from the transceiver.  The start bit is less than 1/2 of a cycle at 115200 BAUD (measures ~240KHz).

I have connected up two of our custom boards to each other and the transmit and receive works fine, so it is particularly with the USB to RS-485 interface that this problem occurs.

Thanks for any thoughts on resolving this issue.

Best regards,

Element Green

#usart-rs485-stm32-serial
1 REPLY 1
Posted on July 21, 2016 at 21:56

Could you source an USB to RS-485 interface that works properly? Do you need to change the way it enables the transceiver?

The STM32 isn't going to provide you with much in the way of options to change how it behaves. You're alternative would be to implement a Soft-UART

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..