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.

Input Mode:

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.

45 views0 comments

Recent Posts

See All

DC Motors are widely used in embedded systems. This tutorial explains driving a DC motor using ARM-7 Architecture based LPC2148 Microcontroller. DC motors are available in different ratings. Selection

LPC 2148 is a 32 - bit ARM-7 microcontroller, manufactured by Philips. It has two I/O ports for interfacing different devices. In this tutorial interfacing of LED is explained. An LED can be interface