STM32F439xx HAL User Manual
stm32f4xx_hal.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32f4xx_hal.c
00004   * @author  MCD Application Team
00005   * @brief   HAL module driver.
00006   *          This is the common part of the HAL initialization
00007   *
00008   @verbatim
00009   ==============================================================================
00010                      ##### How to use this driver #####
00011   ==============================================================================
00012     [..]
00013     The common HAL driver contains a set of generic and common APIs that can be
00014     used by the PPP peripheral drivers and the user to start using the HAL. 
00015     [..]
00016     The HAL contains two APIs' categories: 
00017          (+) Common HAL APIs
00018          (+) Services HAL APIs
00019 
00020   @endverbatim
00021   ******************************************************************************
00022   * @attention
00023   *
00024   * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
00025   *
00026   * Redistribution and use in source and binary forms, with or without modification,
00027   * are permitted provided that the following conditions are met:
00028   *   1. Redistributions of source code must retain the above copyright notice,
00029   *      this list of conditions and the following disclaimer.
00030   *   2. Redistributions in binary form must reproduce the above copyright notice,
00031   *      this list of conditions and the following disclaimer in the documentation
00032   *      and/or other materials provided with the distribution.
00033   *   3. Neither the name of STMicroelectronics nor the names of its contributors
00034   *      may be used to endorse or promote products derived from this software
00035   *      without specific prior written permission.
00036   *
00037   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00038   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00039   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00040   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00041   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00042   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00043   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00044   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00045   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00046   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00047   *
00048   ******************************************************************************
00049   */ 
00050 
00051 /* Includes ------------------------------------------------------------------*/
00052 #include "stm32f4xx_hal.h"
00053 
00054 /** @addtogroup STM32F4xx_HAL_Driver
00055   * @{
00056   */
00057 
00058 /** @defgroup HAL HAL
00059   * @brief HAL module driver.
00060   * @{
00061   */
00062 
00063 /* Private typedef -----------------------------------------------------------*/
00064 /* Private define ------------------------------------------------------------*/
00065 /** @addtogroup HAL_Private_Constants
00066   * @{
00067   */
00068 /**
00069   * @brief STM32F4xx HAL Driver version number V1.7.2
00070   */
00071 #define __STM32F4xx_HAL_VERSION_MAIN   (0x01U) /*!< [31:24] main version */
00072 #define __STM32F4xx_HAL_VERSION_SUB1   (0x07U) /*!< [23:16] sub1 version */
00073 #define __STM32F4xx_HAL_VERSION_SUB2   (0x02U) /*!< [15:8]  sub2 version */
00074 #define __STM32F4xx_HAL_VERSION_RC     (0x00U) /*!< [7:0]  release candidate */ 
00075 #define __STM32F4xx_HAL_VERSION         ((__STM32F4xx_HAL_VERSION_MAIN << 24U)\
00076                                         |(__STM32F4xx_HAL_VERSION_SUB1 << 16U)\
00077                                         |(__STM32F4xx_HAL_VERSION_SUB2 << 8U )\
00078                                         |(__STM32F4xx_HAL_VERSION_RC))
00079                                         
00080 #define IDCODE_DEVID_MASK    0x00000FFFU
00081 
00082 /* ------------ RCC registers bit address in the alias region ----------- */
00083 #define SYSCFG_OFFSET             (SYSCFG_BASE - PERIPH_BASE)
00084 /* ---  MEMRMP Register ---*/ 
00085 /* Alias word address of UFB_MODE bit */ 
00086 #define MEMRMP_OFFSET             SYSCFG_OFFSET 
00087 #define UFB_MODE_BIT_NUMBER       SYSCFG_MEMRMP_UFB_MODE_Pos
00088 #define UFB_MODE_BB               (uint32_t)(PERIPH_BB_BASE + (MEMRMP_OFFSET * 32U) + (UFB_MODE_BIT_NUMBER * 4U)) 
00089 
00090 /* ---  CMPCR Register ---*/ 
00091 /* Alias word address of CMP_PD bit */ 
00092 #define CMPCR_OFFSET              (SYSCFG_OFFSET + 0x20U) 
00093 #define CMP_PD_BIT_NUMBER         SYSCFG_CMPCR_CMP_PD_Pos
00094 #define CMPCR_CMP_PD_BB           (uint32_t)(PERIPH_BB_BASE + (CMPCR_OFFSET * 32U) + (CMP_PD_BIT_NUMBER * 4U))
00095 
00096 /* ---  MCHDLYCR Register ---*/ 
00097 /* Alias word address of BSCKSEL bit */ 
00098 #define MCHDLYCR_OFFSET            (SYSCFG_OFFSET + 0x30U) 
00099 #define BSCKSEL_BIT_NUMBER         SYSCFG_MCHDLYCR_BSCKSEL_Pos
00100 #define MCHDLYCR_BSCKSEL_BB        (uint32_t)(PERIPH_BB_BASE + (MCHDLYCR_OFFSET * 32U) + (BSCKSEL_BIT_NUMBER * 4U))
00101 /**
00102   * @}
00103   */
00104 
00105 /* Private macro -------------------------------------------------------------*/
00106 /* Private variables ---------------------------------------------------------*/
00107 /** @addtogroup HAL_Private_Variables
00108   * @{
00109   */
00110 __IO uint32_t uwTick;
00111 uint32_t uwTickPrio   = (1UL << __NVIC_PRIO_BITS); /* Invalid PRIO */
00112 HAL_TickFreqTypeDef uwTickFreq = HAL_TICK_FREQ_DEFAULT;  /* 1KHz */
00113 /**
00114   * @}
00115   */
00116 /* Private function prototypes -----------------------------------------------*/
00117 /* Private functions ---------------------------------------------------------*/
00118 
00119 /** @defgroup HAL_Exported_Functions HAL Exported Functions
00120   * @{
00121   */
00122 
00123 /** @defgroup HAL_Exported_Functions_Group1 Initialization and de-initialization Functions 
00124  *  @brief    Initialization and de-initialization functions
00125  *
00126 @verbatim    
00127  ===============================================================================
00128               ##### Initialization and Configuration functions #####
00129  ===============================================================================
00130     [..]  This section provides functions allowing to:
00131       (+) Initializes the Flash interface the NVIC allocation and initial clock 
00132           configuration. It initializes the systick also when timeout is needed 
00133           and the backup domain when enabled.
00134       (+) De-Initializes common part of the HAL.
00135       (+) Configure the time base source to have 1ms time base with a dedicated 
00136           Tick interrupt priority. 
00137         (++) SysTick timer is used by default as source of time base, but user
00138              can eventually implement his proper time base source (a general purpose 
00139              timer for example or other time source), keeping in mind that Time base 
00140              duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and 
00141              handled in milliseconds basis.
00142         (++) Time base configuration function (HAL_InitTick ()) is called automatically 
00143              at the beginning of the program after reset by HAL_Init() or at any time 
00144              when clock is configured, by HAL_RCC_ClockConfig(). 
00145         (++) Source of time base is configured  to generate interrupts at regular 
00146              time intervals. Care must be taken if HAL_Delay() is called from a 
00147              peripheral ISR process, the Tick interrupt line must have higher priority 
00148             (numerically lower) than the peripheral interrupt. Otherwise the caller 
00149             ISR process will be blocked. 
00150        (++) functions affecting time base configurations are declared as __weak  
00151              to make  override possible  in case of other  implementations in user file.
00152 @endverbatim
00153   * @{
00154   */
00155 
00156 /**
00157   * @brief  This function is used to initialize the HAL Library; it must be the first 
00158   *         instruction to be executed in the main program (before to call any other
00159   *         HAL function), it performs the following:
00160   *           Configure the Flash prefetch, instruction and Data caches.
00161   *           Configures the SysTick to generate an interrupt each 1 millisecond,
00162   *           which is clocked by the HSI (at this stage, the clock is not yet
00163   *           configured and thus the system is running from the internal HSI at 16 MHz).
00164   *           Set NVIC Group Priority to 4.
00165   *           Calls the HAL_MspInit() callback function defined in user file 
00166   *           "stm32f4xx_hal_msp.c" to do the global low level hardware initialization 
00167   *            
00168   * @note   SysTick is used as time base for the HAL_Delay() function, the application
00169   *         need to ensure that the SysTick time base is always set to 1 millisecond
00170   *         to have correct HAL operation.
00171   * @retval HAL status
00172   */
00173 HAL_StatusTypeDef HAL_Init(void)
00174 {
00175   /* Configure Flash prefetch, Instruction cache, Data cache */ 
00176 #if (INSTRUCTION_CACHE_ENABLE != 0U)
00177   __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
00178 #endif /* INSTRUCTION_CACHE_ENABLE */
00179 
00180 #if (DATA_CACHE_ENABLE != 0U)
00181   __HAL_FLASH_DATA_CACHE_ENABLE();
00182 #endif /* DATA_CACHE_ENABLE */
00183 
00184 #if (PREFETCH_ENABLE != 0U)
00185   __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
00186 #endif /* PREFETCH_ENABLE */
00187 
00188   /* Set Interrupt Group Priority */
00189   HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
00190 
00191   /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
00192   HAL_InitTick(TICK_INT_PRIORITY);
00193 
00194   /* Init the low level hardware */
00195   HAL_MspInit();
00196 
00197   /* Return function status */
00198   return HAL_OK;
00199 }
00200 
00201 /**
00202   * @brief  This function de-Initializes common part of the HAL and stops the systick.
00203   *         This function is optional.   
00204   * @retval HAL status
00205   */
00206 HAL_StatusTypeDef HAL_DeInit(void)
00207 {
00208   /* Reset of all peripherals */
00209   __HAL_RCC_APB1_FORCE_RESET();
00210   __HAL_RCC_APB1_RELEASE_RESET();
00211 
00212   __HAL_RCC_APB2_FORCE_RESET();
00213   __HAL_RCC_APB2_RELEASE_RESET();
00214 
00215   __HAL_RCC_AHB1_FORCE_RESET();
00216   __HAL_RCC_AHB1_RELEASE_RESET();
00217 
00218   __HAL_RCC_AHB2_FORCE_RESET();
00219   __HAL_RCC_AHB2_RELEASE_RESET();
00220 
00221   __HAL_RCC_AHB3_FORCE_RESET();
00222   __HAL_RCC_AHB3_RELEASE_RESET();
00223 
00224   /* De-Init the low level hardware */
00225   HAL_MspDeInit();
00226     
00227   /* Return function status */
00228   return HAL_OK;
00229 }
00230 
00231 /**
00232   * @brief  Initialize the MSP.
00233   * @retval None
00234   */
00235 __weak void HAL_MspInit(void)
00236 {
00237   /* NOTE : This function should not be modified, when the callback is needed,
00238             the HAL_MspInit could be implemented in the user file
00239    */
00240 }
00241 
00242 /**
00243   * @brief  DeInitializes the MSP.
00244   * @retval None
00245   */
00246 __weak void HAL_MspDeInit(void)
00247 {
00248   /* NOTE : This function should not be modified, when the callback is needed,
00249             the HAL_MspDeInit could be implemented in the user file
00250    */ 
00251 }
00252 
00253 /**
00254   * @brief This function configures the source of the time base.
00255   *        The time source is configured  to have 1ms time base with a dedicated 
00256   *        Tick interrupt priority.
00257   * @note This function is called  automatically at the beginning of program after
00258   *       reset by HAL_Init() or at any time when clock is reconfigured  by HAL_RCC_ClockConfig().
00259   * @note In the default implementation, SysTick timer is the source of time base. 
00260   *       It is used to generate interrupts at regular time intervals. 
00261   *       Care must be taken if HAL_Delay() is called from a peripheral ISR process, 
00262   *       The SysTick interrupt must have higher priority (numerically lower)
00263   *       than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
00264   *       The function is declared as __weak  to be overwritten  in case of other
00265   *       implementation  in user file.
00266   * @param TickPriority Tick interrupt priority.
00267   * @retval HAL status
00268   */
00269 __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
00270 {
00271   /* Configure the SysTick to have interrupt in 1ms time basis*/
00272   if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U)
00273   {
00274     return HAL_ERROR;
00275   }
00276 
00277   /* Configure the SysTick IRQ priority */
00278   if ((HAL_GetTickPrio() != TickPriority) && (TickPriority < (1UL << __NVIC_PRIO_BITS)))
00279   {
00280     HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
00281     uwTickPrio = TickPriority;
00282   }
00283 
00284   /* Return function status */
00285   return HAL_OK;
00286 }
00287 
00288 /**
00289   * @}
00290   */
00291 
00292 /** @defgroup HAL_Exported_Functions_Group2 HAL Control functions 
00293  *  @brief    HAL Control functions
00294  *
00295 @verbatim
00296  ===============================================================================
00297                       ##### HAL Control functions #####
00298  ===============================================================================
00299     [..]  This section provides functions allowing to:
00300       (+) Provide a tick value in millisecond
00301       (+) Provide a blocking delay in millisecond
00302       (+) Suspend the time base source interrupt
00303       (+) Resume the time base source interrupt
00304       (+) Get the HAL API driver version
00305       (+) Get the device identifier
00306       (+) Get the device revision identifier
00307       (+) Enable/Disable Debug module during SLEEP mode
00308       (+) Enable/Disable Debug module during STOP mode
00309       (+) Enable/Disable Debug module during STANDBY mode
00310 
00311 @endverbatim
00312   * @{
00313   */
00314 
00315 /**
00316   * @brief This function is called to increment  a global variable "uwTick"
00317   *        used as application time base.
00318   * @note In the default implementation, this variable is incremented each 1ms
00319   *       in SysTick ISR.
00320  * @note This function is declared as __weak to be overwritten in case of other 
00321   *      implementations in user file.
00322   * @retval None
00323   */
00324 __weak void HAL_IncTick(void)
00325 {
00326   uwTick += uwTickFreq;
00327 }
00328 
00329 /**
00330   * @brief Provides a tick value in millisecond.
00331   * @note This function is declared as __weak to be overwritten in case of other 
00332   *       implementations in user file.
00333   * @retval tick value
00334   */
00335 __weak uint32_t HAL_GetTick(void)
00336 {
00337   return uwTick;
00338 }
00339 
00340 /**
00341   * @brief This function returns a tick priority.
00342   * @retval tick priority
00343   */
00344 uint32_t HAL_GetTickPrio(void)
00345 {
00346   return uwTickPrio;
00347 }
00348 
00349 /**
00350   * @brief Set new tick Freq.
00351   * @retval Status
00352   */
00353 HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq)
00354 {
00355   HAL_StatusTypeDef status  = HAL_OK;
00356   assert_param(IS_TICKFREQ(Freq));
00357 
00358   if (uwTickFreq != Freq)
00359   {
00360     uwTickFreq = Freq;
00361 
00362     /* Apply the new tick Freq  */
00363     status = HAL_InitTick(uwTickPrio);
00364   }
00365 
00366   return status;
00367 }
00368 
00369 /**
00370   * @brief Return tick frequency.
00371   * @retval tick period in Hz
00372   */
00373 HAL_TickFreqTypeDef HAL_GetTickFreq(void)
00374 {
00375   return uwTickFreq;
00376 }
00377 
00378 /**
00379   * @brief This function provides minimum delay (in milliseconds) based 
00380   *        on variable incremented.
00381   * @note In the default implementation , SysTick timer is the source of time base.
00382   *       It is used to generate interrupts at regular time intervals where uwTick
00383   *       is incremented.
00384   * @note This function is declared as __weak to be overwritten in case of other
00385   *       implementations in user file.
00386   * @param Delay specifies the delay time length, in milliseconds.
00387   * @retval None
00388   */
00389 __weak void HAL_Delay(uint32_t Delay)
00390 {
00391   uint32_t tickstart = HAL_GetTick();
00392   uint32_t wait = Delay;
00393 
00394   /* Add a freq to guarantee minimum wait */
00395   if (wait < HAL_MAX_DELAY)
00396   {
00397     wait += (uint32_t)(uwTickFreq);
00398   }
00399 
00400   while((HAL_GetTick() - tickstart) < wait)
00401   {
00402   }
00403 }
00404 
00405 /**
00406   * @brief Suspend Tick increment.
00407   * @note In the default implementation , SysTick timer is the source of time base. It is
00408   *       used to generate interrupts at regular time intervals. Once HAL_SuspendTick()
00409   *       is called, the SysTick interrupt will be disabled and so Tick increment 
00410   *       is suspended.
00411   * @note This function is declared as __weak to be overwritten in case of other
00412   *       implementations in user file.
00413   * @retval None
00414   */
00415 __weak void HAL_SuspendTick(void)
00416 {
00417   /* Disable SysTick Interrupt */
00418   SysTick->CTRL &= ~SysTick_CTRL_TICKINT_Msk;
00419 }
00420 
00421 /**
00422   * @brief Resume Tick increment.
00423   * @note In the default implementation , SysTick timer is the source of time base. It is
00424   *       used to generate interrupts at regular time intervals. Once HAL_ResumeTick()
00425   *       is called, the SysTick interrupt will be enabled and so Tick increment 
00426   *       is resumed.
00427   * @note This function is declared as __weak to be overwritten in case of other
00428   *       implementations in user file.
00429   * @retval None
00430   */
00431 __weak void HAL_ResumeTick(void)
00432 {
00433   /* Enable SysTick Interrupt */
00434   SysTick->CTRL  |= SysTick_CTRL_TICKINT_Msk;
00435 }
00436 
00437 /**
00438   * @brief  Returns the HAL revision
00439   * @retval version : 0xXYZR (8bits for each decimal, R for RC)
00440   */
00441 uint32_t HAL_GetHalVersion(void)
00442 {
00443   return __STM32F4xx_HAL_VERSION;
00444 }
00445 
00446 /**
00447   * @brief  Returns the device revision identifier.
00448   * @retval Device revision identifier
00449   */
00450 uint32_t HAL_GetREVID(void)
00451 {
00452   return((DBGMCU->IDCODE) >> 16U);
00453 }
00454 
00455 /**
00456   * @brief  Returns the device identifier.
00457   * @retval Device identifier
00458   */
00459 uint32_t HAL_GetDEVID(void)
00460 {
00461   return((DBGMCU->IDCODE) & IDCODE_DEVID_MASK);
00462 }
00463 
00464 /**
00465   * @brief  Enable the Debug Module during SLEEP mode
00466   * @retval None
00467   */
00468 void HAL_DBGMCU_EnableDBGSleepMode(void)
00469 {
00470   SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
00471 }
00472 
00473 /**
00474   * @brief  Disable the Debug Module during SLEEP mode
00475   * @retval None
00476   */
00477 void HAL_DBGMCU_DisableDBGSleepMode(void)
00478 {
00479   CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
00480 }
00481 
00482 /**
00483   * @brief  Enable the Debug Module during STOP mode
00484   * @retval None
00485   */
00486 void HAL_DBGMCU_EnableDBGStopMode(void)
00487 {
00488   SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
00489 }
00490 
00491 /**
00492   * @brief  Disable the Debug Module during STOP mode
00493   * @retval None
00494   */
00495 void HAL_DBGMCU_DisableDBGStopMode(void)
00496 {
00497   CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
00498 }
00499 
00500 /**
00501   * @brief  Enable the Debug Module during STANDBY mode
00502   * @retval None
00503   */
00504 void HAL_DBGMCU_EnableDBGStandbyMode(void)
00505 {
00506   SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
00507 }
00508 
00509 /**
00510   * @brief  Disable the Debug Module during STANDBY mode
00511   * @retval None
00512   */
00513 void HAL_DBGMCU_DisableDBGStandbyMode(void)
00514 {
00515   CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
00516 }
00517 
00518 /**
00519   * @brief  Enables the I/O Compensation Cell.
00520   * @note   The I/O compensation cell can be used only when the device supply
00521   *         voltage ranges from 2.4 to 3.6 V.  
00522   * @retval None
00523   */
00524 void HAL_EnableCompensationCell(void)
00525 {
00526   *(__IO uint32_t *)CMPCR_CMP_PD_BB = (uint32_t)ENABLE;
00527 }
00528 
00529 /**
00530   * @brief  Power-down the I/O Compensation Cell.
00531   * @note   The I/O compensation cell can be used only when the device supply
00532   *         voltage ranges from 2.4 to 3.6 V.  
00533   * @retval None
00534   */
00535 void HAL_DisableCompensationCell(void)
00536 {
00537   *(__IO uint32_t *)CMPCR_CMP_PD_BB = (uint32_t)DISABLE;
00538 }
00539 
00540 /**
00541   * @brief Return the unique device identifier (UID based on 96 bits)
00542   * @param UID pointer to 3 words array.
00543   * @retval Device identifier
00544   */
00545 void HAL_GetUID(uint32_t *UID)
00546 {
00547   UID[0] = (uint32_t)(READ_REG(*((uint32_t *)UID_BASE)));
00548   UID[1] = (uint32_t)(READ_REG(*((uint32_t *)(UID_BASE + 4U))));
00549   UID[2] = (uint32_t)(READ_REG(*((uint32_t *)(UID_BASE + 8U))));
00550 }
00551 
00552 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) ||\
00553     defined(STM32F469xx) || defined(STM32F479xx)
00554 /**
00555   * @brief  Enables the Internal FLASH Bank Swapping.
00556   *   
00557   * @note   This function can be used only for STM32F42xxx/43xxx devices. 
00558   *
00559   * @note   Flash Bank2 mapped at 0x08000000 (and aliased @0x00000000) 
00560   *         and Flash Bank1 mapped at 0x08100000 (and aliased at 0x00100000)   
00561   *
00562   * @retval None
00563   */
00564 void HAL_EnableMemorySwappingBank(void)
00565 {
00566   *(__IO uint32_t *)UFB_MODE_BB = (uint32_t)ENABLE;
00567 }
00568 
00569 /**
00570   * @brief  Disables the Internal FLASH Bank Swapping.
00571   *   
00572   * @note   This function can be used only for STM32F42xxx/43xxx devices. 
00573   *
00574   * @note   The default state : Flash Bank1 mapped at 0x08000000 (and aliased @0x00000000) 
00575   *         and Flash Bank2 mapped at 0x08100000 (and aliased at 0x00100000) 
00576   *           
00577   * @retval None
00578   */
00579 void HAL_DisableMemorySwappingBank(void)
00580 {
00581   *(__IO uint32_t *)UFB_MODE_BB = (uint32_t)DISABLE;
00582 }
00583 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */
00584 /**
00585   * @}
00586   */
00587 
00588 /**
00589   * @}
00590   */
00591 
00592 /**
00593   * @}
00594   */
00595 
00596 /**
00597   * @}
00598   */
00599 
00600 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/