mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Wed Sep 30 17:00:09 2015 +0100
Revision:
636:a11c0372f0ba
Parent:
490:119543c9f674
Synchronized with git revision d29c98dae61be0946ddf3a3c641c7726056f9452

Full URL: https://github.com/mbedmicro/mbed/commit/d29c98dae61be0946ddf3a3c641c7726056f9452/

Added support for SAMW25

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 376:cb4d9db17537 1 /**
mbed_official 376:cb4d9db17537 2 ******************************************************************************
mbed_official 376:cb4d9db17537 3 * @file stm32l0xx_hal_cortex.c
mbed_official 376:cb4d9db17537 4 * @author MCD Application Team
mbed_official 490:119543c9f674 5 * @version V1.2.0
mbed_official 490:119543c9f674 6 * @date 06-February-2015
mbed_official 376:cb4d9db17537 7 * @brief CORTEX HAL module driver.
mbed_official 376:cb4d9db17537 8 * This file provides firmware functions to manage the following
mbed_official 376:cb4d9db17537 9 * functionalities of the CORTEX:
mbed_official 376:cb4d9db17537 10 * + Initialization and de-initialization functions
mbed_official 376:cb4d9db17537 11 * + Peripheral Control functions
mbed_official 376:cb4d9db17537 12 *
mbed_official 376:cb4d9db17537 13 @verbatim
mbed_official 376:cb4d9db17537 14 ==============================================================================
mbed_official 376:cb4d9db17537 15 ##### How to use this driver #####
mbed_official 376:cb4d9db17537 16 ==============================================================================
mbed_official 376:cb4d9db17537 17
mbed_official 376:cb4d9db17537 18 [..]
mbed_official 376:cb4d9db17537 19 *** How to configure Interrupts using CORTEX HAL driver ***
mbed_official 376:cb4d9db17537 20 ===========================================================
mbed_official 376:cb4d9db17537 21 [..]
mbed_official 376:cb4d9db17537 22 This section provide functions allowing to configure the NVIC interrupts (IRQ).
mbed_official 376:cb4d9db17537 23 The Cortex-M0+ exceptions are managed by CMSIS functions.
mbed_official 376:cb4d9db17537 24 (#) Enable and Configure the priority of the selected IRQ Channels.
mbed_official 376:cb4d9db17537 25 The priority can be 0..3.
mbed_official 376:cb4d9db17537 26
mbed_official 376:cb4d9db17537 27 -@- Lower priority values gives higher priority.
mbed_official 376:cb4d9db17537 28 -@- Priority Order:
mbed_official 376:cb4d9db17537 29 (#@) Lowest priority.
mbed_official 376:cb4d9db17537 30 (#@) Lowest hardware priority (IRQn position).
mbed_official 376:cb4d9db17537 31
mbed_official 376:cb4d9db17537 32 (#) Configure the priority of the selected IRQ Channels using HAL_NVIC_SetPriority()
mbed_official 376:cb4d9db17537 33
mbed_official 376:cb4d9db17537 34 (#) Enable the selected IRQ Channels using HAL_NVIC_EnableIRQ()
mbed_official 376:cb4d9db17537 35
mbed_official 376:cb4d9db17537 36 [..]
mbed_official 376:cb4d9db17537 37 *** How to configure Systick using CORTEX HAL driver ***
mbed_official 376:cb4d9db17537 38 ========================================================
mbed_official 376:cb4d9db17537 39 [..]
mbed_official 376:cb4d9db17537 40 Setup SysTick Timer for time base
mbed_official 376:cb4d9db17537 41
mbed_official 376:cb4d9db17537 42 (+) The HAL_SYSTICK_Config()function calls the SysTick_Config() function which
mbed_official 376:cb4d9db17537 43 is a CMSIS function that:
mbed_official 376:cb4d9db17537 44 (++) Configures the SysTick Reload register with value passed as function parameter.
mbed_official 376:cb4d9db17537 45 (++) Configures the SysTick IRQ priority to the lowest value (0x03).
mbed_official 376:cb4d9db17537 46 (++) Resets the SysTick Counter register.
mbed_official 376:cb4d9db17537 47 (++) Configures the SysTick Counter clock source to be Core Clock Source (HCLK).
mbed_official 376:cb4d9db17537 48 (++) Enables the SysTick Interrupt.
mbed_official 376:cb4d9db17537 49 (++) Starts the SysTick Counter.
mbed_official 376:cb4d9db17537 50
mbed_official 376:cb4d9db17537 51 (+) You can change the SysTick Clock source to be HCLK_Div8 by calling the macro
mbed_official 376:cb4d9db17537 52 __HAL_CORTEX_SYSTICKCLK_CONFIG(SYSTICK_CLKSOURCE_HCLK_DIV8) just after the
mbed_official 376:cb4d9db17537 53 HAL_SYSTICK_Config() function call. The __HAL_CORTEX_SYSTICKCLK_CONFIG() macro is defined
mbed_official 376:cb4d9db17537 54 inside the stm32l0xx_hal_cortex.h file.
mbed_official 376:cb4d9db17537 55
mbed_official 376:cb4d9db17537 56 (+) You can change the SysTick IRQ priority by calling the
mbed_official 376:cb4d9db17537 57 HAL_NVIC_SetPriority(SysTick_IRQn,...) function just after the HAL_SYSTICK_Config() function
mbed_official 376:cb4d9db17537 58 call. The HAL_NVIC_SetPriority() call the NVIC_SetPriority() function which is a CMSIS function.
mbed_official 376:cb4d9db17537 59
mbed_official 376:cb4d9db17537 60 (+) To adjust the SysTick time base, use the following formula:
mbed_official 376:cb4d9db17537 61
mbed_official 376:cb4d9db17537 62 Reload Value = SysTick Counter Clock (Hz) x Desired Time base (s)
mbed_official 376:cb4d9db17537 63 (++) Reload Value is the parameter to be passed for HAL_SYSTICK_Config() function
mbed_official 376:cb4d9db17537 64 (++) Reload Value should not exceed 0xFFFFFF
mbed_official 376:cb4d9db17537 65
mbed_official 376:cb4d9db17537 66 @endverbatim
mbed_official 376:cb4d9db17537 67 ******************************************************************************
mbed_official 376:cb4d9db17537 68 * @attention
mbed_official 376:cb4d9db17537 69 *
mbed_official 490:119543c9f674 70 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 376:cb4d9db17537 71 *
mbed_official 376:cb4d9db17537 72 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 376:cb4d9db17537 73 * are permitted provided that the following conditions are met:
mbed_official 376:cb4d9db17537 74 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 376:cb4d9db17537 75 * this list of conditions and the following disclaimer.
mbed_official 376:cb4d9db17537 76 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 376:cb4d9db17537 77 * this list of conditions and the following disclaimer in the documentation
mbed_official 376:cb4d9db17537 78 * and/or other materials provided with the distribution.
mbed_official 376:cb4d9db17537 79 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 376:cb4d9db17537 80 * may be used to endorse or promote products derived from this software
mbed_official 376:cb4d9db17537 81 * without specific prior written permission.
mbed_official 376:cb4d9db17537 82 *
mbed_official 376:cb4d9db17537 83 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 376:cb4d9db17537 84 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 376:cb4d9db17537 85 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 376:cb4d9db17537 86 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 376:cb4d9db17537 87 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 376:cb4d9db17537 88 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 376:cb4d9db17537 89 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 376:cb4d9db17537 90 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 376:cb4d9db17537 91 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 376:cb4d9db17537 92 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 376:cb4d9db17537 93 *
mbed_official 376:cb4d9db17537 94 ******************************************************************************
mbed_official 376:cb4d9db17537 95 */
mbed_official 376:cb4d9db17537 96
mbed_official 376:cb4d9db17537 97 /* Includes ------------------------------------------------------------------*/
mbed_official 376:cb4d9db17537 98 #include "stm32l0xx_hal.h"
mbed_official 376:cb4d9db17537 99
mbed_official 376:cb4d9db17537 100 /** @addtogroup STM32L0xx_HAL_Driver
mbed_official 376:cb4d9db17537 101 * @{
mbed_official 376:cb4d9db17537 102 */
mbed_official 376:cb4d9db17537 103
mbed_official 490:119543c9f674 104 /** @addtogroup CORTEX
mbed_official 376:cb4d9db17537 105 * @brief CORTEX HAL module driver
mbed_official 376:cb4d9db17537 106 * @{
mbed_official 376:cb4d9db17537 107 */
mbed_official 376:cb4d9db17537 108
mbed_official 376:cb4d9db17537 109 #ifdef HAL_CORTEX_MODULE_ENABLED
mbed_official 376:cb4d9db17537 110
mbed_official 490:119543c9f674 111 /* Private types -------------------------------------------------------------*/
mbed_official 376:cb4d9db17537 112 /* Private variables ---------------------------------------------------------*/
mbed_official 490:119543c9f674 113 /* Private constants ---------------------------------------------------------*/
mbed_official 490:119543c9f674 114 /* Private macros ------------------------------------------------------------*/
mbed_official 376:cb4d9db17537 115 /* Private functions ---------------------------------------------------------*/
mbed_official 490:119543c9f674 116 /* Exported functions --------------------------------------------------------*/
mbed_official 376:cb4d9db17537 117
mbed_official 490:119543c9f674 118 /** @addtogroup CORTEX_Exported_Functions
mbed_official 376:cb4d9db17537 119 * @{
mbed_official 376:cb4d9db17537 120 */
mbed_official 376:cb4d9db17537 121
mbed_official 376:cb4d9db17537 122
mbed_official 490:119543c9f674 123 /** @addtogroup CORTEX_Exported_Functions_Group1 Initialization and de-initialization functions
mbed_official 376:cb4d9db17537 124 * @brief Initialization and Configuration functions
mbed_official 376:cb4d9db17537 125 *
mbed_official 376:cb4d9db17537 126 @verbatim
mbed_official 376:cb4d9db17537 127 ==============================================================================
mbed_official 376:cb4d9db17537 128 ##### Initialization and de-initialization functions #####
mbed_official 376:cb4d9db17537 129 ==============================================================================
mbed_official 376:cb4d9db17537 130 [..]
mbed_official 376:cb4d9db17537 131 This section provides the CORTEX HAL driver functions allowing to configure Interrupts
mbed_official 376:cb4d9db17537 132 Systick functionalities
mbed_official 376:cb4d9db17537 133
mbed_official 376:cb4d9db17537 134 @endverbatim
mbed_official 376:cb4d9db17537 135 * @{
mbed_official 376:cb4d9db17537 136 */
mbed_official 376:cb4d9db17537 137
mbed_official 376:cb4d9db17537 138 /**
mbed_official 376:cb4d9db17537 139 * @brief Sets the priority of an interrupt.
mbed_official 376:cb4d9db17537 140 * @param IRQn: External interrupt number .
mbed_official 376:cb4d9db17537 141 * This parameter can be an enumerator of IRQn_Type enumeration
mbed_official 376:cb4d9db17537 142 * (For the complete STM32 Devices IRQ Channels list, please refer to stm32l0xx.h file)
mbed_official 376:cb4d9db17537 143 * @param PreemptPriority: The pre-emption priority for the IRQn channel.
mbed_official 376:cb4d9db17537 144 * This parameter can be a value between 0 and 3.
mbed_official 376:cb4d9db17537 145 * A lower priority value indicates a higher priority
mbed_official 376:cb4d9db17537 146 * @param SubPriority: The subpriority level for the IRQ channel.
mbed_official 376:cb4d9db17537 147 * with stm32l0xx devices, this parameter is a dummy value and it is ignored, because
mbed_official 376:cb4d9db17537 148 * no subpriority supported in Cortex M0+ based products.
mbed_official 376:cb4d9db17537 149 * @retval None
mbed_official 376:cb4d9db17537 150 */
mbed_official 376:cb4d9db17537 151 void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
mbed_official 376:cb4d9db17537 152 {
mbed_official 376:cb4d9db17537 153 /* Check the parameters */
mbed_official 376:cb4d9db17537 154 assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
mbed_official 376:cb4d9db17537 155 NVIC_SetPriority(IRQn,PreemptPriority);
mbed_official 376:cb4d9db17537 156 }
mbed_official 376:cb4d9db17537 157
mbed_official 376:cb4d9db17537 158 /**
mbed_official 376:cb4d9db17537 159 * @brief Enables a device specific interrupt in the NVIC interrupt controller.
mbed_official 376:cb4d9db17537 160 * @note To configure interrupts priority correctly, the NVIC_PriorityGroupConfig()
mbed_official 376:cb4d9db17537 161 * function should be called before.
mbed_official 376:cb4d9db17537 162 * @param IRQn External interrupt number .
mbed_official 376:cb4d9db17537 163 * This parameter can be an enumerator of IRQn_Type enumeration
mbed_official 376:cb4d9db17537 164 * (For the complete STM32 Devices IRQ Channels list, please refer to stm32l0xx.h file)
mbed_official 376:cb4d9db17537 165 * @retval None
mbed_official 376:cb4d9db17537 166 */
mbed_official 376:cb4d9db17537 167 void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
mbed_official 376:cb4d9db17537 168 {
mbed_official 490:119543c9f674 169 /* Check the parameters */
mbed_official 490:119543c9f674 170 assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
mbed_official 490:119543c9f674 171
mbed_official 376:cb4d9db17537 172 /* Enable interrupt */
mbed_official 376:cb4d9db17537 173 NVIC_EnableIRQ(IRQn);
mbed_official 376:cb4d9db17537 174 }
mbed_official 376:cb4d9db17537 175
mbed_official 376:cb4d9db17537 176 /**
mbed_official 376:cb4d9db17537 177 * @brief Disables a device specific interrupt in the NVIC interrupt controller.
mbed_official 376:cb4d9db17537 178 * @param IRQn External interrupt number .
mbed_official 376:cb4d9db17537 179 * This parameter can be an enumerator of IRQn_Type enumeration
mbed_official 376:cb4d9db17537 180 * (For the complete STM32 Devices IRQ Channels list, please refer to stm32l0xx.h file)
mbed_official 376:cb4d9db17537 181 * @retval None
mbed_official 376:cb4d9db17537 182 */
mbed_official 376:cb4d9db17537 183 void HAL_NVIC_DisableIRQ(IRQn_Type IRQn)
mbed_official 376:cb4d9db17537 184 {
mbed_official 490:119543c9f674 185 /* Check the parameters */
mbed_official 490:119543c9f674 186 assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
mbed_official 490:119543c9f674 187
mbed_official 376:cb4d9db17537 188 /* Disable interrupt */
mbed_official 376:cb4d9db17537 189 NVIC_DisableIRQ(IRQn);
mbed_official 376:cb4d9db17537 190 }
mbed_official 376:cb4d9db17537 191
mbed_official 376:cb4d9db17537 192 /**
mbed_official 376:cb4d9db17537 193 * @brief Initiates a system reset request to reset the MCU.
mbed_official 376:cb4d9db17537 194 * @param None
mbed_official 376:cb4d9db17537 195 * @retval None
mbed_official 376:cb4d9db17537 196 */
mbed_official 376:cb4d9db17537 197 void HAL_NVIC_SystemReset(void)
mbed_official 376:cb4d9db17537 198 {
mbed_official 376:cb4d9db17537 199 /* System Reset */
mbed_official 376:cb4d9db17537 200 NVIC_SystemReset();
mbed_official 376:cb4d9db17537 201 }
mbed_official 376:cb4d9db17537 202
mbed_official 376:cb4d9db17537 203 /**
mbed_official 376:cb4d9db17537 204 * @brief Initializes the System Timer and its interrupt, and starts the System Tick Timer.
mbed_official 376:cb4d9db17537 205 * Counter is in free running mode to generate periodic interrupts.
mbed_official 376:cb4d9db17537 206 * @param TicksNumb: Specifies the ticks Number of ticks between two interrupts.
mbed_official 376:cb4d9db17537 207 * @retval status: - 0 Function succeeded.
mbed_official 376:cb4d9db17537 208 * - 1 Function failed.
mbed_official 376:cb4d9db17537 209 */
mbed_official 376:cb4d9db17537 210 uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
mbed_official 376:cb4d9db17537 211 {
mbed_official 376:cb4d9db17537 212 return SysTick_Config(TicksNumb);
mbed_official 376:cb4d9db17537 213 }
mbed_official 376:cb4d9db17537 214 /**
mbed_official 376:cb4d9db17537 215 * @}
mbed_official 376:cb4d9db17537 216 */
mbed_official 376:cb4d9db17537 217
mbed_official 490:119543c9f674 218 /** @addtogroup CORTEX_Exported_Functions_Group2 Peripheral Control functions
mbed_official 376:cb4d9db17537 219 * @brief Cortex control functions
mbed_official 376:cb4d9db17537 220 *
mbed_official 376:cb4d9db17537 221 @verbatim
mbed_official 376:cb4d9db17537 222 ==============================================================================
mbed_official 376:cb4d9db17537 223 ##### Peripheral Control functions #####
mbed_official 376:cb4d9db17537 224 ==============================================================================
mbed_official 376:cb4d9db17537 225 [..]
mbed_official 376:cb4d9db17537 226 This subsection provides a set of functions allowing to control the CORTEX
mbed_official 376:cb4d9db17537 227 (NVIC, SYSTICK) functionalities.
mbed_official 376:cb4d9db17537 228
mbed_official 376:cb4d9db17537 229
mbed_official 376:cb4d9db17537 230 @endverbatim
mbed_official 376:cb4d9db17537 231 * @{
mbed_official 376:cb4d9db17537 232 */
mbed_official 376:cb4d9db17537 233
mbed_official 376:cb4d9db17537 234
mbed_official 376:cb4d9db17537 235
mbed_official 376:cb4d9db17537 236 /**
mbed_official 376:cb4d9db17537 237 * @brief Sets Pending bit of an external interrupt.
mbed_official 376:cb4d9db17537 238 * @param IRQn External interrupt number
mbed_official 376:cb4d9db17537 239 * This parameter can be an enumerator of @ref IRQn_Type enumeration
mbed_official 376:cb4d9db17537 240 * (For the complete STM32 Devices IRQ Channels list, please refer to stm32l0xx.h file)
mbed_official 376:cb4d9db17537 241 * @retval None
mbed_official 376:cb4d9db17537 242 */
mbed_official 376:cb4d9db17537 243 void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn)
mbed_official 376:cb4d9db17537 244 {
mbed_official 376:cb4d9db17537 245 /* Set interrupt pending */
mbed_official 376:cb4d9db17537 246 NVIC_SetPendingIRQ(IRQn);
mbed_official 376:cb4d9db17537 247 }
mbed_official 376:cb4d9db17537 248
mbed_official 376:cb4d9db17537 249 /**
mbed_official 376:cb4d9db17537 250 * @brief Gets Pending Interrupt (reads the pending register in the NVIC
mbed_official 376:cb4d9db17537 251 * and returns the pending bit for the specified interrupt).
mbed_official 376:cb4d9db17537 252 * @param IRQn External interrupt number .
mbed_official 376:cb4d9db17537 253 * This parameter can be an enumerator of IRQn_Type enumeration
mbed_official 376:cb4d9db17537 254 * (For the complete STM32 Devices IRQ Channels list, please refer to stm32l0xx.h file)
mbed_official 376:cb4d9db17537 255 * @retval status: - 0 Interrupt status is not pending.
mbed_official 376:cb4d9db17537 256 * - 1 Interrupt status is pending.
mbed_official 376:cb4d9db17537 257 */
mbed_official 376:cb4d9db17537 258 uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn)
mbed_official 376:cb4d9db17537 259 {
mbed_official 376:cb4d9db17537 260 /* Return 1 if pending else 0 */
mbed_official 376:cb4d9db17537 261 return NVIC_GetPendingIRQ(IRQn);
mbed_official 376:cb4d9db17537 262 }
mbed_official 376:cb4d9db17537 263
mbed_official 376:cb4d9db17537 264 /**
mbed_official 376:cb4d9db17537 265 * @brief Clears the pending bit of an external interrupt.
mbed_official 376:cb4d9db17537 266 * @param IRQn External interrupt number .
mbed_official 376:cb4d9db17537 267 * This parameter can be an enumerator of IRQn_Type enumeration
mbed_official 376:cb4d9db17537 268 * (For the complete STM32 Devices IRQ Channels list, please refer to stm32l0xx.h file)
mbed_official 376:cb4d9db17537 269 * @retval None
mbed_official 376:cb4d9db17537 270 */
mbed_official 376:cb4d9db17537 271 void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn)
mbed_official 376:cb4d9db17537 272 {
mbed_official 376:cb4d9db17537 273 /* Clear pending interrupt */
mbed_official 376:cb4d9db17537 274 NVIC_ClearPendingIRQ(IRQn);
mbed_official 376:cb4d9db17537 275 }
mbed_official 376:cb4d9db17537 276
mbed_official 376:cb4d9db17537 277
mbed_official 376:cb4d9db17537 278 /**
mbed_official 376:cb4d9db17537 279 * @brief Configures the SysTick clock source.
mbed_official 376:cb4d9db17537 280 * @param CLKSource: specifies the SysTick clock source.
mbed_official 376:cb4d9db17537 281 * This parameter can be one of the following values:
mbed_official 376:cb4d9db17537 282 * @arg SYSTICK_CLKSOURCE_HCLK_DIV8: AHB clock divided by 8 selected as SysTick clock source.
mbed_official 376:cb4d9db17537 283 * @arg SYSTICK_CLKSOURCE_HCLK: AHB clock selected as SysTick clock source.
mbed_official 376:cb4d9db17537 284 * @retval None
mbed_official 376:cb4d9db17537 285 */
mbed_official 376:cb4d9db17537 286 void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource)
mbed_official 376:cb4d9db17537 287 {
mbed_official 376:cb4d9db17537 288 /* Check the parameters */
mbed_official 376:cb4d9db17537 289 assert_param(IS_SYSTICK_CLK_SOURCE(CLKSource));
mbed_official 376:cb4d9db17537 290 if (CLKSource == SYSTICK_CLKSOURCE_HCLK)
mbed_official 376:cb4d9db17537 291 {
mbed_official 376:cb4d9db17537 292 SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK;
mbed_official 376:cb4d9db17537 293 }
mbed_official 376:cb4d9db17537 294 else
mbed_official 376:cb4d9db17537 295 {
mbed_official 376:cb4d9db17537 296 SysTick->CTRL &= ~SYSTICK_CLKSOURCE_HCLK;
mbed_official 376:cb4d9db17537 297 }
mbed_official 376:cb4d9db17537 298 }
mbed_official 376:cb4d9db17537 299
mbed_official 376:cb4d9db17537 300 /**
mbed_official 376:cb4d9db17537 301 * @brief This function handles SYSTICK interrupt request.
mbed_official 376:cb4d9db17537 302 * @param None
mbed_official 376:cb4d9db17537 303 * @retval None
mbed_official 376:cb4d9db17537 304 */
mbed_official 376:cb4d9db17537 305 void HAL_SYSTICK_IRQHandler(void)
mbed_official 376:cb4d9db17537 306 {
mbed_official 376:cb4d9db17537 307 HAL_SYSTICK_Callback();
mbed_official 376:cb4d9db17537 308 }
mbed_official 376:cb4d9db17537 309
mbed_official 376:cb4d9db17537 310 /**
mbed_official 376:cb4d9db17537 311 * @brief SYSTICK callback.
mbed_official 376:cb4d9db17537 312 * @param None
mbed_official 376:cb4d9db17537 313 * @retval None
mbed_official 376:cb4d9db17537 314 */
mbed_official 376:cb4d9db17537 315 __weak void HAL_SYSTICK_Callback(void)
mbed_official 376:cb4d9db17537 316 {
mbed_official 376:cb4d9db17537 317 /* NOTE : This function Should not be modified, when the callback is needed,
mbed_official 376:cb4d9db17537 318 the HAL_SYSTICK_Callback could be implemented in the user file
mbed_official 376:cb4d9db17537 319 */
mbed_official 376:cb4d9db17537 320 }
mbed_official 376:cb4d9db17537 321
mbed_official 376:cb4d9db17537 322 /**
mbed_official 376:cb4d9db17537 323 * @}
mbed_official 376:cb4d9db17537 324 */
mbed_official 376:cb4d9db17537 325
mbed_official 376:cb4d9db17537 326 /**
mbed_official 376:cb4d9db17537 327 * @}
mbed_official 376:cb4d9db17537 328 */
mbed_official 376:cb4d9db17537 329
mbed_official 376:cb4d9db17537 330 #endif /* HAL_CORTEX_MODULE_ENABLED */
mbed_official 376:cb4d9db17537 331 /**
mbed_official 376:cb4d9db17537 332 * @}
mbed_official 376:cb4d9db17537 333 */
mbed_official 376:cb4d9db17537 334
mbed_official 376:cb4d9db17537 335 /**
mbed_official 376:cb4d9db17537 336 * @}
mbed_official 376:cb4d9db17537 337 */
mbed_official 376:cb4d9db17537 338
mbed_official 376:cb4d9db17537 339 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
mbed_official 490:119543c9f674 340