Lancaster University's (short term!) clone of mbed-src for micro:bit. This is a copy of the github branch https://github.com/lancaster-university/mbed-classic

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Fri Aug 14 13:15:17 2015 +0100
Revision:
610:813dcc80987e
Synchronized with git revision 6d84db41c6833e0b9b024741eb0616a5f62d5599

Full URL: https://github.com/mbedmicro/mbed/commit/6d84db41c6833e0b9b024741eb0616a5f62d5599/

DISCO_F746NG - Improvements

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 610:813dcc80987e 1 /**
mbed_official 610:813dcc80987e 2 ******************************************************************************
mbed_official 610:813dcc80987e 3 * @file stm32l4xx_hal.c
mbed_official 610:813dcc80987e 4 * @author MCD Application Team
mbed_official 610:813dcc80987e 5 * @version V1.0.0
mbed_official 610:813dcc80987e 6 * @date 26-June-2015
mbed_official 610:813dcc80987e 7 * @brief HAL module driver.
mbed_official 610:813dcc80987e 8 * This is the common part of the HAL initialization
mbed_official 610:813dcc80987e 9 *
mbed_official 610:813dcc80987e 10 @verbatim
mbed_official 610:813dcc80987e 11 ==============================================================================
mbed_official 610:813dcc80987e 12 ##### How to use this driver #####
mbed_official 610:813dcc80987e 13 ==============================================================================
mbed_official 610:813dcc80987e 14 [..]
mbed_official 610:813dcc80987e 15 The common HAL driver contains a set of generic and common APIs that can be
mbed_official 610:813dcc80987e 16 used by the PPP peripheral drivers and the user to start using the HAL.
mbed_official 610:813dcc80987e 17 [..]
mbed_official 610:813dcc80987e 18 The HAL contains two APIs' categories:
mbed_official 610:813dcc80987e 19 (+) Common HAL APIs
mbed_official 610:813dcc80987e 20 (+) Services HAL APIs
mbed_official 610:813dcc80987e 21
mbed_official 610:813dcc80987e 22 @endverbatim
mbed_official 610:813dcc80987e 23 ******************************************************************************
mbed_official 610:813dcc80987e 24 * @attention
mbed_official 610:813dcc80987e 25 *
mbed_official 610:813dcc80987e 26 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 610:813dcc80987e 27 *
mbed_official 610:813dcc80987e 28 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 610:813dcc80987e 29 * are permitted provided that the following conditions are met:
mbed_official 610:813dcc80987e 30 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 610:813dcc80987e 31 * this list of conditions and the following disclaimer.
mbed_official 610:813dcc80987e 32 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 610:813dcc80987e 33 * this list of conditions and the following disclaimer in the documentation
mbed_official 610:813dcc80987e 34 * and/or other materials provided with the distribution.
mbed_official 610:813dcc80987e 35 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 610:813dcc80987e 36 * may be used to endorse or promote products derived from this software
mbed_official 610:813dcc80987e 37 * without specific prior written permission.
mbed_official 610:813dcc80987e 38 *
mbed_official 610:813dcc80987e 39 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 610:813dcc80987e 40 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 610:813dcc80987e 41 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 610:813dcc80987e 42 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 610:813dcc80987e 43 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 610:813dcc80987e 44 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 610:813dcc80987e 45 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 610:813dcc80987e 46 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 610:813dcc80987e 47 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 610:813dcc80987e 48 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 610:813dcc80987e 49 *
mbed_official 610:813dcc80987e 50 ******************************************************************************
mbed_official 610:813dcc80987e 51 */
mbed_official 610:813dcc80987e 52
mbed_official 610:813dcc80987e 53 /* Includes ------------------------------------------------------------------*/
mbed_official 610:813dcc80987e 54 #include "stm32l4xx_hal.h"
mbed_official 610:813dcc80987e 55
mbed_official 610:813dcc80987e 56 /** @addtogroup STM32L4xx_HAL_Driver
mbed_official 610:813dcc80987e 57 * @{
mbed_official 610:813dcc80987e 58 */
mbed_official 610:813dcc80987e 59
mbed_official 610:813dcc80987e 60 /** @defgroup HAL HAL
mbed_official 610:813dcc80987e 61 * @brief HAL module driver
mbed_official 610:813dcc80987e 62 * @{
mbed_official 610:813dcc80987e 63 */
mbed_official 610:813dcc80987e 64
mbed_official 610:813dcc80987e 65 #ifdef HAL_MODULE_ENABLED
mbed_official 610:813dcc80987e 66
mbed_official 610:813dcc80987e 67 /* Private typedef -----------------------------------------------------------*/
mbed_official 610:813dcc80987e 68 /* Private define ------------------------------------------------------------*/
mbed_official 610:813dcc80987e 69 /**
mbed_official 610:813dcc80987e 70 * @brief STM32L4xx HAL Driver version number V1.0.0
mbed_official 610:813dcc80987e 71 */
mbed_official 610:813dcc80987e 72 #define __STM32L4xx_HAL_VERSION_MAIN (0x01) /*!< [31:24] main version */
mbed_official 610:813dcc80987e 73 #define __STM32L4xx_HAL_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */
mbed_official 610:813dcc80987e 74 #define __STM32L4xx_HAL_VERSION_SUB2 (0x00) /*!< [15:8] sub2 version */
mbed_official 610:813dcc80987e 75 #define __STM32L4xx_HAL_VERSION_RC (0x00) /*!< [7:0] release candidate */
mbed_official 610:813dcc80987e 76 #define __STM32L4xx_HAL_VERSION ((__STM32L4xx_HAL_VERSION_MAIN << 24)\
mbed_official 610:813dcc80987e 77 |(__STM32L4xx_HAL_VERSION_SUB1 << 16)\
mbed_official 610:813dcc80987e 78 |(__STM32L4xx_HAL_VERSION_SUB2 << 8 )\
mbed_official 610:813dcc80987e 79 |(__STM32L4xx_HAL_VERSION_RC))
mbed_official 610:813dcc80987e 80
mbed_official 610:813dcc80987e 81 #define VREFBUF_TIMEOUT_VALUE (uint32_t)10 /* 10 ms (to be confirmed) */
mbed_official 610:813dcc80987e 82
mbed_official 610:813dcc80987e 83 /* ------------ SYSCFG registers bit address in the alias region ------------ */
mbed_official 610:813dcc80987e 84 #define SYSCFG_OFFSET (SYSCFG_BASE - PERIPH_BASE)
mbed_official 610:813dcc80987e 85 /* --- MEMRMP Register ---*/
mbed_official 610:813dcc80987e 86 /* Alias word address of FB_MODE bit */
mbed_official 610:813dcc80987e 87 #define MEMRMP_OFFSET SYSCFG_OFFSET
mbed_official 610:813dcc80987e 88 #define FB_MODE_BitNumber ((uint8_t)0x8)
mbed_official 610:813dcc80987e 89 #define FB_MODE_BB (PERIPH_BB_BASE + (MEMRMP_OFFSET * 32) + (FB_MODE_BitNumber * 4))
mbed_official 610:813dcc80987e 90
mbed_official 610:813dcc80987e 91 /* --- SCSR Register ---*/
mbed_official 610:813dcc80987e 92 /* Alias word address of SRAM2ER bit */
mbed_official 610:813dcc80987e 93 #define SCSR_OFFSET (SYSCFG_OFFSET + 0x18)
mbed_official 610:813dcc80987e 94 #define BRER_BitNumber ((uint8_t)0x0)
mbed_official 610:813dcc80987e 95 #define SCSR_SRAM2ER_BB (PERIPH_BB_BASE + (SCSR_OFFSET * 32) + (BRER_BitNumber * 4))
mbed_official 610:813dcc80987e 96
mbed_official 610:813dcc80987e 97 /* Private macro -------------------------------------------------------------*/
mbed_official 610:813dcc80987e 98 /* Private variables ---------------------------------------------------------*/
mbed_official 610:813dcc80987e 99 static __IO uint32_t uwTick;
mbed_official 610:813dcc80987e 100
mbed_official 610:813dcc80987e 101 /* Private function prototypes -----------------------------------------------*/
mbed_official 610:813dcc80987e 102 /* Exported functions --------------------------------------------------------*/
mbed_official 610:813dcc80987e 103
mbed_official 610:813dcc80987e 104 /** @defgroup HAL_Exported_Functions HAL Exported Functions
mbed_official 610:813dcc80987e 105 * @{
mbed_official 610:813dcc80987e 106 */
mbed_official 610:813dcc80987e 107
mbed_official 610:813dcc80987e 108 /** @defgroup HAL_Exported_Functions_Group1 Initialization and de-initialization Functions
mbed_official 610:813dcc80987e 109 * @brief Initialization and de-initialization functions
mbed_official 610:813dcc80987e 110 *
mbed_official 610:813dcc80987e 111 @verbatim
mbed_official 610:813dcc80987e 112 ===============================================================================
mbed_official 610:813dcc80987e 113 ##### Initialization and de-initialization functions #####
mbed_official 610:813dcc80987e 114 ===============================================================================
mbed_official 610:813dcc80987e 115 [..] This section provides functions allowing to:
mbed_official 610:813dcc80987e 116 (+) Initialize the Flash interface the NVIC allocation and initial time base
mbed_official 610:813dcc80987e 117 clock configuration.
mbed_official 610:813dcc80987e 118 (+) De-initialize common part of the HAL.
mbed_official 610:813dcc80987e 119 (+) Configure the time base source to have 1ms time base with a dedicated
mbed_official 610:813dcc80987e 120 Tick interrupt priority.
mbed_official 610:813dcc80987e 121 (++) SysTick timer is used by default as source of time base, but user
mbed_official 610:813dcc80987e 122 can eventually implement his proper time base source (a general purpose
mbed_official 610:813dcc80987e 123 timer for example or other time source), keeping in mind that Time base
mbed_official 610:813dcc80987e 124 duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and
mbed_official 610:813dcc80987e 125 handled in milliseconds basis.
mbed_official 610:813dcc80987e 126 (++) Time base configuration function (HAL_InitTick ()) is called automatically
mbed_official 610:813dcc80987e 127 at the beginning of the program after reset by HAL_Init() or at any time
mbed_official 610:813dcc80987e 128 when clock is configured, by HAL_RCC_ClockConfig().
mbed_official 610:813dcc80987e 129 (++) Source of time base is configured to generate interrupts at regular
mbed_official 610:813dcc80987e 130 time intervals. Care must be taken if HAL_Delay() is called from a
mbed_official 610:813dcc80987e 131 peripheral ISR process, the Tick interrupt line must have higher priority
mbed_official 610:813dcc80987e 132 (numerically lower) than the peripheral interrupt. Otherwise the caller
mbed_official 610:813dcc80987e 133 ISR process will be blocked.
mbed_official 610:813dcc80987e 134 (++) functions affecting time base configurations are declared as __weak
mbed_official 610:813dcc80987e 135 to make override possible in case of other implementations in user file.
mbed_official 610:813dcc80987e 136 @endverbatim
mbed_official 610:813dcc80987e 137 * @{
mbed_official 610:813dcc80987e 138 */
mbed_official 610:813dcc80987e 139
mbed_official 610:813dcc80987e 140 /**
mbed_official 610:813dcc80987e 141 * @brief Configure the Flash prefetch, the Instruction and Data caches,
mbed_official 610:813dcc80987e 142 * the time base source, NVIC and any required global low level hardware
mbed_official 610:813dcc80987e 143 * by calling the HAL_MspInit() callback function to be optionally defined in user file
mbed_official 610:813dcc80987e 144 * stm32l4xx_hal_msp.c.
mbed_official 610:813dcc80987e 145 *
mbed_official 610:813dcc80987e 146 * @note HAL_Init() function is called at the beginning of program after reset and before
mbed_official 610:813dcc80987e 147 * the clock configuration.
mbed_official 610:813dcc80987e 148 *
mbed_official 610:813dcc80987e 149 * @note In the default implementation the System Timer (Systick) is used as source of time base.
mbed_official 610:813dcc80987e 150 * The Systick configuration is based on MSI clock, as MSI is the clock
mbed_official 610:813dcc80987e 151 * used after a system Reset and the NVIC configuration is set to Priority group 4.
mbed_official 610:813dcc80987e 152 * Once done, time base tick starts incrementing: the tick variable counter is incremented
mbed_official 610:813dcc80987e 153 * each 1ms in the SysTick_Handler() interrupt handler.
mbed_official 610:813dcc80987e 154 *
mbed_official 610:813dcc80987e 155 * @retval HAL status
mbed_official 610:813dcc80987e 156 */
mbed_official 610:813dcc80987e 157 HAL_StatusTypeDef HAL_Init(void)
mbed_official 610:813dcc80987e 158 {
mbed_official 610:813dcc80987e 159 /* Configure Flash prefetch, Instruction cache, Data cache */
mbed_official 610:813dcc80987e 160 /* Default configuration at reset is: */
mbed_official 610:813dcc80987e 161 /* - Prefetch disabled */
mbed_official 610:813dcc80987e 162 /* - Instruction cache enabled */
mbed_official 610:813dcc80987e 163 /* - Data cache enabled */
mbed_official 610:813dcc80987e 164 #if (INSTRUCTION_CACHE_ENABLE == 0)
mbed_official 610:813dcc80987e 165 __HAL_FLASH_INSTRUCTION_CACHE_DISABLE();
mbed_official 610:813dcc80987e 166 #endif /* INSTRUCTION_CACHE_ENABLE */
mbed_official 610:813dcc80987e 167
mbed_official 610:813dcc80987e 168 #if (DATA_CACHE_ENABLE == 0)
mbed_official 610:813dcc80987e 169 __HAL_FLASH_DATA_CACHE_DISABLE();
mbed_official 610:813dcc80987e 170 #endif /* DATA_CACHE_ENABLE */
mbed_official 610:813dcc80987e 171
mbed_official 610:813dcc80987e 172 #if (PREFETCH_ENABLE != 0)
mbed_official 610:813dcc80987e 173 __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
mbed_official 610:813dcc80987e 174 #endif /* PREFETCH_ENABLE */
mbed_official 610:813dcc80987e 175
mbed_official 610:813dcc80987e 176 /* Set Interrupt Group Priority */
mbed_official 610:813dcc80987e 177 HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
mbed_official 610:813dcc80987e 178
mbed_official 610:813dcc80987e 179 /* Use SysTick as time base source and configure 1ms tick (default clock after Reset is MSI) */
mbed_official 610:813dcc80987e 180 HAL_InitTick(TICK_INT_PRIORITY);
mbed_official 610:813dcc80987e 181
mbed_official 610:813dcc80987e 182 /* Init the low level hardware */
mbed_official 610:813dcc80987e 183 HAL_MspInit();
mbed_official 610:813dcc80987e 184
mbed_official 610:813dcc80987e 185 /* Return function status */
mbed_official 610:813dcc80987e 186 return HAL_OK;
mbed_official 610:813dcc80987e 187 }
mbed_official 610:813dcc80987e 188
mbed_official 610:813dcc80987e 189 /**
mbed_official 610:813dcc80987e 190 * @brief De-initialize common part of the HAL and stop the source of time base.
mbed_official 610:813dcc80987e 191 * @note This function is optional.
mbed_official 610:813dcc80987e 192 * @retval HAL status
mbed_official 610:813dcc80987e 193 */
mbed_official 610:813dcc80987e 194 HAL_StatusTypeDef HAL_DeInit(void)
mbed_official 610:813dcc80987e 195 {
mbed_official 610:813dcc80987e 196 /* Reset of all peripherals */
mbed_official 610:813dcc80987e 197 __HAL_RCC_APB1_FORCE_RESET();
mbed_official 610:813dcc80987e 198 __HAL_RCC_APB1_RELEASE_RESET();
mbed_official 610:813dcc80987e 199
mbed_official 610:813dcc80987e 200 __HAL_RCC_APB2_FORCE_RESET();
mbed_official 610:813dcc80987e 201 __HAL_RCC_APB2_RELEASE_RESET();
mbed_official 610:813dcc80987e 202
mbed_official 610:813dcc80987e 203 __HAL_RCC_AHB1_FORCE_RESET();
mbed_official 610:813dcc80987e 204 __HAL_RCC_AHB1_RELEASE_RESET();
mbed_official 610:813dcc80987e 205
mbed_official 610:813dcc80987e 206 __HAL_RCC_AHB2_FORCE_RESET();
mbed_official 610:813dcc80987e 207 __HAL_RCC_AHB2_RELEASE_RESET();
mbed_official 610:813dcc80987e 208
mbed_official 610:813dcc80987e 209 __HAL_RCC_AHB3_FORCE_RESET();
mbed_official 610:813dcc80987e 210 __HAL_RCC_AHB3_RELEASE_RESET();
mbed_official 610:813dcc80987e 211
mbed_official 610:813dcc80987e 212 /* De-Init the low level hardware */
mbed_official 610:813dcc80987e 213 HAL_MspDeInit();
mbed_official 610:813dcc80987e 214
mbed_official 610:813dcc80987e 215 /* Return function status */
mbed_official 610:813dcc80987e 216 return HAL_OK;
mbed_official 610:813dcc80987e 217 }
mbed_official 610:813dcc80987e 218
mbed_official 610:813dcc80987e 219 /**
mbed_official 610:813dcc80987e 220 * @brief Initialize the MSP.
mbed_official 610:813dcc80987e 221 * @retval None
mbed_official 610:813dcc80987e 222 */
mbed_official 610:813dcc80987e 223 __weak void HAL_MspInit(void)
mbed_official 610:813dcc80987e 224 {
mbed_official 610:813dcc80987e 225 /* NOTE : This function should not be modified, when the callback is needed,
mbed_official 610:813dcc80987e 226 the HAL_MspInit could be implemented in the user file
mbed_official 610:813dcc80987e 227 */
mbed_official 610:813dcc80987e 228 }
mbed_official 610:813dcc80987e 229
mbed_official 610:813dcc80987e 230 /**
mbed_official 610:813dcc80987e 231 * @brief DeInitialize the MSP.
mbed_official 610:813dcc80987e 232 * @retval None
mbed_official 610:813dcc80987e 233 */
mbed_official 610:813dcc80987e 234 __weak void HAL_MspDeInit(void)
mbed_official 610:813dcc80987e 235 {
mbed_official 610:813dcc80987e 236 /* NOTE : This function should not be modified, when the callback is needed,
mbed_official 610:813dcc80987e 237 the HAL_MspDeInit could be implemented in the user file
mbed_official 610:813dcc80987e 238 */
mbed_official 610:813dcc80987e 239 }
mbed_official 610:813dcc80987e 240
mbed_official 610:813dcc80987e 241 /**
mbed_official 610:813dcc80987e 242 * @brief This function configures the source of the time base:
mbed_official 610:813dcc80987e 243 * The time source is configured to have 1ms time base with a dedicated
mbed_official 610:813dcc80987e 244 * Tick interrupt priority.
mbed_official 610:813dcc80987e 245 * @note This function is called automatically at the beginning of program after
mbed_official 610:813dcc80987e 246 * reset by HAL_Init() or at any time when clock is reconfigured by HAL_RCC_ClockConfig().
mbed_official 610:813dcc80987e 247 * @note In the default implementation, SysTick timer is the source of time base.
mbed_official 610:813dcc80987e 248 * It is used to generate interrupts at regular time intervals.
mbed_official 610:813dcc80987e 249 * Care must be taken if HAL_Delay() is called from a peripheral ISR process,
mbed_official 610:813dcc80987e 250 * The SysTick interrupt must have higher priority (numerically lower)
mbed_official 610:813dcc80987e 251 * than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
mbed_official 610:813dcc80987e 252 * The function is declared as __weak to be overwritten in case of other
mbed_official 610:813dcc80987e 253 * implementation in user file.
mbed_official 610:813dcc80987e 254 * @param TickPriority: Tick interrupt priority.
mbed_official 610:813dcc80987e 255 * @retval HAL status
mbed_official 610:813dcc80987e 256 */
mbed_official 610:813dcc80987e 257 __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
mbed_official 610:813dcc80987e 258 {
mbed_official 610:813dcc80987e 259 /*Configure the SysTick to have interrupt in 1ms time basis*/
mbed_official 610:813dcc80987e 260 HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
mbed_official 610:813dcc80987e 261
mbed_official 610:813dcc80987e 262 /*Configure the SysTick IRQ priority */
mbed_official 610:813dcc80987e 263 HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority ,0);
mbed_official 610:813dcc80987e 264
mbed_official 610:813dcc80987e 265 /* Return function status */
mbed_official 610:813dcc80987e 266 return HAL_OK;
mbed_official 610:813dcc80987e 267 }
mbed_official 610:813dcc80987e 268
mbed_official 610:813dcc80987e 269 /**
mbed_official 610:813dcc80987e 270 * @}
mbed_official 610:813dcc80987e 271 */
mbed_official 610:813dcc80987e 272
mbed_official 610:813dcc80987e 273 /** @defgroup HAL_Exported_Functions_Group2 HAL Control functions
mbed_official 610:813dcc80987e 274 * @brief HAL Control functions
mbed_official 610:813dcc80987e 275 *
mbed_official 610:813dcc80987e 276 @verbatim
mbed_official 610:813dcc80987e 277 ===============================================================================
mbed_official 610:813dcc80987e 278 ##### HAL Control functions #####
mbed_official 610:813dcc80987e 279 ===============================================================================
mbed_official 610:813dcc80987e 280 [..] This section provides functions allowing to:
mbed_official 610:813dcc80987e 281 (+) Provide a tick value in millisecond
mbed_official 610:813dcc80987e 282 (+) Provide a blocking delay in millisecond
mbed_official 610:813dcc80987e 283 (+) Suspend the time base source interrupt
mbed_official 610:813dcc80987e 284 (+) Resume the time base source interrupt
mbed_official 610:813dcc80987e 285 (+) Get the HAL API driver version
mbed_official 610:813dcc80987e 286 (+) Get the device identifier
mbed_official 610:813dcc80987e 287 (+) Get the device revision identifier
mbed_official 610:813dcc80987e 288
mbed_official 610:813dcc80987e 289 @endverbatim
mbed_official 610:813dcc80987e 290 * @{
mbed_official 610:813dcc80987e 291 */
mbed_official 610:813dcc80987e 292
mbed_official 610:813dcc80987e 293 /**
mbed_official 610:813dcc80987e 294 * @brief This function is called to increment a global variable "uwTick"
mbed_official 610:813dcc80987e 295 * used as application time base.
mbed_official 610:813dcc80987e 296 * @note In the default implementation, this variable is incremented each 1ms
mbed_official 610:813dcc80987e 297 * in SysTick ISR.
mbed_official 610:813dcc80987e 298 * @note This function is declared as __weak to be overwritten in case of other
mbed_official 610:813dcc80987e 299 * implementations in user file.
mbed_official 610:813dcc80987e 300 * @retval None
mbed_official 610:813dcc80987e 301 */
mbed_official 610:813dcc80987e 302 __weak void HAL_IncTick(void)
mbed_official 610:813dcc80987e 303 {
mbed_official 610:813dcc80987e 304 uwTick++;
mbed_official 610:813dcc80987e 305 }
mbed_official 610:813dcc80987e 306
mbed_official 610:813dcc80987e 307 /**
mbed_official 610:813dcc80987e 308 * @brief Provide a tick value in millisecond.
mbed_official 610:813dcc80987e 309 * @note This function is declared as __weak to be overwritten in case of other
mbed_official 610:813dcc80987e 310 * implementations in user file.
mbed_official 610:813dcc80987e 311 * @retval tick value
mbed_official 610:813dcc80987e 312 */
mbed_official 610:813dcc80987e 313 __weak uint32_t HAL_GetTick(void)
mbed_official 610:813dcc80987e 314 {
mbed_official 610:813dcc80987e 315 return uwTick;
mbed_official 610:813dcc80987e 316 }
mbed_official 610:813dcc80987e 317
mbed_official 610:813dcc80987e 318 /**
mbed_official 610:813dcc80987e 319 * @brief Provide accurate delay (in milliseconds) based on variable incremented.
mbed_official 610:813dcc80987e 320 * @note In the default implementation , SysTick timer is the source of time base.
mbed_official 610:813dcc80987e 321 * It is used to generate interrupts at regular time intervals where uwTick
mbed_official 610:813dcc80987e 322 * is incremented.
mbed_official 610:813dcc80987e 323 * @note This function is declared as __weak to be overwritten in case of other
mbed_official 610:813dcc80987e 324 * implementations in user file.
mbed_official 610:813dcc80987e 325 * @param Delay: specifies the delay time length, in milliseconds.
mbed_official 610:813dcc80987e 326 * @retval None
mbed_official 610:813dcc80987e 327 */
mbed_official 610:813dcc80987e 328 __weak void HAL_Delay(uint32_t Delay)
mbed_official 610:813dcc80987e 329 {
mbed_official 610:813dcc80987e 330 uint32_t tickstart = 0;
mbed_official 610:813dcc80987e 331 tickstart = HAL_GetTick();
mbed_official 610:813dcc80987e 332 while((HAL_GetTick() - tickstart) < Delay)
mbed_official 610:813dcc80987e 333 {
mbed_official 610:813dcc80987e 334 }
mbed_official 610:813dcc80987e 335 }
mbed_official 610:813dcc80987e 336
mbed_official 610:813dcc80987e 337 /**
mbed_official 610:813dcc80987e 338 * @brief Suspend Tick increment.
mbed_official 610:813dcc80987e 339 * @note In the default implementation , SysTick timer is the source of time base. It is
mbed_official 610:813dcc80987e 340 * used to generate interrupts at regular time intervals. Once HAL_SuspendTick()
mbed_official 610:813dcc80987e 341 * is called, the SysTick interrupt will be disabled and so Tick increment
mbed_official 610:813dcc80987e 342 * is suspended.
mbed_official 610:813dcc80987e 343 * @note This function is declared as __weak to be overwritten in case of other
mbed_official 610:813dcc80987e 344 * implementations in user file.
mbed_official 610:813dcc80987e 345 * @retval None
mbed_official 610:813dcc80987e 346 */
mbed_official 610:813dcc80987e 347 __weak void HAL_SuspendTick(void)
mbed_official 610:813dcc80987e 348 {
mbed_official 610:813dcc80987e 349 /* Disable SysTick Interrupt */
mbed_official 610:813dcc80987e 350 SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
mbed_official 610:813dcc80987e 351 }
mbed_official 610:813dcc80987e 352
mbed_official 610:813dcc80987e 353 /**
mbed_official 610:813dcc80987e 354 * @brief Resume Tick increment.
mbed_official 610:813dcc80987e 355 * @note In the default implementation , SysTick timer is the source of time base. It is
mbed_official 610:813dcc80987e 356 * used to generate interrupts at regular time intervals. Once HAL_ResumeTick()
mbed_official 610:813dcc80987e 357 * is called, the SysTick interrupt will be enabled and so Tick increment
mbed_official 610:813dcc80987e 358 * is resumed.
mbed_official 610:813dcc80987e 359 * @note This function is declared as __weak to be overwritten in case of other
mbed_official 610:813dcc80987e 360 * implementations in user file.
mbed_official 610:813dcc80987e 361 * @retval None
mbed_official 610:813dcc80987e 362 */
mbed_official 610:813dcc80987e 363 __weak void HAL_ResumeTick(void)
mbed_official 610:813dcc80987e 364 {
mbed_official 610:813dcc80987e 365 /* Enable SysTick Interrupt */
mbed_official 610:813dcc80987e 366 SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
mbed_official 610:813dcc80987e 367 }
mbed_official 610:813dcc80987e 368
mbed_official 610:813dcc80987e 369 /**
mbed_official 610:813dcc80987e 370 * @brief Return the HAL revision.
mbed_official 610:813dcc80987e 371 * @retval version : 0xXYZR (8bits for each decimal, R for RC)
mbed_official 610:813dcc80987e 372 */
mbed_official 610:813dcc80987e 373 uint32_t HAL_GetHalVersion(void)
mbed_official 610:813dcc80987e 374 {
mbed_official 610:813dcc80987e 375 return __STM32L4xx_HAL_VERSION;
mbed_official 610:813dcc80987e 376 }
mbed_official 610:813dcc80987e 377
mbed_official 610:813dcc80987e 378 /**
mbed_official 610:813dcc80987e 379 * @brief Return the device revision identifier.
mbed_official 610:813dcc80987e 380 * @retval Device revision identifier
mbed_official 610:813dcc80987e 381 */
mbed_official 610:813dcc80987e 382 uint32_t HAL_GetREVID(void)
mbed_official 610:813dcc80987e 383 {
mbed_official 610:813dcc80987e 384 return((DBGMCU->IDCODE & DBGMCU_IDCODE_REV_ID) >> 16);
mbed_official 610:813dcc80987e 385 }
mbed_official 610:813dcc80987e 386
mbed_official 610:813dcc80987e 387 /**
mbed_official 610:813dcc80987e 388 * @brief Return the device identifier.
mbed_official 610:813dcc80987e 389 * @retval Device identifier
mbed_official 610:813dcc80987e 390 */
mbed_official 610:813dcc80987e 391 uint32_t HAL_GetDEVID(void)
mbed_official 610:813dcc80987e 392 {
mbed_official 610:813dcc80987e 393 return(DBGMCU->IDCODE & DBGMCU_IDCODE_DEV_ID);
mbed_official 610:813dcc80987e 394 }
mbed_official 610:813dcc80987e 395
mbed_official 610:813dcc80987e 396 /**
mbed_official 610:813dcc80987e 397 * @}
mbed_official 610:813dcc80987e 398 */
mbed_official 610:813dcc80987e 399
mbed_official 610:813dcc80987e 400 /** @defgroup HAL_Exported_Functions_Group3 HAL Debug functions
mbed_official 610:813dcc80987e 401 * @brief HAL Debug functions
mbed_official 610:813dcc80987e 402 *
mbed_official 610:813dcc80987e 403 @verbatim
mbed_official 610:813dcc80987e 404 ===============================================================================
mbed_official 610:813dcc80987e 405 ##### HAL Debug functions #####
mbed_official 610:813dcc80987e 406 ===============================================================================
mbed_official 610:813dcc80987e 407 [..] This section provides functions allowing to:
mbed_official 610:813dcc80987e 408 (+) Enable/Disable Debug module during SLEEP mode
mbed_official 610:813dcc80987e 409 (+) Enable/Disable Debug module during STOP1/STOP2 modes
mbed_official 610:813dcc80987e 410 (+) Enable/Disable Debug module during STANDBY mode
mbed_official 610:813dcc80987e 411
mbed_official 610:813dcc80987e 412 @endverbatim
mbed_official 610:813dcc80987e 413 * @{
mbed_official 610:813dcc80987e 414 */
mbed_official 610:813dcc80987e 415
mbed_official 610:813dcc80987e 416 /**
mbed_official 610:813dcc80987e 417 * @brief Enable the Debug Module during SLEEP mode.
mbed_official 610:813dcc80987e 418 * @retval None
mbed_official 610:813dcc80987e 419 */
mbed_official 610:813dcc80987e 420 void HAL_DBGMCU_EnableDBGSleepMode(void)
mbed_official 610:813dcc80987e 421 {
mbed_official 610:813dcc80987e 422 SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
mbed_official 610:813dcc80987e 423 }
mbed_official 610:813dcc80987e 424
mbed_official 610:813dcc80987e 425 /**
mbed_official 610:813dcc80987e 426 * @brief Disable the Debug Module during SLEEP mode.
mbed_official 610:813dcc80987e 427 * @retval None
mbed_official 610:813dcc80987e 428 */
mbed_official 610:813dcc80987e 429 void HAL_DBGMCU_DisableDBGSleepMode(void)
mbed_official 610:813dcc80987e 430 {
mbed_official 610:813dcc80987e 431 CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
mbed_official 610:813dcc80987e 432 }
mbed_official 610:813dcc80987e 433
mbed_official 610:813dcc80987e 434 /**
mbed_official 610:813dcc80987e 435 * @brief Enable the Debug Module during STOP1/STOP2 modes.
mbed_official 610:813dcc80987e 436 * @retval None
mbed_official 610:813dcc80987e 437 */
mbed_official 610:813dcc80987e 438 void HAL_DBGMCU_EnableDBGStopMode(void)
mbed_official 610:813dcc80987e 439 {
mbed_official 610:813dcc80987e 440 SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
mbed_official 610:813dcc80987e 441 }
mbed_official 610:813dcc80987e 442
mbed_official 610:813dcc80987e 443 /**
mbed_official 610:813dcc80987e 444 * @brief Disable the Debug Module during STOP1/STOP2 modes.
mbed_official 610:813dcc80987e 445 * @retval None
mbed_official 610:813dcc80987e 446 */
mbed_official 610:813dcc80987e 447 void HAL_DBGMCU_DisableDBGStopMode(void)
mbed_official 610:813dcc80987e 448 {
mbed_official 610:813dcc80987e 449 CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
mbed_official 610:813dcc80987e 450 }
mbed_official 610:813dcc80987e 451
mbed_official 610:813dcc80987e 452 /**
mbed_official 610:813dcc80987e 453 * @brief Enable the Debug Module during STANDBY mode.
mbed_official 610:813dcc80987e 454 * @retval None
mbed_official 610:813dcc80987e 455 */
mbed_official 610:813dcc80987e 456 void HAL_DBGMCU_EnableDBGStandbyMode(void)
mbed_official 610:813dcc80987e 457 {
mbed_official 610:813dcc80987e 458 SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
mbed_official 610:813dcc80987e 459 }
mbed_official 610:813dcc80987e 460
mbed_official 610:813dcc80987e 461 /**
mbed_official 610:813dcc80987e 462 * @brief Disable the Debug Module during STANDBY mode.
mbed_official 610:813dcc80987e 463 * @retval None
mbed_official 610:813dcc80987e 464 */
mbed_official 610:813dcc80987e 465 void HAL_DBGMCU_DisableDBGStandbyMode(void)
mbed_official 610:813dcc80987e 466 {
mbed_official 610:813dcc80987e 467 CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
mbed_official 610:813dcc80987e 468 }
mbed_official 610:813dcc80987e 469
mbed_official 610:813dcc80987e 470 /**
mbed_official 610:813dcc80987e 471 * @}
mbed_official 610:813dcc80987e 472 */
mbed_official 610:813dcc80987e 473
mbed_official 610:813dcc80987e 474 /** @defgroup HAL_Exported_Functions_Group4 HAL SYSCFG configuration functions
mbed_official 610:813dcc80987e 475 * @brief HAL SYSCFG configuration functions
mbed_official 610:813dcc80987e 476 *
mbed_official 610:813dcc80987e 477 @verbatim
mbed_official 610:813dcc80987e 478 ===============================================================================
mbed_official 610:813dcc80987e 479 ##### HAL SYSCFG configuration functions #####
mbed_official 610:813dcc80987e 480 ===============================================================================
mbed_official 610:813dcc80987e 481 [..] This section provides functions allowing to:
mbed_official 610:813dcc80987e 482 (+) Start a hardware SRAM2 erase operation
mbed_official 610:813dcc80987e 483 (+) Enable/Disable the Internal FLASH Bank Swapping
mbed_official 610:813dcc80987e 484 (+) Configure the Voltage reference buffer
mbed_official 610:813dcc80987e 485 (+) Enable/Disable the Voltage reference buffer
mbed_official 610:813dcc80987e 486
mbed_official 610:813dcc80987e 487 @endverbatim
mbed_official 610:813dcc80987e 488 * @{
mbed_official 610:813dcc80987e 489 */
mbed_official 610:813dcc80987e 490
mbed_official 610:813dcc80987e 491 /**
mbed_official 610:813dcc80987e 492 * @brief Start a hardware SRAM2 erase operation.
mbed_official 610:813dcc80987e 493 * @note As long as SRAM2 is not erased the SRAM2ER bit will be set.
mbed_official 610:813dcc80987e 494 * This bit is automatically reset at the end of the SRAM2 erase operation.
mbed_official 610:813dcc80987e 495 * @retval None
mbed_official 610:813dcc80987e 496 */
mbed_official 610:813dcc80987e 497 void HAL_SYSCFG_SRAM2Erase(void)
mbed_official 610:813dcc80987e 498 {
mbed_official 610:813dcc80987e 499 /* unlock the write protection of the SRAM2ER bit */
mbed_official 610:813dcc80987e 500 SYSCFG->SKR = 0xCA;
mbed_official 610:813dcc80987e 501 SYSCFG->SKR = 0x53;
mbed_official 610:813dcc80987e 502 /* Starts a hardware SRAM2 erase operation*/
mbed_official 610:813dcc80987e 503 *(__IO uint32_t *) SCSR_SRAM2ER_BB = (uint8_t)0x00000001;
mbed_official 610:813dcc80987e 504 }
mbed_official 610:813dcc80987e 505
mbed_official 610:813dcc80987e 506 /**
mbed_official 610:813dcc80987e 507 * @brief Enable the Internal FLASH Bank Swapping.
mbed_official 610:813dcc80987e 508 *
mbed_official 610:813dcc80987e 509 * @note This function can be used only for STM32L4xx devices.
mbed_official 610:813dcc80987e 510 *
mbed_official 610:813dcc80987e 511 * @note Flash Bank2 mapped at 0x08000000 (and aliased @0x00000000)
mbed_official 610:813dcc80987e 512 * and Flash Bank1 mapped at 0x08100000 (and aliased at 0x00100000)
mbed_official 610:813dcc80987e 513 *
mbed_official 610:813dcc80987e 514 * @retval None
mbed_official 610:813dcc80987e 515 */
mbed_official 610:813dcc80987e 516 void HAL_SYSCFG_EnableMemorySwappingBank(void)
mbed_official 610:813dcc80987e 517 {
mbed_official 610:813dcc80987e 518 *(__IO uint32_t *)FB_MODE_BB = (uint32_t)ENABLE;
mbed_official 610:813dcc80987e 519 }
mbed_official 610:813dcc80987e 520
mbed_official 610:813dcc80987e 521 /**
mbed_official 610:813dcc80987e 522 * @brief Disable the Internal FLASH Bank Swapping.
mbed_official 610:813dcc80987e 523 *
mbed_official 610:813dcc80987e 524 * @note This function can be used only for STM32L4xx devices.
mbed_official 610:813dcc80987e 525 *
mbed_official 610:813dcc80987e 526 * @note The default state : Flash Bank1 mapped at 0x08000000 (and aliased @0x0000 0000)
mbed_official 610:813dcc80987e 527 * and Flash Bank2 mapped at 0x08100000 (and aliased at 0x00100000)
mbed_official 610:813dcc80987e 528 *
mbed_official 610:813dcc80987e 529 * @retval None
mbed_official 610:813dcc80987e 530 */
mbed_official 610:813dcc80987e 531 void HAL_SYSCFG_DisableMemorySwappingBank(void)
mbed_official 610:813dcc80987e 532 {
mbed_official 610:813dcc80987e 533
mbed_official 610:813dcc80987e 534 *(__IO uint32_t *)FB_MODE_BB = (uint32_t)DISABLE;
mbed_official 610:813dcc80987e 535 }
mbed_official 610:813dcc80987e 536
mbed_official 610:813dcc80987e 537 /**
mbed_official 610:813dcc80987e 538 * @brief Configure the internal voltage reference buffer voltage scale.
mbed_official 610:813dcc80987e 539 * @param VoltageScaling: specifies the output voltage to achieve
mbed_official 610:813dcc80987e 540 * This parameter can be one of the following values:
mbed_official 610:813dcc80987e 541 * @arg SYSCFG_VREFBUF_VOLTAGE_SCALE0: VREF_OUT1 around 2.048 V.
mbed_official 610:813dcc80987e 542 * This requires VDDA equal to or higher than 2.4 V.
mbed_official 610:813dcc80987e 543 * @arg SYSCFG_VREFBUF_VOLTAGE_SCALE1: VREF_OUT1 around 2.5 V.
mbed_official 610:813dcc80987e 544 * This requires VDDA equal to or higher than 2.8 V.
mbed_official 610:813dcc80987e 545 * @retval None
mbed_official 610:813dcc80987e 546 */
mbed_official 610:813dcc80987e 547 void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling)
mbed_official 610:813dcc80987e 548 {
mbed_official 610:813dcc80987e 549 /* Check the parameters */
mbed_official 610:813dcc80987e 550 assert_param(IS_SYSCFG_VREFBUF_VOLTAGE_SCALE(VoltageScaling));
mbed_official 610:813dcc80987e 551
mbed_official 610:813dcc80987e 552 MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_VRS, VoltageScaling);
mbed_official 610:813dcc80987e 553 }
mbed_official 610:813dcc80987e 554
mbed_official 610:813dcc80987e 555 /**
mbed_official 610:813dcc80987e 556 * @brief Configure the internal voltage reference buffer high impedance mode.
mbed_official 610:813dcc80987e 557 * @param Mode: specifies the high impedance mode
mbed_official 610:813dcc80987e 558 * This parameter can be one of the following values:
mbed_official 610:813dcc80987e 559 * @arg SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE: VREF+ pin is internally connect to VREFINT output.
mbed_official 610:813dcc80987e 560 * @arg SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE: VREF+ pin is high impedance.
mbed_official 610:813dcc80987e 561 * @retval None
mbed_official 610:813dcc80987e 562 */
mbed_official 610:813dcc80987e 563 void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode)
mbed_official 610:813dcc80987e 564 {
mbed_official 610:813dcc80987e 565 /* Check the parameters */
mbed_official 610:813dcc80987e 566 assert_param(IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE(Mode));
mbed_official 610:813dcc80987e 567
mbed_official 610:813dcc80987e 568 MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_HIZ, Mode);
mbed_official 610:813dcc80987e 569 }
mbed_official 610:813dcc80987e 570
mbed_official 610:813dcc80987e 571 /**
mbed_official 610:813dcc80987e 572 * @brief Tune the Internal Voltage Reference buffer (VREFBUF).
mbed_official 610:813dcc80987e 573 * @retval None
mbed_official 610:813dcc80987e 574 */
mbed_official 610:813dcc80987e 575 void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue)
mbed_official 610:813dcc80987e 576 {
mbed_official 610:813dcc80987e 577 /* Check the parameters */
mbed_official 610:813dcc80987e 578 assert_param(IS_SYSCFG_VREFBUF_TRIMMING(TrimmingValue));
mbed_official 610:813dcc80987e 579
mbed_official 610:813dcc80987e 580 MODIFY_REG(VREFBUF->CCR, VREFBUF_CCR_TRIM, TrimmingValue);
mbed_official 610:813dcc80987e 581 }
mbed_official 610:813dcc80987e 582
mbed_official 610:813dcc80987e 583 /**
mbed_official 610:813dcc80987e 584 * @brief Enable the Internal Voltage Reference buffer (VREFBUF).
mbed_official 610:813dcc80987e 585 * @retval HAL_OK/HAL_TIMEOUT
mbed_official 610:813dcc80987e 586 */
mbed_official 610:813dcc80987e 587 HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void)
mbed_official 610:813dcc80987e 588 {
mbed_official 610:813dcc80987e 589 uint32_t tickstart = 0;
mbed_official 610:813dcc80987e 590
mbed_official 610:813dcc80987e 591 SET_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
mbed_official 610:813dcc80987e 592
mbed_official 610:813dcc80987e 593 /* Get Start Tick*/
mbed_official 610:813dcc80987e 594 tickstart = HAL_GetTick();
mbed_official 610:813dcc80987e 595
mbed_official 610:813dcc80987e 596 /* Wait for VRR bit */
mbed_official 610:813dcc80987e 597 while(READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRR) == RESET)
mbed_official 610:813dcc80987e 598 {
mbed_official 610:813dcc80987e 599 if((HAL_GetTick() - tickstart) > VREFBUF_TIMEOUT_VALUE)
mbed_official 610:813dcc80987e 600 {
mbed_official 610:813dcc80987e 601 return HAL_TIMEOUT;
mbed_official 610:813dcc80987e 602 }
mbed_official 610:813dcc80987e 603 }
mbed_official 610:813dcc80987e 604
mbed_official 610:813dcc80987e 605 return HAL_OK;
mbed_official 610:813dcc80987e 606 }
mbed_official 610:813dcc80987e 607
mbed_official 610:813dcc80987e 608 /**
mbed_official 610:813dcc80987e 609 * @brief Disable the Internal Voltage Reference buffer (VREFBUF).
mbed_official 610:813dcc80987e 610 *
mbed_official 610:813dcc80987e 611 * @retval None
mbed_official 610:813dcc80987e 612 */
mbed_official 610:813dcc80987e 613 void HAL_SYSCFG_DisableVREFBUF(void)
mbed_official 610:813dcc80987e 614 {
mbed_official 610:813dcc80987e 615 CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
mbed_official 610:813dcc80987e 616 }
mbed_official 610:813dcc80987e 617
mbed_official 610:813dcc80987e 618 /**
mbed_official 610:813dcc80987e 619 * @}
mbed_official 610:813dcc80987e 620 */
mbed_official 610:813dcc80987e 621
mbed_official 610:813dcc80987e 622 /**
mbed_official 610:813dcc80987e 623 * @}
mbed_official 610:813dcc80987e 624 */
mbed_official 610:813dcc80987e 625
mbed_official 610:813dcc80987e 626 #endif /* HAL_MODULE_ENABLED */
mbed_official 610:813dcc80987e 627 /**
mbed_official 610:813dcc80987e 628 * @}
mbed_official 610:813dcc80987e 629 */
mbed_official 610:813dcc80987e 630
mbed_official 610:813dcc80987e 631 /**
mbed_official 610:813dcc80987e 632 * @}
mbed_official 610:813dcc80987e 633 */
mbed_official 610:813dcc80987e 634
mbed_official 610:813dcc80987e 635 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/