ARM GAS /tmp/ccGUz3uE.s page 1 1 .cpu cortex-m4 2 .arch armv7e-m 3 .fpu fpv4-sp-d16 4 .eabi_attribute 27, 1 5 .eabi_attribute 28, 1 6 .eabi_attribute 20, 1 7 .eabi_attribute 21, 1 8 .eabi_attribute 23, 3 9 .eabi_attribute 24, 1 10 .eabi_attribute 25, 1 11 .eabi_attribute 26, 1 12 .eabi_attribute 30, 1 13 .eabi_attribute 34, 1 14 .eabi_attribute 18, 4 15 .file "stm32g4xx_hal_flash_ex.c" 16 .text 17 .Ltext0: 18 .cfi_sections .debug_frame 19 .file 1 "Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c" 20 .section .text.FLASH_MassErase,"ax",%progbits 21 .align 1 22 .syntax unified 23 .thumb 24 .thumb_func 26 FLASH_MassErase: 27 .LVL0: 28 .LFB336: 1:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 2:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ****************************************************************************** 3:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @file stm32g4xx_hal_flash_ex.c 4:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @author MCD Application Team 5:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Extended FLASH HAL module driver. 6:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This file provides firmware functions to manage the following 7:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * functionalities of the FLASH extended peripheral: 8:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * + Extended programming operations functions 9:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * 10:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** @verbatim 11:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ============================================================================== 12:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ##### Flash Extended features ##### 13:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ============================================================================== 14:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 15:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** [..] Comparing to other previous devices, the FLASH interface for STM32G4xx 16:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** devices contains the following additional features 17:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 18:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (+) Capacity up to 512 Kbytes with dual bank architecture supporting read-while-write 19:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** capability (RWW) 20:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (+) Dual bank 64-bits memory organization with possibility of single bank 128-bits 21:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (+) Protected areas including WRP, PCROP and Securable memory 22:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 23:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ##### How to use this driver ##### 24:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ============================================================================== 25:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** [..] This driver provides functions to configure and program the FLASH memory 26:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** of all STM32G4xx devices. It includes 27:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (#) Flash Memory Erase functions: 28:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and 29:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_FLASH_Lock() functions 30:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Erase function: Erase pages, or mass erase banks ARM GAS /tmp/ccGUz3uE.s page 2 31:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) There are two modes of erase : 32:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (+++) Polling Mode using HAL_FLASHEx_Erase() 33:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (+++) Interrupt Mode using HAL_FLASHEx_Erase_IT() 34:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 35:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (#) Option Bytes Programming function: Use HAL_FLASHEx_OBProgram() to: 36:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Configure the write protection areas (WRP) 37:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Set the Read protection Level (RDP) 38:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Program the user Option Bytes 39:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Configure the Proprietary Code ReadOut protection areas (PCROP) 40:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Configure the Securable memory areas 41:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Configure the Boot Lock 42:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 43:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (#) Get Option Bytes Configuration function: Use HAL_FLASHEx_OBGetConfig() to: 44:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Get the configuration of write protection areas (WRP) 45:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Get the level of read protection (RDP) 46:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Get the value of the user Option Bytes 47:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Get the configuration of Proprietary Code ReadOut Protection areas (PCROP) 48:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Get the configuration of Securable memory areas 49:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Get the status of Boot Lock 50:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 51:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (#) Activation of Securable memory area: Use HAL_FLASHEx_EnableSecMemProtection() 52:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (++) Deny the access to securable memory area 53:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 54:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (#) Enable or disable debugger: Use HAL_FLASHEx_EnableDebugger() or 55:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_FLASHEx_DisableDebugger() 56:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 57:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** @endverbatim 58:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ****************************************************************************** 59:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @attention 60:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * 61:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * Copyright (c) 2019 STMicroelectronics. 62:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * All rights reserved. 63:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * 64:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This software is licensed under terms that can be found in the LICENSE file in 65:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * the root directory of this software component. 66:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * If no LICENSE file comes with this software, it is provided AS-IS. 67:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ****************************************************************************** 68:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 69:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 70:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Includes ------------------------------------------------------------------*/ 71:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #include "stm32g4xx_hal.h" 72:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 73:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** @addtogroup STM32G4xx_HAL_Driver 74:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @{ 75:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 76:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 77:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** @defgroup FLASHEx FLASHEx 78:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief FLASH Extended HAL module driver 79:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @{ 80:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 81:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 82:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #ifdef HAL_FLASH_MODULE_ENABLED 83:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 84:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Private typedef -----------------------------------------------------------*/ 85:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Private define ------------------------------------------------------------*/ 86:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Private macro -------------------------------------------------------------*/ 87:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Private variables ---------------------------------------------------------*/ ARM GAS /tmp/ccGUz3uE.s page 3 88:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Private function prototypes -----------------------------------------------*/ 89:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Private_Functions FLASHEx Private Functions 90:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @{ 91:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 92:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint32_t Banks); 93:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_WRPConfig(uint32_t WRPArea, uint32_t WRPStartOffset, uint32_t WRD 94:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDPConfig(uint32_t RDPLevel); 95:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_UserConfig(uint32_t UserType, uint32_t UserConfig); 96:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_PCROPConfig(uint32_t PCROPConfig, uint32_t PCROPStartAddr, uint32 97:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_OB_GetWRP(uint32_t WRPArea, uint32_t *WRPStartOffset, uint32_t *WRDP 98:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static uint32_t FLASH_OB_GetRDP(void); 99:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static uint32_t FLASH_OB_GetUser(void); 100:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_OB_GetPCROP(uint32_t *PCROPConfig, uint32_t *PCROPStartAddr, uint32_ 101:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_SecMemConfig(uint32_t SecMemBank, uint32_t SecMemSize); 102:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_OB_GetSecMem(uint32_t SecMemBank, uint32_t *SecMemSize); 103:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootLockConfig(uint32_t BootLockConfig); 104:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static uint32_t FLASH_OB_GetBootLock(void); 105:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 106:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 107:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @} 108:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 109:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 110:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Exported functions -------------------------------------------------------*/ 111:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions FLASHEx Exported Functions 112:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @{ 113:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 114:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 115:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** @defgroup FLASHEx_Exported_Functions_Group1 Extended IO operation functions 116:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Extended IO operation functions 117:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * 118:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** @verbatim 119:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** =============================================================================== 120:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ##### Extended programming operation functions ##### 121:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** =============================================================================== 122:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** [..] 123:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** This subsection provides a set of functions allowing to manage the Extended FLASH 124:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** programming operations Operations. 125:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 126:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** @endverbatim 127:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @{ 128:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 129:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 130:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Perform a mass erase or erase the specified FLASH memory pages. 131:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[in] pEraseInit pointer to an FLASH_EraseInitTypeDef structure that 132:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * contains the configuration information for the erasing. 133:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[out] PageError pointer to variable that contains the configuration 134:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * information on faulty page in case of error (0xFFFFFFFF means that all 135:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * the pages have been correctly erased). 136:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 137:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 138:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError) 139:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 140:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 141:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t page_index; 142:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 143:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 144:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase)); ARM GAS /tmp/ccGUz3uE.s page 4 145:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 146:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Process Locked */ 147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash); 148:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 149:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 150:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 151:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 152:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status == HAL_OK) 153:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 154:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; 155:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 156:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Deactivate the cache if they are activated to avoid data misbehavior */ 157:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->ACR, FLASH_ACR_ICEN) != 0U) 158:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 159:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != 0U) 160:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 161:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Disable data cache */ 162:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_DISABLE(); 163:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_ICACHE_DCACHE_ENABLED; 164:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 165:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 166:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 167:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_ICACHE_ENABLED; 168:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 169:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 170:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != 0U) 171:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 172:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Disable data cache */ 173:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_DISABLE(); 174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_DCACHE_ENABLED; 175:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 176:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 177:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 178:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_DISABLED; 179:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 180:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE) 182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 183:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Mass erase to be done */ 184:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_MassErase(pEraseInit->Banks); 185:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 186:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 187:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 188:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 189:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 190:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* If the erase operation is completed, disable the MER1 and MER2 Bits */ 191:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_MER1 | FLASH_CR_MER2)); 192:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 193:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* If the erase operation is completed, disable the MER1 Bit */ 194:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_MER1)); 195:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 196:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 197:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 198:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 199:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /*Initialization of PageError variable*/ 200:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PageError = 0xFFFFFFFFU; 201:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ARM GAS /tmp/ccGUz3uE.s page 5 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** for (page_index = pEraseInit->Page; page_index < (pEraseInit->Page + pEraseInit->NbPages); pa 203:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 204:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_PageErase(page_index, pEraseInit->Banks); 205:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 206:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 207:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 208:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 209:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* If the erase operation is completed, disable the PER Bit */ 210:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_PER | FLASH_CR_PNB)); 211:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 212:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status != HAL_OK) 213:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 214:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* In case of error, stop erase procedure and return the faulty page */ 215:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PageError = page_index; 216:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** break; 217:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 218:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 219:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 220:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 221:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Flush the caches to be sure of the data consistency */ 222:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_FlushCaches(); 223:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 224:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 225:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Process Unlocked */ 226:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash); 227:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 228:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 229:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 230:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 231:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 232:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Perform a mass erase or erase the specified FLASH memory pages with interrupt enabled. 233:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param pEraseInit pointer to an FLASH_EraseInitTypeDef structure that 234:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * contains the configuration information for the erasing. 235:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 236:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 237:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) 238:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 239:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 240:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 241:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Process Locked */ 242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash); 243:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 244:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 245:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase)); 246:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 247:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; 248:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Deactivate the cache if they are activated to avoid data misbehavior */ 250:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->ACR, FLASH_ACR_ICEN) != 0U) 251:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != 0U) 253:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 254:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Disable data cache */ 255:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_DISABLE(); 256:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_ICACHE_DCACHE_ENABLED; 257:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 258:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else ARM GAS /tmp/ccGUz3uE.s page 6 259:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_ICACHE_ENABLED; 261:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 262:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) != 0U) 264:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 265:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Disable data cache */ 266:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_DISABLE(); 267:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_DCACHE_ENABLED; 268:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 269:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 270:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 271:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_DISABLED; 272:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 273:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 274:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable End of Operation and Error interrupts */ 275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP | FLASH_IT_OPERR); 276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 277:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.Bank = pEraseInit->Banks; 278:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 279:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (pEraseInit->TypeErase == FLASH_TYPEERASE_MASSERASE) 280:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 281:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Mass erase to be done */ 282:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_MASS_ERASE; 283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_MassErase(pEraseInit->Banks); 284:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 285:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 286:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 287:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Erase by page to be done */ 288:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.ProcedureOnGoing = FLASH_PROC_PAGE_ERASE; 289:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.NbPagesToErase = pEraseInit->NbPages; 290:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.Page = pEraseInit->Page; 291:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 292:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /*Erase 1st page and wait for IT */ 293:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_PageErase(pEraseInit->Page, pEraseInit->Banks); 294:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 295:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 296:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 297:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 298:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 299:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 300:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Program Option bytes. 301:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that 302:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * contains the configuration information for the programming. 303:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note To configure any option bytes, the option lock bit OPTLOCK must be 304:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * cleared with the call of HAL_FLASH_OB_Unlock() function. 305:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note New option bytes configuration will be taken into account in two cases: 306:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after an option bytes launch through the call of HAL_FLASH_OB_Launch() 307:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after a power reset (BOR reset or exit from Standby/Shutdown modes) 308:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 309:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 310:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit) 311:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 312:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 313:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 314:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 315:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OPTIONBYTE(pOBInit->OptionType)); ARM GAS /tmp/ccGUz3uE.s page 7 316:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 317:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Process Locked */ 318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_LOCK(&pFlash); 319:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; 321:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 322:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Write protection configuration */ 323:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_WRP) != 0U) 324:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 325:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure of Write protection on the selected area */ 326:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (FLASH_OB_WRPConfig(pOBInit->WRPArea, pOBInit->WRPStartOffset, pOBInit->WRPEndOffset) != HAL 327:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = HAL_ERROR; 329:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 330:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 331:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 332:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Read protection configuration */ 333:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_RDP) != 0U) 334:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 335:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the Read protection level */ 336:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (FLASH_OB_RDPConfig(pOBInit->RDPLevel) != HAL_OK) 337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 338:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = HAL_ERROR; 339:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 340:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 342:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* User Configuration */ 343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_USER) != 0U) 344:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 345:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the user option bytes */ 346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (FLASH_OB_UserConfig(pOBInit->USERType, pOBInit->USERConfig) != HAL_OK) 347:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 348:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = HAL_ERROR; 349:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 350:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 351:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 352:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* PCROP Configuration */ 353:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_PCROP) != 0U) 354:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 355:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (pOBInit->PCROPStartAddr != pOBInit->PCROPEndAddr) 356:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 357:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the Proprietary code readout protection */ 358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (FLASH_OB_PCROPConfig(pOBInit->PCROPConfig, pOBInit->PCROPStartAddr, pOBInit->PCROPEndAddr 359:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 360:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = HAL_ERROR; 361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 362:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 363:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 364:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 365:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Securable memory Configuration */ 366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_SEC) != 0U) 367:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 368:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the securable memory area */ 369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (FLASH_OB_SecMemConfig(pOBInit->SecBank, pOBInit->SecSize) != HAL_OK) 370:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 371:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = HAL_ERROR; 372:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } ARM GAS /tmp/ccGUz3uE.s page 8 373:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 374:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 375:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Boot Entry Point Configuration */ 376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->OptionType & OPTIONBYTE_BOOT_LOCK) != 0U) 377:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 378:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the boot unique entry point option */ 379:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (FLASH_OB_BootLockConfig(pOBInit->BootEntryPoint) != HAL_OK) 380:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 381:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = HAL_ERROR; 382:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 383:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 384:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 385:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Process Unlocked */ 386:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_UNLOCK(&pFlash); 387:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 388:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 389:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 390:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 391:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 392:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Get the Option bytes configuration. 393:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param pOBInit pointer to an FLASH_OBInitStruct structure that contains the 394:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * configuration information. 395:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note The fields pOBInit->WRPArea and pOBInit->PCROPConfig should indicate 396:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * which area is requested for the WRP and PCROP, else no information will be returned. 397:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 398:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 399:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit) 400:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 401:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->OptionType = (OPTIONBYTE_RDP | OPTIONBYTE_USER); 402:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 404:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->WRPArea == OB_WRPAREA_BANK1_AREAA) || (pOBInit->WRPArea == OB_WRPAREA_BANK1_AREAB) 405:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (pOBInit->WRPArea == OB_WRPAREA_BANK2_AREAA) || (pOBInit->WRPArea == OB_WRPAREA_BANK2_AREAB)) 406:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 407:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->WRPArea == OB_WRPAREA_BANK1_AREAA) || (pOBInit->WRPArea == OB_WRPAREA_BANK1_AREAB)) 408:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 409:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->OptionType |= OPTIONBYTE_WRP; 411:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get write protection on the selected area */ 412:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_OB_GetWRP(pOBInit->WRPArea, &(pOBInit->WRPStartOffset), &(pOBInit->WRPEndOffset)); 413:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 414:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 415:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get Read protection level */ 416:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->RDPLevel = FLASH_OB_GetRDP(); 417:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 418:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the user option bytes */ 419:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->USERConfig = FLASH_OB_GetUser(); 420:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 421:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 422:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->PCROPConfig == FLASH_BANK_1) || (pOBInit->PCROPConfig == FLASH_BANK_2)) 423:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 424:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (pOBInit->PCROPConfig == FLASH_BANK_1) 425:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 426:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 427:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->OptionType |= OPTIONBYTE_PCROP; 428:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the Proprietary code readout protection */ 429:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_OB_GetPCROP(&(pOBInit->PCROPConfig), &(pOBInit->PCROPStartAddr), &(pOBInit->PCROPEndAddr) ARM GAS /tmp/ccGUz3uE.s page 9 430:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 431:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 432:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->OptionType |= OPTIONBYTE_BOOT_LOCK; 433:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 434:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the boot entry point */ 435:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->BootEntryPoint = FLASH_OB_GetBootLock(); 436:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 437:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the securable memory area configuration */ 438:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 439:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((pOBInit->SecBank == FLASH_BANK_1) || (pOBInit->SecBank == FLASH_BANK_2)) 440:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 441:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (pOBInit->SecBank == FLASH_BANK_1) 442:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 443:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 444:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->OptionType |= OPTIONBYTE_SEC; 445:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_OB_GetSecMem(pOBInit->SecBank, &(pOBInit->SecSize)); 446:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 447:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 448:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 449:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 450:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Enable the FLASH Securable Memory protection. 451:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param Bank: Bank to be protected 452:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 453:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be protected 454:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be protected (*) 455:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be protected (*) 456:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 457:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL Status 458:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 459:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef HAL_FLASHEx_EnableSecMemProtection(uint32_t Bank) 460:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 461:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 462:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->OPTR, FLASH_OPTR_DBANK) != 0U) 463:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 464:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 465:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Bank)); 466:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 467:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable the Securable Memory Protection Bit for the bank 1 if requested */ 468:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((Bank & FLASH_BANK_1) != 0U) 469:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 470:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_SEC_PROT1); 471:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 472:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 473:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable the Securable Memory Protection Bit for the bank 2 if requested */ 474:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((Bank & FLASH_BANK_2) != 0U) 475:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 476:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_SEC_PROT2); 477:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 478:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 479:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 480:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 481:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_SEC_PROT1); 482:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 483:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 484:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Prevent unused argument(s) compilation warning */ 485:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** UNUSED(Bank); 486:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_SEC_PROT1); ARM GAS /tmp/ccGUz3uE.s page 10 487:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif /* FLASH_OPTR_DBANK */ 488:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 489:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return HAL_OK; 490:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 491:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 492:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 493:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Enable Debugger. 494:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note After calling this API, flash interface allow debugger intrusion. 495:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 496:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 497:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** void HAL_FLASHEx_EnableDebugger(void) 498:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 499:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->ACR |= FLASH_ACR_DBG_SWEN; 500:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 501:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 502:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 503:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 504:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Disable Debugger. 505:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note After calling this API, Debugger is disabled: it's no more possible to 506:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * break, see CPU register, etc... 507:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 508:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 509:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** void HAL_FLASHEx_DisableDebugger(void) 510:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 511:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->ACR &= ~FLASH_ACR_DBG_SWEN; 512:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 513:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 514:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 515:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @} 516:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 517:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 518:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 519:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @} 520:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 521:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 522:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Private functions ---------------------------------------------------------*/ 523:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 524:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** @addtogroup FLASHEx_Private_Functions 525:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @{ 526:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 527:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 528:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Mass erase of FLASH memory. 529:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param Banks Banks to be erased. 530:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 531:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Bank1 to be erased 532:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Bank2 to be erased (*) 533:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_BOTH: Bank1 and Bank2 to be erased (*) 534:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 535:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 536:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 537:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_MassErase(uint32_t Banks) 538:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 29 .loc 1 538 1 view -0 30 .cfi_startproc 31 @ args = 0, pretend = 0, frame = 0 32 @ frame_needed = 0, uses_anonymous_args = 0 33 @ link register save eliminated. ARM GAS /tmp/ccGUz3uE.s page 11 539:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 540:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->OPTR, FLASH_OPTR_DBANK) != 0U) 541:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 542:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 543:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 544:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK(Banks)); 34 .loc 1 544 5 view .LVU1 545:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 546:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set the Mass Erase Bit for the bank 1 if requested */ 547:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((Banks & FLASH_BANK_1) != 0U) 35 .loc 1 547 5 view .LVU2 36 .loc 1 547 8 is_stmt 0 view .LVU3 37 0000 10F0010F tst r0, #1 38 0004 04D0 beq .L2 548:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 549:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_MER1); 39 .loc 1 549 7 is_stmt 1 view .LVU4 40 0006 054A ldr r2, .L3 41 0008 5369 ldr r3, [r2, #20] 42 000a 43F00403 orr r3, r3, #4 43 000e 5361 str r3, [r2, #20] 44 .L2: 550:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 551:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 552:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 553:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set the Mass Erase Bit for the bank 2 if requested */ 554:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((Banks & FLASH_BANK_2) != 0U) 555:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 556:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_MER2); 557:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 558:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 559:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 560:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 561:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 562:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 563:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, (FLASH_CR_MER1 | FLASH_CR_MER2)); 564:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 565:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 566:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 567:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Proceed to erase all sectors */ 568:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_STRT); 45 .loc 1 568 3 view .LVU5 46 0010 024A ldr r2, .L3 47 0012 5369 ldr r3, [r2, #20] 48 0014 43F48033 orr r3, r3, #65536 49 0018 5361 str r3, [r2, #20] 569:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 50 .loc 1 569 1 is_stmt 0 view .LVU6 51 001a 7047 bx lr 52 .L4: 53 .align 2 54 .L3: 55 001c 00200240 .word 1073881088 56 .cfi_endproc 57 .LFE336: 59 .section .text.FLASH_OB_GetSecMem,"ax",%progbits 60 .align 1 ARM GAS /tmp/ccGUz3uE.s page 12 61 .syntax unified 62 .thumb 63 .thumb_func 65 FLASH_OB_GetSecMem: 66 .LVL1: 67 .LFB345: 570:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 571:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 572:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Erase the specified FLASH memory page. 573:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param Page FLASH page to erase. 574:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter must be a value between 0 and (max number of pages in the bank - 1). 575:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param Banks Bank where the page will be erased. 576:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 577:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Page in bank 1 to be erased 578:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Page in bank 2 to be erased (*) 579:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 580:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 581:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 582:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** void FLASH_PageErase(uint32_t Page, uint32_t Banks) 583:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 584:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 585:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_PAGE(Page)); 586:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 587:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 588:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->OPTR, FLASH_OPTR_DBANK) == 0U) 589:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 590:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_BKER); 591:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 592:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 593:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 594:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK_EXCLUSIVE(Banks)); 595:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 596:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((Banks & FLASH_BANK_1) != 0U) 597:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 598:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_BKER); 599:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 600:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 601:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 602:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_BKER); 603:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 604:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 605:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 606:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Prevent unused argument(s) compilation warning */ 607:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** UNUSED(Banks); 608:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif /* FLASH_OPTR_DBANK */ 609:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 610:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Proceed to erase the page */ 611:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->CR, FLASH_CR_PNB, ((Page & 0xFFU) << FLASH_CR_PNB_Pos)); 612:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_PER); 613:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_STRT); 614:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 615:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 616:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 617:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Flush the instruction and data caches. 618:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 619:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 620:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** void FLASH_FlushCaches(void) ARM GAS /tmp/ccGUz3uE.s page 13 621:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 622:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_CacheTypeDef cache = pFlash.CacheToReactivate; 623:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 624:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Flush instruction cache */ 625:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((cache == FLASH_CACHE_ICACHE_ENABLED) || 626:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 627:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 628:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Disable instruction cache */ 629:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_DISABLE(); 630:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Reset instruction cache */ 631:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_RESET(); 632:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable instruction cache */ 633:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_INSTRUCTION_CACHE_ENABLE(); 634:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 635:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 636:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Flush data cache */ 637:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((cache == FLASH_CACHE_DCACHE_ENABLED) || 638:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 639:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 640:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Reset data cache */ 641:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_RESET(); 642:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable data cache */ 643:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** __HAL_FLASH_DATA_CACHE_ENABLE(); 644:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 645:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 646:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Reset internal variable */ 647:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_DISABLED; 648:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 649:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 650:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 651:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Configure the write protection area into Option Bytes. 652:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note When the memory read protection level is selected (RDP level = 1), 653:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * it is not possible to program or erase Flash memory if the CPU debug 654:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * features are connected (JTAG or single wire) or boot code is being 655:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * executed from RAM or System flash, even if WRP is not activated. 656:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note To configure any option bytes, the option lock bit OPTLOCK must be 657:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * cleared with the call of HAL_FLASH_OB_Unlock() function. 658:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note New option bytes configuration will be taken into account in two cases: 659:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after an option bytes launch through the call of HAL_FLASH_OB_Launch() 660:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after a power reset (BOR reset or exit from Standby/Shutdown modes) 661:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param WRPArea specifies the area to be configured. 662:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 663:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK1_AREAA: Flash Bank 1 Area A 664:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK1_AREAB: Flash Bank 1 Area B 665:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK2_AREAA: Flash Bank 2 Area A (*) 666:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK2_AREAB: Flash Bank 2 Area B (*) 667:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 668:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param WRPStartOffset specifies the start page of the write protected area. 669:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be page number between 0 and (max number of pages in the bank - 1). 670:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param WRDPEndOffset specifies the end page of the write protected area. 671:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be page number between WRPStartOffset and (max number of pages in th 672:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 673:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 674:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_WRPConfig(uint32_t WRPArea, uint32_t WRPStartOffset, uint32_t WRD 675:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 676:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 677:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ARM GAS /tmp/ccGUz3uE.s page 14 678:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 679:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_WRPAREA(WRPArea)); 680:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_PAGE(WRPStartOffset)); 681:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_PAGE(WRDPEndOffset)); 682:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 683:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 684:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 685:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status == HAL_OK) 687:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 688:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the write protected area */ 689:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (WRPArea == OB_WRPAREA_BANK1_AREAA) 690:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 691:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->WRP1AR = ((WRDPEndOffset << FLASH_WRP1AR_WRP1A_END_Pos) | WRPStartOffset); 692:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 693:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (WRPArea == OB_WRPAREA_BANK1_AREAB) 694:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 695:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->WRP1BR = ((WRDPEndOffset << FLASH_WRP1BR_WRP1B_END_Pos) | WRPStartOffset); 696:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 697:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 698:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (WRPArea == OB_WRPAREA_BANK2_AREAA) 699:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 700:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->WRP2AR = ((WRDPEndOffset << FLASH_WRP2AR_WRP2A_END_Pos) | WRPStartOffset); 701:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 702:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (WRPArea == OB_WRPAREA_BANK2_AREAB) 703:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 704:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->WRP2BR = ((WRDPEndOffset << FLASH_WRP2BR_WRP2B_END_Pos) | WRPStartOffset); 705:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 706:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 707:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 708:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 709:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 710:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 711:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 712:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set OPTSTRT Bit */ 713:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT); 714:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 715:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 716:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 717:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 718:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 719:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 720:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 721:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 722:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 723:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Set the read protection level into Option Bytes. 724:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note To configure any option bytes, the option lock bit OPTLOCK must be 725:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * cleared with the call of HAL_FLASH_OB_Unlock() function. 726:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note New option bytes configuration will be taken into account in two cases: 727:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after an option bytes launch through the call of HAL_FLASH_OB_Launch() 728:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after a power reset (BOR reset or exit from Standby/Shutdown modes) 729:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note !!! Warning : When enabling OB_RDP level 2 it's no more possible 730:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * to go back to level 1 or 0 !!! 731:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param RDPLevel specifies the read protection level. 732:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 733:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection 734:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Memory Read protection ARM GAS /tmp/ccGUz3uE.s page 15 735:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection 736:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * 737:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 738:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 739:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_RDPConfig(uint32_t RDPLevel) 740:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 741:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 742:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 743:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 744:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_RDP_LEVEL(RDPLevel)); 745:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 746:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 747:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 748:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 749:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status == HAL_OK) 750:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 751:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the RDP level in the option bytes register */ 752:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->OPTR, FLASH_OPTR_RDP, RDPLevel); 753:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 754:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set OPTSTRT Bit */ 755:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT); 756:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 757:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 758:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 759:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 760:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 761:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 762:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 763:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 764:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 765:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Program the FLASH User Option Bytes. 766:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note To configure any option bytes, the option lock bit OPTLOCK must be 767:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * cleared with the call of HAL_FLASH_OB_Unlock() function. 768:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note New option bytes configuration will be taken into account in two cases: 769:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after an option bytes launch through the call of HAL_FLASH_OB_Launch() 770:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after a power reset (BOR reset or exit from Standby/Shutdown modes) 771:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param UserType The FLASH User Option Bytes to be modified. 772:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be a combination of @ref FLASH_OB_USER_Type. 773:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param UserConfig The selected User Option Bytes values: 774:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be a combination of @ref FLASH_OB_USER_BOR_LEVEL, 775:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_nRST_STOP, @ref FLASH_OB_USER_nRST_STANDBY , 776:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_nRST_SHUTDOWN, @ref FLASH_OB_USER_IWDG_SW, 777:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_IWDG_STOP, @ref FLASH_OB_USER_IWDG_STANDBY, 778:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_WWDG_SW, @ref FLASH_OB_USER_WWDG_SW, 779:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_BFB2 (*), @ref FLASH_OB_USER_nBOOT1, 780:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_SRAM_PE, @ref FLASH_OB_USER_CCMSRAM_RST, 781:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_nSWBOOT0, @ref FLASH_OB_USER_nBOOT0, 782:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_NRST_MODE, @ref FLASH_OB_USER_INTERNAL_RESET_HOLDER 783:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 784:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 785:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 786:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_UserConfig(uint32_t UserType, uint32_t UserConfig) 787:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 788:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t optr_reg_val = 0; 789:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t optr_reg_mask = 0; 790:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 791:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ARM GAS /tmp/ccGUz3uE.s page 16 792:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 793:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_TYPE(UserType)); 794:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 795:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 796:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 797:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 798:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status == HAL_OK) 799:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 800:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined(FLASH_OPTR_PB4_PUPEN) 801:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_PB4_PUPEN) != 0U) 802:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 803:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* PB4_PUPEN option byte should be modified */ 804:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_PB4_PUPEN(UserConfig & FLASH_OPTR_PB4_PUPEN)); 805:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 806:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for PB4_PUPEN option byte */ 807:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_PB4_PUPEN); 808:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_PB4_PUPEN; 809:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 810:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif /* FLASH_OPTR_PB4_PUPEN */ 811:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 812:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_BOR_LEV) != 0U) 813:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 814:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* BOR level option byte should be modified */ 815:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_BOR_LEVEL(UserConfig & FLASH_OPTR_BOR_LEV)); 816:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 817:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for BOR level option byte */ 818:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_BOR_LEV); 819:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_BOR_LEV; 820:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 821:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 822:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_nRST_STOP) != 0U) 823:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 824:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* nRST_STOP option byte should be modified */ 825:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_STOP(UserConfig & FLASH_OPTR_nRST_STOP)); 826:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 827:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for nRST_STOP option byte */ 828:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_nRST_STOP); 829:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STOP; 830:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 831:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 832:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_nRST_STDBY) != 0U) 833:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 834:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* nRST_STDBY option byte should be modified */ 835:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_STANDBY(UserConfig & FLASH_OPTR_nRST_STDBY)); 836:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 837:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for nRST_STDBY option byte */ 838:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_nRST_STDBY); 839:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STDBY; 840:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 841:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 842:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_nRST_SHDW) != 0U) 843:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 844:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* nRST_SHDW option byte should be modified */ 845:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_SHUTDOWN(UserConfig & FLASH_OPTR_nRST_SHDW)); 846:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 847:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for nRST_SHDW option byte */ 848:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_nRST_SHDW); ARM GAS /tmp/ccGUz3uE.s page 17 849:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_SHDW; 850:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 851:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 852:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_IWDG_SW) != 0U) 853:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 854:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* IWDG_SW option byte should be modified */ 855:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_IWDG(UserConfig & FLASH_OPTR_IWDG_SW)); 856:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 857:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for IWDG_SW option byte */ 858:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_IWDG_SW); 859:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_SW; 860:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 861:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 862:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_IWDG_STOP) != 0U) 863:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 864:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* IWDG_STOP option byte should be modified */ 865:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_IWDG_STOP(UserConfig & FLASH_OPTR_IWDG_STOP)); 866:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 867:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for IWDG_STOP option byte */ 868:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_IWDG_STOP); 869:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STOP; 870:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 871:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 872:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_IWDG_STDBY) != 0U) 873:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 874:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* IWDG_STDBY option byte should be modified */ 875:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_IWDG_STDBY(UserConfig & FLASH_OPTR_IWDG_STDBY)); 876:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 877:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for IWDG_STDBY option byte */ 878:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_IWDG_STDBY); 879:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STDBY; 880:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 881:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 882:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_WWDG_SW) != 0U) 883:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 884:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* WWDG_SW option byte should be modified */ 885:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_WWDG(UserConfig & FLASH_OPTR_WWDG_SW)); 886:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 887:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for WWDG_SW option byte */ 888:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_WWDG_SW); 889:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_WWDG_SW; 890:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 891:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 892:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_BFB2) 893:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_BFB2) != 0U) 894:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 895:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* BFB2 option byte should be modified */ 896:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_BFB2(UserConfig & FLASH_OPTR_BFB2)); 897:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 898:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for BFB2 option byte */ 899:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_BFB2); 900:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_BFB2; 901:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 902:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 903:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 904:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_nBOOT1) != 0U) 905:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { ARM GAS /tmp/ccGUz3uE.s page 18 906:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* nBOOT1 option byte should be modified */ 907:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_BOOT1(UserConfig & FLASH_OPTR_nBOOT1)); 908:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 909:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for nBOOT1 option byte */ 910:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_nBOOT1); 911:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT1; 912:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 913:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 914:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_SRAM_PE) != 0U) 915:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 916:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* SRAM_PE option byte should be modified */ 917:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_SRAM_PARITY(UserConfig & FLASH_OPTR_SRAM_PE)); 918:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 919:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for SRAM_PE option byte */ 920:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_SRAM_PE); 921:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_SRAM_PE; 922:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 923:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_CCMSRAM_RST) != 0U) 924:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 925:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* CCMSRAM_RST option byte should be modified */ 926:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_CCMSRAM_RST(UserConfig & FLASH_OPTR_CCMSRAM_RST)); 927:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 928:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for CCMSRAM_RST option byte */ 929:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_CCMSRAM_RST); 930:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_CCMSRAM_RST; 931:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 932:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_nSWBOOT0) != 0U) 933:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 934:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* nSWBOOT0 option byte should be modified */ 935:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_SWBOOT0(UserConfig & FLASH_OPTR_nSWBOOT0)); 936:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 937:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for nSWBOOT0 option byte */ 938:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_nSWBOOT0); 939:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nSWBOOT0; 940:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 941:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 942:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_nBOOT0) != 0U) 943:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 944:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* nBOOT0 option byte should be modified */ 945:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_BOOT0(UserConfig & FLASH_OPTR_nBOOT0)); 946:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 947:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for nBOOT0 option byte */ 948:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_nBOOT0); 949:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT0; 950:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 951:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 952:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_NRST_MODE) != 0U) 953:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 954:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Reset Configuration option byte should be modified */ 955:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_NRST_MODE(UserConfig & FLASH_OPTR_NRST_MODE)); 956:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 957:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for Reset Configuration option byte */ 958:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_NRST_MODE); 959:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_NRST_MODE; 960:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 961:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 962:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((UserType & OB_USER_IRHEN) != 0U) ARM GAS /tmp/ccGUz3uE.s page 19 963:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 964:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* IRH option byte should be modified */ 965:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_USER_IRHEN(UserConfig & FLASH_OPTR_IRHEN)); 966:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 967:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set value and mask for IRH option byte */ 968:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_val |= (UserConfig & FLASH_OPTR_IRHEN); 969:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IRHEN; 970:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 971:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 972:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the option bytes register */ 973:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->OPTR, optr_reg_mask, optr_reg_val); 974:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 975:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set OPTSTRT Bit */ 976:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT); 977:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 978:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 979:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 980:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 981:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 982:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 983:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 984:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 985:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 986:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Configure the Proprietary code readout protection area into Option Bytes. 987:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note To configure any option bytes, the option lock bit OPTLOCK must be 988:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * cleared with the call of HAL_FLASH_OB_Unlock() function. 989:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note New option bytes configuration will be taken into account in two cases: 990:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after an option bytes launch through the call of HAL_FLASH_OB_Launch() 991:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after a power reset (BOR reset or exit from Standby/Shutdown modes) 992:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param PCROPConfig specifies the configuration (Bank to be configured and PCROP_RDP option). 993:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter must be a combination of FLASH_BANK_1 or FLASH_BANK_2 (*) 994:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * with OB_PCROP_RDP_NOT_ERASE or OB_PCROP_RDP_ERASE. 995:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 996:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param PCROPStartAddr specifies the start address of the Proprietary code readout protection. 997:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be an address between begin and end of the bank. 998:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param PCROPEndAddr specifies the end address of the Proprietary code readout protection. 999:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be an address between PCROPStartAddr and end of the bank. 1000:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 1001:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1002:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_PCROPConfig(uint32_t PCROPConfig, uint32_t PCROPStartAddr, uint32 1003:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1004:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 1005:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t reg_value; 1006:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t bank1_addr; 1007:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1008:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t bank2_addr; 1009:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1010:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1011:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 1012:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK_EXCLUSIVE(PCROPConfig & FLASH_BANK_BOTH)); 1013:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP_RDP(PCROPConfig & FLASH_PCROP1ER_PCROP_RDP)); 1014:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROPStartAddr)); 1015:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROPEndAddr)); 1016:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1017:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1018:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1019:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ARM GAS /tmp/ccGUz3uE.s page 20 1020:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status == HAL_OK) 1021:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1022:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1023:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the information about the bank swapping */ 1024:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_FB_MODE) == 0U) 1025:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1026:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank1_addr = FLASH_BASE; 1027:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank2_addr = FLASH_BASE + FLASH_BANK_SIZE; 1028:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1029:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1030:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1031:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank1_addr = FLASH_BASE + FLASH_BANK_SIZE; 1032:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank2_addr = FLASH_BASE; 1033:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1034:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 1035:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank1_addr = FLASH_BASE; 1036:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1037:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1038:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1039:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->OPTR, FLASH_OPTR_DBANK) == 0U) 1040:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1041:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the Proprietary code readout protection */ 1042:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((PCROPConfig & FLASH_BANK_BOTH) == FLASH_BANK_1) 1043:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1044:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPStartAddr - FLASH_BASE) >> 4); 1045:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1SR, FLASH_PCROP1SR_PCROP1_STRT, reg_value); 1046:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1047:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPEndAddr - FLASH_BASE) >> 4); 1048:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1ER, FLASH_PCROP1ER_PCROP1_END, reg_value); 1049:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1050:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if ((PCROPConfig & FLASH_BANK_BOTH) == FLASH_BANK_2) 1051:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1052:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPStartAddr - FLASH_BASE) >> 4); 1053:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP2SR, FLASH_PCROP2SR_PCROP2_STRT, reg_value); 1054:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1055:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPEndAddr - FLASH_BASE) >> 4); 1056:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP2ER, FLASH_PCROP2ER_PCROP2_END, reg_value); 1057:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1058:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1059:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1060:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 1061:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1062:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1063:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1064:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1065:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1066:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the Proprietary code readout protection */ 1067:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((PCROPConfig & FLASH_BANK_BOTH) == FLASH_BANK_1) 1068:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1069:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPStartAddr - bank1_addr) >> 3); 1070:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1SR, FLASH_PCROP1SR_PCROP1_STRT, reg_value); 1071:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1072:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPEndAddr - bank1_addr) >> 3); 1073:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1ER, FLASH_PCROP1ER_PCROP1_END, reg_value); 1074:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1075:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1076:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if ((PCROPConfig & FLASH_BANK_BOTH) == FLASH_BANK_2) ARM GAS /tmp/ccGUz3uE.s page 21 1077:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1078:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPStartAddr - bank2_addr) >> 3); 1079:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP2SR, FLASH_PCROP2SR_PCROP2_STRT, reg_value); 1080:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1081:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = ((PCROPEndAddr - bank2_addr) >> 3); 1082:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP2ER, FLASH_PCROP2ER_PCROP2_END, reg_value); 1083:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1084:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1085:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1086:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1087:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 1088:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1089:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1090:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1091:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1ER, FLASH_PCROP1ER_PCROP_RDP, (PCROPConfig & FLASH_PCROP1ER_PCROP_RDP)) 1092:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1093:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set OPTSTRT Bit */ 1094:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT); 1095:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1096:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1097:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1098:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1099:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1100:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 1101:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1102:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1103:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1104:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Configure the Securable memory area into Option Bytes. 1105:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note To configure any option bytes, the option lock bit OPTLOCK must be 1106:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * cleared with the call of HAL_FLASH_OB_Unlock() function. 1107:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note New option bytes configuration will be taken into account in two cases: 1108:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after an option bytes launch through the call of HAL_FLASH_OB_Launch() 1109:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after a power reset (BOR reset or exit from Standby/Shutdown modes) 1110:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param SecBank specifies bank of securable memory area to be configured. 1111:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1112:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Securable memory in Bank1 to be configured 1113:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Securable memory in Bank2 to be configured (*) 1114:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 1115:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param SecSize specifies the number of pages of the Securable memory area, 1116:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * starting from first page of the bank. 1117:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be page number between 0 and (max number of pages in the bank - 1) 1118:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL Status 1119:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1120:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_SecMemConfig(uint32_t SecBank, uint32_t SecSize) 1121:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1122:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 1123:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1124:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 1125:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_BANK_EXCLUSIVE(SecBank)); 1126:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_SECMEM_SIZE(SecSize)); 1127:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1128:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1129:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1130:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1131:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status == HAL_OK) 1132:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1133:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Configure the write protected area */ ARM GAS /tmp/ccGUz3uE.s page 22 1134:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (SecBank == FLASH_BANK_1) 1135:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1136:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->SEC1R, FLASH_SEC1R_SEC_SIZE1, SecSize); 1137:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1138:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1139:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (SecBank == FLASH_BANK_2) 1140:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1141:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->SEC2R, FLASH_SEC2R_SEC_SIZE2, SecSize); 1142:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1143:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1144:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1145:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 1146:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1148:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1149:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set OPTSTRT Bit */ 1150:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT); 1151:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1152:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1153:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1154:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1155:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1156:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 1157:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1158:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1159:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1160:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Configure the Boot Lock into Option Bytes. 1161:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note To configure any option bytes, the option lock bit OPTLOCK must be 1162:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * cleared with the call of HAL_FLASH_OB_Unlock() function. 1163:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note New option bytes configuration will be taken into account in two cases: 1164:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after an option bytes launch through the call of HAL_FLASH_OB_Launch() 1165:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * - after a power reset (BOR reset or exit from Standby/Shutdown modes) 1166:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param BootLockConfig specifies the boot lock configuration. 1167:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1168:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_BOOT_LOCK_ENABLE: Enable Boot Lock 1169:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_BOOT_LOCK_DISABLE: Disable Boot Lock 1170:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * 1171:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval HAL_Status 1172:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1173:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static HAL_StatusTypeDef FLASH_OB_BootLockConfig(uint32_t BootLockConfig) 1174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1175:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 1176:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1177:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 1178:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_BOOT_LOCK(BootLockConfig)); 1179:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1180:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ 1181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1183:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (status == HAL_OK) 1184:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1185:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->SEC1R, FLASH_SEC1R_BOOT_LOCK, BootLockConfig); 1186:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1187:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Set OPTSTRT Bit */ 1188:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT); 1189:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1190:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Wait for last operation to be completed */ ARM GAS /tmp/ccGUz3uE.s page 23 1191:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE); 1192:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1193:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1194:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return status; 1195:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1196:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1197:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1198:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Return the Securable memory area configuration into Option Bytes. 1199:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[in] SecBank specifies the bank where securable memory area is located. 1200:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1201:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_1: Securable memory in Bank1 1202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg FLASH_BANK_2: Securable memory in Bank2 (*) 1203:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 1204:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[out] SecSize specifies the number of pages used in the securable 1205:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** memory area of the bank. 1206:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 1207:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1208:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_OB_GetSecMem(uint32_t SecBank, uint32_t *SecSize) 1209:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 68 .loc 1 1209 1 is_stmt 1 view -0 69 .cfi_startproc 70 @ args = 0, pretend = 0, frame = 0 71 @ frame_needed = 0, uses_anonymous_args = 0 72 @ link register save eliminated. 1210:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the configuration of the securable memory area */ 1211:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (SecBank == FLASH_BANK_1) 73 .loc 1 1211 3 view .LVU8 74 .loc 1 1211 6 is_stmt 0 view .LVU9 75 0000 0128 cmp r0, #1 76 0002 00D0 beq .L7 77 .L5: 1212:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1213:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *SecSize = READ_BIT(FLASH->SEC1R, FLASH_SEC1R_SEC_SIZE1); 1214:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1215:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1216:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (SecBank == FLASH_BANK_2) 1217:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1218:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *SecSize = READ_BIT(FLASH->SEC2R, FLASH_SEC2R_SEC_SIZE2); 1219:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1220:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1221:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1222:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 1223:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1224:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1225:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 78 .loc 1 1225 1 view .LVU10 79 0004 7047 bx lr 80 .L7: 1213:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 81 .loc 1 1213 5 is_stmt 1 view .LVU11 1213:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 82 .loc 1 1213 16 is_stmt 0 view .LVU12 83 0006 034B ldr r3, .L8 84 0008 1B6F ldr r3, [r3, #112] 85 000a 03F07F03 and r3, r3, #127 1213:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 86 .loc 1 1213 14 view .LVU13 ARM GAS /tmp/ccGUz3uE.s page 24 87 000e 0B60 str r3, [r1] 88 .loc 1 1225 1 view .LVU14 89 0010 F8E7 b .L5 90 .L9: 91 0012 00BF .align 2 92 .L8: 93 0014 00200240 .word 1073881088 94 .cfi_endproc 95 .LFE345: 97 .section .text.FLASH_OB_GetBootLock,"ax",%progbits 98 .align 1 99 .syntax unified 100 .thumb 101 .thumb_func 103 FLASH_OB_GetBootLock: 104 .LFB346: 1226:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1227:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1228:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Return the Boot Lock configuration into Option Byte. 1229:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval BootLockConfig. 1230:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This return value can be one of the following values: 1231:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_BOOT_LOCK_ENABLE: Boot lock enabled 1232:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_BOOT_LOCK_DISABLE: Boot lock disabled 1233:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1234:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static uint32_t FLASH_OB_GetBootLock(void) 1235:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 105 .loc 1 1235 1 is_stmt 1 view -0 106 .cfi_startproc 107 @ args = 0, pretend = 0, frame = 0 108 @ frame_needed = 0, uses_anonymous_args = 0 109 @ link register save eliminated. 1236:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return (READ_REG(FLASH->SEC1R) & FLASH_SEC1R_BOOT_LOCK); 110 .loc 1 1236 3 view .LVU16 111 .loc 1 1236 11 is_stmt 0 view .LVU17 112 0000 024B ldr r3, .L11 113 0002 186F ldr r0, [r3, #112] 1237:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 114 .loc 1 1237 1 view .LVU18 115 0004 00F48030 and r0, r0, #65536 116 0008 7047 bx lr 117 .L12: 118 000a 00BF .align 2 119 .L11: 120 000c 00200240 .word 1073881088 121 .cfi_endproc 122 .LFE346: 124 .section .text.FLASH_OB_GetWRP,"ax",%progbits 125 .align 1 126 .syntax unified 127 .thumb 128 .thumb_func 130 FLASH_OB_GetWRP: 131 .LVL2: 132 .LFB347: 1238:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1239:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1240:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Return the Write Protection configuration into Option Bytes. ARM GAS /tmp/ccGUz3uE.s page 25 1241:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[in] WRPArea specifies the area to be returned. 1242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter can be one of the following values: 1243:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK1_AREAA: Flash Bank 1 Area A 1244:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK1_AREAB: Flash Bank 1 Area B 1245:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK2_AREAA: Flash Bank 2 Area A (don't apply to STM32G43x/STM32G44x 1246:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_WRPAREA_BANK2_AREAB: Flash Bank 2 Area B (don't apply to STM32G43x/STM32G44x 1247:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[out] WRPStartOffset specifies the address where to copied the start page 1248:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * of the write protected area. 1249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[out] WRDPEndOffset specifies the address where to copied the end page of 1250:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * the write protected area. 1251:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 1252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1253:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_OB_GetWRP(uint32_t WRPArea, uint32_t *WRPStartOffset, uint32_t *WRDPEndOffset) 1254:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 133 .loc 1 1254 1 is_stmt 1 view -0 134 .cfi_startproc 135 @ args = 0, pretend = 0, frame = 0 136 @ frame_needed = 0, uses_anonymous_args = 0 137 @ link register save eliminated. 1255:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the configuration of the write protected area */ 1256:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (WRPArea == OB_WRPAREA_BANK1_AREAA) 138 .loc 1 1256 3 view .LVU20 139 .loc 1 1256 6 is_stmt 0 view .LVU21 140 0000 48B9 cbnz r0, .L14 1257:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1258:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRPStartOffset = READ_BIT(FLASH->WRP1AR, FLASH_WRP1AR_WRP1A_STRT); 141 .loc 1 1258 5 is_stmt 1 view .LVU22 142 .loc 1 1258 23 is_stmt 0 view .LVU23 143 0002 0B48 ldr r0, .L17 144 .LVL3: 145 .loc 1 1258 23 view .LVU24 146 0004 C36A ldr r3, [r0, #44] 147 0006 03F03F03 and r3, r3, #63 148 .loc 1 1258 21 view .LVU25 149 000a 0B60 str r3, [r1] 1259:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP1AR, FLASH_WRP1AR_WRP1A_END) >> FLASH_WRP1AR_WRP1A_END_Pos 150 .loc 1 1259 5 is_stmt 1 view .LVU26 151 .loc 1 1259 23 is_stmt 0 view .LVU27 152 000c C36A ldr r3, [r0, #44] 153 .loc 1 1259 71 view .LVU28 154 000e C3F30543 ubfx r3, r3, #16, #6 155 .loc 1 1259 20 view .LVU29 156 0012 1360 str r3, [r2] 157 0014 7047 bx lr 158 .LVL4: 159 .L14: 1260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1261:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (WRPArea == OB_WRPAREA_BANK1_AREAB) 160 .loc 1 1261 8 is_stmt 1 view .LVU30 161 .loc 1 1261 11 is_stmt 0 view .LVU31 162 0016 0128 cmp r0, #1 163 0018 00D0 beq .L16 164 .LVL5: 165 .L13: 1262:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRPStartOffset = READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_STRT); 1264:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos ARM GAS /tmp/ccGUz3uE.s page 26 1265:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1266:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1267:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (WRPArea == OB_WRPAREA_BANK2_AREAA) 1268:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1269:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRPStartOffset = READ_BIT(FLASH->WRP2AR, FLASH_WRP2AR_WRP2A_STRT); 1270:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP2AR, FLASH_WRP2AR_WRP2A_END) >> FLASH_WRP2AR_WRP2A_END_Pos 1271:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1272:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (WRPArea == OB_WRPAREA_BANK2_AREAB) 1273:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1274:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRPStartOffset = READ_BIT(FLASH->WRP2BR, FLASH_WRP2BR_WRP2B_STRT); 1275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP2BR, FLASH_WRP2BR_WRP2B_END) >> FLASH_WRP2BR_WRP2B_END_Pos 1276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1277:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1278:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1279:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1280:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 1281:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1282:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 166 .loc 1 1282 1 view .LVU32 167 001a 7047 bx lr 168 .LVL6: 169 .L16: 1263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos 170 .loc 1 1263 5 is_stmt 1 view .LVU33 1263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos 171 .loc 1 1263 23 is_stmt 0 view .LVU34 172 001c 0448 ldr r0, .L17 173 .LVL7: 1263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos 174 .loc 1 1263 23 view .LVU35 175 001e 036B ldr r3, [r0, #48] 176 0020 03F03F03 and r3, r3, #63 1263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *WRDPEndOffset = (READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos 177 .loc 1 1263 21 view .LVU36 178 0024 0B60 str r3, [r1] 1264:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 179 .loc 1 1264 5 is_stmt 1 view .LVU37 1264:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 180 .loc 1 1264 23 is_stmt 0 view .LVU38 181 0026 036B ldr r3, [r0, #48] 1264:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 182 .loc 1 1264 71 view .LVU39 183 0028 C3F30543 ubfx r3, r3, #16, #6 1264:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 184 .loc 1 1264 20 view .LVU40 185 002c 1360 str r3, [r2] 1281:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 186 .loc 1 1281 3 is_stmt 1 view .LVU41 187 .loc 1 1282 1 is_stmt 0 view .LVU42 188 002e F4E7 b .L13 189 .L18: 190 .align 2 191 .L17: 192 0030 00200240 .word 1073881088 193 .cfi_endproc 194 .LFE347: 196 .section .text.FLASH_OB_GetRDP,"ax",%progbits ARM GAS /tmp/ccGUz3uE.s page 27 197 .align 1 198 .syntax unified 199 .thumb 200 .thumb_func 202 FLASH_OB_GetRDP: 203 .LFB348: 1283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1284:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1285:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Return the FLASH Read Protection level into Option Bytes. 1286:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval RDP_Level 1287:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This return value can be one of the following values: 1288:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_0: No protection 1289:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_1: Read protection of the memory 1290:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @arg OB_RDP_LEVEL_2: Full chip protection 1291:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1292:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static uint32_t FLASH_OB_GetRDP(void) 1293:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 204 .loc 1 1293 1 is_stmt 1 view -0 205 .cfi_startproc 206 @ args = 0, pretend = 0, frame = 0 207 @ frame_needed = 0, uses_anonymous_args = 0 208 @ link register save eliminated. 1294:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t rdp_level = READ_BIT(FLASH->OPTR, FLASH_OPTR_RDP); 209 .loc 1 1294 3 view .LVU44 210 .loc 1 1294 24 is_stmt 0 view .LVU45 211 0000 044B ldr r3, .L22 212 0002 186A ldr r0, [r3, #32] 213 .loc 1 1294 12 view .LVU46 214 0004 C0B2 uxtb r0, r0 215 .LVL8: 1295:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1296:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if ((rdp_level != OB_RDP_LEVEL_0) && (rdp_level != OB_RDP_LEVEL_2)) 216 .loc 1 1296 3 is_stmt 1 view .LVU47 217 .loc 1 1296 6 is_stmt 0 view .LVU48 218 0006 AA28 cmp r0, #170 219 0008 02D0 beq .L19 220 .loc 1 1296 37 discriminator 1 view .LVU49 221 000a CC28 cmp r0, #204 222 000c 00D0 beq .L19 1297:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1298:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return (OB_RDP_LEVEL_1); 223 .loc 1 1298 12 view .LVU50 224 000e BB20 movs r0, #187 225 .LVL9: 226 .L19: 1299:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1300:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1301:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1302:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return rdp_level; 1303:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1304:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 227 .loc 1 1304 1 view .LVU51 228 0010 7047 bx lr 229 .L23: 230 0012 00BF .align 2 231 .L22: 232 0014 00200240 .word 1073881088 ARM GAS /tmp/ccGUz3uE.s page 28 233 .cfi_endproc 234 .LFE348: 236 .section .text.FLASH_OB_GetUser,"ax",%progbits 237 .align 1 238 .syntax unified 239 .thumb 240 .thumb_func 242 FLASH_OB_GetUser: 243 .LFB349: 1305:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1306:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1307:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Return the FLASH User Option Byte value. 1308:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval OB_user_config 1309:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This return value is a combination of @ref FLASH_OB_USER_BOR_LEVEL, 1310:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_nRST_STOP, @ref FLASH_OB_USER_nRST_STANDBY, 1311:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_nRST_SHUTDOWN, @ref FLASH_OB_USER_IWDG_SW, 1312:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_IWDG_STOP, @ref FLASH_OB_USER_IWDG_STANDBY, 1313:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_WWDG_SW, @ref FLASH_OB_USER_WWDG_SW, 1314:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_BFB2 (*), @ref FLASH_OB_USER_DBANK (*), 1315:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_nBOOT1, @ref FLASH_OB_USER_SRAM_PE, 1316:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_CCMSRAM_RST, @ref OB_USER_nSWBOOT0,@ref FLASH_OB_USER_nBOOT0, 1317:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @ref FLASH_OB_USER_NRST_MODE, @ref FLASH_OB_USER_INTERNAL_RESET_HOLDER 1318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @note (*) availability depends on devices 1319:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static uint32_t FLASH_OB_GetUser(void) 1321:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 244 .loc 1 1321 1 is_stmt 1 view -0 245 .cfi_startproc 246 @ args = 0, pretend = 0, frame = 0 247 @ frame_needed = 0, uses_anonymous_args = 0 248 @ link register save eliminated. 1322:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t user_config = READ_REG(FLASH->OPTR); 249 .loc 1 1322 3 view .LVU53 250 .loc 1 1322 12 is_stmt 0 view .LVU54 251 0000 024B ldr r3, .L25 252 0002 186A ldr r0, [r3, #32] 253 .LVL10: 1323:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** CLEAR_BIT(user_config, FLASH_OPTR_RDP); 254 .loc 1 1323 3 is_stmt 1 view .LVU55 1324:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1325:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** return user_config; 255 .loc 1 1325 3 view .LVU56 1326:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 256 .loc 1 1326 1 is_stmt 0 view .LVU57 257 0004 20F0FF00 bic r0, r0, #255 258 .LVL11: 259 .loc 1 1326 1 view .LVU58 260 0008 7047 bx lr 261 .L26: 262 000a 00BF .align 2 263 .L25: 264 000c 00200240 .word 1073881088 265 .cfi_endproc 266 .LFE349: 268 .section .text.FLASH_OB_GetPCROP,"ax",%progbits 269 .align 1 270 .syntax unified ARM GAS /tmp/ccGUz3uE.s page 29 271 .thumb 272 .thumb_func 274 FLASH_OB_GetPCROP: 275 .LVL12: 276 .LFB350: 1327:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /** 1329:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @brief Return the FLASH PCROP configuration into Option Bytes. 1330:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[in,out] PCROPConfig specifies the configuration (Bank to be configured and PCROP_RDP opt 1331:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * This parameter must be a combination of FLASH_BANK_1 or FLASH_BANK_2 1332:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * with OB_PCROP_RDP_NOT_ERASE or OB_PCROP_RDP_ERASE. 1333:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[out] PCROPStartAddr specifies the address where to copied the start address 1334:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * of the Proprietary code readout protection. 1335:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @param[out] PCROPEndAddr specifies the address where to copied the end address of 1336:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * the Proprietary code readout protection. 1337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** * @retval None 1338:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** */ 1339:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** static void FLASH_OB_GetPCROP(uint32_t *PCROPConfig, uint32_t *PCROPStartAddr, uint32_t *PCROPEndAd 1340:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 277 .loc 1 1340 1 is_stmt 1 view -0 278 .cfi_startproc 279 @ args = 0, pretend = 0, frame = 0 280 @ frame_needed = 0, uses_anonymous_args = 0 281 @ link register save eliminated. 282 .loc 1 1340 1 is_stmt 0 view .LVU60 283 0000 30B4 push {r4, r5} 284 .LCFI0: 285 .cfi_def_cfa_offset 8 286 .cfi_offset 4, -8 287 .cfi_offset 5, -4 1341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t reg_value; 288 .loc 1 1341 3 is_stmt 1 view .LVU61 1342:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t bank1_addr; 289 .loc 1 1342 3 view .LVU62 1343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1344:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t bank2_addr; 1345:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the information about the bank swapping */ 1347:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_FB_MODE) == 0U) 1348:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1349:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank1_addr = FLASH_BASE; 1350:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank2_addr = FLASH_BASE + FLASH_BANK_SIZE; 1351:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1352:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1353:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1354:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank1_addr = FLASH_BASE + FLASH_BANK_SIZE; 1355:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank2_addr = FLASH_BASE; 1356:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1357:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #else 1358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** bank1_addr = FLASH_BASE; 290 .loc 1 1358 3 view .LVU63 291 .LVL13: 1359:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1360:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1362:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (READ_BIT(FLASH->OPTR, FLASH_OPTR_DBANK) == 0U) 1363:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { ARM GAS /tmp/ccGUz3uE.s page 30 1364:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (((*PCROPConfig) & FLASH_BANK_BOTH) == FLASH_BANK_1) 1365:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP1SR) & FLASH_PCROP1SR_PCROP1_STRT); 1367:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPStartAddr = (reg_value << 4) + FLASH_BASE; 1368:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP1ER) & FLASH_PCROP1ER_PCROP1_END); 1370:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPEndAddr = (reg_value << 4) + FLASH_BASE; 1371:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1372:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (((*PCROPConfig) & FLASH_BANK_BOTH) == FLASH_BANK_2) 1373:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1374:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP2SR) & FLASH_PCROP2SR_PCROP2_STRT); 1375:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPStartAddr = (reg_value << 4) + FLASH_BASE; 1376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1377:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP2ER) & FLASH_PCROP2ER_PCROP2_END); 1378:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPEndAddr = (reg_value << 4) + FLASH_BASE; 1379:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1380:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1381:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1382:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 1383:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1384:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1385:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1386:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1387:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1388:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** if (((*PCROPConfig) & FLASH_BANK_BOTH) == FLASH_BANK_1) 292 .loc 1 1388 5 view .LVU64 293 .loc 1 1388 11 is_stmt 0 view .LVU65 294 0002 0368 ldr r3, [r0] 295 .loc 1 1388 8 view .LVU66 296 0004 13F0010F tst r3, #1 297 0008 0DD0 beq .L28 1389:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1390:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP1SR) & FLASH_PCROP1SR_PCROP1_STRT); 298 .loc 1 1390 7 is_stmt 1 view .LVU67 299 .loc 1 1390 26 is_stmt 0 view .LVU68 300 000a 0B4D ldr r5, .L30 301 000c 6C6A ldr r4, [r5, #36] 302 .LVL14: 1391:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPStartAddr = (reg_value << 3) + bank1_addr; 303 .loc 1 1391 7 is_stmt 1 view .LVU69 304 .loc 1 1391 36 is_stmt 0 view .LVU70 305 000e 0B4B ldr r3, .L30+4 306 0010 03EAC404 and r4, r3, r4, lsl #3 307 .LVL15: 308 .loc 1 1391 42 view .LVU71 309 0014 04F10064 add r4, r4, #134217728 310 .loc 1 1391 23 view .LVU72 311 0018 0C60 str r4, [r1] 1392:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1393:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP1ER) & FLASH_PCROP1ER_PCROP1_END); 312 .loc 1 1393 7 is_stmt 1 view .LVU73 313 .loc 1 1393 24 is_stmt 0 view .LVU74 314 001a A96A ldr r1, [r5, #40] 315 .LVL16: 1394:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPEndAddr = (reg_value << 3) + bank1_addr; 316 .loc 1 1394 7 is_stmt 1 view .LVU75 317 .loc 1 1394 34 is_stmt 0 view .LVU76 ARM GAS /tmp/ccGUz3uE.s page 31 318 001c 03EAC103 and r3, r3, r1, lsl #3 319 .loc 1 1394 40 view .LVU77 320 0020 03F10063 add r3, r3, #134217728 321 .loc 1 1394 21 view .LVU78 322 0024 1360 str r3, [r2] 323 .LVL17: 324 .L28: 1395:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1396:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1397:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else if (((*PCROPConfig) & FLASH_BANK_BOTH) == FLASH_BANK_2) 1398:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1399:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP2SR) & FLASH_PCROP2SR_PCROP2_STRT); 1400:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPStartAddr = (reg_value << 3) + bank2_addr; 1401:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1402:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** reg_value = (READ_REG(FLASH->PCROP2ER) & FLASH_PCROP2ER_PCROP2_END); 1403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPEndAddr = (reg_value << 3) + bank2_addr; 1404:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1405:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1406:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** else 1407:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1408:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Nothing to do */ 1409:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 325 .loc 1 1409 5 is_stmt 1 view .LVU79 1410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1411:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1412:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** *PCROPConfig |= (READ_REG(FLASH->PCROP1ER) & FLASH_PCROP1ER_PCROP_RDP); 326 .loc 1 1412 3 view .LVU80 327 .loc 1 1412 20 is_stmt 0 view .LVU81 328 0026 044B ldr r3, .L30 329 0028 9A6A ldr r2, [r3, #40] 330 .LVL18: 331 .loc 1 1412 46 view .LVU82 332 002a 02F00042 and r2, r2, #-2147483648 333 .loc 1 1412 3 view .LVU83 334 002e 0368 ldr r3, [r0] 335 .loc 1 1412 16 view .LVU84 336 0030 1343 orrs r3, r3, r2 337 0032 0360 str r3, [r0] 1413:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 338 .loc 1 1413 1 view .LVU85 339 0034 30BC pop {r4, r5} 340 .LCFI1: 341 .cfi_restore 5 342 .cfi_restore 4 343 .cfi_def_cfa_offset 0 344 0036 7047 bx lr 345 .L31: 346 .align 2 347 .L30: 348 0038 00200240 .word 1073881088 349 003c F8FF0100 .word 131064 350 .cfi_endproc 351 .LFE350: 353 .section .text.FLASH_OB_WRPConfig,"ax",%progbits 354 .align 1 355 .syntax unified 356 .thumb ARM GAS /tmp/ccGUz3uE.s page 32 357 .thumb_func 359 FLASH_OB_WRPConfig: 360 .LVL19: 361 .LFB339: 675:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 362 .loc 1 675 1 is_stmt 1 view -0 363 .cfi_startproc 364 @ args = 0, pretend = 0, frame = 0 365 @ frame_needed = 0, uses_anonymous_args = 0 675:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 366 .loc 1 675 1 is_stmt 0 view .LVU87 367 0000 70B5 push {r4, r5, r6, lr} 368 .LCFI2: 369 .cfi_def_cfa_offset 16 370 .cfi_offset 4, -16 371 .cfi_offset 5, -12 372 .cfi_offset 6, -8 373 .cfi_offset 14, -4 374 0002 0546 mov r5, r0 375 0004 0C46 mov r4, r1 376 0006 1646 mov r6, r2 676:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 377 .loc 1 676 3 is_stmt 1 view .LVU88 679:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_PAGE(WRPStartOffset)); 378 .loc 1 679 3 view .LVU89 680:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_PAGE(WRDPEndOffset)); 379 .loc 1 680 3 view .LVU90 681:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 380 .loc 1 681 3 view .LVU91 684:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 381 .loc 1 684 3 view .LVU92 684:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 382 .loc 1 684 12 is_stmt 0 view .LVU93 383 0008 4FF47A70 mov r0, #1000 384 .LVL20: 684:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 385 .loc 1 684 12 view .LVU94 386 000c FFF7FEFF bl FLASH_WaitForLastOperation 387 .LVL21: 686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 388 .loc 1 686 3 is_stmt 1 view .LVU95 686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 389 .loc 1 686 6 is_stmt 0 view .LVU96 390 0010 68B9 cbnz r0, .L33 689:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 391 .loc 1 689 5 is_stmt 1 view .LVU97 689:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 392 .loc 1 689 8 is_stmt 0 view .LVU98 393 0012 6DB9 cbnz r5, .L34 691:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 394 .loc 1 691 7 is_stmt 1 view .LVU99 691:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 395 .loc 1 691 70 is_stmt 0 view .LVU100 396 0014 44EA0644 orr r4, r4, r6, lsl #16 397 .LVL22: 691:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 398 .loc 1 691 21 view .LVU101 ARM GAS /tmp/ccGUz3uE.s page 33 399 0018 094B ldr r3, .L37 400 001a DC62 str r4, [r3, #44] 401 .L35: 710:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 402 .loc 1 710 5 is_stmt 1 view .LVU102 713:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 403 .loc 1 713 5 view .LVU103 404 001c 084A ldr r2, .L37 405 001e 5369 ldr r3, [r2, #20] 406 0020 43F40033 orr r3, r3, #131072 407 0024 5361 str r3, [r2, #20] 716:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 408 .loc 1 716 5 view .LVU104 716:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 409 .loc 1 716 14 is_stmt 0 view .LVU105 410 0026 4FF47A70 mov r0, #1000 411 002a FFF7FEFF bl FLASH_WaitForLastOperation 412 .LVL23: 413 .L33: 719:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 414 .loc 1 719 3 is_stmt 1 view .LVU106 720:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 415 .loc 1 720 1 is_stmt 0 view .LVU107 416 002e 70BD pop {r4, r5, r6, pc} 417 .LVL24: 418 .L34: 693:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 419 .loc 1 693 10 is_stmt 1 view .LVU108 693:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 420 .loc 1 693 13 is_stmt 0 view .LVU109 421 0030 012D cmp r5, #1 422 0032 F3D1 bne .L35 695:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 423 .loc 1 695 7 is_stmt 1 view .LVU110 695:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 424 .loc 1 695 70 is_stmt 0 view .LVU111 425 0034 44EA0644 orr r4, r4, r6, lsl #16 426 .LVL25: 695:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 427 .loc 1 695 21 view .LVU112 428 0038 014B ldr r3, .L37 429 003a 1C63 str r4, [r3, #48] 430 003c EEE7 b .L35 431 .L38: 432 003e 00BF .align 2 433 .L37: 434 0040 00200240 .word 1073881088 435 .cfi_endproc 436 .LFE339: 438 .section .text.FLASH_OB_RDPConfig,"ax",%progbits 439 .align 1 440 .syntax unified 441 .thumb 442 .thumb_func 444 FLASH_OB_RDPConfig: 445 .LVL26: 446 .LFB340: ARM GAS /tmp/ccGUz3uE.s page 34 740:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 447 .loc 1 740 1 is_stmt 1 view -0 448 .cfi_startproc 449 @ args = 0, pretend = 0, frame = 0 450 @ frame_needed = 0, uses_anonymous_args = 0 740:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 451 .loc 1 740 1 is_stmt 0 view .LVU114 452 0000 10B5 push {r4, lr} 453 .LCFI3: 454 .cfi_def_cfa_offset 8 455 .cfi_offset 4, -8 456 .cfi_offset 14, -4 457 0002 0446 mov r4, r0 741:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 458 .loc 1 741 3 is_stmt 1 view .LVU115 744:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 459 .loc 1 744 3 view .LVU116 747:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 460 .loc 1 747 3 view .LVU117 747:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 461 .loc 1 747 12 is_stmt 0 view .LVU118 462 0004 4FF47A70 mov r0, #1000 463 .LVL27: 747:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 464 .loc 1 747 12 view .LVU119 465 0008 FFF7FEFF bl FLASH_WaitForLastOperation 466 .LVL28: 749:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 467 .loc 1 749 3 is_stmt 1 view .LVU120 749:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 468 .loc 1 749 6 is_stmt 0 view .LVU121 469 000c 00B1 cbz r0, .L42 470 .L40: 471 .LVL29: 761:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 472 .loc 1 761 3 is_stmt 1 view .LVU122 762:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 473 .loc 1 762 1 is_stmt 0 view .LVU123 474 000e 10BD pop {r4, pc} 475 .LVL30: 476 .L42: 752:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 477 .loc 1 752 5 is_stmt 1 view .LVU124 478 0010 074A ldr r2, .L43 479 0012 136A ldr r3, [r2, #32] 480 0014 23F0FF03 bic r3, r3, #255 481 0018 2343 orrs r3, r3, r4 482 001a 1362 str r3, [r2, #32] 755:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 483 .loc 1 755 5 view .LVU125 484 001c 5369 ldr r3, [r2, #20] 485 001e 43F40033 orr r3, r3, #131072 486 0022 5361 str r3, [r2, #20] 758:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 487 .loc 1 758 5 view .LVU126 758:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 488 .loc 1 758 14 is_stmt 0 view .LVU127 ARM GAS /tmp/ccGUz3uE.s page 35 489 0024 4FF47A70 mov r0, #1000 490 0028 FFF7FEFF bl FLASH_WaitForLastOperation 491 .LVL31: 492 002c EFE7 b .L40 493 .L44: 494 002e 00BF .align 2 495 .L43: 496 0030 00200240 .word 1073881088 497 .cfi_endproc 498 .LFE340: 500 .section .text.FLASH_OB_UserConfig,"ax",%progbits 501 .align 1 502 .syntax unified 503 .thumb 504 .thumb_func 506 FLASH_OB_UserConfig: 507 .LVL32: 508 .LFB341: 787:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t optr_reg_val = 0; 509 .loc 1 787 1 is_stmt 1 view -0 510 .cfi_startproc 511 @ args = 0, pretend = 0, frame = 0 512 @ frame_needed = 0, uses_anonymous_args = 0 787:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t optr_reg_val = 0; 513 .loc 1 787 1 is_stmt 0 view .LVU129 514 0000 38B5 push {r3, r4, r5, lr} 515 .LCFI4: 516 .cfi_def_cfa_offset 16 517 .cfi_offset 3, -16 518 .cfi_offset 4, -12 519 .cfi_offset 5, -8 520 .cfi_offset 14, -4 521 0002 0446 mov r4, r0 522 0004 0D46 mov r5, r1 788:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t optr_reg_mask = 0; 523 .loc 1 788 3 is_stmt 1 view .LVU130 524 .LVL33: 789:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 525 .loc 1 789 3 view .LVU131 790:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 526 .loc 1 790 3 view .LVU132 793:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 527 .loc 1 793 3 view .LVU133 796:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 528 .loc 1 796 3 view .LVU134 796:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 529 .loc 1 796 12 is_stmt 0 view .LVU135 530 0006 4FF47A70 mov r0, #1000 531 .LVL34: 796:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 532 .loc 1 796 12 view .LVU136 533 000a FFF7FEFF bl FLASH_WaitForLastOperation 534 .LVL35: 798:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 535 .loc 1 798 3 is_stmt 1 view .LVU137 798:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 536 .loc 1 798 6 is_stmt 0 view .LVU138 ARM GAS /tmp/ccGUz3uE.s page 36 537 000e 0028 cmp r0, #0 538 0010 40F08680 bne .L46 812:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 539 .loc 1 812 5 is_stmt 1 view .LVU139 812:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 540 .loc 1 812 8 is_stmt 0 view .LVU140 541 0014 14F00103 ands r3, r4, #1 542 0018 00F08380 beq .L62 815:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 543 .loc 1 815 7 is_stmt 1 view .LVU141 818:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_BOR_LEV; 544 .loc 1 818 7 view .LVU142 818:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_BOR_LEV; 545 .loc 1 818 35 is_stmt 0 view .LVU143 546 001c 05F4E063 and r3, r5, #1792 547 .LVL36: 819:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 548 .loc 1 819 7 is_stmt 1 view .LVU144 819:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 549 .loc 1 819 21 is_stmt 0 view .LVU145 550 0020 4FF4E062 mov r2, #1792 551 .LVL37: 552 .L47: 822:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 553 .loc 1 822 5 is_stmt 1 view .LVU146 822:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 554 .loc 1 822 8 is_stmt 0 view .LVU147 555 0024 14F0020F tst r4, #2 556 0028 04D0 beq .L48 825:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 557 .loc 1 825 7 is_stmt 1 view .LVU148 828:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STOP; 558 .loc 1 828 7 view .LVU149 828:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STOP; 559 .loc 1 828 35 is_stmt 0 view .LVU150 560 002a 05F48051 and r1, r5, #4096 828:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STOP; 561 .loc 1 828 20 view .LVU151 562 002e 0B43 orrs r3, r3, r1 563 .LVL38: 829:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 564 .loc 1 829 7 is_stmt 1 view .LVU152 829:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 565 .loc 1 829 21 is_stmt 0 view .LVU153 566 0030 42F48052 orr r2, r2, #4096 567 .LVL39: 568 .L48: 832:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 569 .loc 1 832 5 is_stmt 1 view .LVU154 832:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 570 .loc 1 832 8 is_stmt 0 view .LVU155 571 0034 14F0040F tst r4, #4 572 0038 04D0 beq .L49 835:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 573 .loc 1 835 7 is_stmt 1 view .LVU156 838:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STDBY; 574 .loc 1 838 7 view .LVU157 ARM GAS /tmp/ccGUz3uE.s page 37 838:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STDBY; 575 .loc 1 838 35 is_stmt 0 view .LVU158 576 003a 05F40051 and r1, r5, #8192 838:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_STDBY; 577 .loc 1 838 20 view .LVU159 578 003e 0B43 orrs r3, r3, r1 579 .LVL40: 839:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 580 .loc 1 839 7 is_stmt 1 view .LVU160 839:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 581 .loc 1 839 21 is_stmt 0 view .LVU161 582 0040 42F40052 orr r2, r2, #8192 583 .LVL41: 584 .L49: 842:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 585 .loc 1 842 5 is_stmt 1 view .LVU162 842:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 586 .loc 1 842 8 is_stmt 0 view .LVU163 587 0044 14F4805F tst r4, #4096 588 0048 04D0 beq .L50 845:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 589 .loc 1 845 7 is_stmt 1 view .LVU164 848:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_SHDW; 590 .loc 1 848 7 view .LVU165 848:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_SHDW; 591 .loc 1 848 35 is_stmt 0 view .LVU166 592 004a 05F48041 and r1, r5, #16384 848:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nRST_SHDW; 593 .loc 1 848 20 view .LVU167 594 004e 0B43 orrs r3, r3, r1 595 .LVL42: 849:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 596 .loc 1 849 7 is_stmt 1 view .LVU168 849:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 597 .loc 1 849 21 is_stmt 0 view .LVU169 598 0050 42F48042 orr r2, r2, #16384 599 .LVL43: 600 .L50: 852:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 601 .loc 1 852 5 is_stmt 1 view .LVU170 852:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 602 .loc 1 852 8 is_stmt 0 view .LVU171 603 0054 14F0080F tst r4, #8 604 0058 04D0 beq .L51 855:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 605 .loc 1 855 7 is_stmt 1 view .LVU172 858:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_SW; 606 .loc 1 858 7 view .LVU173 858:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_SW; 607 .loc 1 858 35 is_stmt 0 view .LVU174 608 005a 05F48031 and r1, r5, #65536 858:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_SW; 609 .loc 1 858 20 view .LVU175 610 005e 0B43 orrs r3, r3, r1 611 .LVL44: 859:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 612 .loc 1 859 7 is_stmt 1 view .LVU176 ARM GAS /tmp/ccGUz3uE.s page 38 859:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 613 .loc 1 859 21 is_stmt 0 view .LVU177 614 0060 42F48032 orr r2, r2, #65536 615 .LVL45: 616 .L51: 862:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 617 .loc 1 862 5 is_stmt 1 view .LVU178 862:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 618 .loc 1 862 8 is_stmt 0 view .LVU179 619 0064 14F0100F tst r4, #16 620 0068 04D0 beq .L52 865:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 621 .loc 1 865 7 is_stmt 1 view .LVU180 868:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STOP; 622 .loc 1 868 7 view .LVU181 868:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STOP; 623 .loc 1 868 35 is_stmt 0 view .LVU182 624 006a 05F40031 and r1, r5, #131072 868:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STOP; 625 .loc 1 868 20 view .LVU183 626 006e 0B43 orrs r3, r3, r1 627 .LVL46: 869:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 628 .loc 1 869 7 is_stmt 1 view .LVU184 869:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 629 .loc 1 869 21 is_stmt 0 view .LVU185 630 0070 42F40032 orr r2, r2, #131072 631 .LVL47: 632 .L52: 872:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 633 .loc 1 872 5 is_stmt 1 view .LVU186 872:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 634 .loc 1 872 8 is_stmt 0 view .LVU187 635 0074 14F0200F tst r4, #32 636 0078 04D0 beq .L53 875:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 637 .loc 1 875 7 is_stmt 1 view .LVU188 878:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STDBY; 638 .loc 1 878 7 view .LVU189 878:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STDBY; 639 .loc 1 878 35 is_stmt 0 view .LVU190 640 007a 05F48021 and r1, r5, #262144 878:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IWDG_STDBY; 641 .loc 1 878 20 view .LVU191 642 007e 0B43 orrs r3, r3, r1 643 .LVL48: 879:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 644 .loc 1 879 7 is_stmt 1 view .LVU192 879:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 645 .loc 1 879 21 is_stmt 0 view .LVU193 646 0080 42F48022 orr r2, r2, #262144 647 .LVL49: 648 .L53: 882:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 649 .loc 1 882 5 is_stmt 1 view .LVU194 882:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 650 .loc 1 882 8 is_stmt 0 view .LVU195 ARM GAS /tmp/ccGUz3uE.s page 39 651 0084 14F0400F tst r4, #64 652 0088 04D0 beq .L54 885:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 653 .loc 1 885 7 is_stmt 1 view .LVU196 888:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_WWDG_SW; 654 .loc 1 888 7 view .LVU197 888:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_WWDG_SW; 655 .loc 1 888 35 is_stmt 0 view .LVU198 656 008a 05F40021 and r1, r5, #524288 888:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_WWDG_SW; 657 .loc 1 888 20 view .LVU199 658 008e 0B43 orrs r3, r3, r1 659 .LVL50: 889:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 660 .loc 1 889 7 is_stmt 1 view .LVU200 889:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 661 .loc 1 889 21 is_stmt 0 view .LVU201 662 0090 42F40022 orr r2, r2, #524288 663 .LVL51: 664 .L54: 904:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 665 .loc 1 904 5 is_stmt 1 view .LVU202 904:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 666 .loc 1 904 8 is_stmt 0 view .LVU203 667 0094 14F4007F tst r4, #512 668 0098 04D0 beq .L55 907:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 669 .loc 1 907 7 is_stmt 1 view .LVU204 910:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT1; 670 .loc 1 910 7 view .LVU205 910:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT1; 671 .loc 1 910 35 is_stmt 0 view .LVU206 672 009a 05F40001 and r1, r5, #8388608 910:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT1; 673 .loc 1 910 20 view .LVU207 674 009e 0B43 orrs r3, r3, r1 675 .LVL52: 911:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 676 .loc 1 911 7 is_stmt 1 view .LVU208 911:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 677 .loc 1 911 21 is_stmt 0 view .LVU209 678 00a0 42F40002 orr r2, r2, #8388608 679 .LVL53: 680 .L55: 914:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 681 .loc 1 914 5 is_stmt 1 view .LVU210 914:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 682 .loc 1 914 8 is_stmt 0 view .LVU211 683 00a4 14F4806F tst r4, #1024 684 00a8 04D0 beq .L56 917:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 685 .loc 1 917 7 is_stmt 1 view .LVU212 920:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_SRAM_PE; 686 .loc 1 920 7 view .LVU213 920:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_SRAM_PE; 687 .loc 1 920 35 is_stmt 0 view .LVU214 688 00aa 05F08071 and r1, r5, #16777216 ARM GAS /tmp/ccGUz3uE.s page 40 920:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_SRAM_PE; 689 .loc 1 920 20 view .LVU215 690 00ae 0B43 orrs r3, r3, r1 691 .LVL54: 921:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 692 .loc 1 921 7 is_stmt 1 view .LVU216 921:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 693 .loc 1 921 21 is_stmt 0 view .LVU217 694 00b0 42F08072 orr r2, r2, #16777216 695 .LVL55: 696 .L56: 923:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 697 .loc 1 923 5 is_stmt 1 view .LVU218 923:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 698 .loc 1 923 8 is_stmt 0 view .LVU219 699 00b4 14F4006F tst r4, #2048 700 00b8 04D0 beq .L57 926:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 701 .loc 1 926 7 is_stmt 1 view .LVU220 929:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_CCMSRAM_RST; 702 .loc 1 929 7 view .LVU221 929:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_CCMSRAM_RST; 703 .loc 1 929 35 is_stmt 0 view .LVU222 704 00ba 05F00071 and r1, r5, #33554432 929:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_CCMSRAM_RST; 705 .loc 1 929 20 view .LVU223 706 00be 0B43 orrs r3, r3, r1 707 .LVL56: 930:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 708 .loc 1 930 7 is_stmt 1 view .LVU224 930:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 709 .loc 1 930 21 is_stmt 0 view .LVU225 710 00c0 42F00072 orr r2, r2, #33554432 711 .LVL57: 712 .L57: 932:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 713 .loc 1 932 5 is_stmt 1 view .LVU226 932:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 714 .loc 1 932 8 is_stmt 0 view .LVU227 715 00c4 14F4005F tst r4, #8192 716 00c8 04D0 beq .L58 935:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 717 .loc 1 935 7 is_stmt 1 view .LVU228 938:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nSWBOOT0; 718 .loc 1 938 7 view .LVU229 938:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nSWBOOT0; 719 .loc 1 938 35 is_stmt 0 view .LVU230 720 00ca 05F08061 and r1, r5, #67108864 938:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nSWBOOT0; 721 .loc 1 938 20 view .LVU231 722 00ce 0B43 orrs r3, r3, r1 723 .LVL58: 939:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 724 .loc 1 939 7 is_stmt 1 view .LVU232 939:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 725 .loc 1 939 21 is_stmt 0 view .LVU233 726 00d0 42F08062 orr r2, r2, #67108864 ARM GAS /tmp/ccGUz3uE.s page 41 727 .LVL59: 728 .L58: 942:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 729 .loc 1 942 5 is_stmt 1 view .LVU234 942:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 730 .loc 1 942 8 is_stmt 0 view .LVU235 731 00d4 14F4804F tst r4, #16384 732 00d8 04D0 beq .L59 945:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 733 .loc 1 945 7 is_stmt 1 view .LVU236 948:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT0; 734 .loc 1 948 7 view .LVU237 948:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT0; 735 .loc 1 948 35 is_stmt 0 view .LVU238 736 00da 05F00061 and r1, r5, #134217728 948:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_nBOOT0; 737 .loc 1 948 20 view .LVU239 738 00de 0B43 orrs r3, r3, r1 739 .LVL60: 949:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 740 .loc 1 949 7 is_stmt 1 view .LVU240 949:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 741 .loc 1 949 21 is_stmt 0 view .LVU241 742 00e0 42F00062 orr r2, r2, #134217728 743 .LVL61: 744 .L59: 952:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 745 .loc 1 952 5 is_stmt 1 view .LVU242 952:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 746 .loc 1 952 8 is_stmt 0 view .LVU243 747 00e4 14F4004F tst r4, #32768 748 00e8 04D0 beq .L60 955:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 749 .loc 1 955 7 is_stmt 1 view .LVU244 958:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_NRST_MODE; 750 .loc 1 958 7 view .LVU245 958:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_NRST_MODE; 751 .loc 1 958 35 is_stmt 0 view .LVU246 752 00ea 05F04051 and r1, r5, #805306368 958:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_NRST_MODE; 753 .loc 1 958 20 view .LVU247 754 00ee 0B43 orrs r3, r3, r1 755 .LVL62: 959:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 756 .loc 1 959 7 is_stmt 1 view .LVU248 959:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 757 .loc 1 959 21 is_stmt 0 view .LVU249 758 00f0 42F04052 orr r2, r2, #805306368 759 .LVL63: 760 .L60: 962:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 761 .loc 1 962 5 is_stmt 1 view .LVU250 962:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 762 .loc 1 962 8 is_stmt 0 view .LVU251 763 00f4 14F4803F tst r4, #65536 764 00f8 04D0 beq .L61 965:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ARM GAS /tmp/ccGUz3uE.s page 42 765 .loc 1 965 7 is_stmt 1 view .LVU252 968:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IRHEN; 766 .loc 1 968 7 view .LVU253 968:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IRHEN; 767 .loc 1 968 35 is_stmt 0 view .LVU254 768 00fa 05F08045 and r5, r5, #1073741824 769 .LVL64: 968:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** optr_reg_mask |= FLASH_OPTR_IRHEN; 770 .loc 1 968 20 view .LVU255 771 00fe 2B43 orrs r3, r3, r5 772 .LVL65: 969:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 773 .loc 1 969 7 is_stmt 1 view .LVU256 969:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 774 .loc 1 969 21 is_stmt 0 view .LVU257 775 0100 42F08042 orr r2, r2, #1073741824 776 .LVL66: 777 .L61: 973:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 778 .loc 1 973 5 is_stmt 1 view .LVU258 779 0104 0848 ldr r0, .L64 780 0106 016A ldr r1, [r0, #32] 781 0108 21EA0202 bic r2, r1, r2 782 .LVL67: 973:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 783 .loc 1 973 5 is_stmt 0 view .LVU259 784 010c 1343 orrs r3, r3, r2 785 .LVL68: 973:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 786 .loc 1 973 5 view .LVU260 787 010e 0362 str r3, [r0, #32] 976:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 788 .loc 1 976 5 is_stmt 1 view .LVU261 789 0110 4369 ldr r3, [r0, #20] 790 0112 43F40033 orr r3, r3, #131072 791 0116 4361 str r3, [r0, #20] 979:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 792 .loc 1 979 5 view .LVU262 979:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 793 .loc 1 979 14 is_stmt 0 view .LVU263 794 0118 4FF47A70 mov r0, #1000 795 011c FFF7FEFF bl FLASH_WaitForLastOperation 796 .LVL69: 797 .L46: 982:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 798 .loc 1 982 3 is_stmt 1 view .LVU264 983:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 799 .loc 1 983 1 is_stmt 0 view .LVU265 800 0120 38BD pop {r3, r4, r5, pc} 801 .LVL70: 802 .L62: 789:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 803 .loc 1 789 12 view .LVU266 804 0122 1A46 mov r2, r3 805 0124 7EE7 b .L47 806 .L65: 807 0126 00BF .align 2 ARM GAS /tmp/ccGUz3uE.s page 43 808 .L64: 809 0128 00200240 .word 1073881088 810 .cfi_endproc 811 .LFE341: 813 .section .text.FLASH_OB_PCROPConfig,"ax",%progbits 814 .align 1 815 .syntax unified 816 .thumb 817 .thumb_func 819 FLASH_OB_PCROPConfig: 820 .LVL71: 821 .LFB342: 1003:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 822 .loc 1 1003 1 is_stmt 1 view -0 823 .cfi_startproc 824 @ args = 0, pretend = 0, frame = 0 825 @ frame_needed = 0, uses_anonymous_args = 0 1003:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 826 .loc 1 1003 1 is_stmt 0 view .LVU268 827 0000 70B5 push {r4, r5, r6, lr} 828 .LCFI5: 829 .cfi_def_cfa_offset 16 830 .cfi_offset 4, -16 831 .cfi_offset 5, -12 832 .cfi_offset 6, -8 833 .cfi_offset 14, -4 834 0002 0446 mov r4, r0 835 0004 0D46 mov r5, r1 836 0006 1646 mov r6, r2 1004:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t reg_value; 837 .loc 1 1004 3 is_stmt 1 view .LVU269 1005:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t bank1_addr; 838 .loc 1 1005 3 view .LVU270 1006:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 839 .loc 1 1006 3 view .LVU271 1012:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_PCROP_RDP(PCROPConfig & FLASH_PCROP1ER_PCROP_RDP)); 840 .loc 1 1012 3 view .LVU272 1013:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROPStartAddr)); 841 .loc 1 1013 3 view .LVU273 1014:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROPEndAddr)); 842 .loc 1 1014 3 view .LVU274 1015:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 843 .loc 1 1015 3 view .LVU275 1018:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 844 .loc 1 1018 3 view .LVU276 1018:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 845 .loc 1 1018 12 is_stmt 0 view .LVU277 846 0008 4FF47A70 mov r0, #1000 847 .LVL72: 1018:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 848 .loc 1 1018 12 view .LVU278 849 000c FFF7FEFF bl FLASH_WaitForLastOperation 850 .LVL73: 1020:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 851 .loc 1 1020 3 is_stmt 1 view .LVU279 1020:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 852 .loc 1 1020 6 is_stmt 0 view .LVU280 ARM GAS /tmp/ccGUz3uE.s page 44 853 0010 18BB cbnz r0, .L67 1035:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 854 .loc 1 1035 5 is_stmt 1 view .LVU281 855 .LVL74: 1067:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 856 .loc 1 1067 7 view .LVU282 1067:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 857 .loc 1 1067 10 is_stmt 0 view .LVU283 858 0012 14F0010F tst r4, #1 859 0016 10D0 beq .L68 1069:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1SR, FLASH_PCROP1SR_PCROP1_STRT, reg_value); 860 .loc 1 1069 9 is_stmt 1 view .LVU284 1069:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1SR, FLASH_PCROP1SR_PCROP1_STRT, reg_value); 861 .loc 1 1069 38 is_stmt 0 view .LVU285 862 0018 05F17841 add r1, r5, #-134217728 863 .LVL75: 1070:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 864 .loc 1 1070 9 is_stmt 1 view .LVU286 865 001c 0F48 ldr r0, .L70 866 001e 436A ldr r3, [r0, #36] 867 0020 6FF30D03 bfc r3, #0, #14 868 0024 43EAD103 orr r3, r3, r1, lsr #3 869 0028 4362 str r3, [r0, #36] 1072:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1ER, FLASH_PCROP1ER_PCROP1_END, reg_value); 870 .loc 1 1072 9 view .LVU287 1072:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** MODIFY_REG(FLASH->PCROP1ER, FLASH_PCROP1ER_PCROP1_END, reg_value); 871 .loc 1 1072 36 is_stmt 0 view .LVU288 872 002a 06F17842 add r2, r6, #-134217728 873 .LVL76: 1073:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 874 .loc 1 1073 9 is_stmt 1 view .LVU289 875 002e 836A ldr r3, [r0, #40] 876 0030 6FF30D03 bfc r3, #0, #14 877 0034 43EAD203 orr r3, r3, r2, lsr #3 878 0038 8362 str r3, [r0, #40] 879 .LVL77: 880 .L68: 1088:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 881 .loc 1 1088 7 view .LVU290 1091:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 882 .loc 1 1091 5 view .LVU291 883 003a 084A ldr r2, .L70 884 003c 936A ldr r3, [r2, #40] 885 003e 23F00043 bic r3, r3, #-2147483648 886 0042 04F00044 and r4, r4, #-2147483648 887 .LVL78: 1091:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 888 .loc 1 1091 5 is_stmt 0 view .LVU292 889 0046 1C43 orrs r4, r4, r3 890 0048 9462 str r4, [r2, #40] 1094:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 891 .loc 1 1094 5 is_stmt 1 view .LVU293 892 004a 5369 ldr r3, [r2, #20] 893 004c 43F40033 orr r3, r3, #131072 894 0050 5361 str r3, [r2, #20] 1097:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 895 .loc 1 1097 5 view .LVU294 ARM GAS /tmp/ccGUz3uE.s page 45 1097:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 896 .loc 1 1097 14 is_stmt 0 view .LVU295 897 0052 4FF47A70 mov r0, #1000 898 0056 FFF7FEFF bl FLASH_WaitForLastOperation 899 .LVL79: 900 .L67: 1100:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 901 .loc 1 1100 3 is_stmt 1 view .LVU296 1101:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 902 .loc 1 1101 1 is_stmt 0 view .LVU297 903 005a 70BD pop {r4, r5, r6, pc} 904 .LVL80: 905 .L71: 1101:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 906 .loc 1 1101 1 view .LVU298 907 .align 2 908 .L70: 909 005c 00200240 .word 1073881088 910 .cfi_endproc 911 .LFE342: 913 .section .text.FLASH_OB_SecMemConfig,"ax",%progbits 914 .align 1 915 .syntax unified 916 .thumb 917 .thumb_func 919 FLASH_OB_SecMemConfig: 920 .LVL81: 921 .LFB343: 1121:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 922 .loc 1 1121 1 is_stmt 1 view -0 923 .cfi_startproc 924 @ args = 0, pretend = 0, frame = 0 925 @ frame_needed = 0, uses_anonymous_args = 0 1121:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 926 .loc 1 1121 1 is_stmt 0 view .LVU300 927 0000 38B5 push {r3, r4, r5, lr} 928 .LCFI6: 929 .cfi_def_cfa_offset 16 930 .cfi_offset 3, -16 931 .cfi_offset 4, -12 932 .cfi_offset 5, -8 933 .cfi_offset 14, -4 934 0002 0446 mov r4, r0 935 0004 0D46 mov r5, r1 1122:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 936 .loc 1 1122 3 is_stmt 1 view .LVU301 1125:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** assert_param(IS_OB_SECMEM_SIZE(SecSize)); 937 .loc 1 1125 3 view .LVU302 1126:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 938 .loc 1 1126 3 view .LVU303 1129:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 939 .loc 1 1129 3 view .LVU304 1129:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 940 .loc 1 1129 12 is_stmt 0 view .LVU305 941 0006 4FF47A70 mov r0, #1000 942 .LVL82: 1129:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ARM GAS /tmp/ccGUz3uE.s page 46 943 .loc 1 1129 12 view .LVU306 944 000a FFF7FEFF bl FLASH_WaitForLastOperation 945 .LVL83: 1131:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 946 .loc 1 1131 3 is_stmt 1 view .LVU307 1131:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 947 .loc 1 1131 6 is_stmt 0 view .LVU308 948 000e 50B9 cbnz r0, .L73 1134:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 949 .loc 1 1134 5 is_stmt 1 view .LVU309 1134:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 950 .loc 1 1134 8 is_stmt 0 view .LVU310 951 0010 012C cmp r4, #1 952 0012 09D0 beq .L76 953 .L74: 1150:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 954 .loc 1 1150 5 is_stmt 1 view .LVU311 955 0014 084A ldr r2, .L77 956 0016 5369 ldr r3, [r2, #20] 957 0018 43F40033 orr r3, r3, #131072 958 001c 5361 str r3, [r2, #20] 1153:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 959 .loc 1 1153 5 view .LVU312 1153:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 960 .loc 1 1153 14 is_stmt 0 view .LVU313 961 001e 4FF47A70 mov r0, #1000 962 0022 FFF7FEFF bl FLASH_WaitForLastOperation 963 .LVL84: 964 .L73: 1156:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 965 .loc 1 1156 3 is_stmt 1 view .LVU314 1157:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 966 .loc 1 1157 1 is_stmt 0 view .LVU315 967 0026 38BD pop {r3, r4, r5, pc} 968 .LVL85: 969 .L76: 1136:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 970 .loc 1 1136 7 is_stmt 1 view .LVU316 971 0028 034A ldr r2, .L77 972 002a 136F ldr r3, [r2, #112] 973 002c 23F07F03 bic r3, r3, #127 974 0030 2B43 orrs r3, r3, r5 975 0032 1367 str r3, [r2, #112] 976 0034 EEE7 b .L74 977 .L78: 978 0036 00BF .align 2 979 .L77: 980 0038 00200240 .word 1073881088 981 .cfi_endproc 982 .LFE343: 984 .section .text.FLASH_OB_BootLockConfig,"ax",%progbits 985 .align 1 986 .syntax unified 987 .thumb 988 .thumb_func 990 FLASH_OB_BootLockConfig: 991 .LVL86: ARM GAS /tmp/ccGUz3uE.s page 47 992 .LFB344: 1174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 993 .loc 1 1174 1 view -0 994 .cfi_startproc 995 @ args = 0, pretend = 0, frame = 0 996 @ frame_needed = 0, uses_anonymous_args = 0 1174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 997 .loc 1 1174 1 is_stmt 0 view .LVU318 998 0000 10B5 push {r4, lr} 999 .LCFI7: 1000 .cfi_def_cfa_offset 8 1001 .cfi_offset 4, -8 1002 .cfi_offset 14, -4 1003 0002 0446 mov r4, r0 1175:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1004 .loc 1 1175 3 is_stmt 1 view .LVU319 1178:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1005 .loc 1 1178 3 view .LVU320 1181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1006 .loc 1 1181 3 view .LVU321 1181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1007 .loc 1 1181 12 is_stmt 0 view .LVU322 1008 0004 4FF47A70 mov r0, #1000 1009 .LVL87: 1181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1010 .loc 1 1181 12 view .LVU323 1011 0008 FFF7FEFF bl FLASH_WaitForLastOperation 1012 .LVL88: 1183:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1013 .loc 1 1183 3 is_stmt 1 view .LVU324 1183:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1014 .loc 1 1183 6 is_stmt 0 view .LVU325 1015 000c 00B1 cbz r0, .L82 1016 .L80: 1017 .LVL89: 1194:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1018 .loc 1 1194 3 is_stmt 1 view .LVU326 1195:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1019 .loc 1 1195 1 is_stmt 0 view .LVU327 1020 000e 10BD pop {r4, pc} 1021 .LVL90: 1022 .L82: 1185:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1023 .loc 1 1185 5 is_stmt 1 view .LVU328 1024 0010 074A ldr r2, .L83 1025 0012 136F ldr r3, [r2, #112] 1026 0014 23F48033 bic r3, r3, #65536 1027 0018 2343 orrs r3, r3, r4 1028 001a 1367 str r3, [r2, #112] 1188:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1029 .loc 1 1188 5 view .LVU329 1030 001c 5369 ldr r3, [r2, #20] 1031 001e 43F40033 orr r3, r3, #131072 1032 0022 5361 str r3, [r2, #20] 1191:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1033 .loc 1 1191 5 view .LVU330 1191:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } ARM GAS /tmp/ccGUz3uE.s page 48 1034 .loc 1 1191 14 is_stmt 0 view .LVU331 1035 0024 4FF47A70 mov r0, #1000 1036 0028 FFF7FEFF bl FLASH_WaitForLastOperation 1037 .LVL91: 1038 002c EFE7 b .L80 1039 .L84: 1040 002e 00BF .align 2 1041 .L83: 1042 0030 00200240 .word 1073881088 1043 .cfi_endproc 1044 .LFE344: 1046 .section .text.HAL_FLASHEx_OBProgram,"ax",%progbits 1047 .align 1 1048 .global HAL_FLASHEx_OBProgram 1049 .syntax unified 1050 .thumb 1051 .thumb_func 1053 HAL_FLASHEx_OBProgram: 1054 .LVL92: 1055 .LFB331: 311:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1056 .loc 1 311 1 is_stmt 1 view -0 1057 .cfi_startproc 1058 @ args = 0, pretend = 0, frame = 0 1059 @ frame_needed = 0, uses_anonymous_args = 0 311:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1060 .loc 1 311 1 is_stmt 0 view .LVU333 1061 0000 38B5 push {r3, r4, r5, lr} 1062 .LCFI8: 1063 .cfi_def_cfa_offset 16 1064 .cfi_offset 3, -16 1065 .cfi_offset 4, -12 1066 .cfi_offset 5, -8 1067 .cfi_offset 14, -4 312:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1068 .loc 1 312 3 is_stmt 1 view .LVU334 1069 .LVL93: 315:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1070 .loc 1 315 3 view .LVU335 318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1071 .loc 1 318 3 view .LVU336 318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1072 .loc 1 318 3 view .LVU337 1073 0002 2E4B ldr r3, .L108 1074 0004 1B78 ldrb r3, [r3] @ zero_extendqisi2 1075 0006 012B cmp r3, #1 1076 0008 56D0 beq .L93 1077 000a 0446 mov r4, r0 318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1078 .loc 1 318 3 discriminator 2 view .LVU338 1079 000c 2B4B ldr r3, .L108 1080 000e 0122 movs r2, #1 1081 0010 1A70 strb r2, [r3] 318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1082 .loc 1 318 3 view .LVU339 320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1083 .loc 1 320 3 view .LVU340 ARM GAS /tmp/ccGUz3uE.s page 49 320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1084 .loc 1 320 20 is_stmt 0 view .LVU341 1085 0012 0022 movs r2, #0 1086 0014 5A60 str r2, [r3, #4] 323:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1087 .loc 1 323 3 is_stmt 1 view .LVU342 323:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1088 .loc 1 323 15 is_stmt 0 view .LVU343 1089 0016 0368 ldr r3, [r0] 323:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1090 .loc 1 323 6 view .LVU344 1091 0018 13F0010F tst r3, #1 1092 001c 1DD1 bne .L102 312:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1093 .loc 1 312 21 view .LVU345 1094 001e 0025 movs r5, #0 1095 .LVL94: 1096 .L87: 333:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1097 .loc 1 333 3 is_stmt 1 view .LVU346 333:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1098 .loc 1 333 15 is_stmt 0 view .LVU347 1099 0020 2368 ldr r3, [r4] 333:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1100 .loc 1 333 6 view .LVU348 1101 0022 13F0020F tst r3, #2 1102 0026 22D1 bne .L103 1103 .LVL95: 1104 .L88: 343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1105 .loc 1 343 3 is_stmt 1 view .LVU349 343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1106 .loc 1 343 15 is_stmt 0 view .LVU350 1107 0028 2368 ldr r3, [r4] 343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1108 .loc 1 343 6 view .LVU351 1109 002a 13F0040F tst r3, #4 1110 002e 25D1 bne .L104 1111 .LVL96: 1112 .L89: 353:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1113 .loc 1 353 3 is_stmt 1 view .LVU352 353:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1114 .loc 1 353 15 is_stmt 0 view .LVU353 1115 0030 2368 ldr r3, [r4] 353:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1116 .loc 1 353 6 view .LVU354 1117 0032 13F0080F tst r3, #8 1118 0036 03D0 beq .L90 355:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1119 .loc 1 355 5 is_stmt 1 view .LVU355 355:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1120 .loc 1 355 16 is_stmt 0 view .LVU356 1121 0038 216A ldr r1, [r4, #32] 355:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1122 .loc 1 355 43 view .LVU357 1123 003a 626A ldr r2, [r4, #36] ARM GAS /tmp/ccGUz3uE.s page 50 355:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1124 .loc 1 355 8 view .LVU358 1125 003c 9142 cmp r1, r2 1126 003e 25D1 bne .L105 1127 .LVL97: 1128 .L90: 366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1129 .loc 1 366 3 is_stmt 1 view .LVU359 366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1130 .loc 1 366 15 is_stmt 0 view .LVU360 1131 0040 2368 ldr r3, [r4] 366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1132 .loc 1 366 6 view .LVU361 1133 0042 13F0200F tst r3, #32 1134 0046 28D1 bne .L106 1135 .LVL98: 1136 .L91: 376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1137 .loc 1 376 3 is_stmt 1 view .LVU362 376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1138 .loc 1 376 15 is_stmt 0 view .LVU363 1139 0048 2368 ldr r3, [r4] 376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1140 .loc 1 376 6 view .LVU364 1141 004a 13F0100F tst r3, #16 1142 004e 2CD1 bne .L107 1143 .LVL99: 1144 .L92: 386:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1145 .loc 1 386 3 is_stmt 1 view .LVU365 386:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1146 .loc 1 386 3 view .LVU366 1147 0050 1A4B ldr r3, .L108 1148 0052 0022 movs r2, #0 1149 0054 1A70 strb r2, [r3] 386:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1150 .loc 1 386 3 view .LVU367 388:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1151 .loc 1 388 3 view .LVU368 1152 .LVL100: 1153 .L86: 389:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1154 .loc 1 389 1 is_stmt 0 view .LVU369 1155 0056 2846 mov r0, r5 1156 0058 38BD pop {r3, r4, r5, pc} 1157 .LVL101: 1158 .L102: 326:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1159 .loc 1 326 5 is_stmt 1 view .LVU370 326:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1160 .loc 1 326 9 is_stmt 0 view .LVU371 1161 005a C268 ldr r2, [r0, #12] 1162 005c 8168 ldr r1, [r0, #8] 1163 005e 4068 ldr r0, [r0, #4] 1164 .LVL102: 326:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1165 .loc 1 326 9 view .LVU372 ARM GAS /tmp/ccGUz3uE.s page 51 1166 0060 FFF7FEFF bl FLASH_OB_WRPConfig 1167 .LVL103: 326:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1168 .loc 1 326 8 discriminator 1 view .LVU373 1169 0064 0546 mov r5, r0 1170 0066 0028 cmp r0, #0 1171 0068 DAD0 beq .L87 328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1172 .loc 1 328 14 view .LVU374 1173 006a 0125 movs r5, #1 1174 006c D8E7 b .L87 1175 .LVL104: 1176 .L103: 336:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1177 .loc 1 336 5 is_stmt 1 view .LVU375 336:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1178 .loc 1 336 9 is_stmt 0 view .LVU376 1179 006e 2069 ldr r0, [r4, #16] 1180 0070 FFF7FEFF bl FLASH_OB_RDPConfig 1181 .LVL105: 336:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1182 .loc 1 336 8 discriminator 1 view .LVU377 1183 0074 0028 cmp r0, #0 1184 0076 D7D0 beq .L88 338:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1185 .loc 1 338 14 view .LVU378 1186 0078 0125 movs r5, #1 1187 .LVL106: 338:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1188 .loc 1 338 14 view .LVU379 1189 007a D5E7 b .L88 1190 .LVL107: 1191 .L104: 346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1192 .loc 1 346 5 is_stmt 1 view .LVU380 346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1193 .loc 1 346 9 is_stmt 0 view .LVU381 1194 007c A169 ldr r1, [r4, #24] 1195 007e 6069 ldr r0, [r4, #20] 1196 0080 FFF7FEFF bl FLASH_OB_UserConfig 1197 .LVL108: 346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1198 .loc 1 346 8 discriminator 1 view .LVU382 1199 0084 0028 cmp r0, #0 1200 0086 D3D0 beq .L89 348:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1201 .loc 1 348 14 view .LVU383 1202 0088 0125 movs r5, #1 1203 .LVL109: 348:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1204 .loc 1 348 14 view .LVU384 1205 008a D1E7 b .L89 1206 .LVL110: 1207 .L105: 358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1208 .loc 1 358 7 is_stmt 1 view .LVU385 358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { ARM GAS /tmp/ccGUz3uE.s page 52 1209 .loc 1 358 11 is_stmt 0 view .LVU386 1210 008c E069 ldr r0, [r4, #28] 1211 008e FFF7FEFF bl FLASH_OB_PCROPConfig 1212 .LVL111: 358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1213 .loc 1 358 10 discriminator 1 view .LVU387 1214 0092 0028 cmp r0, #0 1215 0094 D4D0 beq .L90 360:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1216 .loc 1 360 16 view .LVU388 1217 0096 0125 movs r5, #1 1218 .LVL112: 360:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1219 .loc 1 360 16 view .LVU389 1220 0098 D2E7 b .L90 1221 .LVL113: 1222 .L106: 369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1223 .loc 1 369 5 is_stmt 1 view .LVU390 369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1224 .loc 1 369 9 is_stmt 0 view .LVU391 1225 009a 216B ldr r1, [r4, #48] 1226 009c E06A ldr r0, [r4, #44] 1227 009e FFF7FEFF bl FLASH_OB_SecMemConfig 1228 .LVL114: 369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1229 .loc 1 369 8 discriminator 1 view .LVU392 1230 00a2 0028 cmp r0, #0 1231 00a4 D0D0 beq .L91 371:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1232 .loc 1 371 14 view .LVU393 1233 00a6 0125 movs r5, #1 1234 .LVL115: 371:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1235 .loc 1 371 14 view .LVU394 1236 00a8 CEE7 b .L91 1237 .LVL116: 1238 .L107: 379:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1239 .loc 1 379 5 is_stmt 1 view .LVU395 379:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1240 .loc 1 379 9 is_stmt 0 view .LVU396 1241 00aa A06A ldr r0, [r4, #40] 1242 00ac FFF7FEFF bl FLASH_OB_BootLockConfig 1243 .LVL117: 379:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1244 .loc 1 379 8 discriminator 1 view .LVU397 1245 00b0 0028 cmp r0, #0 1246 00b2 CDD0 beq .L92 381:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1247 .loc 1 381 14 view .LVU398 1248 00b4 0125 movs r5, #1 1249 .LVL118: 381:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1250 .loc 1 381 14 view .LVU399 1251 00b6 CBE7 b .L92 1252 .LVL119: ARM GAS /tmp/ccGUz3uE.s page 53 1253 .L93: 318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1254 .loc 1 318 3 discriminator 1 view .LVU400 1255 00b8 0225 movs r5, #2 1256 00ba CCE7 b .L86 1257 .L109: 1258 .align 2 1259 .L108: 1260 00bc 00000000 .word pFlash 1261 .cfi_endproc 1262 .LFE331: 1264 .section .text.HAL_FLASHEx_OBGetConfig,"ax",%progbits 1265 .align 1 1266 .global HAL_FLASHEx_OBGetConfig 1267 .syntax unified 1268 .thumb 1269 .thumb_func 1271 HAL_FLASHEx_OBGetConfig: 1272 .LVL120: 1273 .LFB332: 400:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->OptionType = (OPTIONBYTE_RDP | OPTIONBYTE_USER); 1274 .loc 1 400 1 is_stmt 1 view -0 1275 .cfi_startproc 1276 @ args = 0, pretend = 0, frame = 0 1277 @ frame_needed = 0, uses_anonymous_args = 0 400:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pOBInit->OptionType = (OPTIONBYTE_RDP | OPTIONBYTE_USER); 1278 .loc 1 400 1 is_stmt 0 view .LVU402 1279 0000 10B5 push {r4, lr} 1280 .LCFI9: 1281 .cfi_def_cfa_offset 8 1282 .cfi_offset 4, -8 1283 .cfi_offset 14, -4 1284 0002 0446 mov r4, r0 401:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1285 .loc 1 401 3 is_stmt 1 view .LVU403 401:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1286 .loc 1 401 23 is_stmt 0 view .LVU404 1287 0004 0623 movs r3, #6 1288 0006 0360 str r3, [r0] 407:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1289 .loc 1 407 3 is_stmt 1 view .LVU405 407:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1290 .loc 1 407 15 is_stmt 0 view .LVU406 1291 0008 4068 ldr r0, [r0, #4] 1292 .LVL121: 407:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1293 .loc 1 407 6 view .LVU407 1294 000a 0128 cmp r0, #1 1295 000c 13D9 bls .L115 1296 .L111: 416:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1297 .loc 1 416 3 is_stmt 1 view .LVU408 416:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1298 .loc 1 416 23 is_stmt 0 view .LVU409 1299 000e FFF7FEFF bl FLASH_OB_GetRDP 1300 .LVL122: 416:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** ARM GAS /tmp/ccGUz3uE.s page 54 1301 .loc 1 416 21 discriminator 1 view .LVU410 1302 0012 2061 str r0, [r4, #16] 419:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1303 .loc 1 419 3 is_stmt 1 view .LVU411 419:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1304 .loc 1 419 25 is_stmt 0 view .LVU412 1305 0014 FFF7FEFF bl FLASH_OB_GetUser 1306 .LVL123: 419:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1307 .loc 1 419 23 discriminator 1 view .LVU413 1308 0018 A061 str r0, [r4, #24] 424:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1309 .loc 1 424 3 is_stmt 1 view .LVU414 424:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1310 .loc 1 424 14 is_stmt 0 view .LVU415 1311 001a E369 ldr r3, [r4, #28] 424:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1312 .loc 1 424 6 view .LVU416 1313 001c 012B cmp r3, #1 1314 001e 13D0 beq .L116 1315 .L112: 432:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1316 .loc 1 432 3 is_stmt 1 view .LVU417 432:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1317 .loc 1 432 10 is_stmt 0 view .LVU418 1318 0020 2368 ldr r3, [r4] 432:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1319 .loc 1 432 23 view .LVU419 1320 0022 43F01003 orr r3, r3, #16 1321 0026 2360 str r3, [r4] 435:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1322 .loc 1 435 3 is_stmt 1 view .LVU420 435:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1323 .loc 1 435 29 is_stmt 0 view .LVU421 1324 0028 FFF7FEFF bl FLASH_OB_GetBootLock 1325 .LVL124: 435:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1326 .loc 1 435 27 discriminator 1 view .LVU422 1327 002c A062 str r0, [r4, #40] 441:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1328 .loc 1 441 3 is_stmt 1 view .LVU423 441:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1329 .loc 1 441 14 is_stmt 0 view .LVU424 1330 002e E06A ldr r0, [r4, #44] 441:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1331 .loc 1 441 6 view .LVU425 1332 0030 0128 cmp r0, #1 1333 0032 16D0 beq .L117 1334 .L110: 447:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1335 .loc 1 447 1 view .LVU426 1336 0034 10BD pop {r4, pc} 1337 .LVL125: 1338 .L115: 410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get write protection on the selected area */ 1339 .loc 1 410 5 is_stmt 1 view .LVU427 410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get write protection on the selected area */ ARM GAS /tmp/ccGUz3uE.s page 55 1340 .loc 1 410 25 is_stmt 0 view .LVU428 1341 0036 2246 mov r2, r4 1342 0038 0723 movs r3, #7 1343 003a 42F80C3B str r3, [r2], #12 412:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1344 .loc 1 412 5 is_stmt 1 view .LVU429 1345 003e 04F10801 add r1, r4, #8 1346 0042 FFF7FEFF bl FLASH_OB_GetWRP 1347 .LVL126: 1348 0046 E2E7 b .L111 1349 .L116: 427:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the Proprietary code readout protection */ 1350 .loc 1 427 5 view .LVU430 427:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the Proprietary code readout protection */ 1351 .loc 1 427 12 is_stmt 0 view .LVU431 1352 0048 2368 ldr r3, [r4] 427:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Get the Proprietary code readout protection */ 1353 .loc 1 427 25 view .LVU432 1354 004a 43F00803 orr r3, r3, #8 1355 004e 2246 mov r2, r4 1356 0050 42F8243B str r3, [r2], #36 429:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1357 .loc 1 429 5 is_stmt 1 view .LVU433 1358 0054 04F12001 add r1, r4, #32 1359 0058 04F11C00 add r0, r4, #28 1360 005c FFF7FEFF bl FLASH_OB_GetPCROP 1361 .LVL127: 1362 0060 DEE7 b .L112 1363 .L117: 444:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_OB_GetSecMem(pOBInit->SecBank, &(pOBInit->SecSize)); 1364 .loc 1 444 5 view .LVU434 444:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_OB_GetSecMem(pOBInit->SecBank, &(pOBInit->SecSize)); 1365 .loc 1 444 12 is_stmt 0 view .LVU435 1366 0062 2368 ldr r3, [r4] 444:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_OB_GetSecMem(pOBInit->SecBank, &(pOBInit->SecSize)); 1367 .loc 1 444 25 view .LVU436 1368 0064 43F02003 orr r3, r3, #32 1369 0068 2146 mov r1, r4 1370 006a 41F8303B str r3, [r1], #48 445:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1371 .loc 1 445 5 is_stmt 1 view .LVU437 1372 006e FFF7FEFF bl FLASH_OB_GetSecMem 1373 .LVL128: 447:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1374 .loc 1 447 1 is_stmt 0 view .LVU438 1375 0072 DFE7 b .L110 1376 .cfi_endproc 1377 .LFE332: 1379 .section .text.HAL_FLASHEx_EnableSecMemProtection,"ax",%progbits 1380 .align 1 1381 .global HAL_FLASHEx_EnableSecMemProtection 1382 .syntax unified 1383 .thumb 1384 .thumb_func 1386 HAL_FLASHEx_EnableSecMemProtection: 1387 .LVL129: 1388 .LFB333: ARM GAS /tmp/ccGUz3uE.s page 56 460:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #if defined (FLASH_OPTR_DBANK) 1389 .loc 1 460 1 is_stmt 1 view -0 1390 .cfi_startproc 1391 @ args = 0, pretend = 0, frame = 0 1392 @ frame_needed = 0, uses_anonymous_args = 0 1393 @ link register save eliminated. 485:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_SEC_PROT1); 1394 .loc 1 485 3 view .LVU440 486:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif /* FLASH_OPTR_DBANK */ 1395 .loc 1 486 3 view .LVU441 1396 0000 034A ldr r2, .L119 1397 0002 5369 ldr r3, [r2, #20] 1398 0004 43F08053 orr r3, r3, #268435456 1399 0008 5361 str r3, [r2, #20] 489:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1400 .loc 1 489 3 view .LVU442 490:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1401 .loc 1 490 1 is_stmt 0 view .LVU443 1402 000a 0020 movs r0, #0 1403 .LVL130: 490:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1404 .loc 1 490 1 view .LVU444 1405 000c 7047 bx lr 1406 .L120: 1407 000e 00BF .align 2 1408 .L119: 1409 0010 00200240 .word 1073881088 1410 .cfi_endproc 1411 .LFE333: 1413 .section .text.HAL_FLASHEx_EnableDebugger,"ax",%progbits 1414 .align 1 1415 .global HAL_FLASHEx_EnableDebugger 1416 .syntax unified 1417 .thumb 1418 .thumb_func 1420 HAL_FLASHEx_EnableDebugger: 1421 .LFB334: 498:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->ACR |= FLASH_ACR_DBG_SWEN; 1422 .loc 1 498 1 is_stmt 1 view -0 1423 .cfi_startproc 1424 @ args = 0, pretend = 0, frame = 0 1425 @ frame_needed = 0, uses_anonymous_args = 0 1426 @ link register save eliminated. 499:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1427 .loc 1 499 3 view .LVU446 499:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1428 .loc 1 499 8 is_stmt 0 view .LVU447 1429 0000 024A ldr r2, .L122 1430 0002 1368 ldr r3, [r2] 499:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1431 .loc 1 499 14 view .LVU448 1432 0004 43F48023 orr r3, r3, #262144 1433 0008 1360 str r3, [r2] 500:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1434 .loc 1 500 1 view .LVU449 1435 000a 7047 bx lr 1436 .L123: ARM GAS /tmp/ccGUz3uE.s page 57 1437 .align 2 1438 .L122: 1439 000c 00200240 .word 1073881088 1440 .cfi_endproc 1441 .LFE334: 1443 .section .text.HAL_FLASHEx_DisableDebugger,"ax",%progbits 1444 .align 1 1445 .global HAL_FLASHEx_DisableDebugger 1446 .syntax unified 1447 .thumb 1448 .thumb_func 1450 HAL_FLASHEx_DisableDebugger: 1451 .LFB335: 510:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH->ACR &= ~FLASH_ACR_DBG_SWEN; 1452 .loc 1 510 1 is_stmt 1 view -0 1453 .cfi_startproc 1454 @ args = 0, pretend = 0, frame = 0 1455 @ frame_needed = 0, uses_anonymous_args = 0 1456 @ link register save eliminated. 511:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1457 .loc 1 511 3 view .LVU451 511:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1458 .loc 1 511 8 is_stmt 0 view .LVU452 1459 0000 024A ldr r2, .L125 1460 0002 1368 ldr r3, [r2] 511:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1461 .loc 1 511 14 view .LVU453 1462 0004 23F48023 bic r3, r3, #262144 1463 0008 1360 str r3, [r2] 512:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1464 .loc 1 512 1 view .LVU454 1465 000a 7047 bx lr 1466 .L126: 1467 .align 2 1468 .L125: 1469 000c 00200240 .word 1073881088 1470 .cfi_endproc 1471 .LFE335: 1473 .section .text.FLASH_PageErase,"ax",%progbits 1474 .align 1 1475 .global FLASH_PageErase 1476 .syntax unified 1477 .thumb 1478 .thumb_func 1480 FLASH_PageErase: 1481 .LVL131: 1482 .LFB337: 583:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Check the parameters */ 1483 .loc 1 583 1 is_stmt 1 view -0 1484 .cfi_startproc 1485 @ args = 0, pretend = 0, frame = 0 1486 @ frame_needed = 0, uses_anonymous_args = 0 1487 @ link register save eliminated. 585:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1488 .loc 1 585 3 view .LVU456 607:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif /* FLASH_OPTR_DBANK */ 1489 .loc 1 607 3 view .LVU457 ARM GAS /tmp/ccGUz3uE.s page 58 611:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_PER); 1490 .loc 1 611 3 view .LVU458 1491 0000 084B ldr r3, .L128 1492 0002 5A69 ldr r2, [r3, #20] 1493 0004 22F4FC72 bic r2, r2, #504 1494 0008 C000 lsls r0, r0, #3 1495 .LVL132: 611:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_PER); 1496 .loc 1 611 3 is_stmt 0 view .LVU459 1497 000a 00F4FF60 and r0, r0, #2040 1498 000e 0243 orrs r2, r2, r0 1499 0010 5A61 str r2, [r3, #20] 612:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** SET_BIT(FLASH->CR, FLASH_CR_STRT); 1500 .loc 1 612 3 is_stmt 1 view .LVU460 1501 0012 5A69 ldr r2, [r3, #20] 1502 0014 42F00202 orr r2, r2, #2 1503 0018 5A61 str r2, [r3, #20] 613:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1504 .loc 1 613 3 view .LVU461 1505 001a 5A69 ldr r2, [r3, #20] 1506 001c 42F48032 orr r2, r2, #65536 1507 0020 5A61 str r2, [r3, #20] 614:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1508 .loc 1 614 1 is_stmt 0 view .LVU462 1509 0022 7047 bx lr 1510 .L129: 1511 .align 2 1512 .L128: 1513 0024 00200240 .word 1073881088 1514 .cfi_endproc 1515 .LFE337: 1517 .section .text.HAL_FLASHEx_Erase_IT,"ax",%progbits 1518 .align 1 1519 .global HAL_FLASHEx_Erase_IT 1520 .syntax unified 1521 .thumb 1522 .thumb_func 1524 HAL_FLASHEx_Erase_IT: 1525 .LVL133: 1526 .LFB330: 238:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1527 .loc 1 238 1 is_stmt 1 view -0 1528 .cfi_startproc 1529 @ args = 0, pretend = 0, frame = 0 1530 @ frame_needed = 0, uses_anonymous_args = 0 239:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1531 .loc 1 239 3 view .LVU464 242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1532 .loc 1 242 3 view .LVU465 242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1533 .loc 1 242 3 view .LVU466 1534 0000 294A ldr r2, .L143 1535 0002 1278 ldrb r2, [r2] @ zero_extendqisi2 1536 0004 012A cmp r2, #1 1537 0006 4DD0 beq .L137 238:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status = HAL_OK; 1538 .loc 1 238 1 is_stmt 0 view .LVU467 ARM GAS /tmp/ccGUz3uE.s page 59 1539 0008 08B5 push {r3, lr} 1540 .LCFI10: 1541 .cfi_def_cfa_offset 8 1542 .cfi_offset 3, -8 1543 .cfi_offset 14, -4 1544 000a 0346 mov r3, r0 242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1545 .loc 1 242 3 is_stmt 1 discriminator 2 view .LVU468 1546 000c 264A ldr r2, .L143 1547 000e 0121 movs r1, #1 1548 0010 1170 strb r1, [r2] 242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1549 .loc 1 242 3 view .LVU469 245:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1550 .loc 1 245 3 view .LVU470 247:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1551 .loc 1 247 3 view .LVU471 247:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1552 .loc 1 247 20 is_stmt 0 view .LVU472 1553 0012 0021 movs r1, #0 1554 0014 5160 str r1, [r2, #4] 250:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1555 .loc 1 250 3 is_stmt 1 view .LVU473 250:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1556 .loc 1 250 7 is_stmt 0 view .LVU474 1557 0016 254A ldr r2, .L143+4 1558 0018 1268 ldr r2, [r2] 250:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1559 .loc 1 250 6 view .LVU475 1560 001a 12F4007F tst r2, #512 1561 001e 27D0 beq .L132 252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1562 .loc 1 252 5 is_stmt 1 view .LVU476 252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1563 .loc 1 252 9 is_stmt 0 view .LVU477 1564 0020 224A ldr r2, .L143+4 1565 0022 1268 ldr r2, [r2] 252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1566 .loc 1 252 8 view .LVU478 1567 0024 12F4806F tst r2, #1024 1568 0028 1ED0 beq .L133 255:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_ICACHE_DCACHE_ENABLED; 1569 .loc 1 255 7 is_stmt 1 view .LVU479 1570 002a 2049 ldr r1, .L143+4 1571 002c 0A68 ldr r2, [r1] 1572 002e 22F48062 bic r2, r2, #1024 1573 0032 0A60 str r2, [r1] 256:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1574 .loc 1 256 7 view .LVU480 256:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1575 .loc 1 256 32 is_stmt 0 view .LVU481 1576 0034 1C4A ldr r2, .L143 1577 0036 0321 movs r1, #3 1578 0038 1177 strb r1, [r2, #28] 1579 .L134: 275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1580 .loc 1 275 3 is_stmt 1 view .LVU482 ARM GAS /tmp/ccGUz3uE.s page 60 275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1581 .loc 1 275 3 view .LVU483 275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1582 .loc 1 275 3 discriminator 3 view .LVU484 275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1583 .loc 1 275 3 discriminator 4 view .LVU485 1584 003a 1C49 ldr r1, .L143+4 1585 003c 4A69 ldr r2, [r1, #20] 1586 003e 42F04072 orr r2, r2, #50331648 1587 0042 4A61 str r2, [r1, #20] 275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1588 .loc 1 275 3 discriminator 6 view .LVU486 277:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1589 .loc 1 277 3 view .LVU487 277:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1590 .loc 1 277 27 is_stmt 0 view .LVU488 1591 0044 5968 ldr r1, [r3, #4] 277:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1592 .loc 1 277 15 view .LVU489 1593 0046 184A ldr r2, .L143 1594 0048 1161 str r1, [r2, #16] 279:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1595 .loc 1 279 3 is_stmt 1 view .LVU490 279:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1596 .loc 1 279 17 is_stmt 0 view .LVU491 1597 004a 1A68 ldr r2, [r3] 279:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1598 .loc 1 279 6 view .LVU492 1599 004c 012A cmp r2, #1 1600 004e 21D0 beq .L142 288:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.NbPagesToErase = pEraseInit->NbPages; 1601 .loc 1 288 5 is_stmt 1 view .LVU493 288:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.NbPagesToErase = pEraseInit->NbPages; 1602 .loc 1 288 29 is_stmt 0 view .LVU494 1603 0050 154A ldr r2, .L143 1604 0052 0121 movs r1, #1 1605 0054 1172 strb r1, [r2, #8] 289:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.Page = pEraseInit->Page; 1606 .loc 1 289 5 is_stmt 1 view .LVU495 289:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.Page = pEraseInit->Page; 1607 .loc 1 289 39 is_stmt 0 view .LVU496 1608 0056 D968 ldr r1, [r3, #12] 289:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.Page = pEraseInit->Page; 1609 .loc 1 289 27 view .LVU497 1610 0058 9161 str r1, [r2, #24] 290:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1611 .loc 1 290 5 is_stmt 1 view .LVU498 290:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1612 .loc 1 290 29 is_stmt 0 view .LVU499 1613 005a 9868 ldr r0, [r3, #8] 1614 .LVL134: 290:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1615 .loc 1 290 17 view .LVU500 1616 005c 5061 str r0, [r2, #20] 293:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1617 .loc 1 293 5 is_stmt 1 view .LVU501 1618 005e 5968 ldr r1, [r3, #4] ARM GAS /tmp/ccGUz3uE.s page 61 1619 0060 FFF7FEFF bl FLASH_PageErase 1620 .LVL135: 296:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1621 .loc 1 296 10 is_stmt 0 view .LVU502 1622 0064 0020 movs r0, #0 1623 .L131: 297:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1624 .loc 1 297 1 view .LVU503 1625 0066 08BD pop {r3, pc} 1626 .LVL136: 1627 .L133: 260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1628 .loc 1 260 7 is_stmt 1 view .LVU504 260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1629 .loc 1 260 32 is_stmt 0 view .LVU505 1630 0068 0F4A ldr r2, .L143 1631 006a 0121 movs r1, #1 1632 006c 1177 strb r1, [r2, #28] 1633 006e E4E7 b .L134 1634 .L132: 263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1635 .loc 1 263 8 is_stmt 1 view .LVU506 263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1636 .loc 1 263 12 is_stmt 0 view .LVU507 1637 0070 0E4A ldr r2, .L143+4 1638 0072 1268 ldr r2, [r2] 263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1639 .loc 1 263 11 view .LVU508 1640 0074 12F4806F tst r2, #1024 1641 0078 08D0 beq .L135 266:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_DCACHE_ENABLED; 1642 .loc 1 266 5 is_stmt 1 view .LVU509 1643 007a 0C49 ldr r1, .L143+4 1644 007c 0A68 ldr r2, [r1] 1645 007e 22F48062 bic r2, r2, #1024 1646 0082 0A60 str r2, [r1] 267:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1647 .loc 1 267 5 view .LVU510 267:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1648 .loc 1 267 30 is_stmt 0 view .LVU511 1649 0084 084A ldr r2, .L143 1650 0086 0221 movs r1, #2 1651 0088 1177 strb r1, [r2, #28] 1652 008a D6E7 b .L134 1653 .L135: 271:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1654 .loc 1 271 5 is_stmt 1 view .LVU512 271:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1655 .loc 1 271 30 is_stmt 0 view .LVU513 1656 008c 064A ldr r2, .L143 1657 008e 0021 movs r1, #0 1658 0090 1177 strb r1, [r2, #28] 1659 0092 D2E7 b .L134 1660 .L142: 282:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_MassErase(pEraseInit->Banks); 1661 .loc 1 282 5 is_stmt 1 view .LVU514 282:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_MassErase(pEraseInit->Banks); ARM GAS /tmp/ccGUz3uE.s page 62 1662 .loc 1 282 29 is_stmt 0 view .LVU515 1663 0094 044A ldr r2, .L143 1664 0096 0221 movs r1, #2 1665 0098 1172 strb r1, [r2, #8] 283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1666 .loc 1 283 5 is_stmt 1 view .LVU516 1667 009a 5868 ldr r0, [r3, #4] 1668 .LVL137: 283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1669 .loc 1 283 5 is_stmt 0 view .LVU517 1670 009c FFF7FEFF bl FLASH_MassErase 1671 .LVL138: 296:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1672 .loc 1 296 10 view .LVU518 1673 00a0 0020 movs r0, #0 1674 00a2 E0E7 b .L131 1675 .LVL139: 1676 .L137: 1677 .LCFI11: 1678 .cfi_def_cfa_offset 0 1679 .cfi_restore 3 1680 .cfi_restore 14 242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1681 .loc 1 242 3 discriminator 1 view .LVU519 1682 00a4 0220 movs r0, #2 1683 .LVL140: 297:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1684 .loc 1 297 1 view .LVU520 1685 00a6 7047 bx lr 1686 .L144: 1687 .align 2 1688 .L143: 1689 00a8 00000000 .word pFlash 1690 00ac 00200240 .word 1073881088 1691 .cfi_endproc 1692 .LFE330: 1694 .section .text.FLASH_FlushCaches,"ax",%progbits 1695 .align 1 1696 .global FLASH_FlushCaches 1697 .syntax unified 1698 .thumb 1699 .thumb_func 1701 FLASH_FlushCaches: 1702 .LFB338: 621:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** FLASH_CacheTypeDef cache = pFlash.CacheToReactivate; 1703 .loc 1 621 1 is_stmt 1 view -0 1704 .cfi_startproc 1705 @ args = 0, pretend = 0, frame = 0 1706 @ frame_needed = 0, uses_anonymous_args = 0 1707 @ link register save eliminated. 622:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1708 .loc 1 622 3 view .LVU522 622:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1709 .loc 1 622 22 is_stmt 0 view .LVU523 1710 0000 164B ldr r3, .L150 1711 0002 1A7F ldrb r2, [r3, #28] @ zero_extendqisi2 1712 0004 D3B2 uxtb r3, r2 ARM GAS /tmp/ccGUz3uE.s page 63 1713 .LVL141: 625:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 1714 .loc 1 625 3 is_stmt 1 view .LVU524 625:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 1715 .loc 1 625 6 is_stmt 0 view .LVU525 1716 0006 012A cmp r2, #1 1717 0008 01D0 beq .L146 625:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 1718 .loc 1 625 45 discriminator 1 view .LVU526 1719 000a 032B cmp r3, #3 1720 000c 10D1 bne .L147 1721 .L146: 629:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Reset instruction cache */ 1722 .loc 1 629 5 is_stmt 1 view .LVU527 1723 000e 144A ldr r2, .L150+4 1724 0010 1168 ldr r1, [r2] 1725 0012 21F40071 bic r1, r1, #512 1726 0016 1160 str r1, [r2] 631:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable instruction cache */ 1727 .loc 1 631 5 view .LVU528 631:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable instruction cache */ 1728 .loc 1 631 5 view .LVU529 1729 0018 1168 ldr r1, [r2] 1730 001a 41F40061 orr r1, r1, #2048 1731 001e 1160 str r1, [r2] 631:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable instruction cache */ 1732 .loc 1 631 5 view .LVU530 1733 0020 1168 ldr r1, [r2] 1734 0022 21F40061 bic r1, r1, #2048 1735 0026 1160 str r1, [r2] 631:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable instruction cache */ 1736 .loc 1 631 5 view .LVU531 633:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1737 .loc 1 633 5 view .LVU532 1738 0028 1168 ldr r1, [r2] 1739 002a 41F40071 orr r1, r1, #512 1740 002e 1160 str r1, [r2] 1741 .L147: 637:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 1742 .loc 1 637 3 view .LVU533 637:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 1743 .loc 1 637 45 is_stmt 0 view .LVU534 1744 0030 023B subs r3, r3, #2 1745 .LVL142: 637:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 1746 .loc 1 637 45 view .LVU535 1747 0032 DBB2 uxtb r3, r3 1748 .LVL143: 637:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** (cache == FLASH_CACHE_ICACHE_DCACHE_ENABLED)) 1749 .loc 1 637 6 view .LVU536 1750 0034 012B cmp r3, #1 1751 0036 03D9 bls .L149 1752 .L148: 647:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1753 .loc 1 647 3 is_stmt 1 view .LVU537 647:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1754 .loc 1 647 28 is_stmt 0 view .LVU538 ARM GAS /tmp/ccGUz3uE.s page 64 1755 0038 084B ldr r3, .L150 1756 003a 0022 movs r2, #0 1757 003c 1A77 strb r2, [r3, #28] 648:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1758 .loc 1 648 1 view .LVU539 1759 003e 7047 bx lr 1760 .L149: 641:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable data cache */ 1761 .loc 1 641 5 is_stmt 1 view .LVU540 641:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable data cache */ 1762 .loc 1 641 5 view .LVU541 1763 0040 074B ldr r3, .L150+4 1764 0042 1A68 ldr r2, [r3] 1765 0044 42F48052 orr r2, r2, #4096 1766 0048 1A60 str r2, [r3] 641:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable data cache */ 1767 .loc 1 641 5 view .LVU542 1768 004a 1A68 ldr r2, [r3] 1769 004c 22F48052 bic r2, r2, #4096 1770 0050 1A60 str r2, [r3] 641:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** /* Enable data cache */ 1771 .loc 1 641 5 view .LVU543 643:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1772 .loc 1 643 5 view .LVU544 1773 0052 1A68 ldr r2, [r3] 1774 0054 42F48062 orr r2, r2, #1024 1775 0058 1A60 str r2, [r3] 1776 005a EDE7 b .L148 1777 .L151: 1778 .align 2 1779 .L150: 1780 005c 00000000 .word pFlash 1781 0060 00200240 .word 1073881088 1782 .cfi_endproc 1783 .LFE338: 1785 .section .text.HAL_FLASHEx_Erase,"ax",%progbits 1786 .align 1 1787 .global HAL_FLASHEx_Erase 1788 .syntax unified 1789 .thumb 1790 .thumb_func 1792 HAL_FLASHEx_Erase: 1793 .LVL144: 1794 .LFB329: 139:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 1795 .loc 1 139 1 view -0 1796 .cfi_startproc 1797 @ args = 0, pretend = 0, frame = 0 1798 @ frame_needed = 0, uses_anonymous_args = 0 139:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** HAL_StatusTypeDef status; 1799 .loc 1 139 1 is_stmt 0 view .LVU546 1800 0000 F8B5 push {r3, r4, r5, r6, r7, lr} 1801 .LCFI12: 1802 .cfi_def_cfa_offset 24 1803 .cfi_offset 3, -24 1804 .cfi_offset 4, -20 1805 .cfi_offset 5, -16 ARM GAS /tmp/ccGUz3uE.s page 65 1806 .cfi_offset 6, -12 1807 .cfi_offset 7, -8 1808 .cfi_offset 14, -4 140:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** uint32_t page_index; 1809 .loc 1 140 3 is_stmt 1 view .LVU547 141:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1810 .loc 1 141 3 view .LVU548 144:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1811 .loc 1 144 3 view .LVU549 147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1812 .loc 1 147 3 view .LVU550 147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1813 .loc 1 147 3 view .LVU551 1814 0002 384B ldr r3, .L168 1815 0004 1B78 ldrb r3, [r3] @ zero_extendqisi2 1816 0006 012B cmp r3, #1 1817 0008 69D0 beq .L164 1818 000a 0446 mov r4, r0 1819 000c 0E46 mov r6, r1 147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1820 .loc 1 147 3 discriminator 2 view .LVU552 1821 000e 354B ldr r3, .L168 1822 0010 0122 movs r2, #1 1823 0012 1A70 strb r2, [r3] 147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1824 .loc 1 147 3 view .LVU553 150:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1825 .loc 1 150 3 view .LVU554 150:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1826 .loc 1 150 12 is_stmt 0 view .LVU555 1827 0014 4FF47A70 mov r0, #1000 1828 .LVL145: 150:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1829 .loc 1 150 12 view .LVU556 1830 0018 FFF7FEFF bl FLASH_WaitForLastOperation 1831 .LVL146: 152:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1832 .loc 1 152 3 is_stmt 1 view .LVU557 152:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1833 .loc 1 152 6 is_stmt 0 view .LVU558 1834 001c 0746 mov r7, r0 1835 001e 0028 cmp r0, #0 1836 0020 58D1 bne .L154 154:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1837 .loc 1 154 5 is_stmt 1 view .LVU559 154:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1838 .loc 1 154 22 is_stmt 0 view .LVU560 1839 0022 304B ldr r3, .L168 1840 0024 0022 movs r2, #0 1841 0026 5A60 str r2, [r3, #4] 157:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1842 .loc 1 157 5 is_stmt 1 view .LVU561 157:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1843 .loc 1 157 9 is_stmt 0 view .LVU562 1844 0028 2F4B ldr r3, .L168+4 1845 002a 1B68 ldr r3, [r3] 157:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { ARM GAS /tmp/ccGUz3uE.s page 66 1846 .loc 1 157 8 view .LVU563 1847 002c 13F4007F tst r3, #512 1848 0030 2DD0 beq .L155 159:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1849 .loc 1 159 7 is_stmt 1 view .LVU564 159:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1850 .loc 1 159 11 is_stmt 0 view .LVU565 1851 0032 2D4B ldr r3, .L168+4 1852 0034 1B68 ldr r3, [r3] 159:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1853 .loc 1 159 10 view .LVU566 1854 0036 13F4806F tst r3, #1024 1855 003a 24D0 beq .L156 162:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_ICACHE_DCACHE_ENABLED; 1856 .loc 1 162 9 is_stmt 1 view .LVU567 1857 003c 2A4A ldr r2, .L168+4 1858 003e 1368 ldr r3, [r2] 1859 0040 23F48063 bic r3, r3, #1024 1860 0044 1360 str r3, [r2] 163:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1861 .loc 1 163 9 view .LVU568 163:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1862 .loc 1 163 34 is_stmt 0 view .LVU569 1863 0046 274B ldr r3, .L168 1864 0048 0322 movs r2, #3 1865 004a 1A77 strb r2, [r3, #28] 1866 .L157: 181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1867 .loc 1 181 5 is_stmt 1 view .LVU570 181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1868 .loc 1 181 19 is_stmt 0 view .LVU571 1869 004c 2368 ldr r3, [r4] 181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1870 .loc 1 181 8 view .LVU572 1871 004e 012B cmp r3, #1 1872 0050 2FD0 beq .L166 200:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1873 .loc 1 200 7 is_stmt 1 view .LVU573 200:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1874 .loc 1 200 18 is_stmt 0 view .LVU574 1875 0052 4FF0FF33 mov r3, #-1 1876 0056 3360 str r3, [r6] 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1877 .loc 1 202 7 is_stmt 1 view .LVU575 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1878 .loc 1 202 23 is_stmt 0 view .LVU576 1879 0058 A568 ldr r5, [r4, #8] 1880 .LVL147: 1881 .L161: 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1882 .loc 1 202 54 is_stmt 1 discriminator 1 view .LVU577 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1883 .loc 1 202 67 is_stmt 0 discriminator 1 view .LVU578 1884 005a A368 ldr r3, [r4, #8] 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1885 .loc 1 202 86 discriminator 1 view .LVU579 1886 005c E268 ldr r2, [r4, #12] ARM GAS /tmp/ccGUz3uE.s page 67 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1887 .loc 1 202 74 discriminator 1 view .LVU580 1888 005e 1344 add r3, r3, r2 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1889 .loc 1 202 54 discriminator 1 view .LVU581 1890 0060 AB42 cmp r3, r5 1891 0062 35D9 bls .L160 204:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1892 .loc 1 204 9 is_stmt 1 view .LVU582 1893 0064 6168 ldr r1, [r4, #4] 1894 0066 2846 mov r0, r5 1895 0068 FFF7FEFF bl FLASH_PageErase 1896 .LVL148: 207:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1897 .loc 1 207 9 view .LVU583 207:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1898 .loc 1 207 18 is_stmt 0 view .LVU584 1899 006c 4FF47A70 mov r0, #1000 1900 0070 FFF7FEFF bl FLASH_WaitForLastOperation 1901 .LVL149: 210:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1902 .loc 1 210 9 is_stmt 1 view .LVU585 1903 0074 1C4A ldr r2, .L168+4 1904 0076 5369 ldr r3, [r2, #20] 1905 0078 23F4FD73 bic r3, r3, #506 1906 007c 5361 str r3, [r2, #20] 212:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1907 .loc 1 212 9 view .LVU586 212:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1908 .loc 1 212 12 is_stmt 0 view .LVU587 1909 007e 0746 mov r7, r0 1910 0080 28BB cbnz r0, .L167 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1911 .loc 1 202 108 is_stmt 1 discriminator 2 view .LVU588 1912 0082 0135 adds r5, r5, #1 1913 .LVL150: 202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1914 .loc 1 202 108 is_stmt 0 discriminator 2 view .LVU589 1915 0084 E9E7 b .L161 1916 .LVL151: 1917 .L156: 167:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1918 .loc 1 167 9 is_stmt 1 view .LVU590 167:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1919 .loc 1 167 34 is_stmt 0 view .LVU591 1920 0086 174B ldr r3, .L168 1921 0088 0122 movs r2, #1 1922 008a 1A77 strb r2, [r3, #28] 1923 008c DEE7 b .L157 1924 .L155: 170:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1925 .loc 1 170 10 is_stmt 1 view .LVU592 170:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { 1926 .loc 1 170 14 is_stmt 0 view .LVU593 1927 008e 164B ldr r3, .L168+4 1928 0090 1B68 ldr r3, [r3] 170:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** { ARM GAS /tmp/ccGUz3uE.s page 68 1929 .loc 1 170 13 view .LVU594 1930 0092 13F4806F tst r3, #1024 1931 0096 08D0 beq .L158 173:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** pFlash.CacheToReactivate = FLASH_CACHE_DCACHE_ENABLED; 1932 .loc 1 173 7 is_stmt 1 view .LVU595 1933 0098 134A ldr r2, .L168+4 1934 009a 1368 ldr r3, [r2] 1935 009c 23F48063 bic r3, r3, #1024 1936 00a0 1360 str r3, [r2] 174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1937 .loc 1 174 7 view .LVU596 174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1938 .loc 1 174 32 is_stmt 0 view .LVU597 1939 00a2 104B ldr r3, .L168 1940 00a4 0222 movs r2, #2 1941 00a6 1A77 strb r2, [r3, #28] 1942 00a8 D0E7 b .L157 1943 .L158: 178:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1944 .loc 1 178 7 is_stmt 1 view .LVU598 178:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1945 .loc 1 178 32 is_stmt 0 view .LVU599 1946 00aa 0E4B ldr r3, .L168 1947 00ac 0022 movs r2, #0 1948 00ae 1A77 strb r2, [r3, #28] 1949 00b0 CCE7 b .L157 1950 .L166: 184:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1951 .loc 1 184 7 is_stmt 1 view .LVU600 1952 00b2 6068 ldr r0, [r4, #4] 1953 .LVL152: 184:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1954 .loc 1 184 7 is_stmt 0 view .LVU601 1955 00b4 FFF7FEFF bl FLASH_MassErase 1956 .LVL153: 187:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1957 .loc 1 187 7 is_stmt 1 view .LVU602 187:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1958 .loc 1 187 16 is_stmt 0 view .LVU603 1959 00b8 4FF47A70 mov r0, #1000 1960 00bc FFF7FEFF bl FLASH_WaitForLastOperation 1961 .LVL154: 1962 00c0 0746 mov r7, r0 1963 .LVL155: 194:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** #endif 1964 .loc 1 194 7 is_stmt 1 view .LVU604 1965 00c2 094A ldr r2, .L168+4 1966 00c4 5369 ldr r3, [r2, #20] 1967 00c6 23F00403 bic r3, r3, #4 1968 00ca 5361 str r3, [r2, #20] 1969 00cc 00E0 b .L160 1970 .LVL156: 1971 .L167: 215:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** break; 1972 .loc 1 215 11 view .LVU605 215:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** break; 1973 .loc 1 215 22 is_stmt 0 view .LVU606 ARM GAS /tmp/ccGUz3uE.s page 69 1974 00ce 3560 str r5, [r6] 216:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1975 .loc 1 216 11 is_stmt 1 view .LVU607 1976 .LVL157: 1977 .L160: 222:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1978 .loc 1 222 5 view .LVU608 1979 00d0 FFF7FEFF bl FLASH_FlushCaches 1980 .LVL158: 1981 .L154: 226:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1982 .loc 1 226 3 view .LVU609 226:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1983 .loc 1 226 3 view .LVU610 1984 00d4 034B ldr r3, .L168 1985 00d6 0022 movs r2, #0 1986 00d8 1A70 strb r2, [r3] 226:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1987 .loc 1 226 3 view .LVU611 228:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** } 1988 .loc 1 228 3 view .LVU612 1989 .LVL159: 1990 .L153: 229:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1991 .loc 1 229 1 is_stmt 0 view .LVU613 1992 00da 3846 mov r0, r7 1993 00dc F8BD pop {r3, r4, r5, r6, r7, pc} 1994 .LVL160: 1995 .L164: 147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.c **** 1996 .loc 1 147 3 discriminator 1 view .LVU614 1997 00de 0227 movs r7, #2 1998 00e0 FBE7 b .L153 1999 .L169: 2000 00e2 00BF .align 2 2001 .L168: 2002 00e4 00000000 .word pFlash 2003 00e8 00200240 .word 1073881088 2004 .cfi_endproc 2005 .LFE329: 2007 .text 2008 .Letext0: 2009 .file 2 "/home/fra/bin/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/arm-none-eabi/include/mach 2010 .file 3 "/home/fra/bin/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/arm-none-eabi/include/sys/ 2011 .file 4 "Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h" 2012 .file 5 "Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h" 2013 .file 6 "Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h" ARM GAS /tmp/ccGUz3uE.s page 70 DEFINED SYMBOLS *ABS*:00000000 stm32g4xx_hal_flash_ex.c /tmp/ccGUz3uE.s:21 .text.FLASH_MassErase:00000000 $t /tmp/ccGUz3uE.s:26 .text.FLASH_MassErase:00000000 FLASH_MassErase /tmp/ccGUz3uE.s:55 .text.FLASH_MassErase:0000001c $d /tmp/ccGUz3uE.s:60 .text.FLASH_OB_GetSecMem:00000000 $t /tmp/ccGUz3uE.s:65 .text.FLASH_OB_GetSecMem:00000000 FLASH_OB_GetSecMem /tmp/ccGUz3uE.s:93 .text.FLASH_OB_GetSecMem:00000014 $d /tmp/ccGUz3uE.s:98 .text.FLASH_OB_GetBootLock:00000000 $t /tmp/ccGUz3uE.s:103 .text.FLASH_OB_GetBootLock:00000000 FLASH_OB_GetBootLock /tmp/ccGUz3uE.s:120 .text.FLASH_OB_GetBootLock:0000000c $d /tmp/ccGUz3uE.s:125 .text.FLASH_OB_GetWRP:00000000 $t /tmp/ccGUz3uE.s:130 .text.FLASH_OB_GetWRP:00000000 FLASH_OB_GetWRP /tmp/ccGUz3uE.s:192 .text.FLASH_OB_GetWRP:00000030 $d /tmp/ccGUz3uE.s:197 .text.FLASH_OB_GetRDP:00000000 $t /tmp/ccGUz3uE.s:202 .text.FLASH_OB_GetRDP:00000000 FLASH_OB_GetRDP /tmp/ccGUz3uE.s:232 .text.FLASH_OB_GetRDP:00000014 $d /tmp/ccGUz3uE.s:237 .text.FLASH_OB_GetUser:00000000 $t /tmp/ccGUz3uE.s:242 .text.FLASH_OB_GetUser:00000000 FLASH_OB_GetUser /tmp/ccGUz3uE.s:264 .text.FLASH_OB_GetUser:0000000c $d /tmp/ccGUz3uE.s:269 .text.FLASH_OB_GetPCROP:00000000 $t /tmp/ccGUz3uE.s:274 .text.FLASH_OB_GetPCROP:00000000 FLASH_OB_GetPCROP /tmp/ccGUz3uE.s:348 .text.FLASH_OB_GetPCROP:00000038 $d /tmp/ccGUz3uE.s:354 .text.FLASH_OB_WRPConfig:00000000 $t /tmp/ccGUz3uE.s:359 .text.FLASH_OB_WRPConfig:00000000 FLASH_OB_WRPConfig /tmp/ccGUz3uE.s:434 .text.FLASH_OB_WRPConfig:00000040 $d /tmp/ccGUz3uE.s:439 .text.FLASH_OB_RDPConfig:00000000 $t /tmp/ccGUz3uE.s:444 .text.FLASH_OB_RDPConfig:00000000 FLASH_OB_RDPConfig /tmp/ccGUz3uE.s:496 .text.FLASH_OB_RDPConfig:00000030 $d /tmp/ccGUz3uE.s:501 .text.FLASH_OB_UserConfig:00000000 $t /tmp/ccGUz3uE.s:506 .text.FLASH_OB_UserConfig:00000000 FLASH_OB_UserConfig /tmp/ccGUz3uE.s:809 .text.FLASH_OB_UserConfig:00000128 $d /tmp/ccGUz3uE.s:814 .text.FLASH_OB_PCROPConfig:00000000 $t /tmp/ccGUz3uE.s:819 .text.FLASH_OB_PCROPConfig:00000000 FLASH_OB_PCROPConfig /tmp/ccGUz3uE.s:909 .text.FLASH_OB_PCROPConfig:0000005c $d /tmp/ccGUz3uE.s:914 .text.FLASH_OB_SecMemConfig:00000000 $t /tmp/ccGUz3uE.s:919 .text.FLASH_OB_SecMemConfig:00000000 FLASH_OB_SecMemConfig /tmp/ccGUz3uE.s:980 .text.FLASH_OB_SecMemConfig:00000038 $d /tmp/ccGUz3uE.s:985 .text.FLASH_OB_BootLockConfig:00000000 $t /tmp/ccGUz3uE.s:990 .text.FLASH_OB_BootLockConfig:00000000 FLASH_OB_BootLockConfig /tmp/ccGUz3uE.s:1042 .text.FLASH_OB_BootLockConfig:00000030 $d /tmp/ccGUz3uE.s:1047 .text.HAL_FLASHEx_OBProgram:00000000 $t /tmp/ccGUz3uE.s:1053 .text.HAL_FLASHEx_OBProgram:00000000 HAL_FLASHEx_OBProgram /tmp/ccGUz3uE.s:1260 .text.HAL_FLASHEx_OBProgram:000000bc $d /tmp/ccGUz3uE.s:1265 .text.HAL_FLASHEx_OBGetConfig:00000000 $t /tmp/ccGUz3uE.s:1271 .text.HAL_FLASHEx_OBGetConfig:00000000 HAL_FLASHEx_OBGetConfig /tmp/ccGUz3uE.s:1380 .text.HAL_FLASHEx_EnableSecMemProtection:00000000 $t /tmp/ccGUz3uE.s:1386 .text.HAL_FLASHEx_EnableSecMemProtection:00000000 HAL_FLASHEx_EnableSecMemProtection /tmp/ccGUz3uE.s:1409 .text.HAL_FLASHEx_EnableSecMemProtection:00000010 $d /tmp/ccGUz3uE.s:1414 .text.HAL_FLASHEx_EnableDebugger:00000000 $t /tmp/ccGUz3uE.s:1420 .text.HAL_FLASHEx_EnableDebugger:00000000 HAL_FLASHEx_EnableDebugger /tmp/ccGUz3uE.s:1439 .text.HAL_FLASHEx_EnableDebugger:0000000c $d /tmp/ccGUz3uE.s:1444 .text.HAL_FLASHEx_DisableDebugger:00000000 $t /tmp/ccGUz3uE.s:1450 .text.HAL_FLASHEx_DisableDebugger:00000000 HAL_FLASHEx_DisableDebugger /tmp/ccGUz3uE.s:1469 .text.HAL_FLASHEx_DisableDebugger:0000000c $d /tmp/ccGUz3uE.s:1474 .text.FLASH_PageErase:00000000 $t /tmp/ccGUz3uE.s:1480 .text.FLASH_PageErase:00000000 FLASH_PageErase ARM GAS /tmp/ccGUz3uE.s page 71 /tmp/ccGUz3uE.s:1513 .text.FLASH_PageErase:00000024 $d /tmp/ccGUz3uE.s:1518 .text.HAL_FLASHEx_Erase_IT:00000000 $t /tmp/ccGUz3uE.s:1524 .text.HAL_FLASHEx_Erase_IT:00000000 HAL_FLASHEx_Erase_IT /tmp/ccGUz3uE.s:1689 .text.HAL_FLASHEx_Erase_IT:000000a8 $d /tmp/ccGUz3uE.s:1695 .text.FLASH_FlushCaches:00000000 $t /tmp/ccGUz3uE.s:1701 .text.FLASH_FlushCaches:00000000 FLASH_FlushCaches /tmp/ccGUz3uE.s:1780 .text.FLASH_FlushCaches:0000005c $d /tmp/ccGUz3uE.s:1786 .text.HAL_FLASHEx_Erase:00000000 $t /tmp/ccGUz3uE.s:1792 .text.HAL_FLASHEx_Erase:00000000 HAL_FLASHEx_Erase /tmp/ccGUz3uE.s:2002 .text.HAL_FLASHEx_Erase:000000e4 $d UNDEFINED SYMBOLS FLASH_WaitForLastOperation pFlash