system_stm32h5xx.h 2.6 KB

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