system_stm32l5xx.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. /** @addtogroup CMSIS
  20. * @{
  21. */
  22. /** @addtogroup STM32L5xx_system
  23. * @{
  24. */
  25. #ifndef SYSTEM_STM32L5XX_H
  26. #define SYSTEM_STM32L5XX_H
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. /** @addtogroup STM32L5xx_System_Includes
  31. * @{
  32. */
  33. #include <stdint.h>
  34. /**
  35. * @}
  36. */
  37. /** @addtogroup STM32L5xx_System_Exported_Variables
  38. * @{
  39. */
  40. /* The SystemCoreClock variable is updated in three ways:
  41. 1) by calling CMSIS function SystemCoreClockUpdate()
  42. 2) by calling HAL API function HAL_RCC_GetSysClockFreq()
  43. 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
  44. Note: If you use this function to configure the system clock; then there
  45. is no need to call the 2 first functions listed above, since SystemCoreClock
  46. variable is updated automatically.
  47. */
  48. extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
  49. extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
  50. extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
  51. extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */
  52. /**
  53. * @}
  54. */
  55. /** @addtogroup STM32L5xx_System_Exported_Functions
  56. * @{
  57. */
  58. /**
  59. \brief Setup the microcontroller system.
  60. Initialize the System and update the SystemCoreClock variable.
  61. */
  62. extern void SystemInit (void);
  63. /**
  64. \brief Update SystemCoreClock variable.
  65. Updates the SystemCoreClock with current core Clock retrieved from cpu registers.
  66. */
  67. extern void SystemCoreClockUpdate (void);
  68. /**
  69. \brief Update SystemCoreClock variable from secure application and return its value
  70. when security is implemented in the system (Non-secure callable function).
  71. Returns the SystemCoreClock value with current core Clock retrieved from cpu registers.
  72. */
  73. extern uint32_t SECURE_SystemCoreClockUpdate(void);
  74. /**
  75. * @}
  76. */
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80. #endif /* SYSTEM_STM32L5XX_H */
  81. /**
  82. * @}
  83. */
  84. /**
  85. * @}
  86. */
  87. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/