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