Skip to main content
Associate
May 13, 2026
Solved

STM32H563 Open Drain pulls line to 200mV

  • May 13, 2026
  • 2 replies
  • 200 views

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?

 

Best answer by Andini

Sorry for the delay in getting back.

I changed to input and Open drain and found both now gave me 200mV level.

Tried the same on another pin and got same result, nothing to do with UART mode.

This got me suspicious as to the CRO I was using, it had been recently returned from calibration so should have been spot on but I measured voltage with multimeter and this showed 3.3V. 

I changed to another CRO and voltage now measures correctly and UART is correctly pulling the signal down and my 1 wire code works. 

 

Annoying when you have new PCB, new API and CRO is the problem.

Thank you to all who answered

2 replies

mƎALLEm
Technical Moderator
May 13, 2026

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?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
AndiniAuthor
Associate
May 13, 2026

I will try this and get back with the result.  

MM..1
Chief III
May 13, 2026

Normal open drain is based on ODR register and default is 0. Then enable open drain set pin to logical 0 as you see.

For real "open" you add before switch to open drain set pin to high ...