AN4612
4.9
GPIO
The STM32L4 Series GPIO peripheral embeds identical features compared to STM32L1
Series.
Minor adaptation of the code written for the STM32L1 Series using the GPIO may be
required in STM32L4 Series due to:
•
Mapping of particular function on different GPIOs (see pinout difference in
Hardware
•
Alternate function selection differences (AFSELy[3:0] in registers GPIOx_AFRL and
GPIOx_AFRH)
Below are the main GPIO features:
•
GPIO mapped on AHB bus for better performance
•
I/O pin multiplexer and mapping: pins are connected to on-chip peripherals/modules
through a multiplexer that allows only one peripheral alternate function (AF) connected
to an I/O pin at a time. In this way, there cannot be any conflict between peripherals
sharing the same I/O pin.
•
More possibilities and features for I/O configuration
For more information about STM32L4 Series GPIO programming and usage, please refer to
the "I/O pin multiplexer and mapping" subsection in the GPIO section of the STM32L4
reference manuals and to the product datasheets for detailed description of the pinout and
alternate function mapping.
4.10
EXTI source selection
The external interrupt/event controller (EXTI) is very similar on both STM32L1 and
STM32L4 Series. The table below shows the main differences.
Table 18. EXTI differences between STM32L1 Series and STM32L4 Series
EXTI
Nb of event/interrupt lines
Configuration
Color key:
= Same feature, but specification change or enhancement
migration)
STM32L1 Series
Up to 24 lines
-
DocID027094 Rev 3
Peripheral migration
STM32L4 Series
Up to 40 lines
14 direct, 26 configurable on Cat. 2
devices
12 direct, 25 configurable on Cat. 4
devices
The selection of EXTI line source is
performed through EXTIx bits in
SYSCFG_EXTICRx registers (in
STM32L1 and STM32L4 Series).
However, the mapping of the EXTICRx
registers has been changed.
Section 2:
39/58
57
Need help?
Do you have a question about the STM32L1 Series and is the answer not in the manual?