Skip to main content
Associate III
April 23, 2024
Solved

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

  • April 23, 2024
  • 3 replies
  • 2335 views

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

This topic has been closed for replies.
Best answer by Peter BENSCH

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

3 replies

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
April 28, 2024

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.
Andrew Neil
Super User
April 29, 2024

@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.

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Uwe Bonnes
Chief
April 29, 2024

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
ST Technical Moderator
April 29, 2024

 @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.