Loading...
Searching...
No Matches
sysclk.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Prime Controls, Inc.(R)
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
16
17#include "hse.h"
18#include "hsi.h"
19#include "csi.h"
20#include "pll1.h"
21#include "pll2.h"
22#include "pll3.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#if IS_ACTIVE(CONFIG_USE_HSI_DIRECT)
29# define CLOCK_SYSCLK CLOCK_HSI
30#elif IS_ACTIVE(CONFIG_USE_HSE_DIRECT)
31# define CLOCK_SYSCLK CLOCK_HSE
32#elif IS_ACTIVE(CONFIG_USE_CSI_DIRECT)
33# define CLOCK_SYSCLK CLOCK_CSI
34#elif IS_ACTIVE(CONFIG_USE_HSI_PLL) || IS_ACTIVE(CONFIG_USE_HSE_PLL) || \
35 IS_ACTIVE(CONFIG_USE_CSI_PLL)
36# define CLOCK_SYSCLK CLOCK_PLL1_P_OUT
37#else
38# error "No valid clock source selected"
39#endif
40
41#ifdef __cplusplus
42}
43#endif
44
CSI clock setup for STM32H7 family.
HSE clock setup for STM32H7 family.
HSI clock setup for STM32H7 family.
PLL1 clock setup for STM32H7 family.
PLL2 clock setup for STM32H7 family.
PLL3 clock setup for STM32H7 family.