Clock controller of the STM32H7 RCC.
More...
|
The clocks the driver supports, numbered as in the binding, dt-bindings/clock/stm32h7-clks.h.
|
| #define | STM32H7_CLK_HSE_CK 10 |
| | HSE oscillator.
|
| |
| #define | STM32H7_CLK_LSE_CK 11 |
| | LSE oscillator.
|
| |
| #define | STM32H7_CLK_HSI_CK 18 |
| | HSI oscillator, 64 MHz divided by HSIDIV.
|
| |
| #define | STM32H7_CLK_CSI_CK 20 |
| | CSI oscillator, 4 MHz.
|
| |
| #define | STM32H7_CLK_LSI_CK 23 |
| | LSI oscillator, 32 kHz.
|
| |
| #define | STM32H7_CLK_PLLSRC 29 |
| | PLL source, pllsrc: HSI, CSI or HSE.
|
| |
| #define | STM32H7_CLK_PLL1_P 32 |
| | PLL1 outputs.
|
| |
| #define | STM32H7_CLK_PLL1_Q 33 |
| |
| #define | STM32H7_CLK_PLL1_R 34 |
| |
| #define | STM32H7_CLK_PLL2_P 35 |
| | PLL2 outputs.
|
| |
| #define | STM32H7_CLK_PLL2_Q 36 |
| |
| #define | STM32H7_CLK_PLL2_R 37 |
| |
| #define | STM32H7_CLK_PLL3_P 38 |
| | PLL3 outputs.
|
| |
| #define | STM32H7_CLK_PLL3_Q 39 |
| |
| #define | STM32H7_CLK_PLL3_R 40 |
| |
| #define | STM32H7_CLK_SYS_CK 30 |
| | System clock, sys_ck.
|
| |
| #define | STM32H7_CLK_SYS_D1CPRE 0 |
| | Domain 1 core clock, sys_d1cpre_ck: the CPU.
|
| |
| #define | STM32H7_CLK_HCLK 1 |
| | AHB clock, rcc_hclk.
|
| |
| #define | STM32H7_CLK_PCLK1 2 |
| | APB1 clock, rcc_pclk1.
|
| |
| #define | STM32H7_CLK_PCLK2 3 |
| | APB2 clock, rcc_pclk2.
|
| |
| #define | STM32H7_CLK_PCLK3 4 |
| | APB3 clock.
|
| |
| #define | STM32H7_CLK_PCLK4 5 |
| | APB4 clock, rcc_pclk4.
|
| |
| #define | STM32H7_CLK_GPIOA_CK 86 |
| | GPIO port A to K clocks.
|
| |
| #define | STM32H7_CLK_GPIOB_CK 85 |
| |
| #define | STM32H7_CLK_GPIOC_CK 84 |
| |
| #define | STM32H7_CLK_GPIOD_CK 83 |
| |
| #define | STM32H7_CLK_GPIOE_CK 82 |
| |
| #define | STM32H7_CLK_GPIOF_CK 81 |
| |
| #define | STM32H7_CLK_GPIOG_CK 80 |
| |
| #define | STM32H7_CLK_GPIOH_CK 79 |
| |
| #define | STM32H7_CLK_GPIOI_CK 78 |
| |
| #define | STM32H7_CLK_GPIOJ_CK 77 |
| |
| #define | STM32H7_CLK_GPIOK_CK 76 |
| |
| #define | STM32H7_CLK_LPTIM1_CK 144 |
| | LPTIM1 kernel clock.
|
| |
| #define | STM32H7_CLK_LPTIM2_CK 162 |
| | LPTIM2 kernel clock.
|
| |
| #define | STM32H7_CLK_USART1_CK 156 |
| | USART1 kernel clock.
|
| |
| #define | STM32H7_CLK_UART8_CK 131 |
| | UART8 kernel clock.
|
| |
Clock controller of the STM32H7 RCC.
The oscillators, the system clock and the bus clocks are clocks of the controller, parents of the peripheral clocks they run. The peripheral clocks are gated, and those with a kernel clock multiplexer take its current input as their parent.
Before any clock, the controller sets the supply configuration of the core domain in PWR, which must match how the board is wired, and the highest core voltage (VOS1), then applies its assigned clocks: the PLL source, the rate of PLL1 P, which configures PLL1 and starts it, the parent of the system clock and the bus rates. The system clock moves to a faster parent with the bus clocks divided down to their maximums, 240 MHz for HCLK and 120 MHz for the APB clocks; the CPU runs up to 400 MHz. The flash keeps its reset wait states, which any clock takes.
◆ pbl_clk_stm32h7
| Data Fields |
|
const struct pbl_clk_assigned * |
assigned |
Assigned clocks, ending with an empty entry. |
|
uintptr_t |
base |
Registers. |
|
struct pbl_clk_controller |
ctrl |
Clock controller. |
|
struct pbl_clk |
hse |
HSE input. |
|
struct pbl_clk |
lse |
LSE input. |
|
uintptr_t |
pwr |
PWR registers. |
|
uint32_t |
supply |
Supply configuration, a PBL_CLK_STM32H7_SUPPLY_ value. |
◆ PBL_CLK_STM32H7_DEFINE
| #define PBL_CLK_STM32H7_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_base, |
|
|
|
_pwr, |
|
|
|
_supply, |
|
|
|
_hse, |
|
|
|
_lse, |
|
|
|
... |
|
) |
| |
Value:
PBL_CLK_ASSIGNED_DEFINE(sym##_assigned, __VA_ARGS__); \
.ctrl = \
PBL_CLK_CONTROLLER_INIT(sym, _name, pbl_clk_stm32h7_init, nullptr, &pbl_clk_stm32h7_ops), \
.base = (_base), .pwr = (_pwr), .supply = (_supply), .hse = _hse, .lse = _lse, \
.assigned = sym##_assigned, \
}
STM32H7 RCC.
Definition stm32h7.h:123
A clock controller.
Definition clk.h:75
#define PBL_CLK_CONTROLLER_STATE_DEFINE(sym, _num_clks)
Define the class state of clock controller sym, for the driver's define macro.
Definition clk.h:96
Define the RCC.
- Parameters
-
| sym | Symbol of the controller. |
| _name | Name. |
| _base | Registers. |
| _pwr | PWR registers. |
| _supply | Supply configuration, a PBL_CLK_STM32H7_SUPPLY_ value. |
| _hse | HSE input, from PBL_CLK(). |
| _lse | LSE input, from PBL_CLK(). |
| ... | Assigned clocks, from PBL_CLK_ASSIGNED(). |
◆ PBL_CLK_STM32H7_SUPPLY_BYPASS
| #define PBL_CLK_STM32H7_SUPPLY_BYPASS 0x01U |
◆ PBL_CLK_STM32H7_SUPPLY_DIRECT_SMPS
| #define PBL_CLK_STM32H7_SUPPLY_DIRECT_SMPS 0x04U |
◆ PBL_CLK_STM32H7_SUPPLY_LDO
| #define PBL_CLK_STM32H7_SUPPLY_LDO 0x02U |
◆ PBL_CLK_STM32H7_SUPPLY_SMPS_1V8_EXT_BYPASS
| #define PBL_CLK_STM32H7_SUPPLY_SMPS_1V8_EXT_BYPASS 0x1dU |
◆ PBL_CLK_STM32H7_SUPPLY_SMPS_1V8_EXT_LDO
| #define PBL_CLK_STM32H7_SUPPLY_SMPS_1V8_EXT_LDO 0x1eU |
◆ PBL_CLK_STM32H7_SUPPLY_SMPS_1V8_LDO
| #define PBL_CLK_STM32H7_SUPPLY_SMPS_1V8_LDO 0x16U |
◆ PBL_CLK_STM32H7_SUPPLY_SMPS_2V5_EXT_BYPASS
| #define PBL_CLK_STM32H7_SUPPLY_SMPS_2V5_EXT_BYPASS 0x2dU |
◆ PBL_CLK_STM32H7_SUPPLY_SMPS_2V5_EXT_LDO
| #define PBL_CLK_STM32H7_SUPPLY_SMPS_2V5_EXT_LDO 0x2eU |
◆ PBL_CLK_STM32H7_SUPPLY_SMPS_2V5_LDO
| #define PBL_CLK_STM32H7_SUPPLY_SMPS_2V5_LDO 0x26U |
◆ STM32H7_CLK_CSI_CK
| #define STM32H7_CLK_CSI_CK 20 |
◆ STM32H7_CLK_GPIOA_CK
| #define STM32H7_CLK_GPIOA_CK 86 |
◆ STM32H7_CLK_GPIOB_CK
| #define STM32H7_CLK_GPIOB_CK 85 |
◆ STM32H7_CLK_GPIOC_CK
| #define STM32H7_CLK_GPIOC_CK 84 |
◆ STM32H7_CLK_GPIOD_CK
| #define STM32H7_CLK_GPIOD_CK 83 |
◆ STM32H7_CLK_GPIOE_CK
| #define STM32H7_CLK_GPIOE_CK 82 |
◆ STM32H7_CLK_GPIOF_CK
| #define STM32H7_CLK_GPIOF_CK 81 |
◆ STM32H7_CLK_GPIOG_CK
| #define STM32H7_CLK_GPIOG_CK 80 |
◆ STM32H7_CLK_GPIOH_CK
| #define STM32H7_CLK_GPIOH_CK 79 |
◆ STM32H7_CLK_GPIOI_CK
| #define STM32H7_CLK_GPIOI_CK 78 |
◆ STM32H7_CLK_GPIOJ_CK
| #define STM32H7_CLK_GPIOJ_CK 77 |
◆ STM32H7_CLK_GPIOK_CK
| #define STM32H7_CLK_GPIOK_CK 76 |
◆ STM32H7_CLK_HCLK
| #define STM32H7_CLK_HCLK 1 |
◆ STM32H7_CLK_HSE_CK
| #define STM32H7_CLK_HSE_CK 10 |
◆ STM32H7_CLK_HSI_CK
| #define STM32H7_CLK_HSI_CK 18 |
HSI oscillator, 64 MHz divided by HSIDIV.
◆ STM32H7_CLK_LPTIM1_CK
| #define STM32H7_CLK_LPTIM1_CK 144 |
◆ STM32H7_CLK_LPTIM2_CK
| #define STM32H7_CLK_LPTIM2_CK 162 |
◆ STM32H7_CLK_LSE_CK
| #define STM32H7_CLK_LSE_CK 11 |
◆ STM32H7_CLK_LSI_CK
| #define STM32H7_CLK_LSI_CK 23 |
◆ STM32H7_CLK_PCLK1
| #define STM32H7_CLK_PCLK1 2 |
◆ STM32H7_CLK_PCLK2
| #define STM32H7_CLK_PCLK2 3 |
◆ STM32H7_CLK_PCLK3
| #define STM32H7_CLK_PCLK3 4 |
◆ STM32H7_CLK_PCLK4
| #define STM32H7_CLK_PCLK4 5 |
◆ STM32H7_CLK_PLL1_P
| #define STM32H7_CLK_PLL1_P 32 |
◆ STM32H7_CLK_PLL1_Q
| #define STM32H7_CLK_PLL1_Q 33 |
◆ STM32H7_CLK_PLL1_R
| #define STM32H7_CLK_PLL1_R 34 |
◆ STM32H7_CLK_PLL2_P
| #define STM32H7_CLK_PLL2_P 35 |
◆ STM32H7_CLK_PLL2_Q
| #define STM32H7_CLK_PLL2_Q 36 |
◆ STM32H7_CLK_PLL2_R
| #define STM32H7_CLK_PLL2_R 37 |
◆ STM32H7_CLK_PLL3_P
| #define STM32H7_CLK_PLL3_P 38 |
◆ STM32H7_CLK_PLL3_Q
| #define STM32H7_CLK_PLL3_Q 39 |
◆ STM32H7_CLK_PLL3_R
| #define STM32H7_CLK_PLL3_R 40 |
◆ STM32H7_CLK_PLLSRC
| #define STM32H7_CLK_PLLSRC 29 |
PLL source, pllsrc: HSI, CSI or HSE.
◆ STM32H7_CLK_SYS_CK
| #define STM32H7_CLK_SYS_CK 30 |
◆ STM32H7_CLK_SYS_D1CPRE
| #define STM32H7_CLK_SYS_D1CPRE 0 |
Domain 1 core clock, sys_d1cpre_ck: the CPU.
◆ STM32H7_CLK_UART8_CK
| #define STM32H7_CLK_UART8_CK 131 |
◆ STM32H7_CLK_USART1_CK
| #define STM32H7_CLK_USART1_CK 156 |
◆ STM32H7_RCC