A half-duplex board fails during turnaround. The transmitter reports that the buffer is empty, but its peer flags an error in the last character or the local UART misses the first bit of a reply. Separate DMA delivery of the last byte, the USART's last stop bit, and the transceiver releasing the bus. Different hardware controls those events. A more accurate oscillator affects bit duration but cannot make them coincide.
Calculate how early the driver could release
At 115,200 baud with 8 data bits, no parity and one stop bit, each bit takes about 8.681 µs. A character includes ten bits with start and stop, about 86.81 µs. If the last byte has just reached the shift register when DMA completes, the wire can still need a whole character time. A transmit FIFO can hold more pending bytes. Dropping DE in the DMA callback can remove much of the end of the signal. Bias may hold the undriven bus at the idle state, allowing some all-high ending patterns to appear valid. Include a final byte such as 0x00 in the test.
ST AN3070 treats DMA completion and USART TC as separate events. After DMA completes, use the USART's wire-completion event to decide when to release the transceiver. For a different STM32 with hardware DE, confirm deassertion units, polarity, and settings in its reference manual. For software control, make sure TC belongs to this transaction. A stale flag, data pending after an error, or a callback tied to the wrong interrupt can all make a design appear to wait for completion when it does not. Match each callback to a documented hardware event.
Two failures have opposite causes
Early release can truncate the current message. Late release can block the first reply. Suppose transceiver disable takes at most 0.7 µs and interrupt latency after TC reaches 18 µs. The bus may remain driven for 18.7 µs after the stop bit. If the peer replies after two bit times, at 115,200 baud it starts after 17.36 µs. The budget already falls short by about 1.34 µs before device variation, propagation and receiver enable. Hardware DE or a tighter interrupt latency can recover margin. If the protocol permits more response delay, recalculate using the earliest remote response.
The local receiver may use a separate enable or share a control line. Stopping drive and enabling reception can still be different events. Capture TX, DE or receiver enable, differential bus voltage, and RX. Mark the last stop bit, bus release, and remote first start bit. A complete reply on the bus with missing early bits at RX points to receive enable or UART state. If the peer starts before local drive ends, overlapping drive can appear directly in the waveform. Verify protection and current limits for the actual system.
Check baud timing and application load. An interrupt response that is usually quick can stretch under a high-priority interrupt or critical section. Make the controller busy at the end of transmission and use the shortest supported response delay. Short frames expose the final character. Continuous longer frames expose the relationship between DMA, FIFO and completion flags. Recompute character time for two stop bits or parity. Base turnaround on the relevant hardware event so a constant calibrated at another baud rate cannot carry forward.
Preserve assertion-to-start, last-stop-to-high-impedance, and release-to-first-reply intervals. Document allowed turnaround and final UART dividers together. Check oscillator accuracy against the baud budget and qualify the board with an intact final character and the earliest permitted response.
When the bench controls peer response, sweep the peer's earliest reply separately from delayed local DE release. Retain peer start bit and local DE in both runs to distinguish a narrow receive window from software resetting the UART too early.
