Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
#include "stm32_common_clocks.h"
Go to the source code of this file.
Macros | |
#define | STM32_SRC_HSE (STM32_SRC_LSI + 1) |
Domain clocks. | |
#define | STM32_SRC_HSI (STM32_SRC_HSE + 1) |
#define | STM32_SRC_MSI (STM32_SRC_HSI + 1) |
#define | STM32_SRC_PLL1 (STM32_SRC_MSI + 1) |
PLL outputs. | |
#define | STM32_SRC_PLL2 (STM32_SRC_PLL1 + 1) |
#define | STM32_SRC_PLL3 (STM32_SRC_PLL2 + 1) |
#define | STM32_SRC_PLL4 (STM32_SRC_PLL3 + 1) |
#define | STM32_SRC_CKPER (STM32_SRC_PLL4 + 1) |
Clock muxes. | |
#define | STM32_SRC_IC1 (STM32_SRC_CKPER + 1) |
#define | STM32_SRC_IC2 (STM32_SRC_IC1 + 1) |
#define | STM32_SRC_IC3 (STM32_SRC_IC2 + 1) |
#define | STM32_SRC_IC4 (STM32_SRC_IC3 + 1) |
#define | STM32_SRC_IC5 (STM32_SRC_IC4 + 1) |
#define | STM32_SRC_IC6 (STM32_SRC_IC5 + 1) |
#define | STM32_SRC_IC7 (STM32_SRC_IC6 + 1) |
#define | STM32_SRC_IC8 (STM32_SRC_IC7 + 1) |
#define | STM32_SRC_IC9 (STM32_SRC_IC8 + 1) |
#define | STM32_SRC_IC10 (STM32_SRC_IC9 + 1) |
#define | STM32_SRC_IC11 (STM32_SRC_IC10 + 1) |
#define | STM32_SRC_IC12 (STM32_SRC_IC11 + 1) |
#define | STM32_SRC_IC13 (STM32_SRC_IC12 + 1) |
#define | STM32_SRC_IC14 (STM32_SRC_IC13 + 1) |
#define | STM32_SRC_IC15 (STM32_SRC_IC14 + 1) |
#define | STM32_SRC_IC16 (STM32_SRC_IC15 + 1) |
#define | STM32_SRC_IC17 (STM32_SRC_IC16 + 1) |
#define | STM32_SRC_IC18 (STM32_SRC_IC17 + 1) |
#define | STM32_SRC_IC19 (STM32_SRC_IC18 + 1) |
#define | STM32_SRC_IC20 (STM32_SRC_IC19 + 1) |
#define | STM32_CLOCK_BUS_AHB1 0x250 |
Bus clocks. | |
#define | STM32_CLOCK_BUS_AHB2 0x254 |
#define | STM32_CLOCK_BUS_AHB3 0x258 |
#define | STM32_CLOCK_BUS_AHB4 0x25C |
#define | STM32_CLOCK_BUS_AHB5 0x260 |
#define | STM32_CLOCK_BUS_APB1 0x264 |
#define | STM32_CLOCK_BUS_APB1_2 0x268 |
#define | STM32_CLOCK_BUS_APB2 0x26C |
#define | STM32_CLOCK_BUS_APB3 0x270 |
#define | STM32_CLOCK_BUS_APB4 0x274 |
#define | STM32_CLOCK_BUS_APB4_2 0x278 |
#define | STM32_CLOCK_BUS_APB5 0x27C |
#define | STM32_CLOCK_LP_BUS_SHIFT 0x40 |
#define | STM32_PERIPH_BUS_MIN STM32_CLOCK_BUS_AHB1 |
#define | STM32_PERIPH_BUS_MAX STM32_CLOCK_BUS_APB5 |
#define | STM32_CLOCK_REG_MASK 0xFFFU |
#define | STM32_CLOCK_REG_SHIFT 0U |
#define | STM32_CLOCK_SHIFT_MASK 0x1FU |
#define | STM32_CLOCK_SHIFT_SHIFT 12U |
#define | STM32_CLOCK_MASK_MASK 0x7U |
#define | STM32_CLOCK_MASK_SHIFT 17U |
#define | STM32_CLOCK_VAL_MASK 0x7U |
#define | STM32_CLOCK_VAL_SHIFT 20U |
#define | STM32_DOMAIN_CLOCK(val, mask, shift, reg) |
STM32U5 clock configuration bit field. | |
#define | CCIPR1_REG 0x144 |
RCC_CCIPRx register offset (RM0468.pdf) | |
#define | CCIPR2_REG 0x148 |
#define | CCIPR3_REG 0x14C |
#define | CCIPR4_REG 0x150 |
#define | CCIPR5_REG 0x154 |
#define | CCIPR6_REG 0x158 |
#define | CCIPR7_REG 0x15C |
#define | CCIPR8_REG 0x160 |
#define | CCIPR9_REG 0x164 |
#define | CCIPR12_REG 0x170 |
#define | CCIPR13_REG 0x174 |
#define | CCIPR14_REG 0x178 |
#define | ADF1_SEL(val) |
Device domain clocks selection helpers. | |
#define | ADC12_SEL(val) |
#define | DCMIPP_SEL(val) |
#define | ETH1PTP_SEL(val) |
CCIPR2 devices. | |
#define | ETH1CLK_SEL(val) |
#define | ETH1_SEL(val) |
#define | ETH1REFCLK_SEL(val) |
#define | ETH1GTXCLK_SEL(val) |
#define | FDCAN_SEL(val) |
CCIPR3 devices. | |
#define | FMC_SEL(val) |
#define | I2C1_SEL(val) |
CCIPR4 devices. | |
#define | I2C2_SEL(val) |
#define | I2C3_SEL(val) |
#define | I2C4_SEL(val) |
#define | I3C1_SEL(val) |
#define | I3C2_SEL(val) |
#define | LTDC_SEL(val) |
#define | MCO1_SEL(val) |
CCIPR5 devices. | |
#define | MCO2_SEL(val) |
#define | MDF1SEL(val) |
#define | XSPI1_SEL(val) |
CCIPR6 devices. | |
#define | XSPI2_SEL(val) |
#define | XSPI3_SEL(val) |
#define | OTGPHY1_SEL(val) |
#define | OTGPHY1CKREF_SEL(val) |
#define | OTGPHY2_SEL(val) |
#define | OTGPHY2CKREF_SEL(val) |
#define | PER_SEL(val) |
CCIPR7 devices. | |
#define | PSSI_SEL(val) |
#define | RTC_SEL(val) |
#define | SAI1_SEL(val) |
#define | SAI2_SEL(val) |
#define | SDMMC1_SEL(val) |
CCIPR8 devices. | |
#define | SDMMC2_SEL(val) |
#define | SPDIFRX1_SEL(val) |
CCIPR9 devices. | |
#define | SPI1_SEL(val) |
#define | SPI2_SEL(val) |
#define | SPI3_SEL(val) |
#define | SPI4_SEL(val) |
#define | SPI5_SEL(val) |
#define | SPI6_SEL(val) |
#define | LPTIM1_SEL(val) |
CCIPR12 devices. | |
#define | LPTIM2_SEL(val) |
#define | LPTIM3_SEL(val) |
#define | LPTIM4_SEL(val) |
#define | LPTIM5_SEL(val) |
#define | USART1_SEL(val) |
CCIPR13 devices. | |
#define | USART2_SEL(val) |
#define | USART3_SEL(val) |
#define | UART4_SEL(val) |
#define | UART5_SEL(val) |
#define | USART6_SEL(val) |
#define | UART7_SEL(val) |
#define | UART8_SEL(val) |
#define | UART9_SEL(val) |
CCIPR14 devices. | |
#define | USART10_SEL(val) |
#define | LPUART1_SEL(val) |
#define | ICxCFGR_REG(ic) |
RCC_ICxCFGR register offset (RM0468.pdf) | |
#define | ICx_PLLy_SEL(ic, pll) |
Divider ICx source selection. | |
#define | CFGR1_REG 0x20 |
RCC_CFGR1 register offset (RM0468.pdf) | |
#define | CPU_SEL(val) |
CPU clock switch selection. | |
#define ADC12_SEL | ( | val | ) |
#define ADF1_SEL | ( | val | ) |
Device domain clocks selection helpers.
CCIPR1 devices
#define CCIPR12_REG 0x170 |
#define CCIPR13_REG 0x174 |
#define CCIPR14_REG 0x178 |
#define CCIPR1_REG 0x144 |
RCC_CCIPRx register offset (RM0468.pdf)
#define CCIPR2_REG 0x148 |
#define CCIPR3_REG 0x14C |
#define CCIPR4_REG 0x150 |
#define CCIPR5_REG 0x154 |
#define CCIPR6_REG 0x158 |
#define CCIPR7_REG 0x15C |
#define CCIPR8_REG 0x160 |
#define CCIPR9_REG 0x164 |
#define CFGR1_REG 0x20 |
RCC_CFGR1 register offset (RM0468.pdf)
#define CPU_SEL | ( | val | ) |
CPU clock switch selection.
#define DCMIPP_SEL | ( | val | ) |
#define ETH1_SEL | ( | val | ) |
#define ETH1CLK_SEL | ( | val | ) |
#define ETH1GTXCLK_SEL | ( | val | ) |
#define ETH1PTP_SEL | ( | val | ) |
CCIPR2 devices.
#define ETH1REFCLK_SEL | ( | val | ) |
#define FDCAN_SEL | ( | val | ) |
CCIPR3 devices.
#define FMC_SEL | ( | val | ) |
#define I2C1_SEL | ( | val | ) |
CCIPR4 devices.
#define I2C2_SEL | ( | val | ) |
#define I2C3_SEL | ( | val | ) |
#define I2C4_SEL | ( | val | ) |
#define I3C1_SEL | ( | val | ) |
#define I3C2_SEL | ( | val | ) |
#define ICx_PLLy_SEL | ( | ic, | |
pll ) |
Divider ICx source selection.
#define ICxCFGR_REG | ( | ic | ) |
RCC_ICxCFGR register offset (RM0468.pdf)
#define LPTIM1_SEL | ( | val | ) |
CCIPR12 devices.
#define LPTIM2_SEL | ( | val | ) |
#define LPTIM3_SEL | ( | val | ) |
#define LPTIM4_SEL | ( | val | ) |
#define LPTIM5_SEL | ( | val | ) |
#define LPUART1_SEL | ( | val | ) |
#define LTDC_SEL | ( | val | ) |
#define MCO1_SEL | ( | val | ) |
CCIPR5 devices.
#define MCO2_SEL | ( | val | ) |
#define MDF1SEL | ( | val | ) |
#define OTGPHY1_SEL | ( | val | ) |
#define OTGPHY1CKREF_SEL | ( | val | ) |
#define OTGPHY2_SEL | ( | val | ) |
#define OTGPHY2CKREF_SEL | ( | val | ) |
#define PER_SEL | ( | val | ) |
CCIPR7 devices.
#define PSSI_SEL | ( | val | ) |
#define RTC_SEL | ( | val | ) |
#define SAI1_SEL | ( | val | ) |
#define SAI2_SEL | ( | val | ) |
#define SDMMC1_SEL | ( | val | ) |
CCIPR8 devices.
#define SDMMC2_SEL | ( | val | ) |
#define SPDIFRX1_SEL | ( | val | ) |
CCIPR9 devices.
#define SPI1_SEL | ( | val | ) |
#define SPI2_SEL | ( | val | ) |
#define SPI3_SEL | ( | val | ) |
#define SPI4_SEL | ( | val | ) |
#define SPI5_SEL | ( | val | ) |
#define SPI6_SEL | ( | val | ) |
#define STM32_CLOCK_BUS_AHB1 0x250 |
Bus clocks.
#define STM32_CLOCK_BUS_AHB2 0x254 |
#define STM32_CLOCK_BUS_AHB3 0x258 |
#define STM32_CLOCK_BUS_AHB4 0x25C |
#define STM32_CLOCK_BUS_AHB5 0x260 |
#define STM32_CLOCK_BUS_APB1 0x264 |
#define STM32_CLOCK_BUS_APB1_2 0x268 |
#define STM32_CLOCK_BUS_APB2 0x26C |
#define STM32_CLOCK_BUS_APB3 0x270 |
#define STM32_CLOCK_BUS_APB4 0x274 |
#define STM32_CLOCK_BUS_APB4_2 0x278 |
#define STM32_CLOCK_BUS_APB5 0x27C |
#define STM32_CLOCK_LP_BUS_SHIFT 0x40 |
#define STM32_CLOCK_MASK_MASK 0x7U |
#define STM32_CLOCK_MASK_SHIFT 17U |
#define STM32_CLOCK_REG_MASK 0xFFFU |
#define STM32_CLOCK_REG_SHIFT 0U |
#define STM32_CLOCK_SHIFT_MASK 0x1FU |
#define STM32_CLOCK_SHIFT_SHIFT 12U |
#define STM32_CLOCK_VAL_MASK 0x7U |
#define STM32_CLOCK_VAL_SHIFT 20U |
#define STM32_DOMAIN_CLOCK | ( | val, | |
mask, | |||
shift, | |||
reg ) |
STM32U5 clock configuration bit field.
reg | RCC_CCIPRx register offset |
shift | Position within RCC_CCIPRx. |
mask | Mask for the RCC_CCIPRx field. |
val | Clock value (0, 1, ... 7). |
#define STM32_PERIPH_BUS_MAX STM32_CLOCK_BUS_APB5 |
#define STM32_PERIPH_BUS_MIN STM32_CLOCK_BUS_AHB1 |
#define STM32_SRC_CKPER (STM32_SRC_PLL4 + 1) |
Clock muxes.
#define STM32_SRC_HSE (STM32_SRC_LSI + 1) |
Domain clocks.
System clock Fixed clocks
#define STM32_SRC_HSI (STM32_SRC_HSE + 1) |
#define STM32_SRC_IC1 (STM32_SRC_CKPER + 1) |
#define STM32_SRC_IC10 (STM32_SRC_IC9 + 1) |
#define STM32_SRC_IC11 (STM32_SRC_IC10 + 1) |
#define STM32_SRC_IC12 (STM32_SRC_IC11 + 1) |
#define STM32_SRC_IC13 (STM32_SRC_IC12 + 1) |
#define STM32_SRC_IC14 (STM32_SRC_IC13 + 1) |
#define STM32_SRC_IC15 (STM32_SRC_IC14 + 1) |
#define STM32_SRC_IC16 (STM32_SRC_IC15 + 1) |
#define STM32_SRC_IC17 (STM32_SRC_IC16 + 1) |
#define STM32_SRC_IC18 (STM32_SRC_IC17 + 1) |
#define STM32_SRC_IC19 (STM32_SRC_IC18 + 1) |
#define STM32_SRC_IC2 (STM32_SRC_IC1 + 1) |
#define STM32_SRC_IC20 (STM32_SRC_IC19 + 1) |
#define STM32_SRC_IC3 (STM32_SRC_IC2 + 1) |
#define STM32_SRC_IC4 (STM32_SRC_IC3 + 1) |
#define STM32_SRC_IC5 (STM32_SRC_IC4 + 1) |
#define STM32_SRC_IC6 (STM32_SRC_IC5 + 1) |
#define STM32_SRC_IC7 (STM32_SRC_IC6 + 1) |
#define STM32_SRC_IC8 (STM32_SRC_IC7 + 1) |
#define STM32_SRC_IC9 (STM32_SRC_IC8 + 1) |
#define STM32_SRC_MSI (STM32_SRC_HSI + 1) |
#define STM32_SRC_PLL1 (STM32_SRC_MSI + 1) |
PLL outputs.
#define STM32_SRC_PLL2 (STM32_SRC_PLL1 + 1) |
#define STM32_SRC_PLL3 (STM32_SRC_PLL2 + 1) |
#define STM32_SRC_PLL4 (STM32_SRC_PLL3 + 1) |
#define UART4_SEL | ( | val | ) |
#define UART5_SEL | ( | val | ) |
#define UART7_SEL | ( | val | ) |
#define UART8_SEL | ( | val | ) |
#define UART9_SEL | ( | val | ) |
CCIPR14 devices.
#define USART10_SEL | ( | val | ) |
#define USART1_SEL | ( | val | ) |
CCIPR13 devices.
#define USART2_SEL | ( | val | ) |
#define USART3_SEL | ( | val | ) |
#define USART6_SEL | ( | val | ) |
#define XSPI1_SEL | ( | val | ) |
CCIPR6 devices.
#define XSPI2_SEL | ( | val | ) |
#define XSPI3_SEL | ( | val | ) |