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   * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10   * All rights reserved.</center></h2>
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 STM32L5xx_system
25   * @{
26   */
27 
28 #ifndef SYSTEM_STM32L5XX_H
29 #define SYSTEM_STM32L5XX_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /** @addtogroup STM32L5xx_System_Includes
36   * @{
37   */
38 #include <stdint.h>
39 /**
40   * @}
41   */
42 
43 /** @addtogroup STM32L5xx_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 /** @addtogroup STM32L5xx_System_Exported_Functions
65   * @{
66   */
67 
68  /**
69   \brief Exception / Interrupt Handler Function Prototype
70 */
71 typedef void(*VECTOR_TABLE_Type)(void);
72 
73 /**
74   \brief Setup the microcontroller system.
75 
76    Initialize the System and update the SystemCoreClock variable.
77  */
78 extern void SystemInit (void);
79 
80 
81 /**
82   \brief  Update SystemCoreClock variable.
83 
84    Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
85  */
86 extern void SystemCoreClockUpdate (void);
87 
88 
89 /**
90   \brief  Update SystemCoreClock variable from secure application and return its value
91           when security is implemented in the system (Non-secure callable function).
92 
93    Returns the SystemCoreClock value with current core Clock retrieved from cpu registers.
94  */
95 extern uint32_t SECURE_SystemCoreClockUpdate(void);
96 
97 /**
98   * @}
99   */
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif /* SYSTEM_STM32L5XX_H */
106 
107 /**
108   * @}
109   */
110 
111 /**
112   * @}
113   */
114 
115 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
116