inport from local

Dependents:   Hobbyking_Cheetah_0511

Committer:
NYX
Date:
Mon Mar 16 06:35:48 2020 +0000
Revision:
0:85b3fd62ea1a
reinport to mbed;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NYX 0:85b3fd62ea1a 1 /**
NYX 0:85b3fd62ea1a 2 ******************************************************************************
NYX 0:85b3fd62ea1a 3 * @file stm32f4xx_ll_utils.h
NYX 0:85b3fd62ea1a 4 * @author MCD Application Team
NYX 0:85b3fd62ea1a 5 * @version V1.7.1
NYX 0:85b3fd62ea1a 6 * @date 14-April-2017
NYX 0:85b3fd62ea1a 7 * @brief Header file of UTILS LL module.
NYX 0:85b3fd62ea1a 8 @verbatim
NYX 0:85b3fd62ea1a 9 ==============================================================================
NYX 0:85b3fd62ea1a 10 ##### How to use this driver #####
NYX 0:85b3fd62ea1a 11 ==============================================================================
NYX 0:85b3fd62ea1a 12 [..]
NYX 0:85b3fd62ea1a 13 The LL UTILS driver contains a set of generic APIs that can be
NYX 0:85b3fd62ea1a 14 used by user:
NYX 0:85b3fd62ea1a 15 (+) Device electronic signature
NYX 0:85b3fd62ea1a 16 (+) Timing functions
NYX 0:85b3fd62ea1a 17 (+) PLL configuration functions
NYX 0:85b3fd62ea1a 18
NYX 0:85b3fd62ea1a 19 @endverbatim
NYX 0:85b3fd62ea1a 20 ******************************************************************************
NYX 0:85b3fd62ea1a 21 * @attention
NYX 0:85b3fd62ea1a 22 *
NYX 0:85b3fd62ea1a 23 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
NYX 0:85b3fd62ea1a 24 *
NYX 0:85b3fd62ea1a 25 * Redistribution and use in source and binary forms, with or without modification,
NYX 0:85b3fd62ea1a 26 * are permitted provided that the following conditions are met:
NYX 0:85b3fd62ea1a 27 * 1. Redistributions of source code must retain the above copyright notice,
NYX 0:85b3fd62ea1a 28 * this list of conditions and the following disclaimer.
NYX 0:85b3fd62ea1a 29 * 2. Redistributions in binary form must reproduce the above copyright notice,
NYX 0:85b3fd62ea1a 30 * this list of conditions and the following disclaimer in the documentation
NYX 0:85b3fd62ea1a 31 * and/or other materials provided with the distribution.
NYX 0:85b3fd62ea1a 32 * 3. Neither the name of STMicroelectronics nor the names of its contributors
NYX 0:85b3fd62ea1a 33 * may be used to endorse or promote products derived from this software
NYX 0:85b3fd62ea1a 34 * without specific prior written permission.
NYX 0:85b3fd62ea1a 35 *
NYX 0:85b3fd62ea1a 36 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
NYX 0:85b3fd62ea1a 37 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
NYX 0:85b3fd62ea1a 38 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
NYX 0:85b3fd62ea1a 39 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
NYX 0:85b3fd62ea1a 40 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
NYX 0:85b3fd62ea1a 41 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
NYX 0:85b3fd62ea1a 42 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
NYX 0:85b3fd62ea1a 43 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
NYX 0:85b3fd62ea1a 44 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
NYX 0:85b3fd62ea1a 45 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NYX 0:85b3fd62ea1a 46 *
NYX 0:85b3fd62ea1a 47 ******************************************************************************
NYX 0:85b3fd62ea1a 48 */
NYX 0:85b3fd62ea1a 49
NYX 0:85b3fd62ea1a 50 /* Define to prevent recursive inclusion -------------------------------------*/
NYX 0:85b3fd62ea1a 51 #ifndef __STM32F4xx_LL_UTILS_H
NYX 0:85b3fd62ea1a 52 #define __STM32F4xx_LL_UTILS_H
NYX 0:85b3fd62ea1a 53
NYX 0:85b3fd62ea1a 54 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 55 extern "C" {
NYX 0:85b3fd62ea1a 56 #endif
NYX 0:85b3fd62ea1a 57
NYX 0:85b3fd62ea1a 58 /* Includes ------------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 59 #include "stm32f4xx.h"
NYX 0:85b3fd62ea1a 60
NYX 0:85b3fd62ea1a 61 /** @addtogroup STM32F4xx_LL_Driver
NYX 0:85b3fd62ea1a 62 * @{
NYX 0:85b3fd62ea1a 63 */
NYX 0:85b3fd62ea1a 64
NYX 0:85b3fd62ea1a 65 /** @defgroup UTILS_LL UTILS
NYX 0:85b3fd62ea1a 66 * @{
NYX 0:85b3fd62ea1a 67 */
NYX 0:85b3fd62ea1a 68
NYX 0:85b3fd62ea1a 69 /* Private types -------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 70 /* Private variables ---------------------------------------------------------*/
NYX 0:85b3fd62ea1a 71
NYX 0:85b3fd62ea1a 72 /* Private constants ---------------------------------------------------------*/
NYX 0:85b3fd62ea1a 73 /** @defgroup UTILS_LL_Private_Constants UTILS Private Constants
NYX 0:85b3fd62ea1a 74 * @{
NYX 0:85b3fd62ea1a 75 */
NYX 0:85b3fd62ea1a 76
NYX 0:85b3fd62ea1a 77 /* Max delay can be used in LL_mDelay */
NYX 0:85b3fd62ea1a 78 #define LL_MAX_DELAY 0xFFFFFFFFU
NYX 0:85b3fd62ea1a 79
NYX 0:85b3fd62ea1a 80 /**
NYX 0:85b3fd62ea1a 81 * @brief Unique device ID register base address
NYX 0:85b3fd62ea1a 82 */
NYX 0:85b3fd62ea1a 83 #define UID_BASE_ADDRESS UID_BASE
NYX 0:85b3fd62ea1a 84
NYX 0:85b3fd62ea1a 85 /**
NYX 0:85b3fd62ea1a 86 * @brief Flash size data register base address
NYX 0:85b3fd62ea1a 87 */
NYX 0:85b3fd62ea1a 88 #define FLASHSIZE_BASE_ADDRESS FLASHSIZE_BASE
NYX 0:85b3fd62ea1a 89
NYX 0:85b3fd62ea1a 90 /**
NYX 0:85b3fd62ea1a 91 * @brief Package data register base address
NYX 0:85b3fd62ea1a 92 */
NYX 0:85b3fd62ea1a 93 #define PACKAGE_BASE_ADDRESS PACKAGE_BASE
NYX 0:85b3fd62ea1a 94
NYX 0:85b3fd62ea1a 95 /**
NYX 0:85b3fd62ea1a 96 * @}
NYX 0:85b3fd62ea1a 97 */
NYX 0:85b3fd62ea1a 98
NYX 0:85b3fd62ea1a 99 /* Private macros ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 100 /** @defgroup UTILS_LL_Private_Macros UTILS Private Macros
NYX 0:85b3fd62ea1a 101 * @{
NYX 0:85b3fd62ea1a 102 */
NYX 0:85b3fd62ea1a 103 /**
NYX 0:85b3fd62ea1a 104 * @}
NYX 0:85b3fd62ea1a 105 */
NYX 0:85b3fd62ea1a 106 /* Exported types ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 107 /** @defgroup UTILS_LL_ES_INIT UTILS Exported structures
NYX 0:85b3fd62ea1a 108 * @{
NYX 0:85b3fd62ea1a 109 */
NYX 0:85b3fd62ea1a 110 /**
NYX 0:85b3fd62ea1a 111 * @brief UTILS PLL structure definition
NYX 0:85b3fd62ea1a 112 */
NYX 0:85b3fd62ea1a 113 typedef struct
NYX 0:85b3fd62ea1a 114 {
NYX 0:85b3fd62ea1a 115 uint32_t PLLM; /*!< Division factor for PLL VCO input clock.
NYX 0:85b3fd62ea1a 116 This parameter can be a value of @ref RCC_LL_EC_PLLM_DIV
NYX 0:85b3fd62ea1a 117
NYX 0:85b3fd62ea1a 118 This feature can be modified afterwards using unitary function
NYX 0:85b3fd62ea1a 119 @ref LL_RCC_PLL_ConfigDomain_SYS(). */
NYX 0:85b3fd62ea1a 120
NYX 0:85b3fd62ea1a 121 uint32_t PLLN; /*!< Multiplication factor for PLL VCO output clock.
NYX 0:85b3fd62ea1a 122 This parameter must be a number between Min_Data = @ref RCC_PLLN_MIN_VALUE
NYX 0:85b3fd62ea1a 123 and Max_Data = @ref RCC_PLLN_MIN_VALUE
NYX 0:85b3fd62ea1a 124
NYX 0:85b3fd62ea1a 125 This feature can be modified afterwards using unitary function
NYX 0:85b3fd62ea1a 126 @ref LL_RCC_PLL_ConfigDomain_SYS(). */
NYX 0:85b3fd62ea1a 127
NYX 0:85b3fd62ea1a 128 uint32_t PLLP; /*!< Division for the main system clock.
NYX 0:85b3fd62ea1a 129 This parameter can be a value of @ref RCC_LL_EC_PLLP_DIV
NYX 0:85b3fd62ea1a 130
NYX 0:85b3fd62ea1a 131 This feature can be modified afterwards using unitary function
NYX 0:85b3fd62ea1a 132 @ref LL_RCC_PLL_ConfigDomain_SYS(). */
NYX 0:85b3fd62ea1a 133 } LL_UTILS_PLLInitTypeDef;
NYX 0:85b3fd62ea1a 134
NYX 0:85b3fd62ea1a 135 /**
NYX 0:85b3fd62ea1a 136 * @brief UTILS System, AHB and APB buses clock configuration structure definition
NYX 0:85b3fd62ea1a 137 */
NYX 0:85b3fd62ea1a 138 typedef struct
NYX 0:85b3fd62ea1a 139 {
NYX 0:85b3fd62ea1a 140 uint32_t AHBCLKDivider; /*!< The AHB clock (HCLK) divider. This clock is derived from the system clock (SYSCLK).
NYX 0:85b3fd62ea1a 141 This parameter can be a value of @ref RCC_LL_EC_SYSCLK_DIV
NYX 0:85b3fd62ea1a 142
NYX 0:85b3fd62ea1a 143 This feature can be modified afterwards using unitary function
NYX 0:85b3fd62ea1a 144 @ref LL_RCC_SetAHBPrescaler(). */
NYX 0:85b3fd62ea1a 145
NYX 0:85b3fd62ea1a 146 uint32_t APB1CLKDivider; /*!< The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK).
NYX 0:85b3fd62ea1a 147 This parameter can be a value of @ref RCC_LL_EC_APB1_DIV
NYX 0:85b3fd62ea1a 148
NYX 0:85b3fd62ea1a 149 This feature can be modified afterwards using unitary function
NYX 0:85b3fd62ea1a 150 @ref LL_RCC_SetAPB1Prescaler(). */
NYX 0:85b3fd62ea1a 151
NYX 0:85b3fd62ea1a 152 uint32_t APB2CLKDivider; /*!< The APB2 clock (PCLK2) divider. This clock is derived from the AHB clock (HCLK).
NYX 0:85b3fd62ea1a 153 This parameter can be a value of @ref RCC_LL_EC_APB2_DIV
NYX 0:85b3fd62ea1a 154
NYX 0:85b3fd62ea1a 155 This feature can be modified afterwards using unitary function
NYX 0:85b3fd62ea1a 156 @ref LL_RCC_SetAPB2Prescaler(). */
NYX 0:85b3fd62ea1a 157
NYX 0:85b3fd62ea1a 158 } LL_UTILS_ClkInitTypeDef;
NYX 0:85b3fd62ea1a 159
NYX 0:85b3fd62ea1a 160 /**
NYX 0:85b3fd62ea1a 161 * @}
NYX 0:85b3fd62ea1a 162 */
NYX 0:85b3fd62ea1a 163
NYX 0:85b3fd62ea1a 164 /* Exported constants --------------------------------------------------------*/
NYX 0:85b3fd62ea1a 165 /** @defgroup UTILS_LL_Exported_Constants UTILS Exported Constants
NYX 0:85b3fd62ea1a 166 * @{
NYX 0:85b3fd62ea1a 167 */
NYX 0:85b3fd62ea1a 168
NYX 0:85b3fd62ea1a 169 /** @defgroup UTILS_EC_HSE_BYPASS HSE Bypass activation
NYX 0:85b3fd62ea1a 170 * @{
NYX 0:85b3fd62ea1a 171 */
NYX 0:85b3fd62ea1a 172 #define LL_UTILS_HSEBYPASS_OFF 0x00000000U /*!< HSE Bypass is not enabled */
NYX 0:85b3fd62ea1a 173 #define LL_UTILS_HSEBYPASS_ON 0x00000001U /*!< HSE Bypass is enabled */
NYX 0:85b3fd62ea1a 174 /**
NYX 0:85b3fd62ea1a 175 * @}
NYX 0:85b3fd62ea1a 176 */
NYX 0:85b3fd62ea1a 177
NYX 0:85b3fd62ea1a 178 /** @defgroup UTILS_EC_PACKAGETYPE PACKAGE TYPE
NYX 0:85b3fd62ea1a 179 * @{
NYX 0:85b3fd62ea1a 180 */
NYX 0:85b3fd62ea1a 181 #define LL_UTILS_PACKAGETYPE_WLCSP36_UFQFPN48_LQFP64 0x00000000U /*!< WLCSP36 or UFQFPN48 or LQFP64 package type */
NYX 0:85b3fd62ea1a 182 #define LL_UTILS_PACKAGETYPE_WLCSP168_FBGA169_LQFP100_LQFP64_UFQFPN48 0x00000100U /*!< WLCSP168 or FBGA169 or LQFP100 or LQFP64 or UFQFPN48 package type */
NYX 0:85b3fd62ea1a 183 #define LL_UTILS_PACKAGETYPE_WLCSP64_WLCSP81_LQFP176_UFBGA176 0x00000200U /*!< WLCSP64 or WLCSP81 or LQFP176 or UFBGA176 package type */
NYX 0:85b3fd62ea1a 184 #define LL_UTILS_PACKAGETYPE_LQFP144_UFBGA144_UFBGA144_UFBGA100 0x00000300U /*!< LQFP144 or UFBGA144 or UFBGA144 or UFBGA100 package type */
NYX 0:85b3fd62ea1a 185 #define LL_UTILS_PACKAGETYPE_LQFP100_LQFP208_TFBGA216 0x00000400U /*!< LQFP100 or LQFP208 or TFBGA216 package type */
NYX 0:85b3fd62ea1a 186 #define LL_UTILS_PACKAGETYPE_LQFP208_TFBGA216 0x00000500U /*!< LQFP208 or TFBGA216 package type */
NYX 0:85b3fd62ea1a 187 #define LL_UTILS_PACKAGETYPE_TQFP64_UFBGA144_LQFP144 0x00000700U /*!< TQFP64 or UFBGA144 or LQFP144 package type */
NYX 0:85b3fd62ea1a 188 /**
NYX 0:85b3fd62ea1a 189 * @}
NYX 0:85b3fd62ea1a 190 */
NYX 0:85b3fd62ea1a 191
NYX 0:85b3fd62ea1a 192 /**
NYX 0:85b3fd62ea1a 193 * @}
NYX 0:85b3fd62ea1a 194 */
NYX 0:85b3fd62ea1a 195
NYX 0:85b3fd62ea1a 196 /* Exported macro ------------------------------------------------------------*/
NYX 0:85b3fd62ea1a 197
NYX 0:85b3fd62ea1a 198 /* Exported functions --------------------------------------------------------*/
NYX 0:85b3fd62ea1a 199 /** @defgroup UTILS_LL_Exported_Functions UTILS Exported Functions
NYX 0:85b3fd62ea1a 200 * @{
NYX 0:85b3fd62ea1a 201 */
NYX 0:85b3fd62ea1a 202
NYX 0:85b3fd62ea1a 203 /** @defgroup UTILS_EF_DEVICE_ELECTRONIC_SIGNATURE DEVICE ELECTRONIC SIGNATURE
NYX 0:85b3fd62ea1a 204 * @{
NYX 0:85b3fd62ea1a 205 */
NYX 0:85b3fd62ea1a 206
NYX 0:85b3fd62ea1a 207 /**
NYX 0:85b3fd62ea1a 208 * @brief Get Word0 of the unique device identifier (UID based on 96 bits)
NYX 0:85b3fd62ea1a 209 * @retval UID[31:0]
NYX 0:85b3fd62ea1a 210 */
NYX 0:85b3fd62ea1a 211 __STATIC_INLINE uint32_t LL_GetUID_Word0(void)
NYX 0:85b3fd62ea1a 212 {
NYX 0:85b3fd62ea1a 213 return (uint32_t)(READ_REG(*((uint32_t *)UID_BASE_ADDRESS)));
NYX 0:85b3fd62ea1a 214 }
NYX 0:85b3fd62ea1a 215
NYX 0:85b3fd62ea1a 216 /**
NYX 0:85b3fd62ea1a 217 * @brief Get Word1 of the unique device identifier (UID based on 96 bits)
NYX 0:85b3fd62ea1a 218 * @retval UID[63:32]
NYX 0:85b3fd62ea1a 219 */
NYX 0:85b3fd62ea1a 220 __STATIC_INLINE uint32_t LL_GetUID_Word1(void)
NYX 0:85b3fd62ea1a 221 {
NYX 0:85b3fd62ea1a 222 return (uint32_t)(READ_REG(*((uint32_t *)(UID_BASE_ADDRESS + 4U))));
NYX 0:85b3fd62ea1a 223 }
NYX 0:85b3fd62ea1a 224
NYX 0:85b3fd62ea1a 225 /**
NYX 0:85b3fd62ea1a 226 * @brief Get Word2 of the unique device identifier (UID based on 96 bits)
NYX 0:85b3fd62ea1a 227 * @retval UID[95:64]
NYX 0:85b3fd62ea1a 228 */
NYX 0:85b3fd62ea1a 229 __STATIC_INLINE uint32_t LL_GetUID_Word2(void)
NYX 0:85b3fd62ea1a 230 {
NYX 0:85b3fd62ea1a 231 return (uint32_t)(READ_REG(*((uint32_t *)(UID_BASE_ADDRESS + 8U))));
NYX 0:85b3fd62ea1a 232 }
NYX 0:85b3fd62ea1a 233
NYX 0:85b3fd62ea1a 234 /**
NYX 0:85b3fd62ea1a 235 * @brief Get Flash memory size
NYX 0:85b3fd62ea1a 236 * @note This bitfield indicates the size of the device Flash memory expressed in
NYX 0:85b3fd62ea1a 237 * Kbytes. As an example, 0x040 corresponds to 64 Kbytes.
NYX 0:85b3fd62ea1a 238 * @retval FLASH_SIZE[15:0]: Flash memory size
NYX 0:85b3fd62ea1a 239 */
NYX 0:85b3fd62ea1a 240 __STATIC_INLINE uint32_t LL_GetFlashSize(void)
NYX 0:85b3fd62ea1a 241 {
NYX 0:85b3fd62ea1a 242 return (uint16_t)(READ_REG(*((uint32_t *)FLASHSIZE_BASE_ADDRESS)));
NYX 0:85b3fd62ea1a 243 }
NYX 0:85b3fd62ea1a 244
NYX 0:85b3fd62ea1a 245 /**
NYX 0:85b3fd62ea1a 246 * @brief Get Package type
NYX 0:85b3fd62ea1a 247 * @retval Returned value can be one of the following values:
NYX 0:85b3fd62ea1a 248 * @arg @ref LL_UTILS_PACKAGETYPE_WLCSP36_UFQFPN48_LQFP64 (*)
NYX 0:85b3fd62ea1a 249 * @arg @ref LL_UTILS_PACKAGETYPE_WLCSP168_FBGA169_LQFP100_LQFP64_UFQFPN48 (*)
NYX 0:85b3fd62ea1a 250 * @arg @ref LL_UTILS_PACKAGETYPE_WLCSP64_WLCSP81_LQFP176_UFBGA176 (*)
NYX 0:85b3fd62ea1a 251 * @arg @ref LL_UTILS_PACKAGETYPE_LQFP144_UFBGA144_UFBGA144_UFBGA100 (*)
NYX 0:85b3fd62ea1a 252 * @arg @ref LL_UTILS_PACKAGETYPE_LQFP100_LQFP208_TFBGA216 (*)
NYX 0:85b3fd62ea1a 253 * @arg @ref LL_UTILS_PACKAGETYPE_LQFP208_TFBGA216 (*)
NYX 0:85b3fd62ea1a 254 * @arg @ref LL_UTILS_PACKAGETYPE_TQFP64_UFBGA144_LQFP144 (*)
NYX 0:85b3fd62ea1a 255 *
NYX 0:85b3fd62ea1a 256 * (*) value not defined in all devices.
NYX 0:85b3fd62ea1a 257 */
NYX 0:85b3fd62ea1a 258 __STATIC_INLINE uint32_t LL_GetPackageType(void)
NYX 0:85b3fd62ea1a 259 {
NYX 0:85b3fd62ea1a 260 return (uint8_t)(READ_REG(*((uint32_t *)PACKAGE_BASE_ADDRESS)) & 0x0700U);
NYX 0:85b3fd62ea1a 261 }
NYX 0:85b3fd62ea1a 262
NYX 0:85b3fd62ea1a 263 /**
NYX 0:85b3fd62ea1a 264 * @}
NYX 0:85b3fd62ea1a 265 */
NYX 0:85b3fd62ea1a 266
NYX 0:85b3fd62ea1a 267 /** @defgroup UTILS_LL_EF_DELAY DELAY
NYX 0:85b3fd62ea1a 268 * @{
NYX 0:85b3fd62ea1a 269 */
NYX 0:85b3fd62ea1a 270
NYX 0:85b3fd62ea1a 271 /**
NYX 0:85b3fd62ea1a 272 * @brief This function configures the Cortex-M SysTick source of the time base.
NYX 0:85b3fd62ea1a 273 * @param HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro)
NYX 0:85b3fd62ea1a 274 * @note When a RTOS is used, it is recommended to avoid changing the SysTick
NYX 0:85b3fd62ea1a 275 * configuration by calling this function, for a delay use rather osDelay RTOS service.
NYX 0:85b3fd62ea1a 276 * @param Ticks Number of ticks
NYX 0:85b3fd62ea1a 277 * @retval None
NYX 0:85b3fd62ea1a 278 */
NYX 0:85b3fd62ea1a 279 __STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks)
NYX 0:85b3fd62ea1a 280 {
NYX 0:85b3fd62ea1a 281 /* Configure the SysTick to have interrupt in 1ms time base */
NYX 0:85b3fd62ea1a 282 SysTick->LOAD = (uint32_t)((HCLKFrequency / Ticks) - 1UL); /* set reload register */
NYX 0:85b3fd62ea1a 283 SysTick->VAL = 0UL; /* Load the SysTick Counter Value */
NYX 0:85b3fd62ea1a 284 SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
NYX 0:85b3fd62ea1a 285 SysTick_CTRL_ENABLE_Msk; /* Enable the Systick Timer */
NYX 0:85b3fd62ea1a 286 }
NYX 0:85b3fd62ea1a 287
NYX 0:85b3fd62ea1a 288 void LL_Init1msTick(uint32_t HCLKFrequency);
NYX 0:85b3fd62ea1a 289 void LL_mDelay(uint32_t Delay);
NYX 0:85b3fd62ea1a 290
NYX 0:85b3fd62ea1a 291 /**
NYX 0:85b3fd62ea1a 292 * @}
NYX 0:85b3fd62ea1a 293 */
NYX 0:85b3fd62ea1a 294
NYX 0:85b3fd62ea1a 295 /** @defgroup UTILS_EF_SYSTEM SYSTEM
NYX 0:85b3fd62ea1a 296 * @{
NYX 0:85b3fd62ea1a 297 */
NYX 0:85b3fd62ea1a 298
NYX 0:85b3fd62ea1a 299 void LL_SetSystemCoreClock(uint32_t HCLKFrequency);
NYX 0:85b3fd62ea1a 300 ErrorStatus LL_PLL_ConfigSystemClock_HSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct,
NYX 0:85b3fd62ea1a 301 LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct);
NYX 0:85b3fd62ea1a 302 ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEFrequency, uint32_t HSEBypass,
NYX 0:85b3fd62ea1a 303 LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct, LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct);
NYX 0:85b3fd62ea1a 304
NYX 0:85b3fd62ea1a 305 /**
NYX 0:85b3fd62ea1a 306 * @}
NYX 0:85b3fd62ea1a 307 */
NYX 0:85b3fd62ea1a 308
NYX 0:85b3fd62ea1a 309 /**
NYX 0:85b3fd62ea1a 310 * @}
NYX 0:85b3fd62ea1a 311 */
NYX 0:85b3fd62ea1a 312
NYX 0:85b3fd62ea1a 313 /**
NYX 0:85b3fd62ea1a 314 * @}
NYX 0:85b3fd62ea1a 315 */
NYX 0:85b3fd62ea1a 316
NYX 0:85b3fd62ea1a 317 /**
NYX 0:85b3fd62ea1a 318 * @}
NYX 0:85b3fd62ea1a 319 */
NYX 0:85b3fd62ea1a 320
NYX 0:85b3fd62ea1a 321 #ifdef __cplusplus
NYX 0:85b3fd62ea1a 322 }
NYX 0:85b3fd62ea1a 323 #endif
NYX 0:85b3fd62ea1a 324
NYX 0:85b3fd62ea1a 325 #endif /* __STM32F4xx_LL_UTILS_H */
NYX 0:85b3fd62ea1a 326
NYX 0:85b3fd62ea1a 327 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/