STM32

All STM32 families code and definitions. More...

Detailed Description

All STM32 families code and definitions.

This module contains the code and definitions for STM32 cpu families supported by RIOT: F0, F1, F2, F3, F4, F7, G0, G4, L0, L1, L4, L5 and WB.

All constants described below can be configured using CFLAGS from the command line or in the application Makefile.

Clock configuration

All STM32 cpus have clock configuration code and macros. It is recommend to read the reference manual of the CPU of interest to learn about the corresponding clock tree and the possible configurations.

For all families, different input clock sources are available for the SYSCLK system clock (but only one can be used at a time):

Advanced Peripheral Bus (APB) clock prescalers:

These prescalers are used to compute the PCLK1 and PCLK2 clock values. Use CONFIG_CLOCK_APB1_DIV and CONFIG_CLOCK_APB2_DIV constants to configure the prescalers (just set the frequency factor). APB2 is not available on f0 and g0 families so setting CONFIG_CLOCK_APB2_DIV will have no effect on them.

MCO (Microcontroller Clock Output) parameters:

For stm32f[2|4|7], clock outputs can be configured as follows:

Modules

 STM32 CAN controller
 STM32 CAN controller driver (bxCAN)
 
 STM32WL hardware debugging
 
 stm32 USB OTG FS/HS peripheral
 USB interface functions for the stm32 class devices.
 

Files

file  cfg_clock_common_fx_gx_mp1.h
 Base STM32Fx/Gx/MP1 clock configuration.
 
file  cfg_clock_common_lx_wx.h
 Base STM32Lx/Wx clock configuration.
 
file  clk_conf.h
 Main header for STM32 clock configuration.
 
file  cfg_clock_default.h
 Default clock configuration for STM32F0/F1/F3.
 
file  cfg_clock_default.h
 Main header for STM32F2/F4/F7 clock configuration.
 
file  cfg_clock_default_100.h
 Default STM32F4 clock configuration for 100MHz boards.
 
file  cfg_clock_default_120.h
 Default STM32F2/4/7 clock configuration for 120MHz boards.
 
file  cfg_clock_default_180.h
 Default STM32F4 clock configuration for 180MHz boards.
 
file  cfg_clock_default_216.h
 Default STM32F7 clock configuration for 216MHz boards.
 
file  cfg_clock_default_84.h
 Default STM32F4 clock configuration for 84MHz boards.
 
file  cfg_clock_default.h
 Configure STM32G0/G4 clock.
 
file  cfg_clock_default.h
 Default STM32L0/STM32L1 clock configuration.
 
file  cfg_clock_default.h
 Default STM32L4 clock configuration.
 
file  cfg_clock_default.h
 Main header for STM32MP1 clock configuration.
 
file  cpu_conf.h
 Implementation specific CPU configuration options.
 
file  cpu_conf_stm32_common.h
 Shared CPU specific configuration for STM32 family.
 
file  periph_cpu.h
 STM32F0 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32F1 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32F2 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32F3 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32F4 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32F7 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32G0 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM3G4 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32L0 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32L1 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32L4 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32L5 CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32WB CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 STM32WL CPU specific definitions for internal peripheral handling.
 
file  periph_cpu.h
 Shared CPU specific definitions for the STM32 family.
 
file  stmclk.h
 Interface for configuring the clock tree of STM32 CPUs.