cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Unused pins

isaac
Associate II
Posted on May 12, 2015 at 01:06

Is there any clear recommendation from STM how should the firmware configure unused untied GPIOs? In past STM32F1 controllers we used to configure them as output '0' in order to avoid noise (our environment is very noisy) but is there a need for this with the new STM32F4 family?

#unused-pins-stm32f4
2 REPLIES 2
Posted on May 12, 2015 at 08:54

Is F4 any different from F1 in this regard? Most of the pins are set to input by default after reset.

JW
Danish1
Lead II
Posted on May 12, 2015 at 10:55

I don't expect noise to have been the real issue.

As I understand things (and anyone please correct me if I'm wrong) a CMOS digital input pin that is left unconnected can float to any voltage - restricted only by ESD-protection diodes.

All the time the voltage on such a pin is definitely logic-1 or definitely logic-0, the first stage of the digital input circuitry, which is an inverter*, draws very little power from the power-supply. But if the voltage is somewhere between logic-1 and logic-0, then both top and bottom transistors are partly turned on and some current is drawn from the power-supply.

To prevent this wasteful current, either the pins should be kept at logic-1 or logic-0 (either as digital outputs or with weak pull-up/down) or the digital input should be disabled by programming the pin to be analog.

*A Schmitt-trigger also suffers from this ''Class-A'' current. 

I agree this apples to stm32f4 just as much as stm32f1.

 - Danish