Skip to main content
Graduate
May 31, 2024
Solved

More information on UART half-duplex single-wire peripheral and functions

  • May 31, 2024
  • 1 reply
  • 3574 views

Hello. I have few questions on UART half-duplex single-wire peripheral. I'm using stm32f303k8.

  1. In RM it states that TX and RX are internaly connected and TX is low (or whatever "released" can mean) when it's not transmitting. This means that when no transmission occurs, since TX is in output mode, either open drain or push-pull, it should short the line to ground through the internall connection and "released" NMOS transistor. Is that true?
    Zrzut ekranu 2024-05-31 192307.png
  2. I'd like to know more on what HAL_HalfDuplex_EnableTransmitter() and HAL_HalfDuplex_EnableReceiver() do, as it's hard to get under the hood on just the HAL user manual and the code. Do they somehow protect the transmitter by disabling it such that the series resistor (like this person says) is unnecessary? Normal mode change of a GPIO protects its output driver when it is an input, so it is possible.
  3. Wouldn't it be better if I just changed the modes on the fly from input to output somehow if the series resistor is indeed necessary? For ex. making it a normal UART and swapping the pins with SWAP bit? I'd have to disable the UART at that time. I'm working with TMC2209 board v1.3 by BigTreeTech and they put a pull-down(!) resistor at the UART pin. So I'd have a very cool resistor ladder for even cooler fast rise and fall times (sarcasm). I'd prefer not to modify the boards, but if I have to then I will.
    This topic has been closed for replies.
    Best answer by waclawek.jan

    > In RM it states that TX and RX are internaly connected and TX is low (or whatever "released" can mean) when it's not transmitting. This means that when no transmission occurs, since TX is in output mode, either open drain or push-pull, it should short the line to ground through the internall connection and "released" NMOS transistor. Is that true?

    No.

    "Released" means, that Tx is in high impedance.

    The series resistor should be used to prevent damage, would both sides transmit simultaneously, even if in error.

    I can't/won't comment on the pulldown; ask the module's authors.

    JW

    1 reply

    Super User
    June 1, 2024

    > In RM it states that TX and RX are internaly connected and TX is low (or whatever "released" can mean) when it's not transmitting. This means that when no transmission occurs, since TX is in output mode, either open drain or push-pull, it should short the line to ground through the internall connection and "released" NMOS transistor. Is that true?

    No.

    "Released" means, that Tx is in high impedance.

    The series resistor should be used to prevent damage, would both sides transmit simultaneously, even if in error.

    I can't/won't comment on the pulldown; ask the module's authors.

    JW