4 years, 8 months ago.

Serial Communication using Max485 - how to implement TXEnable (DE/RE) pin?

Hi,

We're moving a large codebase to mbed and one of our core needs is the use of RS485 chips for communication (typical MAX485 design).

I have looked around but it is unclear how one can implement the TXEnable (DE/RE) pin toggle. I was unable to find a definitive guide/advice.

It is obvious we need to attach to TXC interrupt but in the past we've ran into Race Conditions with this (where the TXC fires while we're adding more data to the buffer for transmission).

We're using STM32-F446RE (I know the STM32-Gxxx now implement a direct pin to perform this but those are fairly recent and we're staying away from them).

Can someone please provide clear guidance on how to implement/handle the driving of the TXEnable (DE/RE) pin?

Thank you Pedro

Be the first to answer this question.