I am trying to determine best practice for pin mappings in the device.h file for STM32F4 target. ST has AN4365 , where they provide suggestions for power modes, and when it comes to the pins, they state the following below.
“By default, STM32F4 pins are configured as inputs, except some JTAG pins which can impact the power consumption of the device in different power modes because pins are very sensitive to external noise in input mode I/O.
To avoid extra I/O current, all pins should be configured as analog input (AIN); in this mode the Schmitt trigger input is disabled, providing zero consumption for each I/O pin. We recommend that the I/O speed frequency (driving level) be configured at the lowest possible speed or as an output push-pull configuration, outputting 0 to the ODR. The user should also disable the MCO pin of the clock output if not used.”
Do the pin mapping initializations in the device.h files using Default() or NO_INIT() do any of the suggested defaults? If not, is there an option to do so?