How to configure:
Normal GPIO Input: Configure the PIN as required for float input, with weak pull-up input, or with weak pull-down input, and do not enable all multiplexed function modules that can correspond to the pin
Normal GPIO output: Configure the PIN as required for push-pull output or open-drain output, and do not enable all multiplexed function modules that can correspond to the pin
Normal analog input: Configure the PIN to be analog input mode, and do not enable all the multiplexed function modules that the pin corresponds to
Input of the built-in peripherals: Configure the PIN as required to float the input, with a weak pull-up input or with a weak pull-down input, while enabling the pin corresponding to a function module
The output of the built-in peripherals: Configure the PIN as needed for multiplexed push-pull output or multiplexed open-drain outputs, while enabling all multiplexed function modules that can correspond to the pin
If there are multiple reusable function modules that correspond to the same pin, only one of them can be
Multiplexing Feature configuration:
For multiplexed function input, the port can be configured as any input mode or multiplexed function output mode
For multiplexed function outputs, the port must be configured as a multiplexed function output
For bidirectional multiplexing, the port must be configured to function as a multiplexed output
Precautions:
All IO ports have external interrupt capability and ports must be configured in input mode to use external interrupt function
The IO port is in the input float state after STM32 reset
When the JTAG pin is reset, it is in the pull-up or pull-down state
"STM" Gpio pin configuration method