cancel
Showing results for 
Search instead for 
Did you mean: 

Can FT (five volts tolerance) pin take 4.2V in Open Drain Output mode, No pullup, No pulldown?

David_
Senior

How STM32WLE5JC pin PAD circuit works in mixed 3 volts Vdd and 4.2 volts for Open Drain Output pin

Would like to switch medium power LED that takes 45mA and supplied directly by 4.2 volts Li ion cell. LDO, MCP1700, drops cell voltage from 4.2 to 3V to feed MCU four power pins.

Use 3 port pins and each sink 15mA.  Configure pin as Open Drain, disable pull up.  Disable pull down.  Use PA4, PA5 and PA6 that have I/O structure type FT.   Is it correct that PA4, PA5 and PA6 can take 3 + 3.9 = 6.9 volts and it is OK in this circuit that put 4.2 volts on IO pin when LED is off?  TIA

WHITE_25mA_LED.jpg

 

FT_PIN.jpg

 

NOTE_4_5.jpg

 

FT_PIN_PA4_to_6.jpg

 

FT_IO_STRUCTURE.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

If you want to drive an LED, you have to operate the GPIO in the Output mode, which in your case you are doing correctly with Open Drain and no Pull Up/Down. However, in Table 22 you are referring to the limit values of the GPIO when it is in input mode. The FT note in Table 19 also refers to input, not output.

The simplest and possibly cheaper solution than three resistors is an additional transistor between the GPIO and the LED. If this is a logic level MOSFET, you do not need a gate resistor as with npn BJT, but you should insert a pull-down from the gate to GND so that the gate is definitely deactivated even when the STM32 is switched off.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Peter BENSCH
ST Employee

If you want to drive an LED, you have to operate the GPIO in the Output mode, which in your case you are doing correctly with Open Drain and no Pull Up/Down. However, in Table 22 you are referring to the limit values of the GPIO when it is in input mode. The FT note in Table 19 also refers to input, not output.

The simplest and possibly cheaper solution than three resistors is an additional transistor between the GPIO and the LED. If this is a logic level MOSFET, you do not need a gate resistor as with npn BJT, but you should insert a pull-down from the gate to GND so that the gate is definitely deactivated even when the STM32 is switched off.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Uwe Bonnes
Principal III

As there is voltage drop on the LED even at lowest currents, even with VBAT=4.2 you can expect the voltage at P(0|1|2) to be several 100 mV lower. This can save your *ss in some situations...


@Peter BENSCH wrote:

If this is a logic level MOSFET, you do not need a gate resistor as with npn BJT,


Some BJTs are available with resistors built in; eg,

https://www.rohm.com/products/transistors/digital-transistors/standard/dtc124eu3-product

https://www.rohm.com/products/transistors/digital-transistors/standard/dta124eu3-product

Some call these "digital transistors" or similar.

 


@Peter BENSCH wrote:

If you want to drive an LED, you have to operate the GPIO in the Output mode, which in your case you are doing correctly with Open Drain and no Pull Up/Down. However, in Table 22 you are referring to the limit values of the GPIO when it is in input mode. The FT note in Table 19 also refers to input, not output.


Just thinking on that, so would it be possible to switch between Output mode to light the LED, and input mode when the LED needs to be off ... ?

:thinking_face:

Peter BENSCH
ST Employee

 @Andrew Neil Theoretically, this should be possible. However, modern LEDs light up only weakly, but recognisably, even at the lowest currents in the range of a few microamperes. Real switching off is probably only possible with a dedicated driver such as an external transistor.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.