2020-05-18 07:45 PM
Sectin 6.3.1 of the reference manual says "During and just after reset, the alternate functions are not active and the I/O ports are configured in input floating mode." Floating inputs are bad. Our code will configure all pins appropriately immediately after reset (using code generated by CubeMX). Unused pins will be configured as inputs with pullup or pulldown, or as outputs. However, what about the interval between power on and GPIO configuration? It seems like to be perfectly safe I need to pull every pin that isn't driven by an external source. That comes to about 100 resistors on my board. That's a lot of parts which are mostly needed only for the few milliseconds between power-on and GPIO config code running. Are they really needed?
2020-05-18 08:10 PM
You need to make an assessment about which ones are actually critical to your system, ie enable a motor, value or blades, etc.
Evaluate also the rise time of your supply(s) as these can also cause undesirable behaviour.
With some POR circuits you might expect the reset to be held for 100's of milliseconds.
2020-05-18 08:16 PM
Everything that actually matters to my system is already pulled appropriately. I'm asking about spare pins mostly. Just letting them float could wind up with them half-way between the rails, making the STM32 input circuits unhappy. Not sure how far they would drift in such a short time.
Life would be much simpler if the chip powered up with all pins configured as inputs with _weak_ pull-downs. They would naturally start out low since pin capacitance is initially discharged, and the weak pull-downs would keep them there. Any pins that need to be high for system reasons (such as motor disable, etc) could be pulled high externally. But the bulk of the pins wouldn't need resistors.
2020-05-19 02:05 AM
I have many board with unconnected pins. I did not observe problems when keeping them under reset. If you really care for low current in that situation, look at the parts in the STM32L series, where GPIO is configured as Analog as default. Pins configured as analog are allowed to float without shoot-through current.