ARM GAS /tmp/cckwFovy.s page 1 1 .cpu cortex-m4 2 .arch armv7e-m 3 .fpu fpv4-sp-d16 4 .eabi_attribute 27, 1 5 .eabi_attribute 28, 1 6 .eabi_attribute 20, 1 7 .eabi_attribute 21, 1 8 .eabi_attribute 23, 3 9 .eabi_attribute 24, 1 10 .eabi_attribute 25, 1 11 .eabi_attribute 26, 1 12 .eabi_attribute 30, 1 13 .eabi_attribute 34, 1 14 .eabi_attribute 18, 4 15 .file "stm32f4xx_hal_flash_ex.c" 16 .text 17 .Ltext0: 18 .cfi_sections .debug_frame 19 .section .text.FLASH_MassErase,"ax",%progbits 20 .align 1 21 .syntax unified 22 .thumb 23 .thumb_func 25 FLASH_MassErase: 26 .LVL0: 27 .LFB134: 28 .file 1 "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c" 1:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 2:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ****************************************************************************** 3:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @file stm32f4xx_hal_flash_ex.c 4:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @author MCD Application Team 5:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Extended FLASH HAL module driver. 6:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This file provides firmware functions to manage the following 7:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * functionalities of the FLASH extension peripheral: 8:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * + Extended programming operations functions 9:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 10:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @verbatim 11:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ============================================================================== 12:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### Flash Extension features ##### 13:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ============================================================================== 14:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 15:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..] Comparing to other previous devices, the FLASH interface for STM32F427xx/437xx and 16:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F429xx/439xx devices contains the following additional features 17:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 18:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) Capacity up to 2 Mbyte with dual bank architecture supporting read-while-write 19:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** capability (RWW) 20:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) Dual bank memory organization 21:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+) PCROP protection for all banks 22:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 23:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### How to use this driver ##### 24:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ============================================================================== 25:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..] This driver provides functions to configure and program the FLASH memory 26:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** of all STM32F427xx/437xx, STM32F429xx/439xx, STM32F469xx/479xx and STM32F446xx 27:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** devices. It includes 28:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) FLASH Memory Erase functions: 29:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and 30:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_FLASH_Lock() functions ARM GAS /tmp/cckwFovy.s page 2 31:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Erase function: Erase sector, erase all sectors 32:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) There are two modes of erase : 33:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+++) Polling Mode using HAL_FLASHEx_Erase() 34:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (+++) Interrupt Mode using HAL_FLASHEx_Erase_IT() 35:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 36:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) Option Bytes Programming functions: Use HAL_FLASHEx_OBProgram() to : 37:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set/Reset the write protection 38:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set the Read protection Level 39:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Set the BOR level 40:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Program the user Option Bytes 41:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (#) Advanced Option Bytes Programming functions: Use HAL_FLASHEx_AdvOBProgram() to : 42:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Extended space (bank 2) erase function 43:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Full FLASH space (2 Mo) erase (bank 1 and bank 2) 44:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Dual Boot activation 45:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) Write protection configuration for bank 2 46:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (++) PCROP protection configuration and control for both banks 47:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 48:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @endverbatim 49:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ****************************************************************************** 50:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @attention 51:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 52:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *

© Copyright (c) 2017 STMicroelectronics. 53:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * All rights reserved.

54:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 55:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This software component is licensed by ST under BSD 3-Clause license, 56:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the "License"; You may not use this file except in compliance with the 57:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * License. You may obtain a copy of the License at: 58:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * opensource.org/licenses/BSD-3-Clause 59:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 60:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ****************************************************************************** 61:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 62:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 63:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Includes ------------------------------------------------------------------*/ 64:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #include "stm32f4xx_hal.h" 65:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 66:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup STM32F4xx_HAL_Driver 67:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{ 68:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 69:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 70:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx FLASHEx 71:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief FLASH HAL Extension module driver 72:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{ 73:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 74:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 75:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #ifdef HAL_FLASH_MODULE_ENABLED 76:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 77:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private typedef -----------------------------------------------------------*/ 78:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private define ------------------------------------------------------------*/ 79:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Constants 80:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{ 81:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 82:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #define FLASH_TIMEOUT_VALUE 50000U /* 50 s */ 83:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 84:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @} 85:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 86:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 87:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private macro -------------------------------------------------------------*/ ARM GAS /tmp/cckwFovy.s page 3 88:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private variables ---------------------------------------------------------*/ 89:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Variables 90:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{ 91:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 92:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** extern FLASH_ProcessTypeDef pFlash; 93:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 94:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @} 95:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 96:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 97:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Private function prototypes -----------------------------------------------*/ 98:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Functions 99:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{ 100:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 101:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Option bytes control */ 102:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks); 103:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks); 104:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks); 105:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDP_LevelConfig(uint8_t Level); 106:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_UserConfig(uint8_t Iwdg, uint8_t Stop, uint8_t Stdby); 107:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BOR_LevelConfig(uint8_t Level); 108:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetUser(void); 109:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint16_t FLASH_OB_GetWRP(void); 110:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetRDP(void); 111:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetBOR(void); 112:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 113:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || 114:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || 115:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F423xx) 116:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector); 117:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector); 118:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || 119:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */ 120:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 121:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) || 122:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t 123:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t 124:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootConfig(uint8_t BootConfig); 125:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ 126:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 127:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** extern HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout); 128:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 129:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @} 130:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 131:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 132:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Exported functions --------------------------------------------------------*/ 133:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions FLASHEx Exported Functions 134:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{ 135:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 136:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 137:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions_Group1 Extended IO operation functions 138:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Extended IO operation functions 139:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 140:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @verbatim 141:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** =============================================================================== 142:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ##### Extended programming operation functions ##### 143:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** =============================================================================== 144:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** [..] ARM GAS /tmp/cckwFovy.s page 4 145:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** This subsection provides a set of functions allowing to manage the Extension FLASH 146:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** programming operations. 147:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 148:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** @endverbatim 149:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @{ 150:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 151:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 152:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Perform a mass erase or erase the specified FLASH memory sectors 153:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param[in] pEraseInit pointer to an FLASH_EraseInitTypeDef structure that 154:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the erasing. 155:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 156:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param[out] SectorError pointer to variable that 157:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information on faulty sector in case of error 158:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * (0xFFFFFFFFU means that all the sectors have been correctly erased) 159:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 160:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 161:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 162:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *SectorError) 163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR; 165:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t index = 0U; 166:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 167:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */ 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash); 169:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 171:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase)); 172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 173:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 175:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 177:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Initialization of SectorError variable*/ 179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *SectorError = 0xFFFFFFFFU; 180:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE) 182:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 183:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Mass erase to be done*/ 184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks); 185:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 186:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 188:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 189:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* if the erase operation is completed, disable the MER Bit */ 190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR &= (~FLASH_MER_BIT); 191:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 192:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 193:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 194:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 195:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_NBSECTORS(pEraseInit->NbSectors + pEraseInit->Sector)); 196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Erase by sector by sector to be done*/ 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** for(index = pEraseInit->Sector; index < (pEraseInit->NbSectors + pEraseInit->Sector); index++ 199:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_Erase_Sector(index, (uint8_t) pEraseInit->VoltageRange); 201:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ARM GAS /tmp/cckwFovy.s page 5 202:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 204:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 205:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the erase operation is completed, disable the SER and SNB Bits */ 206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_SER | FLASH_CR_SNB)); 207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status != HAL_OK) 209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 210:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* In case of error, stop erase procedure and return the faulty sector*/ 211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *SectorError = index; 212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** break; 213:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 214:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 216:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush the caches to be sure of the data consistency */ 217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FlushCaches(); 218:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 220:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Unlocked */ 221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash); 222:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 225:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 226:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 227:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Perform a mass erase or erase the specified FLASH memory sectors with interrupt enable 228:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pEraseInit pointer to an FLASH_EraseInitTypeDef structure that 229:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the erasing. 230:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 231:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 232:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 233:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) 234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 235:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 236:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 237:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */ 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash); 239:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 240:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 241:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase)); 242:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 243:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable End of FLASH Operation interrupt */ 244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP); 245:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 246:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable Error source interrupt */ 247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_ERR); 248:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 249:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Clear pending flags (if any) */ 250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |\ 251:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR| FLASH_FLAG_PGSERR); 252:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE) 254:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 255:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Mass erase to be done*/ 256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_MASSERASE; 257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Bank = pEraseInit->Banks; 258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks); ARM GAS /tmp/cckwFovy.s page 6 259:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 260:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 261:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 262:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Erase by sector to be done*/ 263:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 264:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 265:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_NBSECTORS(pEraseInit->NbSectors + pEraseInit->Sector)); 266:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_SECTERASE; 268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.NbSectorsToErase = pEraseInit->NbSectors; 269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Sector = pEraseInit->Sector; 270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange; 271:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 272:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Erase 1st sector and wait for IT*/ 273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_Erase_Sector(pEraseInit->Sector, pEraseInit->VoltageRange); 274:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 275:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 278:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 279:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 280:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program option bytes 281:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that 282:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming. 283:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 284:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 285:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 286:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit) 287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR; 289:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 290:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Locked */ 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash); 292:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 293:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 294:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OPTIONBYTE(pOBInit->OptionType)); 295:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 296:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection configuration*/ 297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_WRP) == OPTIONBYTE_WRP) 298:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 299:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_WRPSTATE(pOBInit->WRPState)); 300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(pOBInit->WRPState == OB_WRPSTATE_ENABLE) 301:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 302:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Enable of Write protection on the selected Sector*/ 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnableWRP(pOBInit->WRPSector, pOBInit->Banks); 304:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 305:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 306:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 307:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Disable of Write protection on the selected Sector*/ 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisableWRP(pOBInit->WRPSector, pOBInit->Banks); 309:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 310:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 311:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 312:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Read protection configuration*/ 313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_RDP) == OPTIONBYTE_RDP) 314:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_RDP_LevelConfig(pOBInit->RDPLevel); ARM GAS /tmp/cckwFovy.s page 7 316:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 317:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 318:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*USER configuration*/ 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_USER) == OPTIONBYTE_USER) 320:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_UserConfig(pOBInit->USERConfig&OB_IWDG_SW, 322:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STOP_NO_RST, 323:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STDBY_NO_RST); 324:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 325:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 326:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*BOR Level configuration*/ 327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pOBInit->OptionType & OPTIONBYTE_BOR) == OPTIONBYTE_BOR) 328:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_BOR_LevelConfig(pOBInit->BORLevel); 330:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 331:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 332:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Process Unlocked */ 333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash); 334:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 335:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 336:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 337:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 338:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 339:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Get the Option byte configuration 340:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that 341:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming. 342:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 343:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None 344:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 345:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit) 346:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 347:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->OptionType = OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_BOR; 348:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 349:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get WRP*/ 350:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->WRPSector = (uint32_t)FLASH_OB_GetWRP(); 351:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 352:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get RDP Level*/ 353:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->RDPLevel = (uint32_t)FLASH_OB_GetRDP(); 354:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 355:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get USER*/ 356:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig = (uint8_t)FLASH_OB_GetUser(); 357:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 358:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get BOR Level*/ 359:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->BORLevel = (uint32_t)FLASH_OB_GetBOR(); 360:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 361:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 362:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || 363:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || 364:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F469xx) || 365:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || 366:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) 367:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 368:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program option bytes 369:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pAdvOBInit pointer to an FLASH_AdvOBProgramInitTypeDef structure that 370:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming. 371:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 372:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status ARM GAS /tmp/cckwFovy.s page 8 373:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 374:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram (FLASH_AdvOBProgramInitTypeDef *pAdvOBInit) 375:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 376:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR; 377:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 378:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 379:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OBEX(pAdvOBInit->OptionType)); 380:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 381:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Program PCROP option byte*/ 382:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((pAdvOBInit->OptionType) & OPTIONBYTE_PCROP) == OPTIONBYTE_PCROP) 383:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 384:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 385:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_PCROPSTATE(pAdvOBInit->PCROPState)); 386:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((pAdvOBInit->PCROPState) == OB_PCROP_STATE_ENABLE) 387:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 388:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Enable of Write protection on the selected Sector*/ 389:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || 390:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || 391:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) 392:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnablePCROP(pAdvOBInit->Sectors); 393:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */ 394:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_EnablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit- 395:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || 396:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */ 397:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 398:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 399:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 400:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Disable of Write protection on the selected Sector*/ 401:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || 402:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || 403:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) 404:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisablePCROP(pAdvOBInit->Sectors); 405:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */ 406:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_DisablePCROP(pAdvOBInit->SectorsBank1, pAdvOBInit->SectorsBank2, pAdvOBInit 407:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || 408:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */ 409:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 410:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 411:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 412:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || 413:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Program BOOT config option byte*/ 414:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((pAdvOBInit->OptionType) & OPTIONBYTE_BOOTCONFIG) == OPTIONBYTE_BOOTCONFIG) 415:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 416:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_OB_BootConfig(pAdvOBInit->BootConfig); 417:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 418:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ 419:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 420:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 421:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 422:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 423:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 424:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Get the OBEX byte configuration 425:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param pAdvOBInit pointer to an FLASH_AdvOBProgramInitTypeDef structure that 426:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * contains the configuration information for the programming. 427:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 428:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None 429:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ ARM GAS /tmp/cckwFovy.s page 9 430:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void HAL_FLASHEx_AdvOBGetConfig(FLASH_AdvOBProgramInitTypeDef *pAdvOBInit) 431:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 432:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || 433:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || 434:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) 435:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector*/ 436:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->Sectors = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS)); 437:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #else /* STM32F427xx || STM32F437xx || STM32F429xx|| STM32F439xx || STM32F469xx || STM32F479xx */ 438:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector for Bank1*/ 439:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->SectorsBank1 = (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS)); 440:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 441:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Sector for Bank2*/ 442:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->SectorsBank2 = (*(__IO uint16_t *)(OPTCR1_BYTE2_ADDRESS)); 443:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 444:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Get Boot config OB*/ 445:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pAdvOBInit->BootConfig = *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS; 446:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || 447:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */ 448:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 449:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 450:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 451:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Select the Protection Mode 452:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 453:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note After PCROP activated Option Byte modification NOT POSSIBLE! excepted 454:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * Global Read Out Protection modification (from level1 to level0) 455:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Once SPRMOD bit is active unprotection of a protected sector is not possible 456:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPER 457:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM3 458:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices. 459:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 460:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 461:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 462:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OB_SelectPCROP(void) 463:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 464:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF; 465:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 466:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask SPRMOD bit */ 467:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE3_ADDRESS) & (uint8_t)0x7F); 468:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 469:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update Option Byte */ 470:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE3_ADDRESS = (uint8_t)(OB_PCROP_SELECTED | optiontmp); 471:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 472:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK; 473:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 474:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 475:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 476:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Deselect the Protection Mode 477:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 478:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note After PCROP activated Option Byte modification NOT POSSIBLE! excepted 479:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * Global Read Out Protection modification (from level1 to level0) 480:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Once SPRMOD bit is active unprotection of a protected sector is not possible 481:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Read a protected sector will set RDERR Flag and write a protected sector will set WRPER 482:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM3 483:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices. 484:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 485:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 486:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ ARM GAS /tmp/cckwFovy.s page 10 487:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OB_DeSelectPCROP(void) 488:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 489:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF; 490:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 491:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask SPRMOD bit */ 492:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE3_ADDRESS) & (uint8_t)0x7F); 493:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 494:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update Option Byte */ 495:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE3_ADDRESS = (uint8_t)(OB_PCROP_DESELECTED | optiontmp); 496:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 497:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK; 498:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 499:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F401xC || STM32F401xE || 500:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F411xE || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || 501:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */ 502:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 503:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx) || 504:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 505:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH Write Protection Option Bytes value for Bank 2 506:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/STM32F43xxx/STM32F469xx/STM32F479xx devi 507:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval The FLASH Write Protection Option Bytes value 508:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 509:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint16_t HAL_FLASHEx_OB_GetBank2WRP(void) 510:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 511:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH write protection Register value */ 512:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (*(__IO uint16_t *)(OPTCR1_BYTE2_ADDRESS)); 513:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 514:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ 515:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 516:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 517:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @} 518:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 519:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 520:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || 521:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 522:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Full erase of FLASH memory sectors 523:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism. 524:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 525:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V, 526:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit) 527:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V, 528:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit) 529:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V, 530:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit) 531:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External 532:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit) 533:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 534:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Banks to be erased 535:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 536:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased 537:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be erased 538:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased 539:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 540:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 541:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 542:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks) 543:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { ARM GAS /tmp/cckwFovy.s page 11 544:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 545:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange)); 546:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 547:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 548:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* if the previous operation is completed, proceed to erase all sectors */ 549:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE); 550:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 551:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Banks == FLASH_BANK_BOTH) 552:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 553:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* bank1 & bank2 will be erased*/ 554:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_MER_BIT; 555:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 556:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(Banks == FLASH_BANK_1) 557:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 558:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Only bank1 will be erased*/ 559:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER1; 560:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 561:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 562:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 563:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Only bank2 will be erased*/ 564:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER2; 565:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 566:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT | ((uint32_t)VoltageRange <<8U); 567:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 568:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 569:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 570:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Erase the specified FLASH memory sector 571:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector FLASH sector to erase 572:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series 573:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism. 574:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 575:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V, 576:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit) 577:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V, 578:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit) 579:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V, 580:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit) 581:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External 582:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit) 583:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 584:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None 585:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 586:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange) 587:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 588:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U; 589:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 590:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 591:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_SECTOR(Sector)); 592:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange)); 593:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 594:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(VoltageRange == FLASH_VOLTAGE_RANGE_1) 595:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 596:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_BYTE; 597:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 598:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_2) 599:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 600:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_HALF_WORD; ARM GAS /tmp/cckwFovy.s page 12 601:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 602:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_3) 603:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 604:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_WORD; 605:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 606:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 607:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 608:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_DOUBLE_WORD; 609:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 610:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 611:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Need to add offset of 4 when sector higher than FLASH_SECTOR_11 */ 612:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Sector > FLASH_SECTOR_11) 613:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 614:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** Sector += 4U; 615:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 616:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase the sector */ 617:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE); 618:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize; 619:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB); 620:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos); 621:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT; 622:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 623:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 624:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 625:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the write protection of the desired bank1 or bank 2 sectors 626:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 627:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1), 628:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4 629:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1 630:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1). 631:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 632:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected. 633:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 634:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg WRPSector: A value between OB_WRP_SECTOR_0 and OB_WRP_SECTOR_23 635:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_WRP_SECTOR_All 636:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note BANK2 starts from OB_WRP_SECTOR_12 637:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 638:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank 639:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 640:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1 641:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2 642:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2 643:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 644:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL FLASH State 645:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 646:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks) 647:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 648:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 649:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 650:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 651:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector)); 652:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 653:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 654:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 655:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 656:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 657:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) ARM GAS /tmp/cckwFovy.s page 13 658:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 659:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((WRPSector == OB_WRP_SECTOR_All) && ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH)) 660:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (WRPSector < OB_WRP_SECTOR_12)) 661:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 662:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(WRPSector == OB_WRP_SECTOR_All) 663:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 664:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK1*/ 665:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~(WRPSector>>12)); 666:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 667:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 668:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 669:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/ 670:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~WRPSector); 671:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 672:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 673:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 674:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 675:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/ 676:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~(WRPSector>>12)); 677:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 678:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 679:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/ 680:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((WRPSector == OB_WRP_SECTOR_All) && (Banks == FLASH_BANK_BOTH)) 681:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 682:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 683:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 684:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 685:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 686:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 687:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~(WRPSector>>12)); 688:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 689:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 690:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 691:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 692:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 693:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 694:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 695:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 696:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the write protection of the desired bank1 or bank 2 sectors 697:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 698:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1), 699:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4 700:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1 701:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1). 702:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 703:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected. 704:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 705:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg WRPSector: A value between OB_WRP_SECTOR_0 and OB_WRP_SECTOR_23 706:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_WRP_Sector_All 707:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note BANK2 starts from OB_WRP_SECTOR_12 708:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 709:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Disable write protection on all the sectors for the specific bank 710:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 711:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased 712:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be erased 713:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased 714:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * ARM GAS /tmp/cckwFovy.s page 14 715:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 716:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 717:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks) 718:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 719:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 720:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 721:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 722:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector)); 723:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 724:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 725:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 726:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 727:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 728:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 729:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 730:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(((WRPSector == OB_WRP_SECTOR_All) && ((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH)) 731:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** (WRPSector < OB_WRP_SECTOR_12)) 732:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 733:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(WRPSector == OB_WRP_SECTOR_All) 734:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 735:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK1*/ 736:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)(WRPSector>>12); 737:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 738:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 739:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 740:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/ 741:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)WRPSector; 742:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 743:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 744:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 745:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 746:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/ 747:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)(WRPSector>>12); 748:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 749:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 750:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/ 751:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((WRPSector == OB_WRP_SECTOR_All) && (Banks == FLASH_BANK_BOTH)) 752:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 753:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 754:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 755:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 756:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 757:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 758:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)(WRPSector>>12); 759:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 760:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 761:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 762:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 763:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 764:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 765:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 766:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 767:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 768:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Configure the Dual Bank Boot. 769:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 770:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices. 771:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * ARM GAS /tmp/cckwFovy.s page 15 772:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param BootConfig specifies the Dual Bank Boot Option byte. 773:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 774:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_Dual_BootEnabled: Dual Bank Boot Enable 775:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_Dual_BootDisabled: Dual Bank Boot Disabled 776:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None 777:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 778:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootConfig(uint8_t BootConfig) 779:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 780:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 781:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 782:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 783:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_BOOT(BootConfig)); 784:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 785:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 786:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 787:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 788:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 789:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 790:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Set Dual Bank Boot */ 791:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS &= (~FLASH_OPTCR_BFB2); 792:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS |= BootConfig; 793:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 794:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 795:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 796:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 797:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 798:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 799:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the read/write protection (PCROP) of the desired 800:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * sectors of Bank 1 and/or Bank 2. 801:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices. 802:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank1 Specifies the sector(s) to be read/write protected or unprotected for bank1 803:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 804:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_0 and OB_PCROP_SECTOR_11 805:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All 806:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank2 Specifies the sector(s) to be read/write protected or unprotected for bank2 807:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 808:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_12 and OB_PCROP_SECTOR_23 809:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All 810:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable PCROP protection on all the sectors for the specific bank 811:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 812:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1 813:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2 814:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2 815:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 816:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 817:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 818:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t 819:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 820:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 821:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 822:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 823:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 824:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 825:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 826:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 827:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 828:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { ARM GAS /tmp/cckwFovy.s page 16 829:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH)) 830:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 831:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank1)); 832:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/ 833:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)SectorBank1; 834:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 835:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 836:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 837:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2)); 838:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/ 839:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)SectorBank2; 840:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 841:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 842:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/ 843:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Banks == FLASH_BANK_BOTH) 844:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 845:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2)); 846:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 847:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 848:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 849:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 850:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 851:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/ 852:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS |= (uint16_t)SectorBank2; 853:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 854:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 855:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 856:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 857:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 858:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 859:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 860:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 861:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 862:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 863:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the read/write protection (PCROP) of the desired 864:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * sectors of Bank 1 and/or Bank 2. 865:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F42xxx/43xxx devices. 866:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank1 specifies the sector(s) to be read/write protected or unprotected for bank1 867:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 868:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_0 and OB_PCROP_SECTOR_11 869:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All 870:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param SectorBank2 Specifies the sector(s) to be read/write protected or unprotected for bank2 871:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 872:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_SECTOR_12 and OB_PCROP_SECTOR_23 873:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_SECTOR__All 874:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Disable PCROP protection on all the sectors for the specific bank 875:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 876:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1 877:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: WRP on all sectors of bank2 878:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: WRP on all sectors of bank1 & bank2 879:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 880:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 881:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 882:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t SectorBank2, uint32_t 883:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 884:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 885:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** ARM GAS /tmp/cckwFovy.s page 17 886:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 887:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 888:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 889:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 890:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 891:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 892:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 893:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 894:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((Banks == FLASH_BANK_1) || (Banks == FLASH_BANK_BOTH)) 895:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 896:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank1)); 897:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK1*/ 898:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~SectorBank1); 899:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 900:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 901:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 902:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/ 903:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2)); 904:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~SectorBank2); 905:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 906:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 907:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection on all sector of BANK2*/ 908:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(Banks == FLASH_BANK_BOTH) 909:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 910:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(SectorBank2)); 911:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 912:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 913:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 914:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 915:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 916:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /*Write protection done on sectors of BANK2*/ 917:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR1_BYTE2_ADDRESS &= (~SectorBank2); 918:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 919:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 920:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 921:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 922:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 923:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 924:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 925:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 926:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 927:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F469xx || STM32F479xx */ 928:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 929:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || 930:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || 931:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || 932:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || 933:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F423xx) 934:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 935:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Mass erase of FLASH memory 936:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism. 937:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 938:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V, 939:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit) 940:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V, 941:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit) 942:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V, ARM GAS /tmp/cckwFovy.s page 18 943:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit) 944:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External 945:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit) 946:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 947:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Banks to be erased 948:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 949:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased 950:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 951:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None 952:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 953:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks) 954:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 29 .loc 1 954 1 view -0 30 .cfi_startproc 31 @ args = 0, pretend = 0, frame = 0 32 @ frame_needed = 0, uses_anonymous_args = 0 33 @ link register save eliminated. 955:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 956:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange)); 34 .loc 1 956 3 view .LVU1 957:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 35 .loc 1 957 3 view .LVU2 958:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 959:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase all sectors */ 960:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE); 36 .loc 1 960 3 view .LVU3 37 0000 074B ldr r3, .L2 38 0002 1969 ldr r1, [r3, #16] 39 .LVL1: 40 .loc 1 960 3 is_stmt 0 view .LVU4 41 0004 21F44071 bic r1, r1, #768 42 0008 1961 str r1, [r3, #16] 961:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_MER; 43 .loc 1 961 3 is_stmt 1 view .LVU5 44 .loc 1 961 13 is_stmt 0 view .LVU6 45 000a 1969 ldr r1, [r3, #16] 46 000c 41F00401 orr r1, r1, #4 47 0010 1961 str r1, [r3, #16] 962:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT | ((uint32_t)VoltageRange <<8U); 48 .loc 1 962 3 is_stmt 1 view .LVU7 49 .loc 1 962 13 is_stmt 0 view .LVU8 50 0012 1A69 ldr r2, [r3, #16] 51 0014 42EA0022 orr r2, r2, r0, lsl #8 52 0018 42F48032 orr r2, r2, #65536 53 001c 1A61 str r2, [r3, #16] 963:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 54 .loc 1 963 1 view .LVU9 55 001e 7047 bx lr 56 .L3: 57 .align 2 58 .L2: 59 0020 003C0240 .word 1073888256 60 .cfi_endproc 61 .LFE134: 63 .section .text.FLASH_OB_BOR_LevelConfig,"ax",%progbits 64 .align 1 65 .syntax unified ARM GAS /tmp/cckwFovy.s page 19 66 .thumb 67 .thumb_func 69 FLASH_OB_BOR_LevelConfig: 70 .LVL2: 71 .LFB140: 964:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 965:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 966:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Erase the specified FLASH memory sector 967:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector FLASH sector to erase 968:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series 969:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param VoltageRange The device voltage range which defines the erase parallelism. 970:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 971:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_1: when the device voltage range is 1.8V to 2.1V, 972:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by byte (8-bit) 973:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_2: when the device voltage range is 2.1V to 2.7V, 974:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by half word (16-bit) 975:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_3: when the device voltage range is 2.7V to 3.6V, 976:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by word (32-bit) 977:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_VOLTAGE_RANGE_4: when the device voltage range is 2.7V to 3.6V + External 978:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * the operation will be done by double word (64-bit) 979:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 980:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None 981:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 982:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange) 983:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 984:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U; 985:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 986:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 987:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_SECTOR(Sector)); 988:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange)); 989:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 990:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(VoltageRange == FLASH_VOLTAGE_RANGE_1) 991:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 992:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_BYTE; 993:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 994:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_2) 995:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 996:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_HALF_WORD; 997:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 998:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if(VoltageRange == FLASH_VOLTAGE_RANGE_3) 999:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1000:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_WORD; 1001:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1002:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 1003:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1004:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** tmp_psize = FLASH_PSIZE_DOUBLE_WORD; 1005:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1006:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1007:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* If the previous operation is completed, proceed to erase the sector */ 1008:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE); 1009:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize; 1010:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB); 1011:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos); 1012:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT; 1013:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1014:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1015:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** ARM GAS /tmp/cckwFovy.s page 20 1016:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the write protection of the desired bank 1 sectors 1017:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1018:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1), 1019:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4 1020:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1 1021:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1). 1022:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1023:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected. 1024:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series 1025:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1026:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank 1027:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1028:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1 1029:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1030:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 1031:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1032:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks) 1033:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1034:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1035:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1036:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 1037:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector)); 1038:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 1039:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1040:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1041:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1042:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1043:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 1044:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1045:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~WRPSector); 1046:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1047:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1048:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 1049:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1050:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1051:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1052:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the write protection of the desired bank 1 sectors 1053:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1054:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1), 1055:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * it is not possible to program or erase the flash sector i if CortexM4 1056:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * debug features are connected or boot code is executed in RAM, even if nWRPi = 1 1057:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note Active value of nWRPi bits is inverted when PCROP mode is active (SPRMOD =1). 1058:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1059:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param WRPSector specifies the sector(s) to be write protected. 1060:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * The value of this parameter depend on device used within the same series 1061:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1062:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Banks Enable write protection on all the sectors for the specific bank 1063:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1064:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: WRP on all sectors of bank1 1065:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1066:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 1067:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1068:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks) 1069:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1070:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1071:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1072:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ ARM GAS /tmp/cckwFovy.s page 21 1073:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_WRP_SECTOR(WRPSector)); 1074:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 1075:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1076:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1077:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1078:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1079:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 1080:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)WRPSector; 1082:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1083:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1084:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 1085:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1086:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F40xxx || STM32F41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F446xx || 1087:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */ 1088:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1089:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || 1090:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || 1091:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) 1092:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1093:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Enable the read/write protection (PCROP) of the desired sectors. 1094:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F401xx devices. 1095:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector specifies the sector(s) to be read/write protected or unprotected. 1096:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1097:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_Sector0 and OB_PCROP_Sector5 1098:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_Sector_All 1099:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 1100:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1101:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_EnablePCROP(uint32_t Sector) 1102:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1103:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1104:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1105:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 1106:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(Sector)); 1107:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1108:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1109:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1110:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1111:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 1112:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1113:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS |= (uint16_t)Sector; 1114:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1115:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1116:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 1117:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1118:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1119:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1120:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1121:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Disable the read/write protection (PCROP) of the desired sectors. 1122:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note This function can be used only for STM32F401xx devices. 1123:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Sector specifies the sector(s) to be read/write protected or unprotected. 1124:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1125:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP: A value between OB_PCROP_Sector0 and OB_PCROP_Sector5 1126:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_PCROP_Sector_All 1127:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 1128:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1129:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t Sector) ARM GAS /tmp/cckwFovy.s page 22 1130:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1131:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1132:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1133:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 1134:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP(Sector)); 1135:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1136:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1137:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1138:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1139:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 1140:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1141:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint16_t*)OPTCR_BYTE2_ADDRESS &= (~Sector); 1142:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1143:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1144:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 1145:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1146:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1147:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F401xC || STM32F401xE || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || 1148:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** STM32F413xx || STM32F423xx */ 1149:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1150:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1151:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Set the read protection level. 1152:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Level specifies the read protection level. 1153:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1154:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection 1155:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Read protection of the memory 1156:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection 1157:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1158:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @note WARNING: When enabling OB_RDP level 2 it's no more possible to go back to level 1 or 0 1159:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * 1160:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 1161:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1162:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDP_LevelConfig(uint8_t Level) 1163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1165:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1166:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 1167:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_RDP_LEVEL(Level)); 1168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1169:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1171:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 1173:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t*)OPTCR_BYTE1_ADDRESS = Level; 1175:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1177:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 1178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1180:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Program the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY. 1182:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Iwdg Selects the IWDG mode 1183:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_IWDG_SW: Software IWDG selected 1185:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_IWDG_HW: Hardware IWDG selected 1186:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Stop Reset event when entering STOP mode. ARM GAS /tmp/cckwFovy.s page 23 1187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1188:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STOP_NO_RST: No reset generated when entering in STOP 1189:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STOP_RST: Reset generated when entering in STOP 1190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Stdby Reset event when entering Standby mode. 1191:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1192:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STDBY_NO_RST: No reset generated when entering in STANDBY 1193:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_STDBY_RST: Reset generated when entering in STANDBY 1194:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 1195:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1196:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_UserConfig(uint8_t Iwdg, uint8_t Stop, uint8_t Stdby) 1197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF; 1199:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1201:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 1202:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_IWDG_SOURCE(Iwdg)); 1203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STOP_SOURCE(Stop)); 1204:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STDBY_SOURCE(Stdby)); 1205:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(status == HAL_OK) 1210:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Mask OPTLOCK, OPTSTRT, BOR_LEV and BFB2 bits */ 1212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** optiontmp = (uint8_t)((*(__IO uint8_t *)OPTCR_BYTE0_ADDRESS) & (uint8_t)0x1F); 1213:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1214:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Update User Option Byte */ 1215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS = Iwdg | (uint8_t)(Stdby | (uint8_t)(Stop | ((uint8_t)opti 1216:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1218:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return status; 1219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1220:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1222:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Set the BOR Level. 1223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @param Level specifies the Option Bytes BOR Reset Level. 1224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1225:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL3: Supply voltage ranges from 2.7 to 3.6 V 1226:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL2: Supply voltage ranges from 2.4 to 2.7 V 1227:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_LEVEL1: Supply voltage ranges from 2.1 to 2.4 V 1228:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_BOR_OFF: Supply voltage ranges from 1.62 to 2.1 V 1229:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval HAL Status 1230:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1231:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BOR_LevelConfig(uint8_t Level) 1232:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 72 .loc 1 1232 1 is_stmt 1 view -0 73 .cfi_startproc 74 @ args = 0, pretend = 0, frame = 0 75 @ frame_needed = 0, uses_anonymous_args = 0 76 @ link register save eliminated. 1233:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Check the parameters */ 1234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_BOR_LEVEL(Level)); 77 .loc 1 1234 3 view .LVU11 1235:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1236:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Set the BOR Level */ 1237:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS &= (~FLASH_OPTCR_BOR_LEV); ARM GAS /tmp/cckwFovy.s page 24 78 .loc 1 1237 3 view .LVU12 79 .loc 1 1237 40 is_stmt 0 view .LVU13 80 0000 044B ldr r3, .L5 81 0002 197D ldrb r1, [r3, #20] @ zero_extendqisi2 82 0004 01F0F301 and r1, r1, #243 83 0008 1975 strb r1, [r3, #20] 1238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** *(__IO uint8_t *)OPTCR_BYTE0_ADDRESS |= Level; 84 .loc 1 1238 3 is_stmt 1 view .LVU14 85 .loc 1 1238 40 is_stmt 0 view .LVU15 86 000a 1A7D ldrb r2, [r3, #20] @ zero_extendqisi2 87 000c 0243 orrs r2, r2, r0 88 000e 1A75 strb r2, [r3, #20] 1239:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1240:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return HAL_OK; 89 .loc 1 1240 3 is_stmt 1 view .LVU16 1241:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1242:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 90 .loc 1 1242 1 is_stmt 0 view .LVU17 91 0010 0020 movs r0, #0 92 .LVL3: 93 .loc 1 1242 1 view .LVU18 94 0012 7047 bx lr 95 .L6: 96 .align 2 97 .L5: 98 0014 003C0240 .word 1073888256 99 .cfi_endproc 100 .LFE140: 102 .section .text.FLASH_OB_GetUser,"ax",%progbits 103 .align 1 104 .syntax unified 105 .thumb 106 .thumb_func 108 FLASH_OB_GetUser: 109 .LFB141: 1243:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1245:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Return the FLASH User Option Byte value. 1246:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint8_t FLASH User Option Bytes values: IWDG_SW(Bit0), RST_STOP(Bit1) 1247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * and RST_STDBY(Bit2). 1248:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1249:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetUser(void) 1250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 110 .loc 1 1250 1 is_stmt 1 view -0 111 .cfi_startproc 112 @ args = 0, pretend = 0, frame = 0 113 @ frame_needed = 0, uses_anonymous_args = 0 114 @ link register save eliminated. 1251:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the User Option Byte */ 1252:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return ((uint8_t)(FLASH->OPTCR & 0xE0)); 115 .loc 1 1252 3 view .LVU20 116 .loc 1 1252 26 is_stmt 0 view .LVU21 117 0000 024B ldr r3, .L8 118 0002 5869 ldr r0, [r3, #20] 1253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 119 .loc 1 1253 1 view .LVU22 120 0004 00F0E000 and r0, r0, #224 ARM GAS /tmp/cckwFovy.s page 25 121 0008 7047 bx lr 122 .L9: 123 000a 00BF .align 2 124 .L8: 125 000c 003C0240 .word 1073888256 126 .cfi_endproc 127 .LFE141: 129 .section .text.FLASH_OB_GetWRP,"ax",%progbits 130 .align 1 131 .syntax unified 132 .thumb 133 .thumb_func 135 FLASH_OB_GetWRP: 136 .LFB142: 1254:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1255:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Return the FLASH Write Protection Option Bytes value. 1257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint16_t FLASH Write Protection Option Bytes value 1258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1259:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint16_t FLASH_OB_GetWRP(void) 1260:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 137 .loc 1 1260 1 is_stmt 1 view -0 138 .cfi_startproc 139 @ args = 0, pretend = 0, frame = 0 140 @ frame_needed = 0, uses_anonymous_args = 0 141 @ link register save eliminated. 1261:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH write protection Register value */ 1262:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (*(__IO uint16_t *)(OPTCR_BYTE2_ADDRESS)); 142 .loc 1 1262 3 view .LVU24 143 .loc 1 1262 11 is_stmt 0 view .LVU25 144 0000 014B ldr r3, .L11 145 0002 D88A ldrh r0, [r3, #22] 1263:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 146 .loc 1 1263 1 view .LVU26 147 0004 80B2 uxth r0, r0 148 0006 7047 bx lr 149 .L12: 150 .align 2 151 .L11: 152 0008 003C0240 .word 1073888256 153 .cfi_endproc 154 .LFE142: 156 .section .text.FLASH_OB_GetRDP,"ax",%progbits 157 .align 1 158 .syntax unified 159 .thumb 160 .thumb_func 162 FLASH_OB_GetRDP: 163 .LFB143: 1264:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1265:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1266:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH Read Protection level. 1267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval FLASH ReadOut Protection Status: 1268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection 1270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Read protection of the memory 1271:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection ARM GAS /tmp/cckwFovy.s page 26 1272:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetRDP(void) 1274:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 164 .loc 1 1274 1 is_stmt 1 view -0 165 .cfi_startproc 166 @ args = 0, pretend = 0, frame = 0 167 @ frame_needed = 0, uses_anonymous_args = 0 168 @ link register save eliminated. 1275:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t readstatus = OB_RDP_LEVEL_0; 169 .loc 1 1275 3 view .LVU28 170 .LVL4: 1276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if((*(__IO uint8_t*)(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_2)) 171 .loc 1 1277 3 view .LVU29 172 .loc 1 1277 7 is_stmt 0 view .LVU30 173 0000 054B ldr r3, .L16 174 0002 587D ldrb r0, [r3, #21] @ zero_extendqisi2 175 0004 C0B2 uxtb r0, r0 176 .loc 1 1277 5 view .LVU31 177 0006 CC28 cmp r0, #204 178 0008 04D0 beq .L14 1278:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1279:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_2; 1280:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1281:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else if((*(__IO uint8_t*)(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_0)) 179 .loc 1 1281 8 is_stmt 1 view .LVU32 180 .loc 1 1281 12 is_stmt 0 view .LVU33 181 000a 587D ldrb r0, [r3, #21] @ zero_extendqisi2 182 000c C0B2 uxtb r0, r0 183 .loc 1 1281 10 view .LVU34 184 000e AA28 cmp r0, #170 185 0010 00D0 beq .L14 1282:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1283:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_0; 1284:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1285:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** else 1286:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** readstatus = OB_RDP_LEVEL_1; 186 .loc 1 1287 16 view .LVU35 187 0012 5520 movs r0, #85 188 .L14: 189 .LVL5: 1288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1289:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1290:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return readstatus; 190 .loc 1 1290 3 is_stmt 1 view .LVU36 1291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 191 .loc 1 1291 1 is_stmt 0 view .LVU37 192 0014 7047 bx lr 193 .L17: 194 0016 00BF .align 2 195 .L16: 196 0018 003C0240 .word 1073888256 197 .cfi_endproc 198 .LFE143: 200 .section .text.FLASH_OB_GetBOR,"ax",%progbits 201 .align 1 ARM GAS /tmp/cckwFovy.s page 27 202 .syntax unified 203 .thumb 204 .thumb_func 206 FLASH_OB_GetBOR: 207 .LFB144: 1292:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1293:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1294:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Returns the FLASH BOR level. 1295:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval uint8_t The FLASH BOR level: 1296:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL3: Supply voltage ranges from 2.7 to 3.6 V 1297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL2: Supply voltage ranges from 2.4 to 2.7 V 1298:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_LEVEL1: Supply voltage ranges from 2.1 to 2.4 V 1299:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * - OB_BOR_OFF : Supply voltage ranges from 1.62 to 2.1 V 1300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1301:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** static uint8_t FLASH_OB_GetBOR(void) 1302:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 208 .loc 1 1302 1 is_stmt 1 view -0 209 .cfi_startproc 210 @ args = 0, pretend = 0, frame = 0 211 @ frame_needed = 0, uses_anonymous_args = 0 212 @ link register save eliminated. 1303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Return the FLASH BOR level */ 1304:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** return (uint8_t)(*(__IO uint8_t *)(OPTCR_BYTE0_ADDRESS) & (uint8_t)0x0C); 213 .loc 1 1304 3 view .LVU39 214 .loc 1 1304 10 is_stmt 0 view .LVU40 215 0000 024B ldr r3, .L19 216 0002 187D ldrb r0, [r3, #20] @ zero_extendqisi2 1305:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 217 .loc 1 1305 1 view .LVU41 218 0004 00F00C00 and r0, r0, #12 219 0008 7047 bx lr 220 .L20: 221 000a 00BF .align 2 222 .L19: 223 000c 003C0240 .word 1073888256 224 .cfi_endproc 225 .LFE144: 227 .section .text.FLASH_OB_EnableWRP,"ax",%progbits 228 .align 1 229 .syntax unified 230 .thumb 231 .thumb_func 233 FLASH_OB_EnableWRP: 234 .LVL6: 235 .LFB136: 1033:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 236 .loc 1 1033 1 is_stmt 1 view -0 237 .cfi_startproc 238 @ args = 0, pretend = 0, frame = 0 239 @ frame_needed = 0, uses_anonymous_args = 0 1033:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 240 .loc 1 1033 1 is_stmt 0 view .LVU43 241 0000 10B5 push {r4, lr} 242 .LCFI0: 243 .cfi_def_cfa_offset 8 244 .cfi_offset 4, -8 245 .cfi_offset 14, -4 ARM GAS /tmp/cckwFovy.s page 28 246 0002 0446 mov r4, r0 1034:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 247 .loc 1 1034 3 is_stmt 1 view .LVU44 248 .LVL7: 1037:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 249 .loc 1 1037 3 view .LVU45 1038:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 250 .loc 1 1038 3 view .LVU46 1041:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 251 .loc 1 1041 3 view .LVU47 1041:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 252 .loc 1 1041 12 is_stmt 0 view .LVU48 253 0004 4CF25030 movw r0, #50000 254 .LVL8: 1041:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 255 .loc 1 1041 12 view .LVU49 256 0008 FFF7FEFF bl FLASH_WaitForLastOperation 257 .LVL9: 1043:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 258 .loc 1 1043 3 is_stmt 1 view .LVU50 1043:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 259 .loc 1 1043 5 is_stmt 0 view .LVU51 260 000c 28B9 cbnz r0, .L22 1045:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 261 .loc 1 1045 5 is_stmt 1 view .LVU52 1045:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 262 .loc 1 1045 42 is_stmt 0 view .LVU53 263 000e 034A ldr r2, .L24 264 0010 D38A ldrh r3, [r2, #22] 265 0012 9BB2 uxth r3, r3 266 0014 23EA0404 bic r4, r3, r4 267 .LVL10: 1045:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 268 .loc 1 1045 42 view .LVU54 269 0018 D482 strh r4, [r2, #22] @ movhi 270 .L22: 1048:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 271 .loc 1 1048 3 is_stmt 1 view .LVU55 1049:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 272 .loc 1 1049 1 is_stmt 0 view .LVU56 273 001a 10BD pop {r4, pc} 274 .L25: 275 .align 2 276 .L24: 277 001c 003C0240 .word 1073888256 278 .cfi_endproc 279 .LFE136: 281 .section .text.FLASH_OB_DisableWRP,"ax",%progbits 282 .align 1 283 .syntax unified 284 .thumb 285 .thumb_func 287 FLASH_OB_DisableWRP: 288 .LVL11: 289 .LFB137: 1069:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 290 .loc 1 1069 1 is_stmt 1 view -0 ARM GAS /tmp/cckwFovy.s page 29 291 .cfi_startproc 292 @ args = 0, pretend = 0, frame = 0 293 @ frame_needed = 0, uses_anonymous_args = 0 1069:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 294 .loc 1 1069 1 is_stmt 0 view .LVU58 295 0000 10B5 push {r4, lr} 296 .LCFI1: 297 .cfi_def_cfa_offset 8 298 .cfi_offset 4, -8 299 .cfi_offset 14, -4 300 0002 0446 mov r4, r0 1070:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 301 .loc 1 1070 3 is_stmt 1 view .LVU59 302 .LVL12: 1073:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 303 .loc 1 1073 3 view .LVU60 1074:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 304 .loc 1 1074 3 view .LVU61 1077:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 305 .loc 1 1077 3 view .LVU62 1077:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 306 .loc 1 1077 12 is_stmt 0 view .LVU63 307 0004 4CF25030 movw r0, #50000 308 .LVL13: 1077:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 309 .loc 1 1077 12 view .LVU64 310 0008 FFF7FEFF bl FLASH_WaitForLastOperation 311 .LVL14: 1079:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 312 .loc 1 1079 3 is_stmt 1 view .LVU65 1079:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 313 .loc 1 1079 5 is_stmt 0 view .LVU66 314 000c 28B9 cbnz r0, .L27 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 315 .loc 1 1081 5 is_stmt 1 view .LVU67 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 316 .loc 1 1081 42 is_stmt 0 view .LVU68 317 000e 034A ldr r2, .L29 318 0010 D38A ldrh r3, [r2, #22] 319 0012 9BB2 uxth r3, r3 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 320 .loc 1 1081 45 view .LVU69 321 0014 A4B2 uxth r4, r4 322 .LVL15: 1081:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 323 .loc 1 1081 42 view .LVU70 324 0016 1C43 orrs r4, r4, r3 325 0018 D482 strh r4, [r2, #22] @ movhi 326 .L27: 1084:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 327 .loc 1 1084 3 is_stmt 1 view .LVU71 1085:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** #endif /* STM32F40xxx || STM32F41xxx || STM32F401xx || STM32F410xx || STM32F411xE || STM32F446xx || 328 .loc 1 1085 1 is_stmt 0 view .LVU72 329 001a 10BD pop {r4, pc} 330 .L30: 331 .align 2 332 .L29: ARM GAS /tmp/cckwFovy.s page 30 333 001c 003C0240 .word 1073888256 334 .cfi_endproc 335 .LFE137: 337 .section .text.FLASH_OB_RDP_LevelConfig,"ax",%progbits 338 .align 1 339 .syntax unified 340 .thumb 341 .thumb_func 343 FLASH_OB_RDP_LevelConfig: 344 .LVL16: 345 .LFB138: 1163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 346 .loc 1 1163 1 is_stmt 1 view -0 347 .cfi_startproc 348 @ args = 0, pretend = 0, frame = 0 349 @ frame_needed = 0, uses_anonymous_args = 0 1163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 350 .loc 1 1163 1 is_stmt 0 view .LVU74 351 0000 10B5 push {r4, lr} 352 .LCFI2: 353 .cfi_def_cfa_offset 8 354 .cfi_offset 4, -8 355 .cfi_offset 14, -4 356 0002 0446 mov r4, r0 1164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 357 .loc 1 1164 3 is_stmt 1 view .LVU75 358 .LVL17: 1167:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 359 .loc 1 1167 3 view .LVU76 1170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 360 .loc 1 1170 3 view .LVU77 1170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 361 .loc 1 1170 12 is_stmt 0 view .LVU78 362 0004 4CF25030 movw r0, #50000 363 .LVL18: 1170:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 364 .loc 1 1170 12 view .LVU79 365 0008 FFF7FEFF bl FLASH_WaitForLastOperation 366 .LVL19: 1172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 367 .loc 1 1172 3 is_stmt 1 view .LVU80 1172:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 368 .loc 1 1172 5 is_stmt 0 view .LVU81 369 000c 08B9 cbnz r0, .L32 1174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 370 .loc 1 1174 5 is_stmt 1 view .LVU82 1174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 371 .loc 1 1174 41 is_stmt 0 view .LVU83 372 000e 014B ldr r3, .L34 373 0010 5C75 strb r4, [r3, #21] 374 .L32: 1177:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 375 .loc 1 1177 3 is_stmt 1 view .LVU84 1178:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 376 .loc 1 1178 1 is_stmt 0 view .LVU85 377 0012 10BD pop {r4, pc} 378 .L35: ARM GAS /tmp/cckwFovy.s page 31 379 .align 2 380 .L34: 381 0014 003C0240 .word 1073888256 382 .cfi_endproc 383 .LFE138: 385 .section .text.FLASH_OB_UserConfig,"ax",%progbits 386 .align 1 387 .syntax unified 388 .thumb 389 .thumb_func 391 FLASH_OB_UserConfig: 392 .LVL20: 393 .LFB139: 1197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF; 394 .loc 1 1197 1 is_stmt 1 view -0 395 .cfi_startproc 396 @ args = 0, pretend = 0, frame = 0 397 @ frame_needed = 0, uses_anonymous_args = 0 1197:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint8_t optiontmp = 0xFF; 398 .loc 1 1197 1 is_stmt 0 view .LVU87 399 0000 F8B5 push {r3, r4, r5, r6, r7, lr} 400 .LCFI3: 401 .cfi_def_cfa_offset 24 402 .cfi_offset 3, -24 403 .cfi_offset 4, -20 404 .cfi_offset 5, -16 405 .cfi_offset 6, -12 406 .cfi_offset 7, -8 407 .cfi_offset 14, -4 408 0002 0446 mov r4, r0 409 0004 0E46 mov r6, r1 410 0006 1546 mov r5, r2 1198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 411 .loc 1 1198 3 is_stmt 1 view .LVU88 412 .LVL21: 1199:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 413 .loc 1 1199 3 view .LVU89 1202:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STOP_SOURCE(Stop)); 414 .loc 1 1202 3 view .LVU90 1203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_OB_STDBY_SOURCE(Stdby)); 415 .loc 1 1203 3 view .LVU91 1204:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 416 .loc 1 1204 3 view .LVU92 1207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 417 .loc 1 1207 3 view .LVU93 1207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 418 .loc 1 1207 12 is_stmt 0 view .LVU94 419 0008 4CF25030 movw r0, #50000 420 .LVL22: 1207:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 421 .loc 1 1207 12 view .LVU95 422 000c FFF7FEFF bl FLASH_WaitForLastOperation 423 .LVL23: 1209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 424 .loc 1 1209 3 is_stmt 1 view .LVU96 1209:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 425 .loc 1 1209 5 is_stmt 0 view .LVU97 ARM GAS /tmp/cckwFovy.s page 32 426 0010 48B9 cbnz r0, .L37 1212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 427 .loc 1 1212 5 is_stmt 1 view .LVU98 1212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 428 .loc 1 1212 67 is_stmt 0 view .LVU99 429 0012 054F ldr r7, .L39 430 0014 3B7D ldrb r3, [r7, #20] @ zero_extendqisi2 1212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 431 .loc 1 1212 15 view .LVU100 432 0016 03F01F03 and r3, r3, #31 433 .LVL24: 1215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 434 .loc 1 1215 5 is_stmt 1 view .LVU101 1215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 435 .loc 1 1215 69 is_stmt 0 view .LVU102 436 001a 43EA0601 orr r1, r3, r6 1215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 437 .loc 1 1215 51 view .LVU103 438 001e 41EA0502 orr r2, r1, r5 1215:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 439 .loc 1 1215 42 view .LVU104 440 0022 2243 orrs r2, r2, r4 441 0024 3A75 strb r2, [r7, #20] 442 .LVL25: 443 .L37: 1218:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 444 .loc 1 1218 3 is_stmt 1 view .LVU105 1219:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 445 .loc 1 1219 1 is_stmt 0 view .LVU106 446 0026 F8BD pop {r3, r4, r5, r6, r7, pc} 447 .L40: 448 .align 2 449 .L39: 450 0028 003C0240 .word 1073888256 451 .cfi_endproc 452 .LFE139: 454 .section .text.HAL_FLASHEx_OBProgram,"ax",%progbits 455 .align 1 456 .global HAL_FLASHEx_OBProgram 457 .syntax unified 458 .thumb 459 .thumb_func 461 HAL_FLASHEx_OBProgram: 462 .LVL26: 463 .LFB132: 287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR; 464 .loc 1 287 1 is_stmt 1 view -0 465 .cfi_startproc 466 @ args = 0, pretend = 0, frame = 0 467 @ frame_needed = 0, uses_anonymous_args = 0 288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 468 .loc 1 288 3 view .LVU108 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 469 .loc 1 291 3 view .LVU109 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 470 .loc 1 291 3 view .LVU110 471 0000 1F4B ldr r3, .L58 ARM GAS /tmp/cckwFovy.s page 33 472 0002 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2 473 0004 012B cmp r3, #1 474 0006 38D0 beq .L48 287:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR; 475 .loc 1 287 1 is_stmt 0 discriminator 2 view .LVU111 476 0008 10B5 push {r4, lr} 477 .LCFI4: 478 .cfi_def_cfa_offset 8 479 .cfi_offset 4, -8 480 .cfi_offset 14, -4 481 000a 0446 mov r4, r0 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 482 .loc 1 291 3 is_stmt 1 discriminator 2 view .LVU112 483 000c 1C4B ldr r3, .L58 484 000e 0122 movs r2, #1 485 0010 1A76 strb r2, [r3, #24] 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 486 .loc 1 291 3 discriminator 2 view .LVU113 294:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 487 .loc 1 294 3 discriminator 2 view .LVU114 297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 488 .loc 1 297 3 discriminator 2 view .LVU115 297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 489 .loc 1 297 14 is_stmt 0 discriminator 2 view .LVU116 490 0012 0368 ldr r3, [r0] 297:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 491 .loc 1 297 5 discriminator 2 view .LVU117 492 0014 13F0010F tst r3, #1 493 0018 0CD0 beq .L49 299:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(pOBInit->WRPState == OB_WRPSTATE_ENABLE) 494 .loc 1 299 5 is_stmt 1 view .LVU118 300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 495 .loc 1 300 5 view .LVU119 300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 496 .loc 1 300 15 is_stmt 0 view .LVU120 497 001a 4368 ldr r3, [r0, #4] 300:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 498 .loc 1 300 7 view .LVU121 499 001c 9342 cmp r3, r2 500 001e 04D0 beq .L54 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 501 .loc 1 308 7 is_stmt 1 view .LVU122 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 502 .loc 1 308 16 is_stmt 0 view .LVU123 503 0020 C168 ldr r1, [r0, #12] 504 0022 8068 ldr r0, [r0, #8] 505 .LVL27: 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 506 .loc 1 308 16 view .LVU124 507 0024 FFF7FEFF bl FLASH_OB_DisableWRP 508 .LVL28: 308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 509 .loc 1 308 16 view .LVU125 510 0028 05E0 b .L43 511 .LVL29: 512 .L54: 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } ARM GAS /tmp/cckwFovy.s page 34 513 .loc 1 303 7 is_stmt 1 view .LVU126 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 514 .loc 1 303 16 is_stmt 0 view .LVU127 515 002a C168 ldr r1, [r0, #12] 516 002c 8068 ldr r0, [r0, #8] 517 .LVL30: 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 518 .loc 1 303 16 view .LVU128 519 002e FFF7FEFF bl FLASH_OB_EnableWRP 520 .LVL31: 303:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 521 .loc 1 303 16 view .LVU129 522 0032 00E0 b .L43 523 .LVL32: 524 .L49: 288:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 525 .loc 1 288 21 view .LVU130 526 0034 0120 movs r0, #1 527 .LVL33: 528 .L43: 313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 529 .loc 1 313 3 is_stmt 1 view .LVU131 313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 530 .loc 1 313 14 is_stmt 0 view .LVU132 531 0036 2368 ldr r3, [r4] 313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 532 .loc 1 313 5 view .LVU133 533 0038 13F0020F tst r3, #2 534 003c 0BD1 bne .L55 535 .L45: 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 536 .loc 1 319 3 is_stmt 1 view .LVU134 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 537 .loc 1 319 14 is_stmt 0 view .LVU135 538 003e 2368 ldr r3, [r4] 319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 539 .loc 1 319 5 view .LVU136 540 0040 13F0040F tst r3, #4 541 0044 0BD1 bne .L56 542 .L46: 327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 543 .loc 1 327 3 is_stmt 1 view .LVU137 327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 544 .loc 1 327 14 is_stmt 0 view .LVU138 545 0046 2368 ldr r3, [r4] 327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 546 .loc 1 327 5 view .LVU139 547 0048 13F0080F tst r3, #8 548 004c 11D1 bne .L57 549 .L47: 333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 550 .loc 1 333 3 is_stmt 1 view .LVU140 333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 551 .loc 1 333 3 view .LVU141 552 004e 0C4B ldr r3, .L58 553 0050 0022 movs r2, #0 554 0052 1A76 strb r2, [r3, #24] ARM GAS /tmp/cckwFovy.s page 35 333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 555 .loc 1 333 3 view .LVU142 335:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 556 .loc 1 335 3 view .LVU143 336:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 557 .loc 1 336 1 is_stmt 0 view .LVU144 558 0054 10BD pop {r4, pc} 559 .LVL34: 560 .L55: 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 561 .loc 1 315 5 is_stmt 1 view .LVU145 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 562 .loc 1 315 14 is_stmt 0 view .LVU146 563 0056 207C ldrb r0, [r4, #16] @ zero_extendqisi2 564 .LVL35: 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 565 .loc 1 315 14 view .LVU147 566 0058 FFF7FEFF bl FLASH_OB_RDP_LevelConfig 567 .LVL36: 315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 568 .loc 1 315 14 view .LVU148 569 005c EFE7 b .L45 570 .L56: 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STOP_NO_RST, 571 .loc 1 321 5 is_stmt 1 view .LVU149 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STOP_NO_RST, 572 .loc 1 321 41 is_stmt 0 view .LVU150 573 005e 207E ldrb r0, [r4, #24] @ zero_extendqisi2 574 .LVL37: 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STOP_NO_RST, 575 .loc 1 321 14 view .LVU151 576 0060 00F08002 and r2, r0, #128 577 0064 00F04001 and r1, r0, #64 578 0068 00F02000 and r0, r0, #32 579 006c FFF7FEFF bl FLASH_OB_UserConfig 580 .LVL38: 321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->USERConfig&OB_STOP_NO_RST, 581 .loc 1 321 14 view .LVU152 582 0070 E9E7 b .L46 583 .L57: 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 584 .loc 1 329 5 is_stmt 1 view .LVU153 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 585 .loc 1 329 14 is_stmt 0 view .LVU154 586 0072 207D ldrb r0, [r4, #20] @ zero_extendqisi2 587 .LVL39: 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 588 .loc 1 329 14 view .LVU155 589 0074 FFF7FEFF bl FLASH_OB_BOR_LevelConfig 590 .LVL40: 329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 591 .loc 1 329 14 view .LVU156 592 0078 E9E7 b .L47 593 .LVL41: 594 .L48: 595 .LCFI5: 596 .cfi_def_cfa_offset 0 ARM GAS /tmp/cckwFovy.s page 36 597 .cfi_restore 4 598 .cfi_restore 14 291:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 599 .loc 1 291 3 view .LVU157 600 007a 0220 movs r0, #2 601 .LVL42: 336:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 602 .loc 1 336 1 view .LVU158 603 007c 7047 bx lr 604 .L59: 605 007e 00BF .align 2 606 .L58: 607 0080 00000000 .word pFlash 608 .cfi_endproc 609 .LFE132: 611 .section .text.HAL_FLASHEx_OBGetConfig,"ax",%progbits 612 .align 1 613 .global HAL_FLASHEx_OBGetConfig 614 .syntax unified 615 .thumb 616 .thumb_func 618 HAL_FLASHEx_OBGetConfig: 619 .LVL43: 620 .LFB133: 346:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->OptionType = OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_BOR; 621 .loc 1 346 1 is_stmt 1 view -0 622 .cfi_startproc 623 @ args = 0, pretend = 0, frame = 0 624 @ frame_needed = 0, uses_anonymous_args = 0 346:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pOBInit->OptionType = OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_BOR; 625 .loc 1 346 1 is_stmt 0 view .LVU160 626 0000 10B5 push {r4, lr} 627 .LCFI6: 628 .cfi_def_cfa_offset 8 629 .cfi_offset 4, -8 630 .cfi_offset 14, -4 631 0002 0446 mov r4, r0 347:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 632 .loc 1 347 3 is_stmt 1 view .LVU161 347:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 633 .loc 1 347 23 is_stmt 0 view .LVU162 634 0004 0F23 movs r3, #15 635 0006 0360 str r3, [r0] 350:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 636 .loc 1 350 3 is_stmt 1 view .LVU163 350:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 637 .loc 1 350 34 is_stmt 0 view .LVU164 638 0008 FFF7FEFF bl FLASH_OB_GetWRP 639 .LVL44: 350:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 640 .loc 1 350 22 view .LVU165 641 000c A060 str r0, [r4, #8] 353:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 642 .loc 1 353 3 is_stmt 1 view .LVU166 353:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 643 .loc 1 353 33 is_stmt 0 view .LVU167 644 000e FFF7FEFF bl FLASH_OB_GetRDP ARM GAS /tmp/cckwFovy.s page 37 645 .LVL45: 353:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 646 .loc 1 353 21 view .LVU168 647 0012 2061 str r0, [r4, #16] 356:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 648 .loc 1 356 3 is_stmt 1 view .LVU169 356:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 649 .loc 1 356 34 is_stmt 0 view .LVU170 650 0014 FFF7FEFF bl FLASH_OB_GetUser 651 .LVL46: 356:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 652 .loc 1 356 23 view .LVU171 653 0018 2076 strb r0, [r4, #24] 359:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 654 .loc 1 359 3 is_stmt 1 view .LVU172 359:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 655 .loc 1 359 33 is_stmt 0 view .LVU173 656 001a FFF7FEFF bl FLASH_OB_GetBOR 657 .LVL47: 359:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 658 .loc 1 359 21 view .LVU174 659 001e 6061 str r0, [r4, #20] 360:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 660 .loc 1 360 1 view .LVU175 661 0020 10BD pop {r4, pc} 360:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 662 .loc 1 360 1 view .LVU176 663 .cfi_endproc 664 .LFE133: 666 .section .text.FLASH_Erase_Sector,"ax",%progbits 667 .align 1 668 .global FLASH_Erase_Sector 669 .syntax unified 670 .thumb 671 .thumb_func 673 FLASH_Erase_Sector: 674 .LVL48: 675 .LFB135: 983:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t tmp_psize = 0U; 676 .loc 1 983 1 is_stmt 1 view -0 677 .cfi_startproc 678 @ args = 0, pretend = 0, frame = 0 679 @ frame_needed = 0, uses_anonymous_args = 0 680 @ link register save eliminated. 984:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 681 .loc 1 984 3 view .LVU178 987:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** assert_param(IS_VOLTAGERANGE(VoltageRange)); 682 .loc 1 987 3 view .LVU179 988:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 683 .loc 1 988 3 view .LVU180 990:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 684 .loc 1 990 3 view .LVU181 990:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 685 .loc 1 990 5 is_stmt 0 view .LVU182 686 0000 49B1 cbz r1, .L64 994:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 687 .loc 1 994 8 is_stmt 1 view .LVU183 ARM GAS /tmp/cckwFovy.s page 38 994:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 688 .loc 1 994 10 is_stmt 0 view .LVU184 689 0002 0129 cmp r1, #1 690 0004 21D0 beq .L65 998:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 691 .loc 1 998 8 is_stmt 1 view .LVU185 998:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 692 .loc 1 998 10 is_stmt 0 view .LVU186 693 0006 0229 cmp r1, #2 694 0008 02D0 beq .L67 1004:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 695 .loc 1 1004 15 view .LVU187 696 000a 4FF4407C mov ip, #768 697 000e 04E0 b .L63 698 .L67: 1000:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 699 .loc 1 1000 15 view .LVU188 700 0010 4FF4007C mov ip, #512 701 0014 01E0 b .L63 702 .L64: 992:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 703 .loc 1 992 16 view .LVU189 704 0016 4FF0000C mov ip, #0 705 .L63: 706 .LVL49: 1008:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize; 707 .loc 1 1008 3 is_stmt 1 view .LVU190 708 001a 0D4B ldr r3, .L68 709 001c 1969 ldr r1, [r3, #16] 710 .LVL50: 1008:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= tmp_psize; 711 .loc 1 1008 3 is_stmt 0 view .LVU191 712 001e 21F44071 bic r1, r1, #768 713 0022 1961 str r1, [r3, #16] 1009:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB); 714 .loc 1 1009 3 is_stmt 1 view .LVU192 1009:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_SNB); 715 .loc 1 1009 13 is_stmt 0 view .LVU193 716 0024 1A69 ldr r2, [r3, #16] 717 0026 42EA0C02 orr r2, r2, ip 718 002a 1A61 str r2, [r3, #16] 1010:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_SER | (Sector << FLASH_CR_SNB_Pos); 719 .loc 1 1010 3 is_stmt 1 view .LVU194 720 002c 1A69 ldr r2, [r3, #16] 721 002e 22F0F802 bic r2, r2, #248 722 0032 1A61 str r2, [r3, #16] 1011:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT; 723 .loc 1 1011 3 view .LVU195 1011:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT; 724 .loc 1 1011 13 is_stmt 0 view .LVU196 725 0034 1A69 ldr r2, [r3, #16] 726 0036 42EAC000 orr r0, r2, r0, lsl #3 727 .LVL51: 1011:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH->CR |= FLASH_CR_STRT; 728 .loc 1 1011 13 view .LVU197 729 003a 40F00200 orr r0, r0, #2 730 003e 1861 str r0, [r3, #16] ARM GAS /tmp/cckwFovy.s page 39 1012:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 731 .loc 1 1012 3 is_stmt 1 view .LVU198 1012:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 732 .loc 1 1012 13 is_stmt 0 view .LVU199 733 0040 1A69 ldr r2, [r3, #16] 734 0042 42F48032 orr r2, r2, #65536 735 0046 1A61 str r2, [r3, #16] 1013:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 736 .loc 1 1013 1 view .LVU200 737 0048 7047 bx lr 738 .LVL52: 739 .L65: 996:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 740 .loc 1 996 15 view .LVU201 741 004a 4FF4807C mov ip, #256 742 004e E4E7 b .L63 743 .L69: 744 .align 2 745 .L68: 746 0050 003C0240 .word 1073888256 747 .cfi_endproc 748 .LFE135: 750 .section .text.HAL_FLASHEx_Erase_IT,"ax",%progbits 751 .align 1 752 .global HAL_FLASHEx_Erase_IT 753 .syntax unified 754 .thumb 755 .thumb_func 757 HAL_FLASHEx_Erase_IT: 758 .LVL53: 759 .LFB131: 234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 760 .loc 1 234 1 is_stmt 1 view -0 761 .cfi_startproc 762 @ args = 0, pretend = 0, frame = 0 763 @ frame_needed = 0, uses_anonymous_args = 0 234:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 764 .loc 1 234 1 is_stmt 0 view .LVU203 765 0000 08B5 push {r3, lr} 766 .LCFI7: 767 .cfi_def_cfa_offset 8 768 .cfi_offset 3, -8 769 .cfi_offset 14, -4 235:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 770 .loc 1 235 3 is_stmt 1 view .LVU204 771 .LVL54: 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 772 .loc 1 238 3 view .LVU205 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 773 .loc 1 238 3 view .LVU206 774 0002 184B ldr r3, .L76 775 0004 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2 776 0006 012B cmp r3, #1 777 0008 29D0 beq .L73 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 778 .loc 1 238 3 discriminator 2 view .LVU207 779 000a 164B ldr r3, .L76 ARM GAS /tmp/cckwFovy.s page 40 780 000c 0122 movs r2, #1 781 000e 1A76 strb r2, [r3, #24] 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 782 .loc 1 238 3 discriminator 2 view .LVU208 241:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 783 .loc 1 241 3 discriminator 2 view .LVU209 244:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 784 .loc 1 244 3 discriminator 2 view .LVU210 785 0010 154B ldr r3, .L76+4 786 0012 1A69 ldr r2, [r3, #16] 787 0014 42F08072 orr r2, r2, #16777216 788 0018 1A61 str r2, [r3, #16] 247:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 789 .loc 1 247 3 discriminator 2 view .LVU211 790 001a 1A69 ldr r2, [r3, #16] 791 001c 42F00072 orr r2, r2, #33554432 792 0020 1A61 str r2, [r3, #16] 250:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR| FLASH_FLAG_PGSERR); 793 .loc 1 250 3 discriminator 2 view .LVU212 794 0022 F322 movs r2, #243 795 0024 DA60 str r2, [r3, #12] 253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 796 .loc 1 253 3 discriminator 2 view .LVU213 253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 797 .loc 1 253 16 is_stmt 0 discriminator 2 view .LVU214 798 0026 0368 ldr r3, [r0] 253:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 799 .loc 1 253 5 discriminator 2 view .LVU215 800 0028 012B cmp r3, #1 801 002a 0DD0 beq .L75 265:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 802 .loc 1 265 5 is_stmt 1 view .LVU216 267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.NbSectorsToErase = pEraseInit->NbSectors; 803 .loc 1 267 5 view .LVU217 267:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.NbSectorsToErase = pEraseInit->NbSectors; 804 .loc 1 267 29 is_stmt 0 view .LVU218 805 002c 0D4B ldr r3, .L76 806 002e 0122 movs r2, #1 807 0030 1A70 strb r2, [r3] 268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Sector = pEraseInit->Sector; 808 .loc 1 268 5 is_stmt 1 view .LVU219 268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Sector = pEraseInit->Sector; 809 .loc 1 268 41 is_stmt 0 view .LVU220 810 0032 C268 ldr r2, [r0, #12] 268:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Sector = pEraseInit->Sector; 811 .loc 1 268 29 view .LVU221 812 0034 5A60 str r2, [r3, #4] 269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange; 813 .loc 1 269 5 is_stmt 1 view .LVU222 269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange; 814 .loc 1 269 31 is_stmt 0 view .LVU223 815 0036 8268 ldr r2, [r0, #8] 269:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.VoltageForErase = (uint8_t)pEraseInit->VoltageRange; 816 .loc 1 269 19 view .LVU224 817 0038 DA60 str r2, [r3, #12] 270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 818 .loc 1 270 5 is_stmt 1 view .LVU225 ARM GAS /tmp/cckwFovy.s page 41 270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 819 .loc 1 270 30 is_stmt 0 view .LVU226 820 003a 017C ldrb r1, [r0, #16] @ zero_extendqisi2 270:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 821 .loc 1 270 28 view .LVU227 822 003c 1972 strb r1, [r3, #8] 273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 823 .loc 1 273 5 is_stmt 1 view .LVU228 824 003e 8068 ldr r0, [r0, #8] 825 .LVL55: 273:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 826 .loc 1 273 5 is_stmt 0 view .LVU229 827 0040 FFF7FEFF bl FLASH_Erase_Sector 828 .LVL56: 276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 829 .loc 1 276 10 view .LVU230 830 0044 0020 movs r0, #0 831 .L71: 277:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 832 .loc 1 277 1 view .LVU231 833 0046 08BD pop {r3, pc} 834 .LVL57: 835 .L75: 256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Bank = pEraseInit->Banks; 836 .loc 1 256 5 is_stmt 1 view .LVU232 256:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** pFlash.Bank = pEraseInit->Banks; 837 .loc 1 256 29 is_stmt 0 view .LVU233 838 0048 064B ldr r3, .L76 839 004a 0222 movs r2, #2 840 004c 1A70 strb r2, [r3] 257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks); 841 .loc 1 257 5 is_stmt 1 view .LVU234 257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks); 842 .loc 1 257 29 is_stmt 0 view .LVU235 843 004e 4268 ldr r2, [r0, #4] 257:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** FLASH_MassErase((uint8_t) pEraseInit->VoltageRange, pEraseInit->Banks); 844 .loc 1 257 17 view .LVU236 845 0050 1A61 str r2, [r3, #16] 258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 846 .loc 1 258 5 is_stmt 1 view .LVU237 847 0052 4168 ldr r1, [r0, #4] 848 0054 007C ldrb r0, [r0, #16] @ zero_extendqisi2 849 .LVL58: 258:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 850 .loc 1 258 5 is_stmt 0 view .LVU238 851 0056 FFF7FEFF bl FLASH_MassErase 852 .LVL59: 276:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 853 .loc 1 276 10 view .LVU239 854 005a 0020 movs r0, #0 855 005c F3E7 b .L71 856 .LVL60: 857 .L73: 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 858 .loc 1 238 3 view .LVU240 859 005e 0220 movs r0, #2 860 .LVL61: ARM GAS /tmp/cckwFovy.s page 42 238:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 861 .loc 1 238 3 view .LVU241 862 0060 F1E7 b .L71 863 .L77: 864 0062 00BF .align 2 865 .L76: 866 0064 00000000 .word pFlash 867 0068 003C0240 .word 1073888256 868 .cfi_endproc 869 .LFE131: 871 .section .text.FLASH_FlushCaches,"ax",%progbits 872 .align 1 873 .global FLASH_FlushCaches 874 .syntax unified 875 .thumb 876 .thumb_func 878 FLASH_FlushCaches: 879 .LFB145: 1306:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1307:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /** 1308:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @brief Flush the instruction and data caches 1309:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** * @retval None 1310:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** */ 1311:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** void FLASH_FlushCaches(void) 1312:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 880 .loc 1 1312 1 is_stmt 1 view -0 881 .cfi_startproc 882 @ args = 0, pretend = 0, frame = 0 883 @ frame_needed = 0, uses_anonymous_args = 0 884 @ link register save eliminated. 1313:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush instruction cache */ 1314:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(READ_BIT(FLASH->ACR, FLASH_ACR_ICEN)!= RESET) 885 .loc 1 1314 3 view .LVU243 886 .loc 1 1314 6 is_stmt 0 view .LVU244 887 0000 164B ldr r3, .L81 888 0002 1B68 ldr r3, [r3] 889 .loc 1 1314 5 view .LVU245 890 0004 13F4007F tst r3, #512 891 0008 10D0 beq .L79 1315:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1316:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Disable instruction cache */ 1317:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_DISABLE(); 892 .loc 1 1317 5 is_stmt 1 view .LVU246 893 000a 144B ldr r3, .L81 894 000c 1A68 ldr r2, [r3] 895 000e 22F40072 bic r2, r2, #512 896 0012 1A60 str r2, [r3] 1318:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Reset instruction cache */ 1319:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_RESET(); 897 .loc 1 1319 5 view .LVU247 898 .loc 1 1319 5 view .LVU248 899 0014 1A68 ldr r2, [r3] 900 0016 42F40062 orr r2, r2, #2048 901 001a 1A60 str r2, [r3] 902 .loc 1 1319 5 view .LVU249 903 001c 1A68 ldr r2, [r3] 904 001e 22F40062 bic r2, r2, #2048 ARM GAS /tmp/cckwFovy.s page 43 905 0022 1A60 str r2, [r3] 906 .loc 1 1319 5 view .LVU250 1320:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable instruction cache */ 1321:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_ENABLE(); 907 .loc 1 1321 5 view .LVU251 908 0024 1A68 ldr r2, [r3] 909 0026 42F40072 orr r2, r2, #512 910 002a 1A60 str r2, [r3] 911 .L79: 1322:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1323:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1324:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Flush data cache */ 1325:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** if(READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != RESET) 912 .loc 1 1325 3 view .LVU252 913 .loc 1 1325 6 is_stmt 0 view .LVU253 914 002c 0B4B ldr r3, .L81 915 002e 1B68 ldr r3, [r3] 916 .loc 1 1325 5 view .LVU254 917 0030 13F4806F tst r3, #1024 918 0034 10D0 beq .L78 1326:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1327:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Disable data cache */ 1328:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_DISABLE(); 919 .loc 1 1328 5 is_stmt 1 view .LVU255 920 0036 094B ldr r3, .L81 921 0038 1A68 ldr r2, [r3] 922 003a 22F48062 bic r2, r2, #1024 923 003e 1A60 str r2, [r3] 1329:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Reset data cache */ 1330:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_RESET(); 924 .loc 1 1330 5 view .LVU256 925 .loc 1 1330 5 view .LVU257 926 0040 1A68 ldr r2, [r3] 927 0042 42F48052 orr r2, r2, #4096 928 0046 1A60 str r2, [r3] 929 .loc 1 1330 5 view .LVU258 930 0048 1A68 ldr r2, [r3] 931 004a 22F48052 bic r2, r2, #4096 932 004e 1A60 str r2, [r3] 933 .loc 1 1330 5 view .LVU259 1331:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** /* Enable data cache */ 1332:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_ENABLE(); 934 .loc 1 1332 5 view .LVU260 935 0050 1A68 ldr r2, [r3] 936 0052 42F48062 orr r2, r2, #1024 937 0056 1A60 str r2, [r3] 938 .L78: 1333:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1334:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 939 .loc 1 1334 1 is_stmt 0 view .LVU261 940 0058 7047 bx lr 941 .L82: 942 005a 00BF .align 2 943 .L81: 944 005c 003C0240 .word 1073888256 945 .cfi_endproc 946 .LFE145: ARM GAS /tmp/cckwFovy.s page 44 948 .section .text.HAL_FLASHEx_Erase,"ax",%progbits 949 .align 1 950 .global HAL_FLASHEx_Erase 951 .syntax unified 952 .thumb 953 .thumb_func 955 HAL_FLASHEx_Erase: 956 .LVL62: 957 .LFB130: 163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR; 958 .loc 1 163 1 is_stmt 1 view -0 959 .cfi_startproc 960 @ args = 0, pretend = 0, frame = 0 961 @ frame_needed = 0, uses_anonymous_args = 0 163:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_ERROR; 962 .loc 1 163 1 is_stmt 0 view .LVU263 963 0000 F8B5 push {r3, r4, r5, r6, r7, lr} 964 .LCFI8: 965 .cfi_def_cfa_offset 24 966 .cfi_offset 3, -24 967 .cfi_offset 4, -20 968 .cfi_offset 5, -16 969 .cfi_offset 6, -12 970 .cfi_offset 7, -8 971 .cfi_offset 14, -4 164:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** uint32_t index = 0U; 972 .loc 1 164 3 is_stmt 1 view .LVU264 973 .LVL63: 165:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 974 .loc 1 165 3 view .LVU265 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 975 .loc 1 168 3 view .LVU266 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 976 .loc 1 168 3 view .LVU267 977 0002 224B ldr r3, .L95 978 0004 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2 979 0006 012B cmp r3, #1 980 0008 3ED0 beq .L91 981 000a 0446 mov r4, r0 982 000c 0E46 mov r6, r1 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 983 .loc 1 168 3 discriminator 2 view .LVU268 984 000e 1F4B ldr r3, .L95 985 0010 0122 movs r2, #1 986 0012 1A76 strb r2, [r3, #24] 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 987 .loc 1 168 3 discriminator 2 view .LVU269 171:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 988 .loc 1 171 3 discriminator 2 view .LVU270 174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 989 .loc 1 174 3 discriminator 2 view .LVU271 174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 990 .loc 1 174 12 is_stmt 0 discriminator 2 view .LVU272 991 0014 4CF25030 movw r0, #50000 992 .LVL64: 174:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 993 .loc 1 174 12 discriminator 2 view .LVU273 ARM GAS /tmp/cckwFovy.s page 45 994 0018 FFF7FEFF bl FLASH_WaitForLastOperation 995 .LVL65: 176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 996 .loc 1 176 3 is_stmt 1 discriminator 2 view .LVU274 176:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 997 .loc 1 176 5 is_stmt 0 discriminator 2 view .LVU275 998 001c 0746 mov r7, r0 999 001e 70BB cbnz r0, .L85 179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1000 .loc 1 179 5 is_stmt 1 view .LVU276 179:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1001 .loc 1 179 18 is_stmt 0 view .LVU277 1002 0020 4FF0FF33 mov r3, #-1 1003 0024 3360 str r3, [r6] 181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1004 .loc 1 181 5 is_stmt 1 view .LVU278 181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1005 .loc 1 181 18 is_stmt 0 view .LVU279 1006 0026 2368 ldr r3, [r4] 181:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1007 .loc 1 181 7 view .LVU280 1008 0028 012B cmp r3, #1 1009 002a 16D0 beq .L93 195:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1010 .loc 1 195 7 is_stmt 1 view .LVU281 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1011 .loc 1 198 7 view .LVU282 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1012 .loc 1 198 17 is_stmt 0 view .LVU283 1013 002c A568 ldr r5, [r4, #8] 1014 .LVL66: 1015 .L88: 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1016 .loc 1 198 39 is_stmt 1 discriminator 1 view .LVU284 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1017 .loc 1 198 58 is_stmt 0 discriminator 1 view .LVU285 1018 002e E368 ldr r3, [r4, #12] 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1019 .loc 1 198 82 discriminator 1 view .LVU286 1020 0030 A268 ldr r2, [r4, #8] 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1021 .loc 1 198 70 discriminator 1 view .LVU287 1022 0032 1344 add r3, r3, r2 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1023 .loc 1 198 7 discriminator 1 view .LVU288 1024 0034 AB42 cmp r3, r5 1025 0036 20D9 bls .L87 200:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1026 .loc 1 200 9 is_stmt 1 view .LVU289 1027 0038 217C ldrb r1, [r4, #16] @ zero_extendqisi2 1028 003a 2846 mov r0, r5 1029 003c FFF7FEFF bl FLASH_Erase_Sector 1030 .LVL67: 203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1031 .loc 1 203 9 view .LVU290 203:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1032 .loc 1 203 18 is_stmt 0 view .LVU291 ARM GAS /tmp/cckwFovy.s page 46 1033 0040 4CF25030 movw r0, #50000 1034 0044 FFF7FEFF bl FLASH_WaitForLastOperation 1035 .LVL68: 206:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1036 .loc 1 206 9 is_stmt 1 view .LVU292 1037 0048 114A ldr r2, .L95+4 1038 004a 1369 ldr r3, [r2, #16] 1039 004c 23F0FA03 bic r3, r3, #250 1040 0050 1361 str r3, [r2, #16] 208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1041 .loc 1 208 9 view .LVU293 208:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1042 .loc 1 208 11 is_stmt 0 view .LVU294 1043 0052 0746 mov r7, r0 1044 0054 80B9 cbnz r0, .L94 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1045 .loc 1 198 93 is_stmt 1 discriminator 2 view .LVU295 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1046 .loc 1 198 98 is_stmt 0 discriminator 2 view .LVU296 1047 0056 0135 adds r5, r5, #1 1048 .LVL69: 198:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** { 1049 .loc 1 198 98 discriminator 2 view .LVU297 1050 0058 E9E7 b .L88 1051 .LVL70: 1052 .L93: 184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1053 .loc 1 184 7 is_stmt 1 view .LVU298 1054 005a 6168 ldr r1, [r4, #4] 1055 005c 207C ldrb r0, [r4, #16] @ zero_extendqisi2 1056 .LVL71: 184:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1057 .loc 1 184 7 is_stmt 0 view .LVU299 1058 005e FFF7FEFF bl FLASH_MassErase 1059 .LVL72: 187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1060 .loc 1 187 7 is_stmt 1 view .LVU300 187:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1061 .loc 1 187 16 is_stmt 0 view .LVU301 1062 0062 4CF25030 movw r0, #50000 1063 0066 FFF7FEFF bl FLASH_WaitForLastOperation 1064 .LVL73: 1065 006a 0746 mov r7, r0 1066 .LVL74: 190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1067 .loc 1 190 7 is_stmt 1 view .LVU302 190:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1068 .loc 1 190 17 is_stmt 0 view .LVU303 1069 006c 084A ldr r2, .L95+4 1070 006e 1369 ldr r3, [r2, #16] 1071 0070 23F00403 bic r3, r3, #4 1072 0074 1361 str r3, [r2, #16] 1073 0076 00E0 b .L87 1074 .LVL75: 1075 .L94: 211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** break; 1076 .loc 1 211 11 is_stmt 1 view .LVU304 ARM GAS /tmp/cckwFovy.s page 47 211:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** break; 1077 .loc 1 211 24 is_stmt 0 view .LVU305 1078 0078 3560 str r5, [r6] 212:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1079 .loc 1 212 11 is_stmt 1 view .LVU306 1080 .LVL76: 1081 .L87: 217:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1082 .loc 1 217 5 view .LVU307 1083 007a FFF7FEFF bl FLASH_FlushCaches 1084 .LVL77: 1085 .L85: 221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1086 .loc 1 221 3 view .LVU308 221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1087 .loc 1 221 3 view .LVU309 1088 007e 034B ldr r3, .L95 1089 0080 0022 movs r2, #0 1090 0082 1A76 strb r2, [r3, #24] 221:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1091 .loc 1 221 3 view .LVU310 223:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** } 1092 .loc 1 223 3 view .LVU311 1093 .LVL78: 1094 .L84: 224:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1095 .loc 1 224 1 is_stmt 0 view .LVU312 1096 0084 3846 mov r0, r7 1097 0086 F8BD pop {r3, r4, r5, r6, r7, pc} 1098 .LVL79: 1099 .L91: 168:Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c **** 1100 .loc 1 168 3 view .LVU313 1101 0088 0227 movs r7, #2 1102 008a FBE7 b .L84 1103 .L96: 1104 .align 2 1105 .L95: 1106 008c 00000000 .word pFlash 1107 0090 003C0240 .word 1073888256 1108 .cfi_endproc 1109 .LFE130: 1111 .text 1112 .Letext0: 1113 .file 2 "/home/gitc/\346\241\214\351\235\242/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/include/ 1114 .file 3 "/home/gitc/\346\241\214\351\235\242/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/include/ 1115 .file 4 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h" 1116 .file 5 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h" 1117 .file 6 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h" 1118 .file 7 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h" 1119 .file 8 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h" ARM GAS /tmp/cckwFovy.s page 48 DEFINED SYMBOLS *ABS*:0000000000000000 stm32f4xx_hal_flash_ex.c /tmp/cckwFovy.s:20 .text.FLASH_MassErase:0000000000000000 $t /tmp/cckwFovy.s:25 .text.FLASH_MassErase:0000000000000000 FLASH_MassErase /tmp/cckwFovy.s:59 .text.FLASH_MassErase:0000000000000020 $d /tmp/cckwFovy.s:64 .text.FLASH_OB_BOR_LevelConfig:0000000000000000 $t /tmp/cckwFovy.s:69 .text.FLASH_OB_BOR_LevelConfig:0000000000000000 FLASH_OB_BOR_LevelConfig /tmp/cckwFovy.s:98 .text.FLASH_OB_BOR_LevelConfig:0000000000000014 $d /tmp/cckwFovy.s:103 .text.FLASH_OB_GetUser:0000000000000000 $t /tmp/cckwFovy.s:108 .text.FLASH_OB_GetUser:0000000000000000 FLASH_OB_GetUser /tmp/cckwFovy.s:125 .text.FLASH_OB_GetUser:000000000000000c $d /tmp/cckwFovy.s:130 .text.FLASH_OB_GetWRP:0000000000000000 $t /tmp/cckwFovy.s:135 .text.FLASH_OB_GetWRP:0000000000000000 FLASH_OB_GetWRP /tmp/cckwFovy.s:152 .text.FLASH_OB_GetWRP:0000000000000008 $d /tmp/cckwFovy.s:157 .text.FLASH_OB_GetRDP:0000000000000000 $t /tmp/cckwFovy.s:162 .text.FLASH_OB_GetRDP:0000000000000000 FLASH_OB_GetRDP /tmp/cckwFovy.s:196 .text.FLASH_OB_GetRDP:0000000000000018 $d /tmp/cckwFovy.s:201 .text.FLASH_OB_GetBOR:0000000000000000 $t /tmp/cckwFovy.s:206 .text.FLASH_OB_GetBOR:0000000000000000 FLASH_OB_GetBOR /tmp/cckwFovy.s:223 .text.FLASH_OB_GetBOR:000000000000000c $d /tmp/cckwFovy.s:228 .text.FLASH_OB_EnableWRP:0000000000000000 $t /tmp/cckwFovy.s:233 .text.FLASH_OB_EnableWRP:0000000000000000 FLASH_OB_EnableWRP /tmp/cckwFovy.s:277 .text.FLASH_OB_EnableWRP:000000000000001c $d /tmp/cckwFovy.s:282 .text.FLASH_OB_DisableWRP:0000000000000000 $t /tmp/cckwFovy.s:287 .text.FLASH_OB_DisableWRP:0000000000000000 FLASH_OB_DisableWRP /tmp/cckwFovy.s:333 .text.FLASH_OB_DisableWRP:000000000000001c $d /tmp/cckwFovy.s:338 .text.FLASH_OB_RDP_LevelConfig:0000000000000000 $t /tmp/cckwFovy.s:343 .text.FLASH_OB_RDP_LevelConfig:0000000000000000 FLASH_OB_RDP_LevelConfig /tmp/cckwFovy.s:381 .text.FLASH_OB_RDP_LevelConfig:0000000000000014 $d /tmp/cckwFovy.s:386 .text.FLASH_OB_UserConfig:0000000000000000 $t /tmp/cckwFovy.s:391 .text.FLASH_OB_UserConfig:0000000000000000 FLASH_OB_UserConfig /tmp/cckwFovy.s:450 .text.FLASH_OB_UserConfig:0000000000000028 $d /tmp/cckwFovy.s:455 .text.HAL_FLASHEx_OBProgram:0000000000000000 $t /tmp/cckwFovy.s:461 .text.HAL_FLASHEx_OBProgram:0000000000000000 HAL_FLASHEx_OBProgram /tmp/cckwFovy.s:607 .text.HAL_FLASHEx_OBProgram:0000000000000080 $d /tmp/cckwFovy.s:612 .text.HAL_FLASHEx_OBGetConfig:0000000000000000 $t /tmp/cckwFovy.s:618 .text.HAL_FLASHEx_OBGetConfig:0000000000000000 HAL_FLASHEx_OBGetConfig /tmp/cckwFovy.s:667 .text.FLASH_Erase_Sector:0000000000000000 $t /tmp/cckwFovy.s:673 .text.FLASH_Erase_Sector:0000000000000000 FLASH_Erase_Sector /tmp/cckwFovy.s:746 .text.FLASH_Erase_Sector:0000000000000050 $d /tmp/cckwFovy.s:751 .text.HAL_FLASHEx_Erase_IT:0000000000000000 $t /tmp/cckwFovy.s:757 .text.HAL_FLASHEx_Erase_IT:0000000000000000 HAL_FLASHEx_Erase_IT /tmp/cckwFovy.s:866 .text.HAL_FLASHEx_Erase_IT:0000000000000064 $d /tmp/cckwFovy.s:872 .text.FLASH_FlushCaches:0000000000000000 $t /tmp/cckwFovy.s:878 .text.FLASH_FlushCaches:0000000000000000 FLASH_FlushCaches /tmp/cckwFovy.s:944 .text.FLASH_FlushCaches:000000000000005c $d /tmp/cckwFovy.s:949 .text.HAL_FLASHEx_Erase:0000000000000000 $t /tmp/cckwFovy.s:955 .text.HAL_FLASHEx_Erase:0000000000000000 HAL_FLASHEx_Erase /tmp/cckwFovy.s:1106 .text.HAL_FLASHEx_Erase:000000000000008c $d UNDEFINED SYMBOLS FLASH_WaitForLastOperation pFlash