1 /**
2   ******************************************************************************
3   * @file    system_stm32h5xx.h
4   * @author  MCD Application Team
5   * @brief   CMSIS Cortex-M33 Device System Source File for STM32H5xx devices.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2023 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /** @addtogroup CMSIS
21   * @{
22   */
23 
24 /** @addtogroup stm32h5xx_system
25   * @{
26   */
27 
28 #ifndef SYSTEM_STM32H5XX_H
29 #define SYSTEM_STM32H5XX_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** @addtogroup STM32H5xx_System_Includes
36   * @{
37   */
38 
39 /**
40   * @}
41   */
42 
43 /** @addtogroup STM32H5xx_System_Exported_Variables
44   * @{
45   */
46   /* The SystemCoreClock variable is updated in three ways:
47       1) by calling CMSIS function SystemCoreClockUpdate()
48       2) by calling HAL API function HAL_RCC_GetSysClockFreq()
49       3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
50          Note: If you use this function to configure the system clock; then there
51                is no need to call the 2 first functions listed above, since SystemCoreClock
52                variable is updated automatically.
53    */
54 extern uint32_t SystemCoreClock;     /*!< System Clock Frequency (Core Clock)  */
55 
56 extern const uint8_t  AHBPrescTable[16];    /*!< AHB prescalers table values */
57 extern const uint8_t  APBPrescTable[8];     /*!< APB prescalers table values */
58 
59 /**
60   * @}
61   */
62 
63 
64 /** @addtogroup STM32H5xx_System_Exported_Functions
65   * @{
66   */
67 
68 /**
69   * @brief Setup the microcontroller system.
70   *
71   * Initialize the System and update the SystemCoreClock variable.
72   */
73 extern void SystemInit (void);
74 
75 
76 /**
77   * @brief  Update SystemCoreClock variable.
78   *
79   * Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
80   */
81 extern void SystemCoreClockUpdate (void);
82 
83 
84 /**
85   * @brief Update SystemCoreClock variable from secure application and return its value
86   *        when security is implemented in the system (Non-secure callable function).
87   *
88   * Returns the SystemCoreClock value with current core Clock retrieved from cpu registers.
89   */
90 extern uint32_t SECURE_SystemCoreClockUpdate(void);
91 
92 
93 /**
94   * @}
95   */
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif /* SYSTEM_STM32H5XX_H */
102 
103 /**
104   * @}
105   */
106 
107 /**
108   * @}
109   */
110