2023-09-15 05:51 PM
Hello,
I will make some probes for reading electrical values (AC, Analog, digital,...), but I'm not sure what happens if I insert a signal to a GPIO when MCU is powered off.
I read time ago that all GPIOs are in high impedance state when MCU is not powered but I don't see this information in datasheets. It's the most logical, but I need to be sure for the safety of MCUs.
The MCUs that I will use are
STM32F446 (Nucleo board)
STM32G030 (Homemade boards)
STM32F103 (Blue Pill)
Thanks
Solved! Go to Solution.
2023-09-15 08:49 PM
If uCPU power is off, than no lines with voltage should be connected to inputs. Exception is only for high impedance signal sources, or you can intentionaly insert resistors in series with inputs. Injection current specified in the DS, usualy < 1mA, but better option would be optoisolation, there are analog galvanic isolation IC as well as digital
2023-09-15 06:31 PM
They're mostly in high impedance mode, but the protection diodes are still present.
Look at the "Voltage characteristics" table in the relevant datasheets. Generally an input voltage of 3.3V is fine. More than that can be problematic. Depends on the exact pins you're using.
Also look at the GPIO port structure in the reference manual for understanding.
2023-09-15 08:49 PM
If uCPU power is off, than no lines with voltage should be connected to inputs. Exception is only for high impedance signal sources, or you can intentionaly insert resistors in series with inputs. Injection current specified in the DS, usualy < 1mA, but better option would be optoisolation, there are analog galvanic isolation IC as well as digital
2023-09-16 03:08 AM
Thanks for your answer.
I see in the GPIO schematic that when VDD=0, The MCU will be powered from GPIO pin thru the protection diode (yellow) and this is a big problem.
2023-09-16 03:20 AM
Thanks for your answer
For analog inputs, I will reduce the maximum current to less than 1 mA, avoiding loss of accuracy in galvanic isolation.
For digital inputs, I will use optocouplers.
2023-09-16 07:20 AM
> If uCPU power is off, than no lines with voltage should be connected to inputs.
Not going to argue here, but this statement isn't supported by the datasheet, nor is it supported by posts from ST:
2023-09-16 09:04 AM
Datasheet is misleading about TT pins:
Input voltage on TT_xx pins | VSS-0.3 | 4.0V
shoid be:
Input voltage on TT_xx pins | VSS-0.3 | Vdd+0.3V
The same time my comments is not correct regarding FT pins, tested on my H743 - no current at 4V w/o Vdd. Seems, it's safe to keep them with external voltage applayed during power off.
2023-09-17 05:45 PM
I tested now a STM32G030 and a STM32F103 using a multimeter on diode test position.
All GPIO of STM32G030 are FT and I don't find the protection diode from any pin to VDD. Obvious, if this diode were present, will be impossible to input a voltage >VDD+0.6V. The protection diode from input to GND is detected in all pins, but is not important for me.
STM32F103 has FT and TT GPIOs, and the protection diode from GPIO to VDD is present on TT pins.
I have tested on a STM32F103 that I suspect is fake, and the protection diode is present on ALL GPIOs. This don't has any FT pin.
In conclusion, I think that I can use any FT pin. However I will do more tests.
2023-09-17 06:35 PM
> Obvious, if this diode were present, will be impossible to input a voltage >VDD+0.6V.
It's certainly possible if the protection diode for FT pins is a 4 V zener, which the evidence strongly suggests.
2023-09-18 09:11 AM - edited 2023-09-18 01:30 PM
Yes, it looks like a zener diode in series with a rectifier diode to avoid the forward polarization current of the zener diode.