EasyManuals Logo

ST STM32F102 series User Manual

ST STM32F102 series
690 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #100 background imageLoading...
Page #100 background image
General-purpose and alternate-function I/Os (GPIOs and AFIOs) RM0008
100/690
7.1.3 External interrupt/wakeup lines
All ports have external interrupt capability. To use external interrupt lines, the port must be
configured in input mode. For more information on external interrupts, refer to:
Section 8.2: External interrupt/event controller (EXTI) on page 126 and
Section 8.2.3: Wakeup event management on page 127.
7.1.4 Alternate functions (AF)
It is necessary to program the Port Bit Configuration Register before using a default
alternate function.
For alternate function inputs, the port must be configured in Input mode (floating, pull-
up or pull-down) and the input pin must be driven externally.
Note: It is also possible to emulate the AFI input pin by software by programming the GPIO
controller. In this case, the port should be configured in Alternate Function Output mode.
And obviously, the corresponding port should not be driven externally as it will be driven by
the software using the GPIO controller.
For alternate function outputs, the port must be configured in Alternate Function Output
mode (Push-Pull or Open-Drain).
For bidirectional Alternate Functions, the port bit must be configured in Alternate
Function Output mode (Push-Pull or Open-Drain). In this case the input driver is
configured in input floating mode
If you configure a port bit as Alternate Function Output, this disconnects the output register
and connects the pin to the output signal of an on-chip peripheral.
If software configures a GPIO pin as Alternate Function Output, but peripheral is not
activated, its output is not specified.
7.1.5 Software remapping of I/O alternate functions
To optimize the number of peripheral I/O functions for different device packages, it is
possible to remap some alternate functions to some other pins. This is achieved by
software, by programming the corresponding registers (refer to AFIO registers on page 115.
In that case, the alternate functions are no longer mapped to their original assignations.
7.1.6 GPIO locking mechanism
The locking mechanism allows the IO configuration to be frozen. When the LOCK sequence
has been applied on a port bit, it is no longer possible to modify the value of the port bit until
the next reset.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F102 series and is the answer not in the manual?

ST STM32F102 series Specifications

General IconGeneral
BrandST
ModelSTM32F102 series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals