GPIO Port Configuration of ARM Cortex - M4 CPU Microcontroller - STM32F407
In this tutorial I will explain the different configurations of the GPIO ports of STM32F407 microcontroller. There are total nine 16 -bit GPIO ports , PORT A- PORT I, available in this microcontroller. The port structure in shown in the following figure:
The individual port pins can be configured in the input or output mode. First, lets understand the input mode configurations. In the input mode, the output data path is disconnected, i.e. we can not write data to the port pins.
The following three different input modes are there:
1. Floating Input : This is the default mode or default configuration, by default, all the port pins are configured in this mode. This mode is shown in the following figure:
The pull-up or pull-down resistors are disconnected and the port pin is in the floating state. This is the default configuration of the micrcontroller.
2. Input With Pull-up
In this mode a pull-up is connected to the port pin
In this mode, the pin logic level will be 1 (high) without any input connection.
3. Input With Pull-Down
In this mode, the pin logic level will be zero (Low) without any input connection.
In the next blog, I will explain about the different output configurations.