2025-07-07 1:51 AM
Hello,
I am currently using the STM32L496 microcontroller in a product design. In this design, I use PC1 as an output to control the EN (enable) pin of a TPS78228 LDO. I'm encountering an issue where the LDO exhibits unexpected behavior when EN is driven low by the STM32.
Setup Details:
A 4.7 µF capacitor is connected to VOUT, as recommended.
I’ve attached two scope captures showing two different behaviors. In both:
In Figure 1 STM32 is not in use and I manually drive the enable pin to the GND and to VCC interchangeably. As expected, VOUT drops to 0 V when VEN goes low.
In Figure 2, The STM32 is powered on, and PC1 is initially configured low. VEN is low, but VOUT rises to 1.8 V, even though it should be off. When STM32 drives PC1 high, VOUT rises to 2.8 V as expected. When STM32 drives PC1 low again, VOUT only drops to 1.8 V, not 0 V. When the STM32 is powered off, VOUT gradually drops to 0 V.
Questions:
Is there any known STM32 GPIO behavior (e.g., leakage current, startup configuration, low-power modes) that could prevent PC1 from sinking enough current?
Solved! Go to Solution.
2025-07-08 2:48 AM
I just wanted to thank everyone for their helpful suggestions! They really guided me in the right direction and helped me understand the root cause of my issue.
I ended up driving all STM32 signals related to the radio chip low, and that gave me exactly the result I was hoping for — the output voltage dropped to 0V as expected.
Thanks again for your support!
2025-07-07 3:49 AM - edited 2025-07-07 5:10 AM
Hello @Knanou and welcome to the community,
Why is there a 470kΩ pull-down resistor between PC1 and the EN pin?
Do you have a common GND between STM32 and the LDOr? please check.
2025-07-07 5:01 AM
Hello @mƎALLEm and thank you for your reply!
The pull-down resistor is placed in parallel from PC1 to GND.
Also I've checked and there is a common GND for STM32 and the TPS78228 LDO.
2025-07-07 5:12 AM
@Knanou wrote:
Hello @mƎALLEm and thank you for your reply!
The pull-down resistor is placed in parallel from PC1 to GND.
I know but why? and why this value of 470k?
Did you test the GPIO PC1 without load (disconnect your LDO)? you set/reset the pin and check the voltage level with an oscilloscope?
2025-07-07 7:31 PM - edited 2025-07-07 9:48 PM
Blue is EN/PC1? And yellow is VOUT from the LDO?
You say PC1 isn't being driving to 0V but it looks 0 V to me. Am I missing something?
If PC1/EN is low, it doesn't matter what is driving it or how. It's low.
If you get different behavior on the output with EN low with STM32 attached vs not, it's not due to how EN is being driven.
Show the full schematic. You're missing something else in there.
2025-07-08 12:51 AM
Thank you @TDK and @mƎALLEm for your insightful comments and replies!
After removing the LDO, as per your recommendation, I measured again the output voltage where i previously measured it and it still read 1.8V (I've attached a picture).
It is worth noting that this output of the LDO is passed as input to a radio chip, which has many inputs and outputs connected to the STM32.
I am now thinking of driving all of these shared signals low, and measuring again the voltage where the LDO output was previously.
2025-07-08 2:48 AM
I just wanted to thank everyone for their helpful suggestions! They really guided me in the right direction and helped me understand the root cause of my issue.
I ended up driving all STM32 signals related to the radio chip low, and that gave me exactly the result I was hoping for — the output voltage dropped to 0V as expected.
Thanks again for your support!
2025-07-08 2:56 AM
Thanks for reporting back - now please mark that as the solution.
This shows how important it is that you provide the full schematic of your system!
2025-07-08 7:48 AM
Sounds like the board was being backpowered.