21#ifndef PERIPH_CPU_COMMON_H
22#define PERIPH_CPU_COMMON_H
35#define STM32_BOOTLOADER_ADDR
43#define CPUID_LEN (12U)
49#define CPUID_ADDR (UID_BASE)
55#if defined(CPU_FAM_STM32F0) || defined (CPU_FAM_STM32F1) || \
56 defined(CPU_FAM_STM32F3)
57#define CLOCK_LSI (40000U)
58#elif defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32L1)
59#define CLOCK_LSI (37000U)
60#elif defined(CPU_FAM_STM32F2) || defined(CPU_FAM_STM32F4) || \
61 defined(CPU_FAM_STM32F7) || defined(CPU_FAM_STM32L4) || \
62 defined(CPU_FAM_STM32WB) || defined(CPU_FAM_STM32G4) || \
63 defined(CPU_FAM_STM32G0) || defined(CPU_FAM_STM32L5) || \
64 defined(CPU_FAM_STM32U5) || defined(CPU_FAM_STM32MP1) || \
65 defined(CPU_FAM_STM32WL) || defined(CPU_FAM_STM32C0)
66#define CLOCK_LSI (32000U)
68#error "error: LSI clock speed not defined for your target CPU"
77#if defined(CPU_FAM_STM32WL) || defined(CPU_FAM_STM32U5)
80#if defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32WB) || \
81 defined(CPU_FAM_STM32G4) || defined(CPU_FAM_STM32G0) || \
82 defined(CPU_FAM_STM32L5) || defined(CPU_FAM_STM32U5) || \
83 defined(CPU_FAM_STM32WL) || defined(CPU_FAM_STM32C0)
86#if defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32G0) || \
87 defined(CPU_FAM_STM32C0)
90#elif defined(CPU_FAM_STM32L1) || defined(CPU_FAM_STM32F1) || \
91 defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3)
93#elif defined(CPU_FAM_STM32F2) || defined(CPU_FAM_STM32F4) || \
94 defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32F7) || \
95 defined(CPU_FAM_STM32WB) || defined(CPU_FAM_STM32G4) || \
96 defined(CPU_FAM_STM32L5) || defined(CPU_FAM_STM32U5) || \
97 defined(CPU_FAM_STM32WL)
100#if defined(CPU_FAM_STM32U5)
104#elif defined(CPU_FAM_STM32MP1)
109#warning "unsupported stm32XX family"
111#if defined(CPU_FAM_STM32WB) || defined(CPU_FAM_STM32MP1)
@ AHB
Advanced High-performance Bus.
uint32_t periph_apb_clk(bus_t bus)
Get the actual bus clock frequency for the APB buses.
void periph_lpclk_en(bus_t bus, uint32_t mask)
Enable the given peripheral clock in low power mode.
void periph_clk_en(bus_t bus, uint32_t mask)
Enable the given peripheral clock.
void periph_clk_dis(bus_t bus, uint32_t mask)
Disable the given peripheral clock.
uint32_t periph_timer_clk(bus_t bus)
Get the actual timer clock frequency.
void periph_lpclk_dis(bus_t bus, uint32_t mask)
Disable the given peripheral clock in low power mode.
bus_t
CPU specific LSI clock speed.