1
\$\begingroup\$

While I play with STM32 a lot on the software side, I still miss a lot of hardware knowledge so I want to confirm my thinking before making a test PCB. I use STM32L4R5 GPIO to control LM3800 power sequencer. GPIO pin is directly connected to LM3880 EN pin (active high). To guarantee that LM3880 is not enabled by a glitch during STM32 power up, I want to put external pull-down resistor to guarantee it is set to low. Of course, once the STM32 is on, I want to enable LM3880 and it will be mostly high all of the time. Now, regarding the value.

  • STM32 datasheet says internal pull-up (I guess this is what i have to look for regarding high state later) is 40kOhm (25-55 min/max)
  • LM3880 datasheet says EN voltage should be over 1.4V max (1V min)

My understanding is that I have to consider the voltage divider that will happen between internal pull up and my external pull down. Choosing 56K resistor, gives me 1.66V to 2.28V at EN pin when I set GPIO pin high (I use 3.3V and the divider min max). Before high is set, pull down will give me the required low on EN.

Is my thinking correct or I miss something?

EDIT: I received excellent comments and understood my wrong thinking about the pull down resistor concept. Reconsidering the full power design, I decided to update the question with the following:

The STM32 has to control two DC/DC convertors. It is easily done by software, but I need external pull down resistors to guarantee both chips are off during STM32 power up (takes a long time due to huge arrays) before it takes control of the GPIO pins. My thinking is:

  • Chip 1, TPS54202, has EN level of 1.2V, powered by 12V, output 5V. Has internal pull up current source of 0.7 uA. Following the previous discussion, 0.7uA would mean (12V - 1.2V) / 0.7 uA or 15.4MOhm equivalent resistance. I would need an external resistor, for example 100K and this will give me around 0.08 V at EN when STM32 is still not initialized. After STM32 is ON, I will use the GPIO pin as open drain and drive it low/high when necessary.

  • Chip 2, LP2985, 12V to 10V LDO, active high, no internal current source. So, I guess it is ok just to put the same pull down resistor 100K just to guarantee the chip is not enabled until STM32 is powered on and takes control of the GPIO.

The low current through resistors should be ok for GPIO to drive them easily.

\$\endgroup\$
1
  • \$\begingroup\$ The pullup resistor is irrelevant when the gpio is set for standard output. The pullup is mainly for input and open drain modes. It might also be disabled during reset. Your external pulldown should be 4k7 or thereabouts. \$\endgroup\$ Commented May 3 at 13:15

2 Answers 2

1
\$\begingroup\$

The STM32 GPIOs initialize in an analog state without pull-up.

However, the LM3880 does have a 7uA current source from VDD on the EN pin (when the EN pin is at 0V). If we assume 7uA remains constant and we want to keep the voltage below 1.0V, then a pulldown of 1.0V/7uA => <142k should do the trick.

Then when you enable the STM32 GPIO at presumably 3.3V, it needs to drive 3.3/142k = 23.2uA.

\$\endgroup\$
3
  • \$\begingroup\$ Minor correction; STM32 GPIOs do not initialize in analog state without pull resistors, but digital floating input without pull resistors. Except for the JTAG/SWD pins which do boot up with pull ups/downs as specified. \$\endgroup\$ Commented May 3 at 17:00
  • \$\begingroup\$ Thank you and @Justme for opening my eyes. I see my understanding was wrong. I do not need to care about STM32 GPIO pin as long as the current is not too high (for the sake of safety let's limit to few mA). I still find the pull up current source tricky. What you calculated above looks like voltage drop on resistor. Should't we consider the level at EN pin to be under 1V? For example, having LM3880 powered by 3.3V, and assuring under 1V would give us 2.3V difference for 7uA current or 328kOhm equivalent resistance. Then, we can form voltage divider with, let's say 50kOhm pull down to be safe? \$\endgroup\$ Commented May 5 at 5:26
  • \$\begingroup\$ The discussion showed me that using LM3880 to control power supplies is not gonna work since I will have the same issue with their EN pins. Best is probably to remove LM3880 and use a few GPIOs to control EN pins of the supplies. I will make another question since it will be off topic here \$\endgroup\$ Commented May 5 at 5:30
1
\$\begingroup\$

The value of external pull-down resistance does not depend on the value of any internal pull resistor of the STM32, because they are not enabled at reset.

Unless you use a pin that is enabled at reset, such as JTAG pins. Until you disable them with lock/fuse/config bits.

What does matter is the internal pull-up of the LM3880.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.