I have a 3.3 V microcontroller pin (not 5 V tolerant) with an external 10 kΩ pull-up resistor. By mistake, the external pull-up resistor was connected to 5 V. As I understand it, the only thing that protects the pin from burning is its protection diode.
If the pin is declared as input, the current path will be 5 V -> pull-up resistor -> pin -> protection diode -> 3.3 V and on the MCU pin there will be 3.3 V + Vdiode.
What is the current path when the pin is declared as a push-pull output and the output level is set to high? What is the voltage level on the microcontroller pin? What is the voltage level when the pin is set to low?
Microcontroller is STM32F103C6T6, and pin is PB5