ARM GAS /tmp/cc26Ml62.s page 1 1 .cpu cortex-m3 2 .arch armv7-m 3 .fpu softvfp 4 .eabi_attribute 20, 1 5 .eabi_attribute 21, 1 6 .eabi_attribute 23, 3 7 .eabi_attribute 24, 1 8 .eabi_attribute 25, 1 9 .eabi_attribute 26, 1 10 .eabi_attribute 30, 1 11 .eabi_attribute 34, 1 12 .eabi_attribute 18, 4 13 .file "stm32f1xx_hal_flash.c" 14 .text 15 .Ltext0: 16 .cfi_sections .debug_frame 17 .section .text.FLASH_Program_HalfWord,"ax",%progbits 18 .align 1 19 .syntax unified 20 .thumb 21 .thumb_func 23 FLASH_Program_HalfWord: 24 .LVL0: 25 .LFB76: 26 .file 1 "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c" 1:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 2:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ****************************************************************************** 3:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @file stm32f1xx_hal_flash.c 4:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @author MCD Application Team 5:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief FLASH HAL module driver. 6:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * This file provides firmware functions to manage the following 7:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * functionalities of the internal FLASH memory: 8:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * + Program operations functions 9:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * + Memory Control functions 10:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * + Peripheral State functions 11:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 12:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @verbatim 13:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ============================================================================== 14:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ##### FLASH peripheral features ##### 15:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ============================================================================== 16:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** [..] The Flash memory interface manages CPU AHB I-Code and D-Code accesses 17:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** to the Flash memory. It implements the erase and program Flash memory operations 18:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** and the read and write protection mechanisms. 19:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 20:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** [..] The Flash memory interface accelerates code execution with a system of instruction 21:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** prefetch. 22:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 23:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** [..] The FLASH main features are: 24:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Flash memory read operations 25:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Flash memory program/erase operations 26:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Read / write protections 27:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Prefetch on I-Code 28:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Option Bytes programming 29:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 30:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 31:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ##### How to use this driver ##### 32:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ============================================================================== ARM GAS /tmp/cc26Ml62.s page 2 33:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** [..] 34:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** This driver provides functions and macros to configure and program the FLASH 35:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** memory of all STM32F1xx devices. 36:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 37:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (#) FLASH Memory I/O Programming functions: this group includes all needed 38:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** functions to erase and program the main memory: 39:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Lock and Unlock the FLASH interface 40:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Erase function: Erase page, erase all pages 41:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Program functions: half word, word and doubleword 42:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (#) FLASH Option Bytes Programming functions: this group includes all needed 43:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** functions to manage the Option Bytes: 44:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Lock and Unlock the Option Bytes 45:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Set/Reset the write protection 46:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Set the Read protection Level 47:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Program the user Option Bytes 48:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Launch the Option Bytes loader 49:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Erase Option Bytes 50:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Program the data Option Bytes 51:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Get the Write protection. 52:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Get the user option bytes. 53:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 54:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (#) Interrupts and flags management functions : this group 55:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** includes all needed functions to: 56:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Handle FLASH interrupts 57:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Wait for last FLASH operation according to its status 58:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (++) Get error flag status 59:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 60:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** [..] In addition to these function, this driver includes a set of macros allowing 61:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** to handle the following operations: 62:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 63:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Set/Get the latency 64:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Enable/Disable the prefetch buffer 65:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Enable/Disable the half cycle access 66:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Enable/Disable the FLASH interrupts 67:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (+) Monitor the FLASH flags status 68:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 69:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @endverbatim 70:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ****************************************************************************** 71:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @attention 72:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 73:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * Copyright (c) 2016 STMicroelectronics. 74:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * All rights reserved. 75:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 76:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * This software is licensed under terms that can be found in the LICENSE file in 77:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * the root directory of this software component. 78:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * If no LICENSE file comes with this software, it is provided AS-IS. 79:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ****************************************************************************** 80:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 81:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 82:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Includes ------------------------------------------------------------------*/ 83:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #include "stm32f1xx_hal.h" 84:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 85:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @addtogroup STM32F1xx_HAL_Driver 86:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 87:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 88:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 89:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #ifdef HAL_FLASH_MODULE_ENABLED ARM GAS /tmp/cc26Ml62.s page 3 90:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 91:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH FLASH 92:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief FLASH HAL module driver 93:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 94:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 95:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 96:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Private typedef -----------------------------------------------------------*/ 97:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Private define ------------------------------------------------------------*/ 98:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Private_Constants FLASH Private Constants 99:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 100:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 101:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 102:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 103:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 104:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 105:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Private macro ---------------------------- ---------------------------------*/ 106:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Private_Macros FLASH Private Macros 107:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 108:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 109:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 110:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 111:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 112:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 113:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 114:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Private variables ---------------------------------------------------------*/ 115:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Private_Variables FLASH Private Variables 116:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 117:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 118:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Variables used for Erase pages under interruption*/ 119:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_ProcessTypeDef pFlash; 120:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 121:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 122:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 123:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 124:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Private function prototypes -----------------------------------------------*/ 125:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Private_Functions FLASH Private Functions 126:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 127:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 128:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** static void FLASH_Program_HalfWord(uint32_t Address, uint16_t Data); 129:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** static void FLASH_SetErrorCode(void); 130:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** extern void FLASH_PageErase(uint32_t PageAddress); 131:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 132:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 133:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 134:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 135:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Exported functions ---------------------------------------------------------*/ 136:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions FLASH Exported Functions 137:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 138:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 139:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 140:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions_Group1 Programming operation functions 141:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Programming operation functions 142:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 143:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @verbatim 144:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @endverbatim 145:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 146:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ ARM GAS /tmp/cc26Ml62.s page 4 147:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 148:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 149:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Program halfword, word or double word at a specified address 150:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @note The function HAL_FLASH_Unlock() should be called before to unlock the FLASH interface 151:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * The function HAL_FLASH_Lock() should be called after to lock the FLASH interface 152:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 153:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @note If an erase and a program operations are requested simultaneously, 154:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * the erase operation is performed before the program one. 155:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 156:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @note FLASH should be previously erased before new programmation (only exception to this 157:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * is when 0x0000 is programmed) 158:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 159:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param TypeProgram: Indicate the way to program at a specified address. 160:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * This parameter can be a value of @ref FLASH_Type_Program 161:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Address: Specifies the address to be programmed. 162:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Data: Specifies the data to be programmed 163:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 164:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL_StatusTypeDef HAL Status 165:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 166:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data) 167:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 168:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_ERROR; 169:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint8_t index = 0; 170:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint8_t nbiterations = 0; 171:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 172:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Process Locked */ 173:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_LOCK(&pFlash); 174:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 175:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check the parameters */ 176:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram)); 177:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); 178:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 179:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 180:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(Address <= FLASH_BANK1_END) 181:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 182:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 183:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for last operation to be completed */ 184:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); 185:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 186:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 187:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 188:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 189:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for last operation to be completed */ 190:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** status = FLASH_WaitForLastOperationBank2(FLASH_TIMEOUT_VALUE); 191:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 192:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 193:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 194:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(status == HAL_OK) 195:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 196:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(TypeProgram == FLASH_TYPEPROGRAM_HALFWORD) 197:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 198:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program halfword (16-bit) at a specified address. */ 199:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** nbiterations = 1U; 200:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 201:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else if(TypeProgram == FLASH_TYPEPROGRAM_WORD) 202:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 203:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program word (32-bit = 2*16-bit) at a specified address. */ ARM GAS /tmp/cc26Ml62.s page 5 204:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** nbiterations = 2U; 205:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 206:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 207:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 208:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program double word (64-bit = 4*16-bit) at a specified address. */ 209:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** nbiterations = 4U; 210:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 211:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** for (index = 0U; index < nbiterations; index++) 213:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 214:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_Program_HalfWord((Address + (2U*index)), (uint16_t)(Data >> (16U*index))); 215:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 216:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 217:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(Address <= FLASH_BANK1_END) 218:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 219:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 220:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for last operation to be completed */ 221:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); 222:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 223:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* If the program operation is completed, disable the PG Bit */ 224:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PG); 225:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 226:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 227:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 228:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 229:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for last operation to be completed */ 230:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** status = FLASH_WaitForLastOperationBank2(FLASH_TIMEOUT_VALUE); 231:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 232:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* If the program operation is completed, disable the PG Bit */ 233:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR2, FLASH_CR2_PG); 234:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 235:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 236:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* In case of error, stop programation procedure */ 237:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (status != HAL_OK) 238:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 239:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** break; 240:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 241:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 242:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 243:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 244:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Process Unlocked */ 245:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_UNLOCK(&pFlash); 246:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 247:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return status; 248:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 249:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 250:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 251:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Program halfword, word or double word at a specified address with interrupt enabled. 252:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @note The function HAL_FLASH_Unlock() should be called before to unlock the FLASH interface 253:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * The function HAL_FLASH_Lock() should be called after to lock the FLASH interface 254:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 255:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @note If an erase and a program operations are requested simultaneously, 256:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * the erase operation is performed before the program one. 257:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 258:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param TypeProgram: Indicate the way to program at a specified address. 259:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * This parameter can be a value of @ref FLASH_Type_Program 260:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Address: Specifies the address to be programmed. ARM GAS /tmp/cc26Ml62.s page 6 261:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Data: Specifies the data to be programmed 262:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 263:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL_StatusTypeDef HAL Status 264:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 265:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data) 266:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 267:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK; 268:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 269:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Process Locked */ 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_LOCK(&pFlash); 271:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 272:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check the parameters */ 273:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram)); 274:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); 275:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 276:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 277:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* If procedure already ongoing, reject the next one */ 278:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (pFlash.ProcedureOnGoing != FLASH_PROC_NONE) 279:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 280:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_ERROR; 281:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 282:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 283:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(Address <= FLASH_BANK1_END) 284:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 285:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Enable End of FLASH Operation and Error source interrupts */ 286:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP_BANK1 | FLASH_IT_ERR_BANK1); 287:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 288:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** }else 289:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 290:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Enable End of FLASH Operation and Error source interrupts */ 291:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP_BANK2 | FLASH_IT_ERR_BANK2); 292:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 293:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 294:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Enable End of FLASH Operation and Error source interrupts */ 295:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP | FLASH_IT_ERR); 296:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 297:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 298:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = Address; 299:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Data = Data; 300:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 301:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(TypeProgram == FLASH_TYPEPROGRAM_HALFWORD) 302:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 303:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_PROGRAMHALFWORD; 304:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program halfword (16-bit) at a specified address. */ 305:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.DataRemaining = 1U; 306:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 307:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else if(TypeProgram == FLASH_TYPEPROGRAM_WORD) 308:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 309:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_PROGRAMWORD; 310:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program word (32-bit : 2*16-bit) at a specified address. */ 311:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.DataRemaining = 2U; 312:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 313:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 314:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 315:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_PROGRAMDOUBLEWORD; 316:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program double word (64-bit : 4*16-bit) at a specified address. */ 317:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.DataRemaining = 4U; ARM GAS /tmp/cc26Ml62.s page 7 318:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 319:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 320:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program halfword (16-bit) at a specified address. */ 321:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_Program_HalfWord(Address, (uint16_t)Data); 322:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 323:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return status; 324:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 325:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 326:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 327:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief This function handles FLASH interrupt request. 328:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval None 329:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 330:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** void HAL_FLASH_IRQHandler(void) 331:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 332:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint32_t addresstmp = 0U; 333:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 334:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check FLASH operation error flags */ 335:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 336:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR_BANK1) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR_BANK1) 337:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** (__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR_BANK2) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR_BANK2)) 338:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 339:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR) ||__HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR)) 340:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 341:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 342:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Return the faulty address */ 343:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address; 344:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Reset address */ 345:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = 0xFFFFFFFFU; 346:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 347:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Save the Error code */ 348:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_SetErrorCode(); 349:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 350:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH error interrupt user callback */ 351:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_OperationErrorCallback(addresstmp); 352:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 353:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Stop the procedure ongoing */ 354:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 355:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 356:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 357:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check FLASH End of Operation flag */ 358:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 359:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP_BANK1)) 360:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 361:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear FLASH End of Operation pending bit */ 362:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP_BANK1); 363:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 364:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP)) 365:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 366:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear FLASH End of Operation pending bit */ 367:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP); 368:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 369:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 370:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Process can continue only if no error detected */ 371:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.ProcedureOnGoing != FLASH_PROC_NONE) 372:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 373:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.ProcedureOnGoing == FLASH_PROC_PAGEERASE) 374:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { ARM GAS /tmp/cc26Ml62.s page 8 375:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Nb of pages to erased can be decreased */ 376:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.DataRemaining--; 377:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 378:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check if there are still pages to erase */ 379:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.DataRemaining != 0U) 380:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 381:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address; 382:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Indicate user which sector has been erased */ 383:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(addresstmp); 384:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 385:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Increment sector number*/ 386:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address + FLASH_PAGE_SIZE; 387:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = addresstmp; 388:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 389:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* If the erase operation is completed, disable the PER Bit */ 390:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PER); 391:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 392:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_PageErase(addresstmp); 393:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 394:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 395:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 396:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* No more pages to Erase, user callback can be called. */ 397:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Reset Sector and stop Erase pages procedure */ 398:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = addresstmp = 0xFFFFFFFFU; 399:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 400:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 401:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(addresstmp); 402:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 403:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 404:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else if(pFlash.ProcedureOnGoing == FLASH_PROC_MASSERASE) 405:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 406:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Operation is completed, disable the MER Bit */ 407:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_MER); 408:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 409:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 410:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Stop Mass Erase procedure if no pending mass erase on other bank */ 411:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (HAL_IS_BIT_CLR(FLASH->CR2, FLASH_CR2_MER)) 412:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 413:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 414:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* MassErase ended. Return the selected bank */ 415:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 416:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(0U); 417:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 418:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Stop Mass Erase procedure*/ 419:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 420:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 421:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 422:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 423:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 424:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 425:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 426:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Nb of 16-bit data to program can be decreased */ 427:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.DataRemaining--; 428:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 429:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check if there are still 16-bit data to program */ 430:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.DataRemaining != 0U) 431:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { ARM GAS /tmp/cc26Ml62.s page 9 432:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Increment address to 16-bit */ 433:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address += 2U; 434:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address; 435:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 436:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Shift to have next 16-bit data */ 437:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Data = (pFlash.Data >> 16U); 438:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 439:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Operation is completed, disable the PG Bit */ 440:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_PG); 441:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 442:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Program halfword (16-bit) at a specified address.*/ 443:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_Program_HalfWord(addresstmp, (uint16_t)pFlash.Data); 444:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 445:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 446:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 447:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program ended. Return the selected address */ 448:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 449:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (pFlash.ProcedureOnGoing == FLASH_PROC_PROGRAMHALFWORD) 450:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 451:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address); 452:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 453:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else if (pFlash.ProcedureOnGoing == FLASH_PROC_PROGRAMWORD) 454:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 455:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address - 2U); 456:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 457:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 458:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 459:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address - 6U); 460:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 461:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 462:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Reset Address and stop Program procedure */ 463:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = 0xFFFFFFFFU; 464:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 465:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 466:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 467:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 468:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 469:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 470:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 471:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check FLASH End of Operation flag */ 472:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG( FLASH_FLAG_EOP_BANK2)) 473:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 474:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear FLASH End of Operation pending bit */ 475:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP_BANK2); 476:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 477:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Process can continue only if no error detected */ 478:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.ProcedureOnGoing != FLASH_PROC_NONE) 479:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 480:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.ProcedureOnGoing == FLASH_PROC_PAGEERASE) 481:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 482:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Nb of pages to erased can be decreased */ 483:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.DataRemaining--; 484:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 485:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check if there are still pages to erase*/ 486:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.DataRemaining != 0U) 487:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 488:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Indicate user which page address has been erased*/ ARM GAS /tmp/cc26Ml62.s page 10 489:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address); 490:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 491:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Increment page address to next page */ 492:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address += FLASH_PAGE_SIZE; 493:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address; 494:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 495:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Operation is completed, disable the PER Bit */ 496:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR2, FLASH_CR2_PER); 497:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 498:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_PageErase(addresstmp); 499:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 500:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 501:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 502:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*No more pages to Erase*/ 503:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 504:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Reset Address and stop Erase pages procedure*/ 505:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = 0xFFFFFFFFU; 506:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 507:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 508:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 509:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address); 510:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 511:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 512:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else if(pFlash.ProcedureOnGoing == FLASH_PROC_MASSERASE) 513:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 514:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Operation is completed, disable the MER Bit */ 515:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR2, FLASH_CR2_MER); 516:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 517:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (HAL_IS_BIT_CLR(FLASH->CR, FLASH_CR_MER)) 518:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 519:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* MassErase ended. Return the selected bank*/ 520:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 521:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(0U); 522:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 523:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 524:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 525:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 526:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 527:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 528:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Nb of 16-bit data to program can be decreased */ 529:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.DataRemaining--; 530:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 531:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check if there are still 16-bit data to program */ 532:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.DataRemaining != 0U) 533:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 534:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Increment address to 16-bit */ 535:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address += 2U; 536:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address; 537:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 538:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Shift to have next 16-bit data */ 539:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Data = (pFlash.Data >> 16U); 540:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 541:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Operation is completed, disable the PG Bit */ 542:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR2, FLASH_CR2_PG); 543:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 544:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Program halfword (16-bit) at a specified address.*/ 545:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_Program_HalfWord(addresstmp, (uint16_t)pFlash.Data); ARM GAS /tmp/cc26Ml62.s page 11 546:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 547:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 548:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 549:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Program ended. Return the selected address*/ 550:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 551:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (pFlash.ProcedureOnGoing == FLASH_PROC_PROGRAMHALFWORD) 552:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 553:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address); 554:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 555:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else if (pFlash.ProcedureOnGoing == FLASH_PROC_PROGRAMWORD) 556:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 557:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address-2U); 558:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 559:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 560:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 561:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address-6U); 562:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 563:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 564:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Reset Address and stop Program procedure*/ 565:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = 0xFFFFFFFFU; 566:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 567:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 568:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 569:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 570:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 571:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif 572:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 573:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(pFlash.ProcedureOnGoing == FLASH_PROC_NONE) 574:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 575:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 576:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Operation is completed, disable the PG, PER and MER Bits for both bank */ 577:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_PG | FLASH_CR_PER | FLASH_CR_MER)); 578:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR2, (FLASH_CR2_PG | FLASH_CR2_PER | FLASH_CR2_MER)); 579:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 580:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Disable End of FLASH Operation and Error source interrupts for both banks */ 581:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_DISABLE_IT(FLASH_IT_EOP_BANK1 | FLASH_IT_ERR_BANK1 | FLASH_IT_EOP_BANK2 | FLASH_IT_ 582:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 583:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Operation is completed, disable the PG, PER and MER Bits */ 584:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_PG | FLASH_CR_PER | FLASH_CR_MER)); 585:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 586:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Disable End of FLASH Operation and Error source interrupts */ 587:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_DISABLE_IT(FLASH_IT_EOP | FLASH_IT_ERR); 588:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 589:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 590:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Process Unlocked */ 591:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_UNLOCK(&pFlash); 592:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 593:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 594:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 595:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 596:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief FLASH end of operation interrupt callback 597:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param ReturnValue: The value saved in this parameter depends on the ongoing procedure 598:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * - Mass Erase: No return value expected 599:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * - Pages Erase: Address of the page which has been erased 600:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * (if 0xFFFFFFFF, it means that all the selected pages have been erased) 601:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * - Program: Address which was selected for data program 602:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval none ARM GAS /tmp/cc26Ml62.s page 12 603:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 604:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue) 605:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 606:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */ 607:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** UNUSED(ReturnValue); 608:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 609:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* NOTE : This function Should not be modified, when the callback is needed, 610:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** the HAL_FLASH_EndOfOperationCallback could be implemented in the user file 611:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 612:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 613:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 614:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 615:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief FLASH operation error interrupt callback 616:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param ReturnValue: The value saved in this parameter depends on the ongoing procedure 617:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * - Mass Erase: No return value expected 618:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * - Pages Erase: Address of the page which returned an error 619:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * - Program: Address which was selected for data program 620:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval none 621:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 622:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __weak void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue) 623:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 624:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */ 625:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** UNUSED(ReturnValue); 626:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 627:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* NOTE : This function Should not be modified, when the callback is needed, 628:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** the HAL_FLASH_OperationErrorCallback could be implemented in the user file 629:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 630:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 631:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 632:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 633:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 634:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 635:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 636:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions_Group2 Peripheral Control functions 637:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief management functions 638:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 639:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @verbatim 640:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** =============================================================================== 641:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ##### Peripheral Control functions ##### 642:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** =============================================================================== 643:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** [..] 644:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** This subsection provides a set of functions allowing to control the FLASH 645:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** memory operations. 646:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 647:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @endverbatim 648:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 649:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 650:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 651:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 652:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Unlock the FLASH control register access 653:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL Status 654:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 655:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Unlock(void) 656:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 657:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK; 658:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 659:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(READ_BIT(FLASH->CR, FLASH_CR_LOCK) != RESET) ARM GAS /tmp/cc26Ml62.s page 13 660:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 661:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Authorize the FLASH Registers access */ 662:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->KEYR, FLASH_KEY1); 663:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->KEYR, FLASH_KEY2); 664:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 665:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Verify Flash is unlocked */ 666:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(READ_BIT(FLASH->CR, FLASH_CR_LOCK) != RESET) 667:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 668:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** status = HAL_ERROR; 669:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 670:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 671:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 672:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(READ_BIT(FLASH->CR2, FLASH_CR2_LOCK) != RESET) 673:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 674:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Authorize the FLASH BANK2 Registers access */ 675:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->KEYR2, FLASH_KEY1); 676:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->KEYR2, FLASH_KEY2); 677:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 678:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Verify Flash BANK2 is unlocked */ 679:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(READ_BIT(FLASH->CR2, FLASH_CR2_LOCK) != RESET) 680:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 681:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** status = HAL_ERROR; 682:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 683:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 684:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 685:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 686:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return status; 687:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 688:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 689:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 690:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Locks the FLASH control register access 691:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL Status 692:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 693:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Lock(void) 694:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 695:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Set the LOCK Bit to lock the FLASH Registers access */ 696:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** SET_BIT(FLASH->CR, FLASH_CR_LOCK); 697:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 698:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 699:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Set the LOCK Bit to lock the FLASH BANK2 Registers access */ 700:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** SET_BIT(FLASH->CR2, FLASH_CR2_LOCK); 701:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 702:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 703:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_OK; 704:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 705:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 706:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 707:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Unlock the FLASH Option Control Registers access. 708:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL Status 709:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 710:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void) 711:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 712:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (HAL_IS_BIT_CLR(FLASH->CR, FLASH_CR_OPTWRE)) 713:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 714:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Authorizes the Option Byte register programming */ 715:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY1); 716:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY2); ARM GAS /tmp/cc26Ml62.s page 14 717:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 718:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 719:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 720:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_ERROR; 721:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 722:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 723:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_OK; 724:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 725:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 726:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 727:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Lock the FLASH Option Control Registers access. 728:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL Status 729:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 730:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_OB_Lock(void) 731:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 732:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear the OPTWRE Bit to lock the FLASH Option Byte Registers access */ 733:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_OPTWRE); 734:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 735:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_OK; 736:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 737:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 738:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 739:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Launch the option byte loading. 740:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @note This function will reset automatically the MCU. 741:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval None 742:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 743:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** void HAL_FLASH_OB_Launch(void) 744:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 745:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Initiates a system reset request to launch the option byte loading */ 746:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_NVIC_SystemReset(); 747:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 748:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 749:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 750:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 751:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 752:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 753:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions_Group3 Peripheral errors functions 754:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Peripheral errors functions 755:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * 756:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @verbatim 757:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** =============================================================================== 758:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ##### Peripheral Errors functions ##### 759:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** =============================================================================== 760:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** [..] 761:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** This subsection permit to get in run-time errors of the FLASH peripheral. 762:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 763:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** @endverbatim 764:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 765:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 766:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 767:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 768:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Get the specific FLASH error flag. 769:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval FLASH_ErrorCode The returned value can be: 770:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @ref FLASH_Error_Codes 771:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 772:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint32_t HAL_FLASH_GetError(void) 773:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { ARM GAS /tmp/cc26Ml62.s page 15 774:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return pFlash.ErrorCode; 775:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 776:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 777:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 778:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 779:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 780:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 781:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 782:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @} 783:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 784:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 785:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** @addtogroup FLASH_Private_Functions 786:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @{ 787:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 788:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 789:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 790:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Program a half-word (16-bit) at a specified address. 791:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Address specify the address to be programmed. 792:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Data specify the data to be programmed. 793:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval None 794:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 795:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** static void FLASH_Program_HalfWord(uint32_t Address, uint16_t Data) 796:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 27 .loc 1 796 1 view -0 28 .cfi_startproc 29 @ args = 0, pretend = 0, frame = 0 30 @ frame_needed = 0, uses_anonymous_args = 0 31 @ link register save eliminated. 797:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clean the error context */ 798:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; 32 .loc 1 798 3 view .LVU1 33 .loc 1 798 20 is_stmt 0 view .LVU2 34 0000 044B ldr r3, .L2 35 0002 0022 movs r2, #0 36 0004 DA61 str r2, [r3, #28] 799:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 800:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 801:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(Address <= FLASH_BANK1_END) 802:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 803:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 804:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Proceed to program the new data */ 805:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** SET_BIT(FLASH->CR, FLASH_CR_PG); 37 .loc 1 805 5 is_stmt 1 view .LVU3 38 0006 044A ldr r2, .L2+4 39 0008 1369 ldr r3, [r2, #16] 40 000a 43F00103 orr r3, r3, #1 41 000e 1361 str r3, [r2, #16] 806:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 807:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 808:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** else 809:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 810:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Proceed to program the new data */ 811:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** SET_BIT(FLASH->CR2, FLASH_CR2_PG); 812:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 813:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 814:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 815:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Write data in the address */ ARM GAS /tmp/cc26Ml62.s page 16 816:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** *(__IO uint16_t*)Address = Data; 42 .loc 1 816 3 view .LVU4 43 .loc 1 816 28 is_stmt 0 view .LVU5 44 0010 0180 strh r1, [r0] @ movhi 817:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 45 .loc 1 817 1 view .LVU6 46 0012 7047 bx lr 47 .L3: 48 .align 2 49 .L2: 50 0014 00000000 .word .LANCHOR0 51 0018 00200240 .word 1073881088 52 .cfi_endproc 53 .LFE76: 55 .section .text.FLASH_SetErrorCode,"ax",%progbits 56 .align 1 57 .syntax unified 58 .thumb 59 .thumb_func 61 FLASH_SetErrorCode: 62 .LFB78: 818:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 819:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 820:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Wait for a FLASH operation to complete. 821:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Timeout maximum flash operation timeout 822:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL Status 823:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 824:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout) 825:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 826:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. 827:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** Even if the FLASH operation fails, the BUSY flag will be reset and an error 828:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** flag will be set */ 829:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 830:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint32_t tickstart = HAL_GetTick(); 831:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 832:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** while(__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY)) 833:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 834:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (Timeout != HAL_MAX_DELAY) 835:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 836:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if((Timeout == 0U) || ((HAL_GetTick()-tickstart) > Timeout)) 837:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 838:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_TIMEOUT; 839:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 840:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 841:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 842:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 843:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check FLASH End of Operation flag */ 844:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP)) 845:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 846:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear FLASH End of Operation pending bit */ 847:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP); 848:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 849:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 850:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR) || 851:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_OPTVERR) || 852:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR)) 853:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { ARM GAS /tmp/cc26Ml62.s page 17 854:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Save the error code*/ 855:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_SetErrorCode(); 856:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_ERROR; 857:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 858:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 859:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* There is no error flag set */ 860:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_OK; 861:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 862:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 863:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 864:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 865:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Wait for a FLASH BANK2 operation to complete. 866:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @param Timeout maximum flash operation timeout 867:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval HAL_StatusTypeDef HAL Status 868:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 869:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef FLASH_WaitForLastOperationBank2(uint32_t Timeout) 870:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 871:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for the FLASH BANK2 operation to complete by polling on BUSY flag to be reset. 872:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** Even if the FLASH BANK2 operation fails, the BUSY flag will be reset and an error 873:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** flag will be set */ 874:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 875:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint32_t tickstart = HAL_GetTick(); 876:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 877:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** while(__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY_BANK2)) 878:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 879:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (Timeout != HAL_MAX_DELAY) 880:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 881:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if((Timeout == 0U) || ((HAL_GetTick()-tickstart) > Timeout)) 882:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 883:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_TIMEOUT; 884:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 885:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 886:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 887:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 888:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Check FLASH End of Operation flag */ 889:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP_BANK2)) 890:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 891:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear FLASH End of Operation pending bit */ 892:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP_BANK2); 893:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 894:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 895:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR_BANK2) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR_BANK2)) 896:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 897:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Save the error code*/ 898:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** FLASH_SetErrorCode(); 899:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_ERROR; 900:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 901:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 902:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* If there is an error flag set */ 903:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_OK; 904:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 905:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 906:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 907:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 908:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /** 909:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @brief Set the specific FLASH error flag. 910:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** * @retval None ARM GAS /tmp/cc26Ml62.s page 18 911:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** */ 912:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** static void FLASH_SetErrorCode(void) 913:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 63 .loc 1 913 1 is_stmt 1 view -0 64 .cfi_startproc 65 @ args = 0, pretend = 0, frame = 0 66 @ frame_needed = 0, uses_anonymous_args = 0 67 @ link register save eliminated. 914:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint32_t flags = 0U; 68 .loc 1 914 3 view .LVU8 69 .LVL1: 915:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 916:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 917:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR_BANK2)) 918:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 919:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_WRPERR)) 70 .loc 1 919 3 view .LVU9 71 .loc 1 919 6 is_stmt 0 view .LVU10 72 0000 194B ldr r3, .L11 73 0002 DB68 ldr r3, [r3, #12] 74 .loc 1 919 5 view .LVU11 75 0004 13F01003 ands r3, r3, #16 76 0008 05D0 beq .L5 920:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 921:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 922:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ErrorCode |= HAL_FLASH_ERROR_WRP; 77 .loc 1 922 5 is_stmt 1 view .LVU12 78 .loc 1 922 22 is_stmt 0 view .LVU13 79 000a 184A ldr r2, .L11+4 80 000c D369 ldr r3, [r2, #28] 81 000e 43F00203 orr r3, r3, #2 82 0012 D361 str r3, [r2, #28] 923:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 924:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** flags |= FLASH_FLAG_WRPERR | FLASH_FLAG_WRPERR_BANK2; 925:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 926:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** flags |= FLASH_FLAG_WRPERR; 83 .loc 1 926 5 is_stmt 1 view .LVU14 84 .LVL2: 85 .loc 1 926 11 is_stmt 0 view .LVU15 86 0014 1023 movs r3, #16 87 .LVL3: 88 .L5: 927:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 928:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 929:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 930:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR) || __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR_BANK2)) 931:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 932:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR)) 89 .loc 1 932 3 is_stmt 1 view .LVU16 90 .loc 1 932 6 is_stmt 0 view .LVU17 91 0016 144A ldr r2, .L11 92 0018 D268 ldr r2, [r2, #12] 93 .loc 1 932 5 view .LVU18 94 001a 12F0040F tst r2, #4 95 001e 06D0 beq .L6 933:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 934:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { ARM GAS /tmp/cc26Ml62.s page 19 935:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ErrorCode |= HAL_FLASH_ERROR_PROG; 96 .loc 1 935 5 is_stmt 1 view .LVU19 97 .loc 1 935 22 is_stmt 0 view .LVU20 98 0020 1249 ldr r1, .L11+4 99 0022 CA69 ldr r2, [r1, #28] 100 0024 42F00102 orr r2, r2, #1 101 0028 CA61 str r2, [r1, #28] 936:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 937:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** flags |= FLASH_FLAG_PGERR | FLASH_FLAG_PGERR_BANK2; 938:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #else 939:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** flags |= FLASH_FLAG_PGERR; 102 .loc 1 939 5 is_stmt 1 view .LVU21 103 .loc 1 939 11 is_stmt 0 view .LVU22 104 002a 43F00403 orr r3, r3, #4 105 .LVL4: 106 .L6: 940:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 941:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 942:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if(__HAL_FLASH_GET_FLAG(FLASH_FLAG_OPTVERR)) 107 .loc 1 942 3 is_stmt 1 view .LVU23 108 .loc 1 942 6 is_stmt 0 view .LVU24 109 002e 0E4A ldr r2, .L11 110 0030 D269 ldr r2, [r2, #28] 111 .loc 1 942 5 view .LVU25 112 0032 12F0010F tst r2, #1 113 0036 09D0 beq .L7 943:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 944:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ErrorCode |= HAL_FLASH_ERROR_OPTV; 114 .loc 1 944 5 is_stmt 1 view .LVU26 115 .loc 1 944 22 is_stmt 0 view .LVU27 116 0038 0C49 ldr r1, .L11+4 117 003a CA69 ldr r2, [r1, #28] 118 003c 42F00402 orr r2, r2, #4 119 0040 CA61 str r2, [r1, #28] 945:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR); 120 .loc 1 945 3 is_stmt 1 view .LVU28 121 .loc 1 945 3 view .LVU29 122 .loc 1 945 3 view .LVU30 123 0042 0949 ldr r1, .L11 124 0044 CA69 ldr r2, [r1, #28] 125 0046 22F00102 bic r2, r2, #1 126 004a CA61 str r2, [r1, #28] 127 .L7: 128 .loc 1 945 3 discriminator 4 view .LVU31 946:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 947:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 948:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear FLASH error pending bits */ 949:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(flags); 129 .loc 1 949 3 discriminator 4 view .LVU32 130 .loc 1 949 3 discriminator 4 view .LVU33 131 004c 40F20112 movw r2, #257 132 0050 9342 cmp r3, r2 133 0052 02D0 beq .L10 134 .loc 1 949 3 discriminator 2 view .LVU34 135 0054 044A ldr r2, .L11 136 0056 D360 str r3, [r2, #12] 137 .loc 1 949 3 discriminator 2 view .LVU35 ARM GAS /tmp/cc26Ml62.s page 20 950:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 138 .loc 1 950 1 is_stmt 0 discriminator 2 view .LVU36 139 0058 7047 bx lr 140 .L10: 949:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 141 .loc 1 949 3 is_stmt 1 discriminator 1 view .LVU37 142 005a 034A ldr r2, .L11 143 005c D369 ldr r3, [r2, #28] 144 .LVL5: 949:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 145 .loc 1 949 3 is_stmt 0 discriminator 1 view .LVU38 146 005e 23F00103 bic r3, r3, #1 147 0062 D361 str r3, [r2, #28] 148 0064 7047 bx lr 149 .L12: 150 0066 00BF .align 2 151 .L11: 152 0068 00200240 .word 1073881088 153 006c 00000000 .word .LANCHOR0 154 .cfi_endproc 155 .LFE78: 157 .section .text.HAL_FLASH_Program_IT,"ax",%progbits 158 .align 1 159 .global HAL_FLASH_Program_IT 160 .syntax unified 161 .thumb 162 .thumb_func 164 HAL_FLASH_Program_IT: 165 .LVL6: 166 .LFB66: 266:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK; 167 .loc 1 266 1 is_stmt 1 view -0 168 .cfi_startproc 169 @ args = 0, pretend = 0, frame = 0 170 @ frame_needed = 0, uses_anonymous_args = 0 266:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK; 171 .loc 1 266 1 is_stmt 0 view .LVU40 172 0000 38B5 push {r3, r4, r5, lr} 173 .LCFI0: 174 .cfi_def_cfa_offset 16 175 .cfi_offset 3, -16 176 .cfi_offset 4, -12 177 .cfi_offset 5, -8 178 .cfi_offset 14, -4 179 0002 1D46 mov r5, r3 267:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 180 .loc 1 267 3 is_stmt 1 view .LVU41 181 .LVL7: 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 182 .loc 1 270 3 view .LVU42 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 183 .loc 1 270 3 view .LVU43 184 0004 174B ldr r3, .L22 185 0006 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2 186 0008 012B cmp r3, #1 187 000a 28D0 beq .L18 188 000c 8446 mov ip, r0 ARM GAS /tmp/cc26Ml62.s page 21 189 000e 0846 mov r0, r1 190 .LVL8: 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 191 .loc 1 270 3 is_stmt 0 view .LVU44 192 0010 1446 mov r4, r2 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 193 .loc 1 270 3 is_stmt 1 discriminator 2 view .LVU45 194 0012 144B ldr r3, .L22 195 0014 0122 movs r2, #1 196 .LVL9: 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 197 .loc 1 270 3 is_stmt 0 discriminator 2 view .LVU46 198 0016 1A76 strb r2, [r3, #24] 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 199 .loc 1 270 3 is_stmt 1 discriminator 2 view .LVU47 273:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); 200 .loc 1 273 3 discriminator 2 view .LVU48 274:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 201 .loc 1 274 3 discriminator 2 view .LVU49 295:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 202 .loc 1 295 3 discriminator 2 view .LVU50 203 0018 1349 ldr r1, .L22+4 204 .LVL10: 295:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 205 .loc 1 295 3 is_stmt 0 discriminator 2 view .LVU51 206 001a 0A69 ldr r2, [r1, #16] 207 001c 42F4A052 orr r2, r2, #5120 208 0020 0A61 str r2, [r1, #16] 298:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Data = Data; 209 .loc 1 298 3 is_stmt 1 discriminator 2 view .LVU52 298:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Data = Data; 210 .loc 1 298 18 is_stmt 0 discriminator 2 view .LVU53 211 0022 9860 str r0, [r3, #8] 299:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 212 .loc 1 299 3 is_stmt 1 discriminator 2 view .LVU54 299:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 213 .loc 1 299 15 is_stmt 0 discriminator 2 view .LVU55 214 0024 C3E90445 strd r4, [r3, #16] 301:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 215 .loc 1 301 3 is_stmt 1 discriminator 2 view .LVU56 301:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 216 .loc 1 301 5 is_stmt 0 discriminator 2 view .LVU57 217 0028 BCF1010F cmp ip, #1 218 002c 0CD0 beq .L20 307:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 219 .loc 1 307 8 is_stmt 1 view .LVU58 307:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 220 .loc 1 307 10 is_stmt 0 view .LVU59 221 002e BCF1020F cmp ip, #2 222 0032 0ED0 beq .L21 315:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program double word (64-bit : 4*16-bit) at a specified address. */ 223 .loc 1 315 5 is_stmt 1 view .LVU60 315:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program double word (64-bit : 4*16-bit) at a specified address. */ 224 .loc 1 315 29 is_stmt 0 view .LVU61 225 0034 0B4B ldr r3, .L22 226 0036 0522 movs r2, #5 227 0038 1A70 strb r2, [r3] ARM GAS /tmp/cc26Ml62.s page 22 317:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 228 .loc 1 317 5 is_stmt 1 view .LVU62 317:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 229 .loc 1 317 26 is_stmt 0 view .LVU63 230 003a 0422 movs r2, #4 231 003c 5A60 str r2, [r3, #4] 232 .L16: 321:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 233 .loc 1 321 3 is_stmt 1 view .LVU64 234 003e A1B2 uxth r1, r4 235 0040 FFF7FEFF bl FLASH_Program_HalfWord 236 .LVL11: 323:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 237 .loc 1 323 3 view .LVU65 323:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 238 .loc 1 323 10 is_stmt 0 view .LVU66 239 0044 0020 movs r0, #0 240 .L14: 324:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 241 .loc 1 324 1 view .LVU67 242 0046 38BD pop {r3, r4, r5, pc} 243 .LVL12: 244 .L20: 303:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program halfword (16-bit) at a specified address. */ 245 .loc 1 303 5 is_stmt 1 view .LVU68 303:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program halfword (16-bit) at a specified address. */ 246 .loc 1 303 29 is_stmt 0 view .LVU69 247 0048 0322 movs r2, #3 248 004a 1A70 strb r2, [r3] 305:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 249 .loc 1 305 5 is_stmt 1 view .LVU70 305:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 250 .loc 1 305 26 is_stmt 0 view .LVU71 251 004c 0122 movs r2, #1 252 004e 5A60 str r2, [r3, #4] 253 0050 F5E7 b .L16 254 .L21: 309:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program word (32-bit : 2*16-bit) at a specified address. */ 255 .loc 1 309 5 is_stmt 1 view .LVU72 309:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Program word (32-bit : 2*16-bit) at a specified address. */ 256 .loc 1 309 29 is_stmt 0 view .LVU73 257 0052 044B ldr r3, .L22 258 0054 0422 movs r2, #4 259 0056 1A70 strb r2, [r3] 311:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 260 .loc 1 311 5 is_stmt 1 view .LVU74 311:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 261 .loc 1 311 26 is_stmt 0 view .LVU75 262 0058 0222 movs r2, #2 263 005a 5A60 str r2, [r3, #4] 264 005c EFE7 b .L16 265 .LVL13: 266 .L18: 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 267 .loc 1 270 3 view .LVU76 268 005e 0220 movs r0, #2 269 .LVL14: ARM GAS /tmp/cc26Ml62.s page 23 270:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 270 .loc 1 270 3 view .LVU77 271 0060 F1E7 b .L14 272 .L23: 273 0062 00BF .align 2 274 .L22: 275 0064 00000000 .word .LANCHOR0 276 0068 00200240 .word 1073881088 277 .cfi_endproc 278 .LFE66: 280 .section .text.HAL_FLASH_EndOfOperationCallback,"ax",%progbits 281 .align 1 282 .weak HAL_FLASH_EndOfOperationCallback 283 .syntax unified 284 .thumb 285 .thumb_func 287 HAL_FLASH_EndOfOperationCallback: 288 .LVL15: 289 .LFB68: 605:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */ 290 .loc 1 605 1 is_stmt 1 view -0 291 .cfi_startproc 292 @ args = 0, pretend = 0, frame = 0 293 @ frame_needed = 0, uses_anonymous_args = 0 294 @ link register save eliminated. 607:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 295 .loc 1 607 3 view .LVU79 612:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 296 .loc 1 612 1 is_stmt 0 view .LVU80 297 0000 7047 bx lr 298 .cfi_endproc 299 .LFE68: 301 .section .text.HAL_FLASH_OperationErrorCallback,"ax",%progbits 302 .align 1 303 .weak HAL_FLASH_OperationErrorCallback 304 .syntax unified 305 .thumb 306 .thumb_func 308 HAL_FLASH_OperationErrorCallback: 309 .LVL16: 310 .LFB69: 623:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */ 311 .loc 1 623 1 is_stmt 1 view -0 312 .cfi_startproc 313 @ args = 0, pretend = 0, frame = 0 314 @ frame_needed = 0, uses_anonymous_args = 0 315 @ link register save eliminated. 625:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 316 .loc 1 625 3 view .LVU82 630:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 317 .loc 1 630 1 is_stmt 0 view .LVU83 318 0000 7047 bx lr 319 .cfi_endproc 320 .LFE69: 322 .section .text.HAL_FLASH_IRQHandler,"ax",%progbits 323 .align 1 324 .global HAL_FLASH_IRQHandler ARM GAS /tmp/cc26Ml62.s page 24 325 .syntax unified 326 .thumb 327 .thumb_func 329 HAL_FLASH_IRQHandler: 330 .LFB67: 331:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint32_t addresstmp = 0U; 331 .loc 1 331 1 is_stmt 1 view -0 332 .cfi_startproc 333 @ args = 0, pretend = 0, frame = 0 334 @ frame_needed = 0, uses_anonymous_args = 0 335 0000 F8B5 push {r3, r4, r5, r6, r7, lr} 336 .LCFI1: 337 .cfi_def_cfa_offset 24 338 .cfi_offset 3, -24 339 .cfi_offset 4, -20 340 .cfi_offset 5, -16 341 .cfi_offset 6, -12 342 .cfi_offset 7, -8 343 .cfi_offset 14, -4 332:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 344 .loc 1 332 3 view .LVU85 345 .LVL17: 339:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 346 .loc 1 339 3 view .LVU86 339:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 347 .loc 1 339 6 is_stmt 0 view .LVU87 348 0002 524B ldr r3, .L44 349 0004 DB68 ldr r3, [r3, #12] 339:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 350 .loc 1 339 5 view .LVU88 351 0006 13F0100F tst r3, #16 352 000a 04D1 bne .L27 339:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 353 .loc 1 339 48 discriminator 1 view .LVU89 354 000c 4F4B ldr r3, .L44 355 000e DB68 ldr r3, [r3, #12] 339:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 356 .loc 1 339 46 discriminator 1 view .LVU90 357 0010 13F0040F tst r3, #4 358 0014 0BD0 beq .L28 359 .L27: 343:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Reset address */ 360 .loc 1 343 5 is_stmt 1 view .LVU91 343:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Reset address */ 361 .loc 1 343 16 is_stmt 0 view .LVU92 362 0016 4E4C ldr r4, .L44+4 363 0018 A568 ldr r5, [r4, #8] 364 .LVL18: 345:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 365 .loc 1 345 5 is_stmt 1 view .LVU93 345:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 366 .loc 1 345 20 is_stmt 0 view .LVU94 367 001a 4FF0FF33 mov r3, #-1 368 001e A360 str r3, [r4, #8] 348:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 369 .loc 1 348 5 is_stmt 1 view .LVU95 370 0020 FFF7FEFF bl FLASH_SetErrorCode ARM GAS /tmp/cc26Ml62.s page 25 371 .LVL19: 351:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 372 .loc 1 351 5 view .LVU96 373 0024 2846 mov r0, r5 374 0026 FFF7FEFF bl HAL_FLASH_OperationErrorCallback 375 .LVL20: 354:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 376 .loc 1 354 5 view .LVU97 354:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 377 .loc 1 354 29 is_stmt 0 view .LVU98 378 002a 0023 movs r3, #0 379 002c 2370 strb r3, [r4] 380 .LVL21: 381 .L28: 364:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 382 .loc 1 364 3 is_stmt 1 view .LVU99 364:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 383 .loc 1 364 6 is_stmt 0 view .LVU100 384 002e 474B ldr r3, .L44 385 0030 DB68 ldr r3, [r3, #12] 364:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 386 .loc 1 364 5 view .LVU101 387 0032 13F0200F tst r3, #32 388 0036 2BD0 beq .L29 367:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 389 .loc 1 367 5 is_stmt 1 discriminator 2 view .LVU102 367:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 390 .loc 1 367 5 discriminator 2 view .LVU103 367:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 391 .loc 1 367 5 discriminator 2 view .LVU104 392 0038 444B ldr r3, .L44 393 003a 2022 movs r2, #32 394 003c DA60 str r2, [r3, #12] 367:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 395 .loc 1 367 5 discriminator 2 view .LVU105 371:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 396 .loc 1 371 5 discriminator 2 view .LVU106 371:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 397 .loc 1 371 14 is_stmt 0 discriminator 2 view .LVU107 398 003e 444B ldr r3, .L44+4 399 0040 1B78 ldrb r3, [r3] @ zero_extendqisi2 371:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 400 .loc 1 371 7 discriminator 2 view .LVU108 401 0042 2BB3 cbz r3, .L29 373:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 402 .loc 1 373 7 is_stmt 1 view .LVU109 373:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 403 .loc 1 373 16 is_stmt 0 view .LVU110 404 0044 424B ldr r3, .L44+4 405 0046 1B78 ldrb r3, [r3] @ zero_extendqisi2 406 0048 DBB2 uxtb r3, r3 373:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 407 .loc 1 373 9 view .LVU111 408 004a 012B cmp r3, #1 409 004c 30D0 beq .L39 404:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 410 .loc 1 404 12 is_stmt 1 view .LVU112 ARM GAS /tmp/cc26Ml62.s page 26 404:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 411 .loc 1 404 21 is_stmt 0 view .LVU113 412 004e 404B ldr r3, .L44+4 413 0050 1B78 ldrb r3, [r3] @ zero_extendqisi2 414 0052 DBB2 uxtb r3, r3 404:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 415 .loc 1 404 14 view .LVU114 416 0054 022B cmp r3, #2 417 0056 4AD0 beq .L40 427:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 418 .loc 1 427 9 is_stmt 1 view .LVU115 427:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 419 .loc 1 427 15 is_stmt 0 view .LVU116 420 0058 3D4B ldr r3, .L44+4 421 005a 5A68 ldr r2, [r3, #4] 427:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 422 .loc 1 427 29 view .LVU117 423 005c 013A subs r2, r2, #1 424 005e 5A60 str r2, [r3, #4] 430:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 425 .loc 1 430 9 is_stmt 1 view .LVU118 430:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 426 .loc 1 430 18 is_stmt 0 view .LVU119 427 0060 5B68 ldr r3, [r3, #4] 430:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 428 .loc 1 430 11 view .LVU120 429 0062 002B cmp r3, #0 430 0064 4FD1 bne .L41 449:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 431 .loc 1 449 11 is_stmt 1 view .LVU121 449:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 432 .loc 1 449 21 is_stmt 0 view .LVU122 433 0066 3A4B ldr r3, .L44+4 434 0068 1B78 ldrb r3, [r3] @ zero_extendqisi2 435 006a DBB2 uxtb r3, r3 449:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 436 .loc 1 449 14 view .LVU123 437 006c 032B cmp r3, #3 438 006e 62D0 beq .L42 453:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 439 .loc 1 453 16 is_stmt 1 view .LVU124 453:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 440 .loc 1 453 26 is_stmt 0 view .LVU125 441 0070 374B ldr r3, .L44+4 442 0072 1B78 ldrb r3, [r3] @ zero_extendqisi2 443 0074 DBB2 uxtb r3, r3 453:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 444 .loc 1 453 19 view .LVU126 445 0076 042B cmp r3, #4 446 0078 62D0 beq .L43 459:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 447 .loc 1 459 13 is_stmt 1 view .LVU127 459:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 448 .loc 1 459 52 is_stmt 0 view .LVU128 449 007a 354B ldr r3, .L44+4 450 007c 9868 ldr r0, [r3, #8] 459:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } ARM GAS /tmp/cc26Ml62.s page 27 451 .loc 1 459 13 view .LVU129 452 007e 0638 subs r0, r0, #6 453 0080 FFF7FEFF bl HAL_FLASH_EndOfOperationCallback 454 .LVL22: 455 .L35: 463:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 456 .loc 1 463 11 is_stmt 1 view .LVU130 463:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 457 .loc 1 463 26 is_stmt 0 view .LVU131 458 0084 324B ldr r3, .L44+4 459 0086 4FF0FF32 mov r2, #-1 460 008a 9A60 str r2, [r3, #8] 464:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 461 .loc 1 464 11 is_stmt 1 view .LVU132 464:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 462 .loc 1 464 35 is_stmt 0 view .LVU133 463 008c 0022 movs r2, #0 464 008e 1A70 strb r2, [r3] 465 .L29: 573:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 466 .loc 1 573 3 is_stmt 1 view .LVU134 573:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 467 .loc 1 573 12 is_stmt 0 view .LVU135 468 0090 2F4B ldr r3, .L44+4 469 0092 1B78 ldrb r3, [r3] @ zero_extendqisi2 573:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 470 .loc 1 573 5 view .LVU136 471 0094 5BB9 cbnz r3, .L26 584:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 472 .loc 1 584 5 is_stmt 1 view .LVU137 473 0096 2D4B ldr r3, .L44 474 0098 1A69 ldr r2, [r3, #16] 475 009a 22F00702 bic r2, r2, #7 476 009e 1A61 str r2, [r3, #16] 587:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #endif /* FLASH_BANK2_END */ 477 .loc 1 587 5 view .LVU138 478 00a0 1A69 ldr r2, [r3, #16] 479 00a2 22F4A052 bic r2, r2, #5120 480 00a6 1A61 str r2, [r3, #16] 591:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 481 .loc 1 591 5 view .LVU139 591:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 482 .loc 1 591 5 view .LVU140 483 00a8 294B ldr r3, .L44+4 484 00aa 0022 movs r2, #0 485 00ac 1A76 strb r2, [r3, #24] 591:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 486 .loc 1 591 5 view .LVU141 487 .L26: 593:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 488 .loc 1 593 1 is_stmt 0 view .LVU142 489 00ae F8BD pop {r3, r4, r5, r6, r7, pc} 490 .L39: 376:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 491 .loc 1 376 9 is_stmt 1 view .LVU143 376:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 492 .loc 1 376 15 is_stmt 0 view .LVU144 ARM GAS /tmp/cc26Ml62.s page 28 493 00b0 274B ldr r3, .L44+4 494 00b2 5A68 ldr r2, [r3, #4] 376:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 495 .loc 1 376 29 view .LVU145 496 00b4 013A subs r2, r2, #1 497 00b6 5A60 str r2, [r3, #4] 379:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 498 .loc 1 379 9 is_stmt 1 view .LVU146 379:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 499 .loc 1 379 18 is_stmt 0 view .LVU147 500 00b8 5B68 ldr r3, [r3, #4] 379:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 501 .loc 1 379 11 view .LVU148 502 00ba 7BB1 cbz r3, .L31 381:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Indicate user which sector has been erased */ 503 .loc 1 381 11 is_stmt 1 view .LVU149 381:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /*Indicate user which sector has been erased */ 504 .loc 1 381 22 is_stmt 0 view .LVU150 505 00bc 244C ldr r4, .L44+4 506 00be A068 ldr r0, [r4, #8] 507 .LVL23: 383:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 508 .loc 1 383 11 is_stmt 1 view .LVU151 509 00c0 FFF7FEFF bl HAL_FLASH_EndOfOperationCallback 510 .LVL24: 386:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = addresstmp; 511 .loc 1 386 11 view .LVU152 386:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = addresstmp; 512 .loc 1 386 30 is_stmt 0 view .LVU153 513 00c4 A068 ldr r0, [r4, #8] 386:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.Address = addresstmp; 514 .loc 1 386 22 view .LVU154 515 00c6 00F58060 add r0, r0, #1024 516 .LVL25: 387:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 517 .loc 1 387 11 is_stmt 1 view .LVU155 387:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 518 .loc 1 387 26 is_stmt 0 view .LVU156 519 00ca A060 str r0, [r4, #8] 390:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 520 .loc 1 390 11 is_stmt 1 view .LVU157 521 00cc 1F4A ldr r2, .L44 522 00ce 1369 ldr r3, [r2, #16] 523 00d0 23F00203 bic r3, r3, #2 524 00d4 1361 str r3, [r2, #16] 392:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 525 .loc 1 392 11 view .LVU158 526 00d6 FFF7FEFF bl FLASH_PageErase 527 .LVL26: 392:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 528 .loc 1 392 11 is_stmt 0 view .LVU159 529 00da D9E7 b .L29 530 .L31: 398:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; 531 .loc 1 398 11 is_stmt 1 view .LVU160 532 .LVL27: 398:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE; ARM GAS /tmp/cc26Ml62.s page 29 533 .loc 1 398 26 is_stmt 0 view .LVU161 534 00dc 1C4B ldr r3, .L44+4 535 00de 4FF0FF30 mov r0, #-1 536 00e2 9860 str r0, [r3, #8] 399:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 537 .loc 1 399 11 is_stmt 1 view .LVU162 399:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* FLASH EOP interrupt user callback */ 538 .loc 1 399 35 is_stmt 0 view .LVU163 539 00e4 0022 movs r2, #0 540 00e6 1A70 strb r2, [r3] 401:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 541 .loc 1 401 11 is_stmt 1 view .LVU164 542 00e8 FFF7FEFF bl HAL_FLASH_EndOfOperationCallback 543 .LVL28: 544 00ec D0E7 b .L29 545 .LVL29: 546 .L40: 407:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 547 .loc 1 407 9 view .LVU165 548 00ee 174A ldr r2, .L44 549 00f0 1369 ldr r3, [r2, #16] 550 00f2 23F00403 bic r3, r3, #4 551 00f6 1361 str r3, [r2, #16] 416:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 552 .loc 1 416 11 view .LVU166 553 00f8 0020 movs r0, #0 554 00fa FFF7FEFF bl HAL_FLASH_EndOfOperationCallback 555 .LVL30: 419:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 556 .loc 1 419 11 view .LVU167 419:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 557 .loc 1 419 35 is_stmt 0 view .LVU168 558 00fe 144B ldr r3, .L44+4 559 0100 0022 movs r2, #0 560 0102 1A70 strb r2, [r3] 561 0104 C4E7 b .L29 562 .L41: 433:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address; 563 .loc 1 433 11 is_stmt 1 view .LVU169 433:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** addresstmp = pFlash.Address; 564 .loc 1 433 26 is_stmt 0 view .LVU170 565 0106 124B ldr r3, .L44+4 566 0108 9A68 ldr r2, [r3, #8] 567 010a 0232 adds r2, r2, #2 568 010c 9A60 str r2, [r3, #8] 434:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 569 .loc 1 434 11 is_stmt 1 view .LVU171 434:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 570 .loc 1 434 22 is_stmt 0 view .LVU172 571 010e 9868 ldr r0, [r3, #8] 572 .LVL31: 437:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 573 .loc 1 437 11 is_stmt 1 view .LVU173 437:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 574 .loc 1 437 32 is_stmt 0 view .LVU174 575 0110 D3E90467 ldrd r6, [r3, #16] 437:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ARM GAS /tmp/cc26Ml62.s page 30 576 .loc 1 437 38 view .LVU175 577 0114 340C lsrs r4, r6, #16 578 0116 44EA0744 orr r4, r4, r7, lsl #16 579 011a 3D0C lsrs r5, r7, #16 437:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 580 .loc 1 437 23 view .LVU176 581 011c C3E90445 strd r4, [r3, #16] 440:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 582 .loc 1 440 11 is_stmt 1 view .LVU177 583 0120 0A49 ldr r1, .L44 584 0122 0A69 ldr r2, [r1, #16] 585 0124 22F00102 bic r2, r2, #1 586 0128 0A61 str r2, [r1, #16] 443:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 587 .loc 1 443 11 view .LVU178 443:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 588 .loc 1 443 62 is_stmt 0 view .LVU179 589 012a D3E90423 ldrd r2, [r3, #16] 443:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 590 .loc 1 443 11 view .LVU180 591 012e 91B2 uxth r1, r2 592 0130 FFF7FEFF bl FLASH_Program_HalfWord 593 .LVL32: 443:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 594 .loc 1 443 11 view .LVU181 595 0134 ACE7 b .L29 596 .L42: 451:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 597 .loc 1 451 13 is_stmt 1 view .LVU182 598 0136 064B ldr r3, .L44+4 599 0138 9868 ldr r0, [r3, #8] 600 013a FFF7FEFF bl HAL_FLASH_EndOfOperationCallback 601 .LVL33: 602 013e A1E7 b .L35 603 .L43: 455:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 604 .loc 1 455 13 view .LVU183 455:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 605 .loc 1 455 52 is_stmt 0 view .LVU184 606 0140 034B ldr r3, .L44+4 607 0142 9868 ldr r0, [r3, #8] 455:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 608 .loc 1 455 13 view .LVU185 609 0144 0238 subs r0, r0, #2 610 0146 FFF7FEFF bl HAL_FLASH_EndOfOperationCallback 611 .LVL34: 612 014a 9BE7 b .L35 613 .L45: 614 .align 2 615 .L44: 616 014c 00200240 .word 1073881088 617 0150 00000000 .word .LANCHOR0 618 .cfi_endproc 619 .LFE67: 621 .section .text.HAL_FLASH_Unlock,"ax",%progbits 622 .align 1 623 .global HAL_FLASH_Unlock ARM GAS /tmp/cc26Ml62.s page 31 624 .syntax unified 625 .thumb 626 .thumb_func 628 HAL_FLASH_Unlock: 629 .LFB70: 656:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK; 630 .loc 1 656 1 is_stmt 1 view -0 631 .cfi_startproc 632 @ args = 0, pretend = 0, frame = 0 633 @ frame_needed = 0, uses_anonymous_args = 0 634 @ link register save eliminated. 657:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 635 .loc 1 657 3 view .LVU187 636 .LVL35: 659:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 637 .loc 1 659 3 view .LVU188 659:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 638 .loc 1 659 6 is_stmt 0 view .LVU189 639 0000 0A4B ldr r3, .L50 640 0002 1B69 ldr r3, [r3, #16] 659:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 641 .loc 1 659 5 view .LVU190 642 0004 13F0800F tst r3, #128 643 0008 0BD0 beq .L48 662:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->KEYR, FLASH_KEY2); 644 .loc 1 662 5 is_stmt 1 view .LVU191 645 000a 084B ldr r3, .L50 646 000c 084A ldr r2, .L50+4 647 000e 5A60 str r2, [r3, #4] 663:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 648 .loc 1 663 5 view .LVU192 649 0010 02F18832 add r2, r2, #-2004318072 650 0014 5A60 str r2, [r3, #4] 666:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 651 .loc 1 666 5 view .LVU193 666:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 652 .loc 1 666 8 is_stmt 0 view .LVU194 653 0016 1B69 ldr r3, [r3, #16] 666:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 654 .loc 1 666 7 view .LVU195 655 0018 13F0800F tst r3, #128 656 001c 03D1 bne .L49 657:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 657 .loc 1 657 21 view .LVU196 658 001e 0020 movs r0, #0 659 0020 7047 bx lr 660 .L48: 661 0022 0020 movs r0, #0 662 0024 7047 bx lr 663 .L49: 668:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 664 .loc 1 668 14 view .LVU197 665 0026 0120 movs r0, #1 666 .LVL36: 686:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 667 .loc 1 686 3 is_stmt 1 view .LVU198 687:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** ARM GAS /tmp/cc26Ml62.s page 32 668 .loc 1 687 1 is_stmt 0 view .LVU199 669 0028 7047 bx lr 670 .L51: 671 002a 00BF .align 2 672 .L50: 673 002c 00200240 .word 1073881088 674 0030 23016745 .word 1164378403 675 .cfi_endproc 676 .LFE70: 678 .section .text.HAL_FLASH_Lock,"ax",%progbits 679 .align 1 680 .global HAL_FLASH_Lock 681 .syntax unified 682 .thumb 683 .thumb_func 685 HAL_FLASH_Lock: 686 .LFB71: 694:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Set the LOCK Bit to lock the FLASH Registers access */ 687 .loc 1 694 1 is_stmt 1 view -0 688 .cfi_startproc 689 @ args = 0, pretend = 0, frame = 0 690 @ frame_needed = 0, uses_anonymous_args = 0 691 @ link register save eliminated. 696:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 692 .loc 1 696 3 view .LVU201 693 0000 034A ldr r2, .L53 694 0002 1369 ldr r3, [r2, #16] 695 0004 43F08003 orr r3, r3, #128 696 0008 1361 str r3, [r2, #16] 703:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 697 .loc 1 703 3 view .LVU202 704:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 698 .loc 1 704 1 is_stmt 0 view .LVU203 699 000a 0020 movs r0, #0 700 000c 7047 bx lr 701 .L54: 702 000e 00BF .align 2 703 .L53: 704 0010 00200240 .word 1073881088 705 .cfi_endproc 706 .LFE71: 708 .section .text.HAL_FLASH_OB_Unlock,"ax",%progbits 709 .align 1 710 .global HAL_FLASH_OB_Unlock 711 .syntax unified 712 .thumb 713 .thumb_func 715 HAL_FLASH_OB_Unlock: 716 .LFB72: 711:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** if (HAL_IS_BIT_CLR(FLASH->CR, FLASH_CR_OPTWRE)) 717 .loc 1 711 1 is_stmt 1 view -0 718 .cfi_startproc 719 @ args = 0, pretend = 0, frame = 0 720 @ frame_needed = 0, uses_anonymous_args = 0 721 @ link register save eliminated. 712:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 722 .loc 1 712 3 view .LVU205 ARM GAS /tmp/cc26Ml62.s page 33 712:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 723 .loc 1 712 7 is_stmt 0 view .LVU206 724 0000 074B ldr r3, .L58 725 0002 1B69 ldr r3, [r3, #16] 712:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 726 .loc 1 712 6 view .LVU207 727 0004 13F4007F tst r3, #512 728 0008 07D1 bne .L57 715:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY2); 729 .loc 1 715 5 is_stmt 1 view .LVU208 730 000a 054B ldr r3, .L58 731 000c 054A ldr r2, .L58+4 732 000e 9A60 str r2, [r3, #8] 716:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 733 .loc 1 716 5 view .LVU209 734 0010 02F18832 add r2, r2, #-2004318072 735 0014 9A60 str r2, [r3, #8] 723:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 736 .loc 1 723 3 view .LVU210 723:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 737 .loc 1 723 10 is_stmt 0 view .LVU211 738 0016 0020 movs r0, #0 739 0018 7047 bx lr 740 .L57: 720:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 741 .loc 1 720 12 view .LVU212 742 001a 0120 movs r0, #1 724:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 743 .loc 1 724 1 view .LVU213 744 001c 7047 bx lr 745 .L59: 746 001e 00BF .align 2 747 .L58: 748 0020 00200240 .word 1073881088 749 0024 23016745 .word 1164378403 750 .cfi_endproc 751 .LFE72: 753 .section .text.HAL_FLASH_OB_Lock,"ax",%progbits 754 .align 1 755 .global HAL_FLASH_OB_Lock 756 .syntax unified 757 .thumb 758 .thumb_func 760 HAL_FLASH_OB_Lock: 761 .LFB73: 731:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Clear the OPTWRE Bit to lock the FLASH Option Byte Registers access */ 762 .loc 1 731 1 is_stmt 1 view -0 763 .cfi_startproc 764 @ args = 0, pretend = 0, frame = 0 765 @ frame_needed = 0, uses_anonymous_args = 0 766 @ link register save eliminated. 733:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 767 .loc 1 733 3 view .LVU215 768 0000 034A ldr r2, .L61 769 0002 1369 ldr r3, [r2, #16] 770 0004 23F40073 bic r3, r3, #512 771 0008 1361 str r3, [r2, #16] ARM GAS /tmp/cc26Ml62.s page 34 735:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 772 .loc 1 735 3 view .LVU216 736:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 773 .loc 1 736 1 is_stmt 0 view .LVU217 774 000a 0020 movs r0, #0 775 000c 7047 bx lr 776 .L62: 777 000e 00BF .align 2 778 .L61: 779 0010 00200240 .word 1073881088 780 .cfi_endproc 781 .LFE73: 783 .section .text.HAL_FLASH_OB_Launch,"ax",%progbits 784 .align 1 785 .global HAL_FLASH_OB_Launch 786 .syntax unified 787 .thumb 788 .thumb_func 790 HAL_FLASH_OB_Launch: 791 .LFB74: 744:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Initiates a system reset request to launch the option byte loading */ 792 .loc 1 744 1 is_stmt 1 view -0 793 .cfi_startproc 794 @ args = 0, pretend = 0, frame = 0 795 @ frame_needed = 0, uses_anonymous_args = 0 796 0000 08B5 push {r3, lr} 797 .LCFI2: 798 .cfi_def_cfa_offset 8 799 .cfi_offset 3, -8 800 .cfi_offset 14, -4 746:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 801 .loc 1 746 3 view .LVU219 802 0002 FFF7FEFF bl HAL_NVIC_SystemReset 803 .LVL37: 747:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 804 .loc 1 747 1 is_stmt 0 view .LVU220 805 0006 08BD pop {r3, pc} 806 .cfi_endproc 807 .LFE74: 809 .section .text.HAL_FLASH_GetError,"ax",%progbits 810 .align 1 811 .global HAL_FLASH_GetError 812 .syntax unified 813 .thumb 814 .thumb_func 816 HAL_FLASH_GetError: 817 .LFB75: 773:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return pFlash.ErrorCode; 818 .loc 1 773 1 is_stmt 1 view -0 819 .cfi_startproc 820 @ args = 0, pretend = 0, frame = 0 821 @ frame_needed = 0, uses_anonymous_args = 0 822 @ link register save eliminated. 774:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 823 .loc 1 774 4 view .LVU222 774:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 824 .loc 1 774 17 is_stmt 0 view .LVU223 ARM GAS /tmp/cc26Ml62.s page 35 825 0000 014B ldr r3, .L66 826 0002 D869 ldr r0, [r3, #28] 775:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 827 .loc 1 775 1 view .LVU224 828 0004 7047 bx lr 829 .L67: 830 0006 00BF .align 2 831 .L66: 832 0008 00000000 .word .LANCHOR0 833 .cfi_endproc 834 .LFE75: 836 .section .text.FLASH_WaitForLastOperation,"ax",%progbits 837 .align 1 838 .global FLASH_WaitForLastOperation 839 .syntax unified 840 .thumb 841 .thumb_func 843 FLASH_WaitForLastOperation: 844 .LVL38: 845 .LFB77: 825:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. 846 .loc 1 825 1 is_stmt 1 view -0 847 .cfi_startproc 848 @ args = 0, pretend = 0, frame = 0 849 @ frame_needed = 0, uses_anonymous_args = 0 825:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. 850 .loc 1 825 1 is_stmt 0 view .LVU226 851 0000 38B5 push {r3, r4, r5, lr} 852 .LCFI3: 853 .cfi_def_cfa_offset 16 854 .cfi_offset 3, -16 855 .cfi_offset 4, -12 856 .cfi_offset 5, -8 857 .cfi_offset 14, -4 858 0002 0446 mov r4, r0 830:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 859 .loc 1 830 3 is_stmt 1 view .LVU227 830:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 860 .loc 1 830 24 is_stmt 0 view .LVU228 861 0004 FFF7FEFF bl HAL_GetTick 862 .LVL39: 830:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 863 .loc 1 830 24 view .LVU229 864 0008 0546 mov r5, r0 865 .LVL40: 832:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 866 .loc 1 832 3 is_stmt 1 view .LVU230 867 .L70: 832:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 868 .loc 1 832 8 view .LVU231 832:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 869 .loc 1 832 9 is_stmt 0 view .LVU232 870 000a 164B ldr r3, .L79 871 000c DB68 ldr r3, [r3, #12] 832:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 872 .loc 1 832 8 view .LVU233 873 000e 13F0010F tst r3, #1 ARM GAS /tmp/cc26Ml62.s page 36 874 0012 0AD0 beq .L78 834:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 875 .loc 1 834 5 is_stmt 1 view .LVU234 834:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 876 .loc 1 834 8 is_stmt 0 view .LVU235 877 0014 B4F1FF3F cmp r4, #-1 878 0018 F7D0 beq .L70 836:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 879 .loc 1 836 7 is_stmt 1 view .LVU236 836:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 880 .loc 1 836 9 is_stmt 0 view .LVU237 881 001a 24B1 cbz r4, .L71 836:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 882 .loc 1 836 31 discriminator 1 view .LVU238 883 001c FFF7FEFF bl HAL_GetTick 884 .LVL41: 836:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 885 .loc 1 836 44 discriminator 1 view .LVU239 886 0020 401B subs r0, r0, r5 836:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 887 .loc 1 836 26 discriminator 1 view .LVU240 888 0022 A042 cmp r0, r4 889 0024 F1D9 bls .L70 890 .L71: 838:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 891 .loc 1 838 9 is_stmt 1 view .LVU241 838:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 892 .loc 1 838 16 is_stmt 0 view .LVU242 893 0026 0320 movs r0, #3 894 0028 1BE0 b .L72 895 .L78: 844:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 896 .loc 1 844 3 is_stmt 1 view .LVU243 844:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 897 .loc 1 844 7 is_stmt 0 view .LVU244 898 002a 0E4B ldr r3, .L79 899 002c DB68 ldr r3, [r3, #12] 844:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 900 .loc 1 844 6 view .LVU245 901 002e 13F0200F tst r3, #32 902 0032 02D0 beq .L74 847:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 903 .loc 1 847 5 is_stmt 1 discriminator 2 view .LVU246 847:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 904 .loc 1 847 5 discriminator 2 view .LVU247 847:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 905 .loc 1 847 5 discriminator 2 view .LVU248 906 0034 0B4B ldr r3, .L79 907 0036 2022 movs r2, #32 908 0038 DA60 str r2, [r3, #12] 909 .L74: 847:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 910 .loc 1 847 5 discriminator 4 view .LVU249 850:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_OPTVERR) || 911 .loc 1 850 3 discriminator 4 view .LVU250 850:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_OPTVERR) || 912 .loc 1 850 6 is_stmt 0 discriminator 4 view .LVU251 ARM GAS /tmp/cc26Ml62.s page 37 913 003a 0A4B ldr r3, .L79 914 003c DB68 ldr r3, [r3, #12] 850:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_OPTVERR) || 915 .loc 1 850 5 discriminator 4 view .LVU252 916 003e 13F0100F tst r3, #16 917 0042 0BD1 bne .L75 851:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR)) 918 .loc 1 851 6 discriminator 1 view .LVU253 919 0044 074B ldr r3, .L79 920 0046 DB69 ldr r3, [r3, #28] 850:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_OPTVERR) || 921 .loc 1 850 47 discriminator 1 view .LVU254 922 0048 13F0010F tst r3, #1 923 004c 06D1 bne .L75 852:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 924 .loc 1 852 6 view .LVU255 925 004e 054B ldr r3, .L79 926 0050 DB68 ldr r3, [r3, #12] 851:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** __HAL_FLASH_GET_FLAG(FLASH_FLAG_PGERR)) 927 .loc 1 851 47 view .LVU256 928 0052 13F0040F tst r3, #4 929 0056 01D1 bne .L75 860:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 930 .loc 1 860 10 view .LVU257 931 0058 0020 movs r0, #0 932 005a 02E0 b .L72 933 .L75: 855:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** return HAL_ERROR; 934 .loc 1 855 5 is_stmt 1 view .LVU258 935 005c FFF7FEFF bl FLASH_SetErrorCode 936 .LVL42: 856:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 937 .loc 1 856 5 view .LVU259 856:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 938 .loc 1 856 12 is_stmt 0 view .LVU260 939 0060 0120 movs r0, #1 940 .L72: 861:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 941 .loc 1 861 1 view .LVU261 942 0062 38BD pop {r3, r4, r5, pc} 943 .LVL43: 944 .L80: 861:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 945 .loc 1 861 1 view .LVU262 946 .align 2 947 .L79: 948 0064 00200240 .word 1073881088 949 .cfi_endproc 950 .LFE77: 952 .section .text.HAL_FLASH_Program,"ax",%progbits 953 .align 1 954 .global HAL_FLASH_Program 955 .syntax unified 956 .thumb 957 .thumb_func 959 HAL_FLASH_Program: 960 .LVL44: ARM GAS /tmp/cc26Ml62.s page 38 961 .LFB65: 167:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_ERROR; 962 .loc 1 167 1 is_stmt 1 view -0 963 .cfi_startproc 964 @ args = 0, pretend = 0, frame = 0 965 @ frame_needed = 0, uses_anonymous_args = 0 167:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_ERROR; 966 .loc 1 167 1 is_stmt 0 view .LVU264 967 0000 2DE9F843 push {r3, r4, r5, r6, r7, r8, r9, lr} 968 .LCFI4: 969 .cfi_def_cfa_offset 32 970 .cfi_offset 3, -32 971 .cfi_offset 4, -28 972 .cfi_offset 5, -24 973 .cfi_offset 6, -20 974 .cfi_offset 7, -16 975 .cfi_offset 8, -12 976 .cfi_offset 9, -8 977 .cfi_offset 14, -4 978 0004 1E46 mov r6, r3 168:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint8_t index = 0; 979 .loc 1 168 3 is_stmt 1 view .LVU265 980 .LVL45: 169:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** uint8_t nbiterations = 0; 981 .loc 1 169 3 view .LVU266 170:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 982 .loc 1 170 3 view .LVU267 173:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 983 .loc 1 173 3 view .LVU268 173:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 984 .loc 1 173 3 view .LVU269 985 0006 244B ldr r3, .L93 986 0008 1B7E ldrb r3, [r3, #24] @ zero_extendqisi2 987 000a 012B cmp r3, #1 988 000c 41D0 beq .L87 989 000e 0446 mov r4, r0 990 0010 0F46 mov r7, r1 991 0012 9046 mov r8, r2 173:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 992 .loc 1 173 3 discriminator 2 view .LVU270 993 0014 204B ldr r3, .L93 994 0016 0122 movs r2, #1 995 .LVL46: 173:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 996 .loc 1 173 3 is_stmt 0 discriminator 2 view .LVU271 997 0018 1A76 strb r2, [r3, #24] 173:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 998 .loc 1 173 3 is_stmt 1 discriminator 2 view .LVU272 176:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); 999 .loc 1 176 3 discriminator 2 view .LVU273 177:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1000 .loc 1 177 3 discriminator 2 view .LVU274 184:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 1001 .loc 1 184 5 discriminator 2 view .LVU275 184:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 1002 .loc 1 184 14 is_stmt 0 discriminator 2 view .LVU276 1003 001a 4CF25030 movw r0, #50000 ARM GAS /tmp/cc26Ml62.s page 39 1004 .LVL47: 184:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 1005 .loc 1 184 14 discriminator 2 view .LVU277 1006 001e FFF7FEFF bl FLASH_WaitForLastOperation 1007 .LVL48: 194:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1008 .loc 1 194 3 is_stmt 1 discriminator 2 view .LVU278 194:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1009 .loc 1 194 5 is_stmt 0 discriminator 2 view .LVU279 1010 0022 0346 mov r3, r0 1011 0024 78BB cbnz r0, .L83 196:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1012 .loc 1 196 5 is_stmt 1 view .LVU280 196:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1013 .loc 1 196 7 is_stmt 0 view .LVU281 1014 0026 012C cmp r4, #1 1015 0028 08D0 beq .L88 201:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1016 .loc 1 201 10 is_stmt 1 view .LVU282 201:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1017 .loc 1 201 12 is_stmt 0 view .LVU283 1018 002a 022C cmp r4, #2 1019 002c 03D0 beq .L91 209:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 1020 .loc 1 209 20 view .LVU284 1021 002e 4FF00409 mov r9, #4 1022 .L84: 1023 .LVL49: 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1024 .loc 1 212 5 is_stmt 1 view .LVU285 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1025 .loc 1 212 16 is_stmt 0 view .LVU286 1026 0032 1C46 mov r4, r3 1027 .LVL50: 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1028 .loc 1 212 5 view .LVU287 1029 0034 07E0 b .L85 1030 .LVL51: 1031 .L91: 204:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 1032 .loc 1 204 20 view .LVU288 1033 0036 4FF00209 mov r9, #2 1034 003a FAE7 b .L84 1035 .L88: 199:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 1036 .loc 1 199 20 view .LVU289 1037 003c 4FF00109 mov r9, #1 1038 0040 F7E7 b .L84 1039 .LVL52: 1040 .L92: 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1041 .loc 1 212 44 is_stmt 1 discriminator 2 view .LVU290 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1042 .loc 1 212 49 is_stmt 0 discriminator 2 view .LVU291 1043 0042 0134 adds r4, r4, #1 1044 .LVL53: 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { ARM GAS /tmp/cc26Ml62.s page 40 1045 .loc 1 212 49 discriminator 2 view .LVU292 1046 0044 E4B2 uxtb r4, r4 1047 .LVL54: 1048 .L85: 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1049 .loc 1 212 22 is_stmt 1 discriminator 1 view .LVU293 212:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1050 .loc 1 212 5 is_stmt 0 discriminator 1 view .LVU294 1051 0046 4C45 cmp r4, r9 1052 0048 1DD2 bcs .L83 214:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1053 .loc 1 214 7 is_stmt 1 view .LVU295 214:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1054 .loc 1 214 77 is_stmt 0 view .LVU296 1055 004a 2101 lsls r1, r4, #4 214:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1056 .loc 1 214 70 view .LVU297 1057 004c C1F12002 rsb r2, r1, #32 1058 0050 A1F12003 sub r3, r1, #32 1059 .LVL55: 214:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1060 .loc 1 214 70 view .LVU298 1061 0054 28FA01F1 lsr r1, r8, r1 1062 0058 06FA02F2 lsl r2, r6, r2 1063 005c 1143 orrs r1, r1, r2 1064 005e 26FA03F3 lsr r3, r6, r3 1065 0062 1943 orrs r1, r1, r3 214:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1066 .loc 1 214 7 view .LVU299 1067 0064 89B2 uxth r1, r1 1068 0066 07EB4400 add r0, r7, r4, lsl #1 1069 006a FFF7FEFF bl FLASH_Program_HalfWord 1070 .LVL56: 221:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1071 .loc 1 221 9 is_stmt 1 view .LVU300 221:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1072 .loc 1 221 18 is_stmt 0 view .LVU301 1073 006e 4CF25030 movw r0, #50000 1074 0072 FFF7FEFF bl FLASH_WaitForLastOperation 1075 .LVL57: 224:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** #if defined(FLASH_BANK2_END) 1076 .loc 1 224 9 is_stmt 1 view .LVU302 1077 0076 094B ldr r3, .L93+4 1078 0078 1D69 ldr r5, [r3, #16] 1079 007a 25F00105 bic r5, r5, #1 1080 007e 1D61 str r5, [r3, #16] 237:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1081 .loc 1 237 7 view .LVU303 237:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** { 1082 .loc 1 237 10 is_stmt 0 view .LVU304 1083 0080 0346 mov r3, r0 1084 0082 0028 cmp r0, #0 1085 0084 DDD0 beq .L92 1086 .LVL58: 1087 .L83: 245:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1088 .loc 1 245 3 is_stmt 1 view .LVU305 ARM GAS /tmp/cc26Ml62.s page 41 245:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1089 .loc 1 245 3 view .LVU306 1090 0086 044A ldr r2, .L93 1091 0088 0021 movs r1, #0 1092 008a 1176 strb r1, [r2, #24] 245:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1093 .loc 1 245 3 view .LVU307 247:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** } 1094 .loc 1 247 3 view .LVU308 1095 .LVL59: 1096 .L82: 248:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1097 .loc 1 248 1 is_stmt 0 view .LVU309 1098 008c 1846 mov r0, r3 1099 008e BDE8F883 pop {r3, r4, r5, r6, r7, r8, r9, pc} 1100 .LVL60: 1101 .L87: 173:Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c **** 1102 .loc 1 173 3 view .LVU310 1103 0092 0223 movs r3, #2 1104 0094 FAE7 b .L82 1105 .L94: 1106 0096 00BF .align 2 1107 .L93: 1108 0098 00000000 .word .LANCHOR0 1109 009c 00200240 .word 1073881088 1110 .cfi_endproc 1111 .LFE65: 1113 .global pFlash 1114 .section .bss.pFlash,"aw",%nobits 1115 .align 3 1116 .set .LANCHOR0,. + 0 1119 pFlash: 1120 0000 00000000 .space 32 1120 00000000 1120 00000000 1120 00000000 1120 00000000 1121 .text 1122 .Letext0: 1123 .file 2 "/opt/gcc-arm/arm-none-eabi/include/machine/_default_types.h" 1124 .file 3 "/opt/gcc-arm/arm-none-eabi/include/sys/_stdint.h" 1125 .file 4 "Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h" 1126 .file 5 "Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h" 1127 .file 6 "Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h" 1128 .file 7 "Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h" 1129 .file 8 "Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h" 1130 .file 9 "Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h" ARM GAS /tmp/cc26Ml62.s page 42 DEFINED SYMBOLS *ABS*:0000000000000000 stm32f1xx_hal_flash.c /tmp/cc26Ml62.s:18 .text.FLASH_Program_HalfWord:0000000000000000 $t /tmp/cc26Ml62.s:23 .text.FLASH_Program_HalfWord:0000000000000000 FLASH_Program_HalfWord /tmp/cc26Ml62.s:50 .text.FLASH_Program_HalfWord:0000000000000014 $d /tmp/cc26Ml62.s:56 .text.FLASH_SetErrorCode:0000000000000000 $t /tmp/cc26Ml62.s:61 .text.FLASH_SetErrorCode:0000000000000000 FLASH_SetErrorCode /tmp/cc26Ml62.s:152 .text.FLASH_SetErrorCode:0000000000000068 $d /tmp/cc26Ml62.s:158 .text.HAL_FLASH_Program_IT:0000000000000000 $t /tmp/cc26Ml62.s:164 .text.HAL_FLASH_Program_IT:0000000000000000 HAL_FLASH_Program_IT /tmp/cc26Ml62.s:275 .text.HAL_FLASH_Program_IT:0000000000000064 $d /tmp/cc26Ml62.s:281 .text.HAL_FLASH_EndOfOperationCallback:0000000000000000 $t /tmp/cc26Ml62.s:287 .text.HAL_FLASH_EndOfOperationCallback:0000000000000000 HAL_FLASH_EndOfOperationCallback /tmp/cc26Ml62.s:302 .text.HAL_FLASH_OperationErrorCallback:0000000000000000 $t /tmp/cc26Ml62.s:308 .text.HAL_FLASH_OperationErrorCallback:0000000000000000 HAL_FLASH_OperationErrorCallback /tmp/cc26Ml62.s:323 .text.HAL_FLASH_IRQHandler:0000000000000000 $t /tmp/cc26Ml62.s:329 .text.HAL_FLASH_IRQHandler:0000000000000000 HAL_FLASH_IRQHandler /tmp/cc26Ml62.s:616 .text.HAL_FLASH_IRQHandler:000000000000014c $d /tmp/cc26Ml62.s:622 .text.HAL_FLASH_Unlock:0000000000000000 $t /tmp/cc26Ml62.s:628 .text.HAL_FLASH_Unlock:0000000000000000 HAL_FLASH_Unlock /tmp/cc26Ml62.s:673 .text.HAL_FLASH_Unlock:000000000000002c $d /tmp/cc26Ml62.s:679 .text.HAL_FLASH_Lock:0000000000000000 $t /tmp/cc26Ml62.s:685 .text.HAL_FLASH_Lock:0000000000000000 HAL_FLASH_Lock /tmp/cc26Ml62.s:704 .text.HAL_FLASH_Lock:0000000000000010 $d /tmp/cc26Ml62.s:709 .text.HAL_FLASH_OB_Unlock:0000000000000000 $t /tmp/cc26Ml62.s:715 .text.HAL_FLASH_OB_Unlock:0000000000000000 HAL_FLASH_OB_Unlock /tmp/cc26Ml62.s:748 .text.HAL_FLASH_OB_Unlock:0000000000000020 $d /tmp/cc26Ml62.s:754 .text.HAL_FLASH_OB_Lock:0000000000000000 $t /tmp/cc26Ml62.s:760 .text.HAL_FLASH_OB_Lock:0000000000000000 HAL_FLASH_OB_Lock /tmp/cc26Ml62.s:779 .text.HAL_FLASH_OB_Lock:0000000000000010 $d /tmp/cc26Ml62.s:784 .text.HAL_FLASH_OB_Launch:0000000000000000 $t /tmp/cc26Ml62.s:790 .text.HAL_FLASH_OB_Launch:0000000000000000 HAL_FLASH_OB_Launch /tmp/cc26Ml62.s:810 .text.HAL_FLASH_GetError:0000000000000000 $t /tmp/cc26Ml62.s:816 .text.HAL_FLASH_GetError:0000000000000000 HAL_FLASH_GetError /tmp/cc26Ml62.s:832 .text.HAL_FLASH_GetError:0000000000000008 $d /tmp/cc26Ml62.s:837 .text.FLASH_WaitForLastOperation:0000000000000000 $t /tmp/cc26Ml62.s:843 .text.FLASH_WaitForLastOperation:0000000000000000 FLASH_WaitForLastOperation /tmp/cc26Ml62.s:948 .text.FLASH_WaitForLastOperation:0000000000000064 $d /tmp/cc26Ml62.s:953 .text.HAL_FLASH_Program:0000000000000000 $t /tmp/cc26Ml62.s:959 .text.HAL_FLASH_Program:0000000000000000 HAL_FLASH_Program /tmp/cc26Ml62.s:1108 .text.HAL_FLASH_Program:0000000000000098 $d /tmp/cc26Ml62.s:1119 .bss.pFlash:0000000000000000 pFlash /tmp/cc26Ml62.s:1115 .bss.pFlash:0000000000000000 $d UNDEFINED SYMBOLS FLASH_PageErase HAL_NVIC_SystemReset HAL_GetTick