2026-05-13 7:11 AM
I am new to using the STM32H563, 64 pin package and am trying to implement Dallas 1 wire protocol with a UART.
Initially I was going to use transmit and receive with diode back into Tx, but I saw example using the Half duplex mode of the UART and thought I would give that a go.
However, whenever I change the USART1 pin to open drain (Pin 59 of 64 pin package), the line which is pulled up by a 4k7 resistor drops to about 200mV. If I try to transmit with the UART, I can see the Open drain pulling from 200mV down to ground as the data goes through. If I place another 4k7 pullup in parallel, the voltage increases to 400mV.
If I make the pin an input, the voltage goes up to 3.3V as expected.
If I make the pin full duplex standard USART1 TX with PP pin, the voltage goes to 3.3V.
I have removed all other components so it is just the processor pin itself, setting Open Drain just fails to give me a proper open drain, it seems to have something else loading the line.
Both pullup and pulldown resistors are disabled.
The initialisation for the port is from MX cube.
Is there a known issue with Open Drain on this version of processor?
If not, how should I initialise the port to get a real Open Drain output where the 4k7 pulls up to 3.3V.
Neither MX Cube or Claude seem to know?
2026-05-13 7:16 AM - edited 2026-05-13 8:02 AM
Hello @Andini and welcome to the ST community,
Forget about USART for the moment. If you use that pin as normal GPIO in output open drain, do you have the same behavior?