UART RS485 how to manage half-duplex
Hello,
I implement RS-485 on STM32G491. I receive with ReceiveToIdle_DMA and I also transmit with DMA. I need to know if currently something is being received because that means I cannot send data now because RS485 is half-duplex. As far as I know I cannot use IDLE flag as it clears after interrupt and I need to know if RX line is now IDLE or now I am receiving data.
In sumarry - what condition should I check before sending data and changing DE state of the transceiver to make sure RX is silent now.
Looking forward to your replies!
