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