How to internally pullup TX line when using HardwareSerial + HalfDuplex?
Posted: Wed Aug 09, 2023 7:52 am
Dear all,
I am utilizing a board based on the Blue Pill board for my project, aiming to establish half-duplex communication with UART-controlled servo motors. To achieve this, I am leveraging the HardwareSerial API.
However, I've encountered an issue: while sending commands to the servos using HardwareSerial configured in full-duplex mode yields the expected responses, the servos do not respond as anticipated when I switch to half-duplex mode.
Upon investigation, I've noticed that upon entering half-duplex mode, the TX line of my UART port is no longer held HIGH; instead, it appears to transition to a high-impedance state when idle. Consequently, while the command is still being sent, the motors fail to respond due to their anticipation of the line being HIGH during idle periods.
My query is this: how can I ensure that the TX line of the half-duplex mode remains HIGH by default?
Best regards,
I am utilizing a board based on the Blue Pill board for my project, aiming to establish half-duplex communication with UART-controlled servo motors. To achieve this, I am leveraging the HardwareSerial API.
However, I've encountered an issue: while sending commands to the servos using HardwareSerial configured in full-duplex mode yields the expected responses, the servos do not respond as anticipated when I switch to half-duplex mode.
Upon investigation, I've noticed that upon entering half-duplex mode, the TX line of my UART port is no longer held HIGH; instead, it appears to transition to a high-impedance state when idle. Consequently, while the command is still being sent, the motors fail to respond due to their anticipation of the line being HIGH during idle periods.
My query is this: how can I ensure that the TX line of the half-duplex mode remains HIGH by default?
Best regards,