STM32F405 GPIO

Thread Starter

chandimajaya85

Joined Sep 27, 2023
41
STM32.jpg

As shown above picture, I got my STM32F405 configured as open drain to drive the led that is connected.Also, the same pin connected to via hex inverted (74HCS04D) to invert it and connected to OR gate. But when the GPIO pin in reset (low) state voltage showing as (2.934V) and set state (high) voltage showing as 3.24V. its not driving down to able for hex inverter to output as 1 when the GPIO pin in reset (low) state. Any help on this. Thank you
 

Papabravo

Joined Feb 24, 2006
22,059
View attachment 309398

As shown above picture, I got my STM32F405 configured as open drain to drive the led that is connected.Also, the same pin connected to via hex inverted (74HCS04D) to invert it and connected to OR gate. But when the GPIO pin in reset (low) state voltage showing as (2.934V) and set state (high) voltage showing as 3.24V. its not driving down to able for hex inverter to output as 1 when the GPIO pin in reset (low) state. Any help on this. Thank you
I believe you need a current limiting resistor so that the GPIO pin can be pulled all the way to ground. You should compute the value of the resistor so that the current into the open drain port does not exceed its capability, and accounts for the forward voltage drop of the LED.
 

Thread Starter

chandimajaya85

Joined Sep 27, 2023
41
I believe you need a current limiting resistor so that the GPIO pin can be pulled all the way to ground. You should compute the value of the resistor so that the current into the open drain port does not exceed its capability, and accounts for the forward voltage drop of the LED.
Thank you for the reply. Is that the reason I am getting 2.934V at the hex inverter input even though it is low (reset) state. So I should use current limiting resistor.
 

MrChips

Joined Oct 2, 2009
34,662
You need to get into the habit of checking datasheets. The STM32F405 can sink/source up to 25mA.
Hence if the LED is passing 25mA, the LED forward voltage is probably around 2V. This puts the output pin at about 5V - 2V = 3V.

BTW, what is your supply voltage on the STM32F405?
Datasheet states 4.0V maximum. Typical VDD is 3.3V.
 

Thread Starter

chandimajaya85

Joined Sep 27, 2023
41
You need to get into the habit of checking datasheets. The STM32F405 can sink/source up to 25mA.
Hence if the LED is passing 25mA, the LED forward voltage is probably around 2V. This puts the output pin at about 5V - 2V = 3V.

BTW, what is your supply voltage on the STM32F405?
Datasheet states 4.0V maximum. Typical VDD is 3.3V.
Thank you for the reply. supply voltage for the STM32F405 is 3.3V
 
Top