1 /**
2   ******************************************************************************
3   * @file    system_stm32u5xx.h
4   * @author  MCD Application Team
5   * @brief   CMSIS Cortex-M33 Device System Source File for STM32U5xx devices.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2021 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software component is licensed by ST under Apache License, Version 2.0,
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/Apache-2.0
16   *
17   ******************************************************************************
18   */
19 
20 /** @addtogroup CMSIS
21   * @{
22   */
23 
24 /** @addtogroup stm32u5xx_system
25   * @{
26   */
27 
28 #ifndef SYSTEM_STM32U5XX_H
29 #define SYSTEM_STM32U5XX_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** @addtogroup STM32U5xx_System_Includes
36   * @{
37   */
38 
39 /**
40   * @}
41   */
42 
43 /** @addtogroup STM32U5xx_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 extern const uint32_t MSIRangeTable[16];    /*!< MSI ranges table values     */
59 
60 /**
61   * @}
62   */
63 
64 
65 /** @addtogroup STM32U5xx_System_Exported_Functions
66   * @{
67   */
68 
69 /**
70   \brief Exception / Interrupt Handler Function Prototype
71 */
72 typedef void(*VECTOR_TABLE_Type)(void);
73 
74 /**
75   * @brief Setup the microcontroller system.
76   *
77   * Initialize the System and update the SystemCoreClock variable.
78   */
79 extern void SystemInit (void);
80 
81 
82 /**
83   * @brief  Update SystemCoreClock variable.
84   *
85   * Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
86   */
87 extern void SystemCoreClockUpdate (void);
88 
89 
90 /**
91   * @brief Update SystemCoreClock variable from secure application and return its value
92   *        when security is implemented in the system (Non-secure callable function).
93   *
94   * Returns the SystemCoreClock value with current core Clock retrieved from cpu registers.
95   */
96 extern uint32_t SECURE_SystemCoreClockUpdate(void);
97 
98 /**
99   * @}
100   */
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /* SYSTEM_STM32U5XX_H */
107 
108 /**
109   * @}
110   */
111 
112 /**
113   * @}
114   */
115 
116