Files
squeow/squeow_sw/build/stm32g4xx_hal_flash.lst

3455 lines
215 KiB
Plaintext
Raw Normal View History

2023-07-02 17:09:41 +02:00
ARM GAS /tmp/ccsIWRCI.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.c"
16 .text
17 .Ltext0:
18 .cfi_sections .debug_frame
19 .file 1 "Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c"
20 .section .text.FLASH_Program_DoubleWord,"ax",%progbits
21 .align 1
22 .syntax unified
23 .thumb
24 .thumb_func
26 FLASH_Program_DoubleWord:
27 .LVL0:
28 .LFB341:
1:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
2:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ******************************************************************************
3:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @file stm32g4xx_hal_flash.c
4:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @author MCD Application Team
5:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief FLASH HAL module driver.
6:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * This file provides firmware functions to manage the following
7:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * functionalities of the internal FLASH memory:
8:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * + Program operations functions
9:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * + Memory Control functions
10:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * + Peripheral Errors functions
11:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
12:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @verbatim
13:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ==============================================================================
14:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ##### FLASH peripheral features #####
15:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ==============================================================================
16:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
17:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..] The Flash memory interface manages CPU AHB I-Code and D-Code accesses
18:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** to the Flash memory. It implements the erase and program Flash memory operations
19:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** and the read and write protection mechanisms.
20:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
21:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..] The Flash memory interface accelerates code execution with a system of instruction
22:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** prefetch and cache lines.
23:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
24:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..] The FLASH main features are:
25:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Flash memory read operations
26:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Flash memory program/erase operations
27:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Read / write protections
28:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Option bytes programming
29:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Prefetch on I-Code
30:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) 32 cache lines of 4*64 or 2*128 bits on I-Code
ARM GAS /tmp/ccsIWRCI.s page 2
31:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) 8 cache lines of 4*64 or 2*128 bits on D-Code
32:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Error code correction (ECC) : Data in flash are 72-bits word
33:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (8 bits added per double word)
34:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
35:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
36:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ##### How to use this driver #####
37:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ==============================================================================
38:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..]
39:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** This driver provides functions and macros to configure and program the FLASH
40:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** memory of all STM32G4xx devices.
41:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
42:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (#) Flash Memory IO Programming functions:
43:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and
44:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_Lock() functions
45:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) Program functions: double word and fast program (full row programming)
46:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) There are two modes of programming :
47:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+++) Polling mode using HAL_FLASH_Program() function
48:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+++) Interrupt mode using HAL_FLASH_Program_IT() function
49:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
50:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (#) Interrupts and flags management functions:
51:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) Handle FLASH interrupts by calling HAL_FLASH_IRQHandler()
52:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) Callback functions are called when the flash operations are finished :
53:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback() when everything is ok, otherwise
54:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_OperationErrorCallback()
55:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) Get error flag status by calling HAL_GetError()
56:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
57:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (#) Option bytes management functions:
58:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) Lock and Unlock the option bytes using HAL_FLASH_OB_Unlock() and
59:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_OB_Lock() functions
60:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (++) Launch the reload of the option bytes using HAL_FLASH_Launch() function.
61:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** In this case, a reset is generated
62:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
63:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..]
64:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** In addition to these functions, this driver includes a set of macros allowing
65:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** to handle the following operations:
66:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Set the latency
67:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Enable/Disable the prefetch buffer
68:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Enable/Disable the Instruction cache and the Data cache
69:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Reset the Instruction cache and the Data cache
70:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Enable/Disable the Flash power-down during low-power run and sleep modes
71:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Enable/Disable the Flash interrupts
72:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (+) Monitor the Flash flags status
73:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
74:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @endverbatim
75:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ******************************************************************************
76:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @attention
77:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
78:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * Copyright (c) 2019 STMicroelectronics.
79:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * All rights reserved.
80:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
81:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * This software is licensed under terms that can be found in the LICENSE file in
82:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * the root directory of this software component.
83:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * If no LICENSE file comes with this software, it is provided AS-IS.
84:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ******************************************************************************
85:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
86:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
87:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Includes ------------------------------------------------------------------*/
ARM GAS /tmp/ccsIWRCI.s page 3
88:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** #include "stm32g4xx_hal.h"
89:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
90:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @addtogroup STM32G4xx_HAL_Driver
91:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
92:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
93:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
94:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH FLASH
95:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief FLASH HAL module driver
96:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
97:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
98:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
99:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** #ifdef HAL_FLASH_MODULE_ENABLED
100:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
101:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Private typedef -----------------------------------------------------------*/
102:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Private defines -----------------------------------------------------------*/
103:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH_Private_Constants FLASH Private Constants
104:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
105:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
106:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** #define FLASH_NB_DOUBLE_WORDS_IN_ROW 32
107:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
108:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @}
109:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
110:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
111:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Private macros ------------------------------------------------------------*/
112:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Private variables ---------------------------------------------------------*/
113:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH_Private_Variables FLASH Private Variables
114:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
115:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
116:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
117:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
118:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Variable used for Program/Erase sectors under interruption
119:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
120:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_ProcessTypeDef pFlash = {.Lock = HAL_UNLOCKED,
121:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** .ErrorCode = HAL_FLASH_ERROR_NONE,
122:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** .ProcedureOnGoing = FLASH_PROC_NONE,
123:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** .Address = 0U,
124:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** .Bank = FLASH_BANK_1,
125:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** .Page = 0U,
126:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** .NbPagesToErase = 0U,
127:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** .CacheToReactivate = FLASH_CACHE_DISABLED};
128:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
129:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @}
130:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
131:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
132:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Private function prototypes -----------------------------------------------*/
133:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH_Private_Functions FLASH Private Functions
134:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
135:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
136:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** static void FLASH_Program_DoubleWord(uint32_t Address, uint64_t Data);
137:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** static void FLASH_Program_Fast(uint32_t Address, uint32_t DataAddress);
138:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
139:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @}
140:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
141:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
142:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Exported functions --------------------------------------------------------*/
143:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions FLASH Exported Functions
144:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
ARM GAS /tmp/ccsIWRCI.s page 4
145:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
146:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
147:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions_Group1 Programming operation functions
148:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Programming operation functions
149:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
150:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @verbatim
151:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ===============================================================================
152:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ##### Programming operation functions #####
153:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ===============================================================================
154:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..]
155:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** This subsection provides a set of functions allowing to manage the FLASH
156:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** program operations.
157:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
158:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @endverbatim
159:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
160:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
161:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
162:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
163:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Program double word or fast program of a row at a specified address.
164:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param TypeProgram Indicate the way to program at a specified address.
165:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * This parameter can be a value of @ref FLASH_Type_Program.
166:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Address specifies the address to be programmed.
167:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Data specifies the data to be programmed.
168:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * This parameter is the data for the double word program and the address where
169:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * are stored the data for the row fast program.
170:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
171:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
172:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
173:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data)
174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
175:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status;
176:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t prog_bit = 0;
177:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
178:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check the parameters */
179:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram));
180:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
181:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Process Locked */
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_LOCK(&pFlash);
183:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
184:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Wait for last operation to be completed */
185:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
186:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
187:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (status == HAL_OK)
188:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
189:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;
190:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
191:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (TypeProgram == FLASH_TYPEPROGRAM_DOUBLEWORD)
192:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
193:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Program double-word (64-bit) at a specified address */
194:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_Program_DoubleWord(Address, Data);
195:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** prog_bit = FLASH_CR_PG;
196:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
197:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else if ((TypeProgram == FLASH_TYPEPROGRAM_FAST) || (TypeProgram == FLASH_TYPEPROGRAM_FAST_AND_
198:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
199:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Fast program a 32 row double-word (64-bit) at a specified address */
200:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_Program_Fast(Address, (uint32_t)Data);
201:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
ARM GAS /tmp/ccsIWRCI.s page 5
202:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* If it is the last row, the bit will be cleared at the end of the operation */
203:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (TypeProgram == FLASH_TYPEPROGRAM_FAST_AND_LAST)
204:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
205:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** prog_bit = FLASH_CR_FSTPG;
206:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
207:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
208:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
209:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
210:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Nothing to do */
211:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
212:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
213:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Wait for last operation to be completed */
214:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** status = FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE);
215:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
216:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* If the program operation is completed, disable the PG or FSTPG Bit */
217:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (prog_bit != 0U)
218:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
219:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, prog_bit);
220:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
221:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
222:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
223:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Process Unlocked */
224:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_UNLOCK(&pFlash);
225:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
226:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* return status */
227:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return status;
228:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
229:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
230:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
231:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Program double word or fast program of a row at a specified address with interrupt enab
232:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param TypeProgram Indicate the way to program at a specified address.
233:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * This parameter can be a value of @ref FLASH_Type_Program.
234:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Address specifies the address to be programmed.
235:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Data specifies the data to be programmed.
236:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * This parameter is the data for the double word program and the address where
237:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * are stored the data for the row fast program.
238:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
239:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
240:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
241:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data)
242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
243:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status;
244:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
245:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check the parameters */
246:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram));
247:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
248:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Process Locked */
249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_LOCK(&pFlash);
250:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
251:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Reset error code */
252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ErrorCode = HAL_FLASH_ERROR_NONE;
253:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
254:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Wait for last operation to be completed */
255:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE);
256:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
257:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (status != HAL_OK)
258:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
ARM GAS /tmp/ccsIWRCI.s page 6
259:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Process Unlocked */
260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_UNLOCK(&pFlash);
261:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
262:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
263:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
264:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Set internal variables used by the IRQ handler */
265:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (TypeProgram == FLASH_TYPEPROGRAM_FAST_AND_LAST)
266:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
267:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_PROGRAM_LAST;
268:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
269:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
270:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
271:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_PROGRAM;
272:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
273:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.Address = Address;
274:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
275:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Enable End of Operation and Error interrupts */
276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP | FLASH_IT_OPERR);
277:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
278:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (TypeProgram == FLASH_TYPEPROGRAM_DOUBLEWORD)
279:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
280:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Program double-word (64-bit) at a specified address */
281:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_Program_DoubleWord(Address, Data);
282:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else if ((TypeProgram == FLASH_TYPEPROGRAM_FAST) || (TypeProgram == FLASH_TYPEPROGRAM_FAST_AND_
284:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
285:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Fast program a 32 row double-word (64-bit) at a specified address */
286:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_Program_Fast(Address, (uint32_t)Data);
287:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
288:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
289:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
290:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Nothing to do */
291:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
292:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
293:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
294:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return status;
295:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
296:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
297:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
298:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Handle FLASH interrupt request.
299:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval None
300:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
301:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** void HAL_FLASH_IRQHandler(void)
302:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
303:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t tmp_page;
304:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t error;
305:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_ProcedureTypeDef procedure;
306:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
307:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* If the operation is completed, disable the PG, PNB, MER1, MER2 and PER Bit */
308:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, (FLASH_CR_PG | FLASH_CR_MER1 | FLASH_CR_PER | FLASH_CR_PNB));
309:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** #if defined (FLASH_OPTR_DBANK)
310:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_MER2);
311:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** #endif
312:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
313:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Disable the FSTPG Bit only if it is the last row programmed */
314:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (pFlash.ProcedureOnGoing == FLASH_PROC_PROGRAM_LAST)
315:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
ARM GAS /tmp/ccsIWRCI.s page 7
316:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** CLEAR_BIT(FLASH->CR, FLASH_CR_FSTPG);
317:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
318:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
319:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check FLASH operation error flags */
320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** error = (FLASH->SR & FLASH_FLAG_SR_ERRORS);
321:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
322:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (error != 0U)
323:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
324:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Save the error code */
325:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ErrorCode |= error;
326:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
327:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Clear error programming flags */
328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(error);
329:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
330:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Flush the caches to be sure of the data consistency */
331:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_FlushCaches() ;
332:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
333:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* FLASH error interrupt user callback */
334:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** procedure = pFlash.ProcedureOnGoing;
335:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (procedure == FLASH_PROC_PAGE_ERASE)
336:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_OperationErrorCallback(pFlash.Page);
338:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
339:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else if (procedure == FLASH_PROC_MASS_ERASE)
340:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_OperationErrorCallback(pFlash.Bank);
342:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else if ((procedure == FLASH_PROC_PROGRAM) ||
344:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
345:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_OperationErrorCallback(pFlash.Address);
347:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
348:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
349:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
350:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Nothing to do */
351:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
352:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
353:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /*Stop the procedure ongoing*/
354:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE;
355:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
356:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
357:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check FLASH End of Operation flag */
358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP))
359:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
360:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Clear FLASH End of Operation pending bit */
361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP);
362:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
363:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (pFlash.ProcedureOnGoing == FLASH_PROC_PAGE_ERASE)
364:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
365:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Nb of pages to erased can be decreased */
366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.NbPagesToErase--;
367:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
368:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check if there are still pages to erase*/
369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (pFlash.NbPagesToErase != 0U)
370:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
371:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Indicate user which page has been erased*/
372:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Page);
ARM GAS /tmp/ccsIWRCI.s page 8
373:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
374:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Increment page number */
375:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.Page++;
376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** tmp_page = pFlash.Page;
377:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_PageErase(tmp_page, pFlash.Bank);
378:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
379:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
380:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
381:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* No more pages to Erase */
382:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Reset Address and stop Erase pages procedure */
383:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.Page = 0xFFFFFFFFU;
384:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE;
385:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
386:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Flush the caches to be sure of the data consistency */
387:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_FlushCaches() ;
388:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
389:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* FLASH EOP interrupt user callback */
390:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Page);
391:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
392:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
393:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
394:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
395:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Flush the caches to be sure of the data consistency */
396:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_FlushCaches() ;
397:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
398:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** procedure = pFlash.ProcedureOnGoing;
399:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (procedure == FLASH_PROC_MASS_ERASE)
400:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
401:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* MassErase ended. Return the selected bank */
402:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* FLASH EOP interrupt user callback */
403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Bank);
404:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
405:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else if ((procedure == FLASH_PROC_PROGRAM) ||
406:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
407:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
408:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Program ended. Return the selected address */
409:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* FLASH EOP interrupt user callback */
410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_FLASH_EndOfOperationCallback(pFlash.Address);
411:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
412:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** else
413:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
414:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Nothing to do */
415:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
416:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
417:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /*Clear the procedure ongoing*/
418:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE;
419:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
420:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
421:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
422:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (pFlash.ProcedureOnGoing == FLASH_PROC_NONE)
423:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
424:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Disable End of Operation and Error interrupts */
425:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_FLASH_DISABLE_IT(FLASH_IT_EOP | FLASH_IT_OPERR);
426:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
427:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Process Unlocked */
428:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_UNLOCK(&pFlash);
429:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
ARM GAS /tmp/ccsIWRCI.s page 9
430:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
431:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
432:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
433:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief FLASH end of operation interrupt callback.
434:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param ReturnValue The value saved in this parameter depends on the ongoing procedure:
435:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg Mass Erase: Bank number which has been requested to erase
436:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg Page Erase: Page which has been erased
437:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * (if 0xFFFFFFFF, it means that all the selected pages have been erase
438:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg Program: Address which was selected for data program
439:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval None
440:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
441:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue)
442:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
443:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */
444:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** UNUSED(ReturnValue);
445:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
446:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* NOTE : This function should not be modified, when the callback is needed,
447:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** the HAL_FLASH_EndOfOperationCallback could be implemented in the user file
448:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
449:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
450:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
451:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
452:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief FLASH operation error interrupt callback.
453:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param ReturnValue The value saved in this parameter depends on the ongoing procedure:
454:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg Mass Erase: Bank number which has been requested to erase
455:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg Page Erase: Page number which returned an error
456:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg Program: Address which was selected for data program
457:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval None
458:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
459:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __weak void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue)
460:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
461:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */
462:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** UNUSED(ReturnValue);
463:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
464:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* NOTE : This function should not be modified, when the callback is needed,
465:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** the HAL_FLASH_OperationErrorCallback could be implemented in the user file
466:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
467:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
468:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
469:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
470:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @}
471:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
472:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
473:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions_Group2 Peripheral Control functions
474:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Management functions
475:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
476:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @verbatim
477:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ===============================================================================
478:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ##### Peripheral Control functions #####
479:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ===============================================================================
480:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..]
481:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** This subsection provides a set of functions allowing to control the FLASH
482:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** memory operations.
483:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
484:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @endverbatim
485:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
486:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
ARM GAS /tmp/ccsIWRCI.s page 10
487:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
488:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
489:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Unlock the FLASH control register access.
490:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
491:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
492:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Unlock(void)
493:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
494:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK;
495:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
496:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0U)
497:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
498:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Authorize the FLASH Registers access */
499:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** WRITE_REG(FLASH->KEYR, FLASH_KEY1);
500:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** WRITE_REG(FLASH->KEYR, FLASH_KEY2);
501:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
502:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* verify Flash is unlocked */
503:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0U)
504:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
505:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** status = HAL_ERROR;
506:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
507:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
508:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
509:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return status;
510:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
511:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
512:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
513:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Lock the FLASH control register access.
514:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
515:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
516:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_Lock(void)
517:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
518:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_ERROR;
519:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
520:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Set the LOCK Bit to lock the FLASH Registers access */
521:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** SET_BIT(FLASH->CR, FLASH_CR_LOCK);
522:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
523:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* verify Flash is locked */
524:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0U)
525:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
526:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** status = HAL_OK;
527:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
528:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
529:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return status;
530:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
531:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
532:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
533:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Unlock the FLASH Option Bytes Registers access.
534:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
535:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
536:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void)
537:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
538:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK;
539:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
540:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (READ_BIT(FLASH->CR, FLASH_CR_OPTLOCK) != 0U)
541:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
542:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Authorizes the Option Byte register programming */
543:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY1);
ARM GAS /tmp/ccsIWRCI.s page 11
544:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY2);
545:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
546:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* verify option bytes are unlocked */
547:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (READ_BIT(FLASH->CR, FLASH_CR_OPTLOCK) != 0U)
548:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
549:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** status = HAL_ERROR;
550:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
551:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
552:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
553:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return status;
554:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
555:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
556:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
557:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Lock the FLASH Option Bytes Registers access.
558:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
559:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
560:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_OB_Lock(void)
561:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
562:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_ERROR;
563:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
564:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Set the OPTLOCK Bit to lock the FLASH Option Byte Registers access */
565:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** SET_BIT(FLASH->CR, FLASH_CR_OPTLOCK);
566:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
567:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Verify option bytes are locked */
568:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (READ_BIT(FLASH->CR, FLASH_CR_OPTLOCK) != 0U)
569:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
570:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** status = HAL_OK;
571:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
572:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
573:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return status;
574:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
575:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
576:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
577:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Launch the option byte loading.
578:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
579:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
580:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef HAL_FLASH_OB_Launch(void)
581:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
582:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Set the bit to force the option byte reloading */
583:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** SET_BIT(FLASH->CR, FLASH_CR_OBL_LAUNCH);
584:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
585:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Wait for last operation to be completed */
586:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return (FLASH_WaitForLastOperation((uint32_t)FLASH_TIMEOUT_VALUE));
587:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
588:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
589:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
590:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @}
591:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
592:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
593:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @defgroup FLASH_Exported_Functions_Group3 Peripheral State and Errors functions
594:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Peripheral Errors functions
595:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *
596:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @verbatim
597:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ===============================================================================
598:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ##### Peripheral Errors functions #####
599:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** ===============================================================================
600:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** [..]
ARM GAS /tmp/ccsIWRCI.s page 12
601:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** This subsection permits to get in run-time Errors of the FLASH peripheral.
602:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
603:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** @endverbatim
604:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
605:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
606:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
607:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
608:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Get the specific FLASH error flag.
609:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval FLASH_ErrorCode. The returned value can be:
610:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_RD: FLASH Read Protection error flag (PCROP)
611:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_PGS: FLASH Programming Sequence error flag
612:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_PGP: FLASH Programming Parallelism error flag
613:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_PGA: FLASH Programming Alignment error flag
614:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_WRP: FLASH Write protected error flag
615:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_OPERATION: FLASH operation Error flag
616:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_NONE: No error set
617:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_OP: FLASH Operation error
618:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_PROG: FLASH Programming error
619:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_WRP: FLASH Write protection error
620:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_PGA: FLASH Programming alignment error
621:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_SIZ: FLASH Size error
622:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_PGS: FLASH Programming sequence error
623:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_MIS: FLASH Fast programming data miss error
624:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_FAST: FLASH Fast programming error
625:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_RD: FLASH PCROP read error
626:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @arg HAL_FLASH_ERROR_OPTV: FLASH Option validity error
627:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
628:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t HAL_FLASH_GetError(void)
629:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
630:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return pFlash.ErrorCode;
631:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
632:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
633:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
634:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @}
635:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
636:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
637:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
638:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @}
639:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
640:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
641:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Private functions ---------------------------------------------------------*/
642:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
643:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /** @addtogroup FLASH_Private_Functions
644:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @{
645:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
646:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
647:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
648:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Wait for a FLASH operation to complete.
649:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Timeout maximum flash operation timeout.
650:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval HAL_Status
651:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
652:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout)
653:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
654:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset.
655:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** Even if the FLASH operation fails, the BUSY flag will be reset and an error
656:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** flag will be set */
657:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
ARM GAS /tmp/ccsIWRCI.s page 13
658:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t tickstart = HAL_GetTick();
659:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t error;
660:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
661:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY))
662:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
663:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if ((HAL_GetTick() - tickstart) > Timeout)
664:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
665:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return HAL_TIMEOUT;
666:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
667:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
668:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
669:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check FLASH operation error flags */
670:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** error = (FLASH->SR & FLASH_FLAG_SR_ERRORS);
671:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (error != 0u)
672:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
673:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Save the error code */
674:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ErrorCode |= error;
675:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
676:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Clear error programming flags */
677:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(error);
678:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
679:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return HAL_ERROR;
680:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
681:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
682:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check FLASH End of Operation flag */
683:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP))
684:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
685:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Clear FLASH End of Operation pending bit */
686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP);
687:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
688:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
689:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* If there is an error flag set */
690:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return HAL_OK;
691:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
692:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
693:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
694:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Program double-word (64-bit) at a specified address.
695:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Address specifies the address to be programmed.
696:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Data specifies the data to be programmed.
697:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval None
698:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
699:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** static void FLASH_Program_DoubleWord(uint32_t Address, uint64_t Data)
700:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
29 .loc 1 700 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.
34 .loc 1 700 1 is_stmt 0 view .LVU1
35 0000 10B4 push {r4}
36 .LCFI0:
37 .cfi_def_cfa_offset 4
38 .cfi_offset 4, -4
701:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check the parameters */
702:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** assert_param(IS_FLASH_PROGRAM_ADDRESS(Address));
39 .loc 1 702 3 is_stmt 1 view .LVU2
703:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
ARM GAS /tmp/ccsIWRCI.s page 14
704:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Set PG bit */
705:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** SET_BIT(FLASH->CR, FLASH_CR_PG);
40 .loc 1 705 3 view .LVU3
41 0002 064C ldr r4, .L3
42 0004 6169 ldr r1, [r4, #20]
43 0006 41F00101 orr r1, r1, #1
44 000a 6161 str r1, [r4, #20]
706:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
707:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Program first word */
708:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *(uint32_t *)Address = (uint32_t)Data;
45 .loc 1 708 3 view .LVU4
46 .loc 1 708 24 is_stmt 0 view .LVU5
47 000c 0260 str r2, [r0]
709:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
710:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Barrier to ensure programming is performed in 2 steps, in right order
711:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (independently of compiler optimization behavior) */
712:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __ISB();
48 .loc 1 712 3 is_stmt 1 view .LVU6
49 .LBB10:
50 .LBI10:
51 .file 2 "Drivers/CMSIS/Include/cmsis_gcc.h"
1:Drivers/CMSIS/Include/cmsis_gcc.h **** /**************************************************************************//**
2:Drivers/CMSIS/Include/cmsis_gcc.h **** * @file cmsis_gcc.h
3:Drivers/CMSIS/Include/cmsis_gcc.h **** * @brief CMSIS compiler GCC header file
4:Drivers/CMSIS/Include/cmsis_gcc.h **** * @version V5.2.0
5:Drivers/CMSIS/Include/cmsis_gcc.h **** * @date 08. May 2019
6:Drivers/CMSIS/Include/cmsis_gcc.h **** ******************************************************************************/
7:Drivers/CMSIS/Include/cmsis_gcc.h **** /*
8:Drivers/CMSIS/Include/cmsis_gcc.h **** * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
9:Drivers/CMSIS/Include/cmsis_gcc.h **** *
10:Drivers/CMSIS/Include/cmsis_gcc.h **** * SPDX-License-Identifier: Apache-2.0
11:Drivers/CMSIS/Include/cmsis_gcc.h **** *
12:Drivers/CMSIS/Include/cmsis_gcc.h **** * Licensed under the Apache License, Version 2.0 (the License); you may
13:Drivers/CMSIS/Include/cmsis_gcc.h **** * not use this file except in compliance with the License.
14:Drivers/CMSIS/Include/cmsis_gcc.h **** * You may obtain a copy of the License at
15:Drivers/CMSIS/Include/cmsis_gcc.h **** *
16:Drivers/CMSIS/Include/cmsis_gcc.h **** * www.apache.org/licenses/LICENSE-2.0
17:Drivers/CMSIS/Include/cmsis_gcc.h **** *
18:Drivers/CMSIS/Include/cmsis_gcc.h **** * Unless required by applicable law or agreed to in writing, software
19:Drivers/CMSIS/Include/cmsis_gcc.h **** * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20:Drivers/CMSIS/Include/cmsis_gcc.h **** * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21:Drivers/CMSIS/Include/cmsis_gcc.h **** * See the License for the specific language governing permissions and
22:Drivers/CMSIS/Include/cmsis_gcc.h **** * limitations under the License.
23:Drivers/CMSIS/Include/cmsis_gcc.h **** */
24:Drivers/CMSIS/Include/cmsis_gcc.h ****
25:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __CMSIS_GCC_H
26:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_H
27:Drivers/CMSIS/Include/cmsis_gcc.h ****
28:Drivers/CMSIS/Include/cmsis_gcc.h **** /* ignore some GCC warnings */
29:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push
30:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wsign-conversion"
31:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wconversion"
32:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wunused-parameter"
33:Drivers/CMSIS/Include/cmsis_gcc.h ****
34:Drivers/CMSIS/Include/cmsis_gcc.h **** /* Fallback for __has_builtin */
35:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __has_builtin
36:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __has_builtin(x) (0)
ARM GAS /tmp/ccsIWRCI.s page 15
37:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
38:Drivers/CMSIS/Include/cmsis_gcc.h ****
39:Drivers/CMSIS/Include/cmsis_gcc.h **** /* CMSIS compiler specific defines */
40:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __ASM
41:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __ASM __asm
42:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
43:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __INLINE
44:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __INLINE inline
45:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
46:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __STATIC_INLINE
47:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __STATIC_INLINE static inline
48:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
49:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __STATIC_FORCEINLINE
50:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline
51:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
52:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __NO_RETURN
53:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __NO_RETURN __attribute__((__noreturn__))
54:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
55:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __USED
56:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __USED __attribute__((used))
57:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
58:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __WEAK
59:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __WEAK __attribute__((weak))
60:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
61:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __PACKED
62:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __PACKED __attribute__((packed, aligned(1)))
63:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
64:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __PACKED_STRUCT
65:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __PACKED_STRUCT struct __attribute__((packed, aligned(1)))
66:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
67:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __PACKED_UNION
68:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __PACKED_UNION union __attribute__((packed, aligned(1)))
69:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
70:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT32 /* deprecated */
71:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push
72:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked"
73:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes"
74:Drivers/CMSIS/Include/cmsis_gcc.h **** struct __attribute__((packed)) T_UINT32 { uint32_t v; };
75:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop
76:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
77:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
78:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT16_WRITE
79:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push
80:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked"
81:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes"
82:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
83:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop
84:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))-
85:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
86:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT16_READ
87:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push
88:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked"
89:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes"
90:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
91:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop
92:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(add
93:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
ARM GAS /tmp/ccsIWRCI.s page 16
94:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT32_WRITE
95:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push
96:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked"
97:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes"
98:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
99:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop
100:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))-
101:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
102:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT32_READ
103:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push
104:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked"
105:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes"
106:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
107:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop
108:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(add
109:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
110:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __ALIGNED
111:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __ALIGNED(x) __attribute__((aligned(x)))
112:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
113:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __RESTRICT
114:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __RESTRICT __restrict
115:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
116:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __COMPILER_BARRIER
117:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __COMPILER_BARRIER() __ASM volatile("":::"memory")
118:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
119:Drivers/CMSIS/Include/cmsis_gcc.h ****
120:Drivers/CMSIS/Include/cmsis_gcc.h **** /* ######################### Startup and Lowlevel Init ######################## */
121:Drivers/CMSIS/Include/cmsis_gcc.h ****
122:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __PROGRAM_START
123:Drivers/CMSIS/Include/cmsis_gcc.h ****
124:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
125:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Initializes data and bss sections
126:Drivers/CMSIS/Include/cmsis_gcc.h **** \details This default implementations initialized all data and additional bss
127:Drivers/CMSIS/Include/cmsis_gcc.h **** sections relying on .copy.table and .zero.table specified properly
128:Drivers/CMSIS/Include/cmsis_gcc.h **** in the used linker script.
129:Drivers/CMSIS/Include/cmsis_gcc.h ****
130:Drivers/CMSIS/Include/cmsis_gcc.h **** */
131:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE __NO_RETURN void __cmsis_start(void)
132:Drivers/CMSIS/Include/cmsis_gcc.h **** {
133:Drivers/CMSIS/Include/cmsis_gcc.h **** extern void _start(void) __NO_RETURN;
134:Drivers/CMSIS/Include/cmsis_gcc.h ****
135:Drivers/CMSIS/Include/cmsis_gcc.h **** typedef struct {
136:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t const* src;
137:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t* dest;
138:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t wlen;
139:Drivers/CMSIS/Include/cmsis_gcc.h **** } __copy_table_t;
140:Drivers/CMSIS/Include/cmsis_gcc.h ****
141:Drivers/CMSIS/Include/cmsis_gcc.h **** typedef struct {
142:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t* dest;
143:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t wlen;
144:Drivers/CMSIS/Include/cmsis_gcc.h **** } __zero_table_t;
145:Drivers/CMSIS/Include/cmsis_gcc.h ****
146:Drivers/CMSIS/Include/cmsis_gcc.h **** extern const __copy_table_t __copy_table_start__;
147:Drivers/CMSIS/Include/cmsis_gcc.h **** extern const __copy_table_t __copy_table_end__;
148:Drivers/CMSIS/Include/cmsis_gcc.h **** extern const __zero_table_t __zero_table_start__;
149:Drivers/CMSIS/Include/cmsis_gcc.h **** extern const __zero_table_t __zero_table_end__;
150:Drivers/CMSIS/Include/cmsis_gcc.h ****
ARM GAS /tmp/ccsIWRCI.s page 17
151:Drivers/CMSIS/Include/cmsis_gcc.h **** for (__copy_table_t const* pTable = &__copy_table_start__; pTable < &__copy_table_end__; ++pTable
152:Drivers/CMSIS/Include/cmsis_gcc.h **** for(uint32_t i=0u; i<pTable->wlen; ++i) {
153:Drivers/CMSIS/Include/cmsis_gcc.h **** pTable->dest[i] = pTable->src[i];
154:Drivers/CMSIS/Include/cmsis_gcc.h **** }
155:Drivers/CMSIS/Include/cmsis_gcc.h **** }
156:Drivers/CMSIS/Include/cmsis_gcc.h ****
157:Drivers/CMSIS/Include/cmsis_gcc.h **** for (__zero_table_t const* pTable = &__zero_table_start__; pTable < &__zero_table_end__; ++pTable
158:Drivers/CMSIS/Include/cmsis_gcc.h **** for(uint32_t i=0u; i<pTable->wlen; ++i) {
159:Drivers/CMSIS/Include/cmsis_gcc.h **** pTable->dest[i] = 0u;
160:Drivers/CMSIS/Include/cmsis_gcc.h **** }
161:Drivers/CMSIS/Include/cmsis_gcc.h **** }
162:Drivers/CMSIS/Include/cmsis_gcc.h ****
163:Drivers/CMSIS/Include/cmsis_gcc.h **** _start();
164:Drivers/CMSIS/Include/cmsis_gcc.h **** }
165:Drivers/CMSIS/Include/cmsis_gcc.h ****
166:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __PROGRAM_START __cmsis_start
167:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
168:Drivers/CMSIS/Include/cmsis_gcc.h ****
169:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __INITIAL_SP
170:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __INITIAL_SP __StackTop
171:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
172:Drivers/CMSIS/Include/cmsis_gcc.h ****
173:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __STACK_LIMIT
174:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __STACK_LIMIT __StackLimit
175:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
176:Drivers/CMSIS/Include/cmsis_gcc.h ****
177:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __VECTOR_TABLE
178:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __VECTOR_TABLE __Vectors
179:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
180:Drivers/CMSIS/Include/cmsis_gcc.h ****
181:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __VECTOR_TABLE_ATTRIBUTE
182:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __VECTOR_TABLE_ATTRIBUTE __attribute((used, section(".vectors")))
183:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
184:Drivers/CMSIS/Include/cmsis_gcc.h ****
185:Drivers/CMSIS/Include/cmsis_gcc.h **** /* ########################### Core Function Access ########################### */
186:Drivers/CMSIS/Include/cmsis_gcc.h **** /** \ingroup CMSIS_Core_FunctionInterface
187:Drivers/CMSIS/Include/cmsis_gcc.h **** \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
188:Drivers/CMSIS/Include/cmsis_gcc.h **** @{
189:Drivers/CMSIS/Include/cmsis_gcc.h **** */
190:Drivers/CMSIS/Include/cmsis_gcc.h ****
191:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
192:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Enable IRQ Interrupts
193:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Enables IRQ interrupts by clearing the I-bit in the CPSR.
194:Drivers/CMSIS/Include/cmsis_gcc.h **** Can only be executed in Privileged modes.
195:Drivers/CMSIS/Include/cmsis_gcc.h **** */
196:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __enable_irq(void)
197:Drivers/CMSIS/Include/cmsis_gcc.h **** {
198:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("cpsie i" : : : "memory");
199:Drivers/CMSIS/Include/cmsis_gcc.h **** }
200:Drivers/CMSIS/Include/cmsis_gcc.h ****
201:Drivers/CMSIS/Include/cmsis_gcc.h ****
202:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
203:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Disable IRQ Interrupts
204:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Disables IRQ interrupts by setting the I-bit in the CPSR.
205:Drivers/CMSIS/Include/cmsis_gcc.h **** Can only be executed in Privileged modes.
206:Drivers/CMSIS/Include/cmsis_gcc.h **** */
207:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __disable_irq(void)
ARM GAS /tmp/ccsIWRCI.s page 18
208:Drivers/CMSIS/Include/cmsis_gcc.h **** {
209:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("cpsid i" : : : "memory");
210:Drivers/CMSIS/Include/cmsis_gcc.h **** }
211:Drivers/CMSIS/Include/cmsis_gcc.h ****
212:Drivers/CMSIS/Include/cmsis_gcc.h ****
213:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
214:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Control Register
215:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the content of the Control Register.
216:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Control Register value
217:Drivers/CMSIS/Include/cmsis_gcc.h **** */
218:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_CONTROL(void)
219:Drivers/CMSIS/Include/cmsis_gcc.h **** {
220:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
221:Drivers/CMSIS/Include/cmsis_gcc.h ****
222:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, control" : "=r" (result) );
223:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
224:Drivers/CMSIS/Include/cmsis_gcc.h **** }
225:Drivers/CMSIS/Include/cmsis_gcc.h ****
226:Drivers/CMSIS/Include/cmsis_gcc.h ****
227:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
228:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
229:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Control Register (non-secure)
230:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the content of the non-secure Control Register when in secure mode.
231:Drivers/CMSIS/Include/cmsis_gcc.h **** \return non-secure Control Register value
232:Drivers/CMSIS/Include/cmsis_gcc.h **** */
233:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void)
234:Drivers/CMSIS/Include/cmsis_gcc.h **** {
235:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
236:Drivers/CMSIS/Include/cmsis_gcc.h ****
237:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, control_ns" : "=r" (result) );
238:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
239:Drivers/CMSIS/Include/cmsis_gcc.h **** }
240:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
241:Drivers/CMSIS/Include/cmsis_gcc.h ****
242:Drivers/CMSIS/Include/cmsis_gcc.h ****
243:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
244:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Control Register
245:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Writes the given value to the Control Register.
246:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] control Control Register value to set
247:Drivers/CMSIS/Include/cmsis_gcc.h **** */
248:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_CONTROL(uint32_t control)
249:Drivers/CMSIS/Include/cmsis_gcc.h **** {
250:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR control, %0" : : "r" (control) : "memory");
251:Drivers/CMSIS/Include/cmsis_gcc.h **** }
252:Drivers/CMSIS/Include/cmsis_gcc.h ****
253:Drivers/CMSIS/Include/cmsis_gcc.h ****
254:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
255:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
256:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Control Register (non-secure)
257:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Writes the given value to the non-secure Control Register when in secure state.
258:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] control Control Register value to set
259:Drivers/CMSIS/Include/cmsis_gcc.h **** */
260:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control)
261:Drivers/CMSIS/Include/cmsis_gcc.h **** {
262:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory");
263:Drivers/CMSIS/Include/cmsis_gcc.h **** }
264:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
ARM GAS /tmp/ccsIWRCI.s page 19
265:Drivers/CMSIS/Include/cmsis_gcc.h ****
266:Drivers/CMSIS/Include/cmsis_gcc.h ****
267:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
268:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get IPSR Register
269:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the content of the IPSR Register.
270:Drivers/CMSIS/Include/cmsis_gcc.h **** \return IPSR Register value
271:Drivers/CMSIS/Include/cmsis_gcc.h **** */
272:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_IPSR(void)
273:Drivers/CMSIS/Include/cmsis_gcc.h **** {
274:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
275:Drivers/CMSIS/Include/cmsis_gcc.h ****
276:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
277:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
278:Drivers/CMSIS/Include/cmsis_gcc.h **** }
279:Drivers/CMSIS/Include/cmsis_gcc.h ****
280:Drivers/CMSIS/Include/cmsis_gcc.h ****
281:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
282:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get APSR Register
283:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the content of the APSR Register.
284:Drivers/CMSIS/Include/cmsis_gcc.h **** \return APSR Register value
285:Drivers/CMSIS/Include/cmsis_gcc.h **** */
286:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_APSR(void)
287:Drivers/CMSIS/Include/cmsis_gcc.h **** {
288:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
289:Drivers/CMSIS/Include/cmsis_gcc.h ****
290:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, apsr" : "=r" (result) );
291:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
292:Drivers/CMSIS/Include/cmsis_gcc.h **** }
293:Drivers/CMSIS/Include/cmsis_gcc.h ****
294:Drivers/CMSIS/Include/cmsis_gcc.h ****
295:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
296:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get xPSR Register
297:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the content of the xPSR Register.
298:Drivers/CMSIS/Include/cmsis_gcc.h **** \return xPSR Register value
299:Drivers/CMSIS/Include/cmsis_gcc.h **** */
300:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_xPSR(void)
301:Drivers/CMSIS/Include/cmsis_gcc.h **** {
302:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
303:Drivers/CMSIS/Include/cmsis_gcc.h ****
304:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, xpsr" : "=r" (result) );
305:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
306:Drivers/CMSIS/Include/cmsis_gcc.h **** }
307:Drivers/CMSIS/Include/cmsis_gcc.h ****
308:Drivers/CMSIS/Include/cmsis_gcc.h ****
309:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
310:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Process Stack Pointer
311:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the Process Stack Pointer (PSP).
312:Drivers/CMSIS/Include/cmsis_gcc.h **** \return PSP Register value
313:Drivers/CMSIS/Include/cmsis_gcc.h **** */
314:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_PSP(void)
315:Drivers/CMSIS/Include/cmsis_gcc.h **** {
316:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
317:Drivers/CMSIS/Include/cmsis_gcc.h ****
318:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, psp" : "=r" (result) );
319:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
320:Drivers/CMSIS/Include/cmsis_gcc.h **** }
321:Drivers/CMSIS/Include/cmsis_gcc.h ****
ARM GAS /tmp/ccsIWRCI.s page 20
322:Drivers/CMSIS/Include/cmsis_gcc.h ****
323:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
324:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
325:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Process Stack Pointer (non-secure)
326:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure s
327:Drivers/CMSIS/Include/cmsis_gcc.h **** \return PSP Register value
328:Drivers/CMSIS/Include/cmsis_gcc.h **** */
329:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void)
330:Drivers/CMSIS/Include/cmsis_gcc.h **** {
331:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
332:Drivers/CMSIS/Include/cmsis_gcc.h ****
333:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, psp_ns" : "=r" (result) );
334:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
335:Drivers/CMSIS/Include/cmsis_gcc.h **** }
336:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
337:Drivers/CMSIS/Include/cmsis_gcc.h ****
338:Drivers/CMSIS/Include/cmsis_gcc.h ****
339:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
340:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Process Stack Pointer
341:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Process Stack Pointer (PSP).
342:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] topOfProcStack Process Stack Pointer value to set
343:Drivers/CMSIS/Include/cmsis_gcc.h **** */
344:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack)
345:Drivers/CMSIS/Include/cmsis_gcc.h **** {
346:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : );
347:Drivers/CMSIS/Include/cmsis_gcc.h **** }
348:Drivers/CMSIS/Include/cmsis_gcc.h ****
349:Drivers/CMSIS/Include/cmsis_gcc.h ****
350:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
351:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
352:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Process Stack Pointer (non-secure)
353:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure sta
354:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] topOfProcStack Process Stack Pointer value to set
355:Drivers/CMSIS/Include/cmsis_gcc.h **** */
356:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack)
357:Drivers/CMSIS/Include/cmsis_gcc.h **** {
358:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : );
359:Drivers/CMSIS/Include/cmsis_gcc.h **** }
360:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
361:Drivers/CMSIS/Include/cmsis_gcc.h ****
362:Drivers/CMSIS/Include/cmsis_gcc.h ****
363:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
364:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Main Stack Pointer
365:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the Main Stack Pointer (MSP).
366:Drivers/CMSIS/Include/cmsis_gcc.h **** \return MSP Register value
367:Drivers/CMSIS/Include/cmsis_gcc.h **** */
368:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_MSP(void)
369:Drivers/CMSIS/Include/cmsis_gcc.h **** {
370:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
371:Drivers/CMSIS/Include/cmsis_gcc.h ****
372:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, msp" : "=r" (result) );
373:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
374:Drivers/CMSIS/Include/cmsis_gcc.h **** }
375:Drivers/CMSIS/Include/cmsis_gcc.h ****
376:Drivers/CMSIS/Include/cmsis_gcc.h ****
377:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
378:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
ARM GAS /tmp/ccsIWRCI.s page 21
379:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Main Stack Pointer (non-secure)
380:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure stat
381:Drivers/CMSIS/Include/cmsis_gcc.h **** \return MSP Register value
382:Drivers/CMSIS/Include/cmsis_gcc.h **** */
383:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void)
384:Drivers/CMSIS/Include/cmsis_gcc.h **** {
385:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
386:Drivers/CMSIS/Include/cmsis_gcc.h ****
387:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, msp_ns" : "=r" (result) );
388:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
389:Drivers/CMSIS/Include/cmsis_gcc.h **** }
390:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
391:Drivers/CMSIS/Include/cmsis_gcc.h ****
392:Drivers/CMSIS/Include/cmsis_gcc.h ****
393:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
394:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Main Stack Pointer
395:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Main Stack Pointer (MSP).
396:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] topOfMainStack Main Stack Pointer value to set
397:Drivers/CMSIS/Include/cmsis_gcc.h **** */
398:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack)
399:Drivers/CMSIS/Include/cmsis_gcc.h **** {
400:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : );
401:Drivers/CMSIS/Include/cmsis_gcc.h **** }
402:Drivers/CMSIS/Include/cmsis_gcc.h ****
403:Drivers/CMSIS/Include/cmsis_gcc.h ****
404:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
405:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
406:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Main Stack Pointer (non-secure)
407:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state.
408:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] topOfMainStack Main Stack Pointer value to set
409:Drivers/CMSIS/Include/cmsis_gcc.h **** */
410:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack)
411:Drivers/CMSIS/Include/cmsis_gcc.h **** {
412:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : );
413:Drivers/CMSIS/Include/cmsis_gcc.h **** }
414:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
415:Drivers/CMSIS/Include/cmsis_gcc.h ****
416:Drivers/CMSIS/Include/cmsis_gcc.h ****
417:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
418:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
419:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Stack Pointer (non-secure)
420:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state.
421:Drivers/CMSIS/Include/cmsis_gcc.h **** \return SP Register value
422:Drivers/CMSIS/Include/cmsis_gcc.h **** */
423:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void)
424:Drivers/CMSIS/Include/cmsis_gcc.h **** {
425:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
426:Drivers/CMSIS/Include/cmsis_gcc.h ****
427:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, sp_ns" : "=r" (result) );
428:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
429:Drivers/CMSIS/Include/cmsis_gcc.h **** }
430:Drivers/CMSIS/Include/cmsis_gcc.h ****
431:Drivers/CMSIS/Include/cmsis_gcc.h ****
432:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
433:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Stack Pointer (non-secure)
434:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state.
435:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] topOfStack Stack Pointer value to set
ARM GAS /tmp/ccsIWRCI.s page 22
436:Drivers/CMSIS/Include/cmsis_gcc.h **** */
437:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack)
438:Drivers/CMSIS/Include/cmsis_gcc.h **** {
439:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : );
440:Drivers/CMSIS/Include/cmsis_gcc.h **** }
441:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
442:Drivers/CMSIS/Include/cmsis_gcc.h ****
443:Drivers/CMSIS/Include/cmsis_gcc.h ****
444:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
445:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Priority Mask
446:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current state of the priority mask bit from the Priority Mask Register.
447:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Priority Mask value
448:Drivers/CMSIS/Include/cmsis_gcc.h **** */
449:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_PRIMASK(void)
450:Drivers/CMSIS/Include/cmsis_gcc.h **** {
451:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
452:Drivers/CMSIS/Include/cmsis_gcc.h ****
453:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory");
454:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
455:Drivers/CMSIS/Include/cmsis_gcc.h **** }
456:Drivers/CMSIS/Include/cmsis_gcc.h ****
457:Drivers/CMSIS/Include/cmsis_gcc.h ****
458:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
459:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
460:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Priority Mask (non-secure)
461:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current state of the non-secure priority mask bit from the Priority Mask Reg
462:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Priority Mask value
463:Drivers/CMSIS/Include/cmsis_gcc.h **** */
464:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void)
465:Drivers/CMSIS/Include/cmsis_gcc.h **** {
466:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
467:Drivers/CMSIS/Include/cmsis_gcc.h ****
468:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, primask_ns" : "=r" (result) :: "memory");
469:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
470:Drivers/CMSIS/Include/cmsis_gcc.h **** }
471:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
472:Drivers/CMSIS/Include/cmsis_gcc.h ****
473:Drivers/CMSIS/Include/cmsis_gcc.h ****
474:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
475:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Priority Mask
476:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Priority Mask Register.
477:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] priMask Priority Mask
478:Drivers/CMSIS/Include/cmsis_gcc.h **** */
479:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask)
480:Drivers/CMSIS/Include/cmsis_gcc.h **** {
481:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
482:Drivers/CMSIS/Include/cmsis_gcc.h **** }
483:Drivers/CMSIS/Include/cmsis_gcc.h ****
484:Drivers/CMSIS/Include/cmsis_gcc.h ****
485:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
486:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
487:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Priority Mask (non-secure)
488:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Priority Mask Register when in secure state.
489:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] priMask Priority Mask
490:Drivers/CMSIS/Include/cmsis_gcc.h **** */
491:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask)
492:Drivers/CMSIS/Include/cmsis_gcc.h **** {
ARM GAS /tmp/ccsIWRCI.s page 23
493:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory");
494:Drivers/CMSIS/Include/cmsis_gcc.h **** }
495:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
496:Drivers/CMSIS/Include/cmsis_gcc.h ****
497:Drivers/CMSIS/Include/cmsis_gcc.h ****
498:Drivers/CMSIS/Include/cmsis_gcc.h **** #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
499:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
500:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) )
501:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
502:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Enable FIQ
503:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Enables FIQ interrupts by clearing the F-bit in the CPSR.
504:Drivers/CMSIS/Include/cmsis_gcc.h **** Can only be executed in Privileged modes.
505:Drivers/CMSIS/Include/cmsis_gcc.h **** */
506:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __enable_fault_irq(void)
507:Drivers/CMSIS/Include/cmsis_gcc.h **** {
508:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("cpsie f" : : : "memory");
509:Drivers/CMSIS/Include/cmsis_gcc.h **** }
510:Drivers/CMSIS/Include/cmsis_gcc.h ****
511:Drivers/CMSIS/Include/cmsis_gcc.h ****
512:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
513:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Disable FIQ
514:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Disables FIQ interrupts by setting the F-bit in the CPSR.
515:Drivers/CMSIS/Include/cmsis_gcc.h **** Can only be executed in Privileged modes.
516:Drivers/CMSIS/Include/cmsis_gcc.h **** */
517:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __disable_fault_irq(void)
518:Drivers/CMSIS/Include/cmsis_gcc.h **** {
519:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("cpsid f" : : : "memory");
520:Drivers/CMSIS/Include/cmsis_gcc.h **** }
521:Drivers/CMSIS/Include/cmsis_gcc.h ****
522:Drivers/CMSIS/Include/cmsis_gcc.h ****
523:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
524:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Base Priority
525:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the Base Priority register.
526:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Base Priority register value
527:Drivers/CMSIS/Include/cmsis_gcc.h **** */
528:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_BASEPRI(void)
529:Drivers/CMSIS/Include/cmsis_gcc.h **** {
530:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
531:Drivers/CMSIS/Include/cmsis_gcc.h ****
532:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, basepri" : "=r" (result) );
533:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
534:Drivers/CMSIS/Include/cmsis_gcc.h **** }
535:Drivers/CMSIS/Include/cmsis_gcc.h ****
536:Drivers/CMSIS/Include/cmsis_gcc.h ****
537:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
538:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
539:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Base Priority (non-secure)
540:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the non-secure Base Priority register when in secure state.
541:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Base Priority register value
542:Drivers/CMSIS/Include/cmsis_gcc.h **** */
543:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void)
544:Drivers/CMSIS/Include/cmsis_gcc.h **** {
545:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
546:Drivers/CMSIS/Include/cmsis_gcc.h ****
547:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) );
548:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
549:Drivers/CMSIS/Include/cmsis_gcc.h **** }
ARM GAS /tmp/ccsIWRCI.s page 24
550:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
551:Drivers/CMSIS/Include/cmsis_gcc.h ****
552:Drivers/CMSIS/Include/cmsis_gcc.h ****
553:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
554:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Base Priority
555:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Base Priority register.
556:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] basePri Base Priority value to set
557:Drivers/CMSIS/Include/cmsis_gcc.h **** */
558:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri)
559:Drivers/CMSIS/Include/cmsis_gcc.h **** {
560:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory");
561:Drivers/CMSIS/Include/cmsis_gcc.h **** }
562:Drivers/CMSIS/Include/cmsis_gcc.h ****
563:Drivers/CMSIS/Include/cmsis_gcc.h ****
564:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
565:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
566:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Base Priority (non-secure)
567:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Base Priority register when in secure state.
568:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] basePri Base Priority value to set
569:Drivers/CMSIS/Include/cmsis_gcc.h **** */
570:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri)
571:Drivers/CMSIS/Include/cmsis_gcc.h **** {
572:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory");
573:Drivers/CMSIS/Include/cmsis_gcc.h **** }
574:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
575:Drivers/CMSIS/Include/cmsis_gcc.h ****
576:Drivers/CMSIS/Include/cmsis_gcc.h ****
577:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
578:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Base Priority with condition
579:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Base Priority register only if BASEPRI masking is disable
580:Drivers/CMSIS/Include/cmsis_gcc.h **** or the new value increases the BASEPRI priority level.
581:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] basePri Base Priority value to set
582:Drivers/CMSIS/Include/cmsis_gcc.h **** */
583:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri)
584:Drivers/CMSIS/Include/cmsis_gcc.h **** {
585:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory");
586:Drivers/CMSIS/Include/cmsis_gcc.h **** }
587:Drivers/CMSIS/Include/cmsis_gcc.h ****
588:Drivers/CMSIS/Include/cmsis_gcc.h ****
589:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
590:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Fault Mask
591:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the Fault Mask register.
592:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Fault Mask register value
593:Drivers/CMSIS/Include/cmsis_gcc.h **** */
594:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void)
595:Drivers/CMSIS/Include/cmsis_gcc.h **** {
596:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
597:Drivers/CMSIS/Include/cmsis_gcc.h ****
598:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
599:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
600:Drivers/CMSIS/Include/cmsis_gcc.h **** }
601:Drivers/CMSIS/Include/cmsis_gcc.h ****
602:Drivers/CMSIS/Include/cmsis_gcc.h ****
603:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
604:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
605:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Fault Mask (non-secure)
606:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the non-secure Fault Mask register when in secure state.
ARM GAS /tmp/ccsIWRCI.s page 25
607:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Fault Mask register value
608:Drivers/CMSIS/Include/cmsis_gcc.h **** */
609:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void)
610:Drivers/CMSIS/Include/cmsis_gcc.h **** {
611:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
612:Drivers/CMSIS/Include/cmsis_gcc.h ****
613:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) );
614:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
615:Drivers/CMSIS/Include/cmsis_gcc.h **** }
616:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
617:Drivers/CMSIS/Include/cmsis_gcc.h ****
618:Drivers/CMSIS/Include/cmsis_gcc.h ****
619:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
620:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Fault Mask
621:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Fault Mask register.
622:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] faultMask Fault Mask value to set
623:Drivers/CMSIS/Include/cmsis_gcc.h **** */
624:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask)
625:Drivers/CMSIS/Include/cmsis_gcc.h **** {
626:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory");
627:Drivers/CMSIS/Include/cmsis_gcc.h **** }
628:Drivers/CMSIS/Include/cmsis_gcc.h ****
629:Drivers/CMSIS/Include/cmsis_gcc.h ****
630:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
631:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
632:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Fault Mask (non-secure)
633:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Fault Mask register when in secure state.
634:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] faultMask Fault Mask value to set
635:Drivers/CMSIS/Include/cmsis_gcc.h **** */
636:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask)
637:Drivers/CMSIS/Include/cmsis_gcc.h **** {
638:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory");
639:Drivers/CMSIS/Include/cmsis_gcc.h **** }
640:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
641:Drivers/CMSIS/Include/cmsis_gcc.h ****
642:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
643:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
644:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */
645:Drivers/CMSIS/Include/cmsis_gcc.h ****
646:Drivers/CMSIS/Include/cmsis_gcc.h ****
647:Drivers/CMSIS/Include/cmsis_gcc.h **** #if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
648:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) )
649:Drivers/CMSIS/Include/cmsis_gcc.h ****
650:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
651:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Process Stack Pointer Limit
652:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
653:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence zero is returned always in non-secure
654:Drivers/CMSIS/Include/cmsis_gcc.h **** mode.
655:Drivers/CMSIS/Include/cmsis_gcc.h ****
656:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the Process Stack Pointer Limit (PSPLIM).
657:Drivers/CMSIS/Include/cmsis_gcc.h **** \return PSPLIM Register value
658:Drivers/CMSIS/Include/cmsis_gcc.h **** */
659:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_PSPLIM(void)
660:Drivers/CMSIS/Include/cmsis_gcc.h **** {
661:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \
662:Drivers/CMSIS/Include/cmsis_gcc.h **** (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3)))
663:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure PSPLIM is RAZ/WI
ARM GAS /tmp/ccsIWRCI.s page 26
664:Drivers/CMSIS/Include/cmsis_gcc.h **** return 0U;
665:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
666:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
667:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, psplim" : "=r" (result) );
668:Drivers/CMSIS/Include/cmsis_gcc.h **** return result;
669:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
670:Drivers/CMSIS/Include/cmsis_gcc.h **** }
671:Drivers/CMSIS/Include/cmsis_gcc.h ****
672:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3))
673:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
674:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Process Stack Pointer Limit (non-secure)
675:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
676:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence zero is returned always.
677:Drivers/CMSIS/Include/cmsis_gcc.h ****
678:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in
679:Drivers/CMSIS/Include/cmsis_gcc.h **** \return PSPLIM Register value
680:Drivers/CMSIS/Include/cmsis_gcc.h **** */
681:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void)
682:Drivers/CMSIS/Include/cmsis_gcc.h **** {
683:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)))
684:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure PSPLIM is RAZ/WI
685:Drivers/CMSIS/Include/cmsis_gcc.h **** return 0U;
686:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
687:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
688:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) );
689:Drivers/CMSIS/Include/cmsis_gcc.h **** return result;
690:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
691:Drivers/CMSIS/Include/cmsis_gcc.h **** }
692:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
693:Drivers/CMSIS/Include/cmsis_gcc.h ****
694:Drivers/CMSIS/Include/cmsis_gcc.h ****
695:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
696:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Process Stack Pointer Limit
697:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
698:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence the write is silently ignored in non-secure
699:Drivers/CMSIS/Include/cmsis_gcc.h **** mode.
700:Drivers/CMSIS/Include/cmsis_gcc.h ****
701:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM).
702:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set
703:Drivers/CMSIS/Include/cmsis_gcc.h **** */
704:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit)
705:Drivers/CMSIS/Include/cmsis_gcc.h **** {
706:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \
707:Drivers/CMSIS/Include/cmsis_gcc.h **** (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3)))
708:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure PSPLIM is RAZ/WI
709:Drivers/CMSIS/Include/cmsis_gcc.h **** (void)ProcStackPtrLimit;
710:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
711:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit));
712:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
713:Drivers/CMSIS/Include/cmsis_gcc.h **** }
714:Drivers/CMSIS/Include/cmsis_gcc.h ****
715:Drivers/CMSIS/Include/cmsis_gcc.h ****
716:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
717:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
718:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Process Stack Pointer (non-secure)
719:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
720:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence the write is silently ignored.
ARM GAS /tmp/ccsIWRCI.s page 27
721:Drivers/CMSIS/Include/cmsis_gcc.h ****
722:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in s
723:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set
724:Drivers/CMSIS/Include/cmsis_gcc.h **** */
725:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit)
726:Drivers/CMSIS/Include/cmsis_gcc.h **** {
727:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)))
728:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure PSPLIM is RAZ/WI
729:Drivers/CMSIS/Include/cmsis_gcc.h **** (void)ProcStackPtrLimit;
730:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
731:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit));
732:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
733:Drivers/CMSIS/Include/cmsis_gcc.h **** }
734:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
735:Drivers/CMSIS/Include/cmsis_gcc.h ****
736:Drivers/CMSIS/Include/cmsis_gcc.h ****
737:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
738:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Main Stack Pointer Limit
739:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
740:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence zero is returned always in non-secure
741:Drivers/CMSIS/Include/cmsis_gcc.h **** mode.
742:Drivers/CMSIS/Include/cmsis_gcc.h ****
743:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the Main Stack Pointer Limit (MSPLIM).
744:Drivers/CMSIS/Include/cmsis_gcc.h **** \return MSPLIM Register value
745:Drivers/CMSIS/Include/cmsis_gcc.h **** */
746:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_MSPLIM(void)
747:Drivers/CMSIS/Include/cmsis_gcc.h **** {
748:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \
749:Drivers/CMSIS/Include/cmsis_gcc.h **** (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3)))
750:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure MSPLIM is RAZ/WI
751:Drivers/CMSIS/Include/cmsis_gcc.h **** return 0U;
752:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
753:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
754:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, msplim" : "=r" (result) );
755:Drivers/CMSIS/Include/cmsis_gcc.h **** return result;
756:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
757:Drivers/CMSIS/Include/cmsis_gcc.h **** }
758:Drivers/CMSIS/Include/cmsis_gcc.h ****
759:Drivers/CMSIS/Include/cmsis_gcc.h ****
760:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
761:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
762:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get Main Stack Pointer Limit (non-secure)
763:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
764:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence zero is returned always.
765:Drivers/CMSIS/Include/cmsis_gcc.h ****
766:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in sec
767:Drivers/CMSIS/Include/cmsis_gcc.h **** \return MSPLIM Register value
768:Drivers/CMSIS/Include/cmsis_gcc.h **** */
769:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void)
770:Drivers/CMSIS/Include/cmsis_gcc.h **** {
771:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)))
772:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure MSPLIM is RAZ/WI
773:Drivers/CMSIS/Include/cmsis_gcc.h **** return 0U;
774:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
775:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
776:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) );
777:Drivers/CMSIS/Include/cmsis_gcc.h **** return result;
ARM GAS /tmp/ccsIWRCI.s page 28
778:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
779:Drivers/CMSIS/Include/cmsis_gcc.h **** }
780:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
781:Drivers/CMSIS/Include/cmsis_gcc.h ****
782:Drivers/CMSIS/Include/cmsis_gcc.h ****
783:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
784:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Main Stack Pointer Limit
785:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
786:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence the write is silently ignored in non-secure
787:Drivers/CMSIS/Include/cmsis_gcc.h **** mode.
788:Drivers/CMSIS/Include/cmsis_gcc.h ****
789:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM).
790:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set
791:Drivers/CMSIS/Include/cmsis_gcc.h **** */
792:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit)
793:Drivers/CMSIS/Include/cmsis_gcc.h **** {
794:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \
795:Drivers/CMSIS/Include/cmsis_gcc.h **** (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3)))
796:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure MSPLIM is RAZ/WI
797:Drivers/CMSIS/Include/cmsis_gcc.h **** (void)MainStackPtrLimit;
798:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
799:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit));
800:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
801:Drivers/CMSIS/Include/cmsis_gcc.h **** }
802:Drivers/CMSIS/Include/cmsis_gcc.h ****
803:Drivers/CMSIS/Include/cmsis_gcc.h ****
804:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
805:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
806:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set Main Stack Pointer Limit (non-secure)
807:Drivers/CMSIS/Include/cmsis_gcc.h **** Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure
808:Drivers/CMSIS/Include/cmsis_gcc.h **** Stack Pointer Limit register hence the write is silently ignored.
809:Drivers/CMSIS/Include/cmsis_gcc.h ****
810:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secu
811:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] MainStackPtrLimit Main Stack Pointer value to set
812:Drivers/CMSIS/Include/cmsis_gcc.h **** */
813:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit)
814:Drivers/CMSIS/Include/cmsis_gcc.h **** {
815:Drivers/CMSIS/Include/cmsis_gcc.h **** #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)))
816:Drivers/CMSIS/Include/cmsis_gcc.h **** // without main extensions, the non-secure MSPLIM is RAZ/WI
817:Drivers/CMSIS/Include/cmsis_gcc.h **** (void)MainStackPtrLimit;
818:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
819:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit));
820:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
821:Drivers/CMSIS/Include/cmsis_gcc.h **** }
822:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
823:Drivers/CMSIS/Include/cmsis_gcc.h ****
824:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
825:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */
826:Drivers/CMSIS/Include/cmsis_gcc.h ****
827:Drivers/CMSIS/Include/cmsis_gcc.h ****
828:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
829:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Get FPSCR
830:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Returns the current value of the Floating Point Status/Control register.
831:Drivers/CMSIS/Include/cmsis_gcc.h **** \return Floating Point Status/Control register value
832:Drivers/CMSIS/Include/cmsis_gcc.h **** */
833:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE uint32_t __get_FPSCR(void)
834:Drivers/CMSIS/Include/cmsis_gcc.h **** {
ARM GAS /tmp/ccsIWRCI.s page 29
835:Drivers/CMSIS/Include/cmsis_gcc.h **** #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
836:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__FPU_USED ) && (__FPU_USED == 1U)) )
837:Drivers/CMSIS/Include/cmsis_gcc.h **** #if __has_builtin(__builtin_arm_get_fpscr)
838:Drivers/CMSIS/Include/cmsis_gcc.h **** // Re-enable using built-in when GCC has been fixed
839:Drivers/CMSIS/Include/cmsis_gcc.h **** // || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
840:Drivers/CMSIS/Include/cmsis_gcc.h **** /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */
841:Drivers/CMSIS/Include/cmsis_gcc.h **** return __builtin_arm_get_fpscr();
842:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
843:Drivers/CMSIS/Include/cmsis_gcc.h **** uint32_t result;
844:Drivers/CMSIS/Include/cmsis_gcc.h ****
845:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("VMRS %0, fpscr" : "=r" (result) );
846:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
847:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
848:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
849:Drivers/CMSIS/Include/cmsis_gcc.h **** return(0U);
850:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
851:Drivers/CMSIS/Include/cmsis_gcc.h **** }
852:Drivers/CMSIS/Include/cmsis_gcc.h ****
853:Drivers/CMSIS/Include/cmsis_gcc.h ****
854:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
855:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Set FPSCR
856:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Assigns the given value to the Floating Point Status/Control register.
857:Drivers/CMSIS/Include/cmsis_gcc.h **** \param [in] fpscr Floating Point Status/Control value to set
858:Drivers/CMSIS/Include/cmsis_gcc.h **** */
859:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __set_FPSCR(uint32_t fpscr)
860:Drivers/CMSIS/Include/cmsis_gcc.h **** {
861:Drivers/CMSIS/Include/cmsis_gcc.h **** #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
862:Drivers/CMSIS/Include/cmsis_gcc.h **** (defined (__FPU_USED ) && (__FPU_USED == 1U)) )
863:Drivers/CMSIS/Include/cmsis_gcc.h **** #if __has_builtin(__builtin_arm_set_fpscr)
864:Drivers/CMSIS/Include/cmsis_gcc.h **** // Re-enable using built-in when GCC has been fixed
865:Drivers/CMSIS/Include/cmsis_gcc.h **** // || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
866:Drivers/CMSIS/Include/cmsis_gcc.h **** /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */
867:Drivers/CMSIS/Include/cmsis_gcc.h **** __builtin_arm_set_fpscr(fpscr);
868:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
869:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory");
870:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
871:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
872:Drivers/CMSIS/Include/cmsis_gcc.h **** (void)fpscr;
873:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
874:Drivers/CMSIS/Include/cmsis_gcc.h **** }
875:Drivers/CMSIS/Include/cmsis_gcc.h ****
876:Drivers/CMSIS/Include/cmsis_gcc.h ****
877:Drivers/CMSIS/Include/cmsis_gcc.h **** /*@} end of CMSIS_Core_RegAccFunctions */
878:Drivers/CMSIS/Include/cmsis_gcc.h ****
879:Drivers/CMSIS/Include/cmsis_gcc.h ****
880:Drivers/CMSIS/Include/cmsis_gcc.h **** /* ########################## Core Instruction Access ######################### */
881:Drivers/CMSIS/Include/cmsis_gcc.h **** /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
882:Drivers/CMSIS/Include/cmsis_gcc.h **** Access to dedicated instructions
883:Drivers/CMSIS/Include/cmsis_gcc.h **** @{
884:Drivers/CMSIS/Include/cmsis_gcc.h **** */
885:Drivers/CMSIS/Include/cmsis_gcc.h ****
886:Drivers/CMSIS/Include/cmsis_gcc.h **** /* Define macros for porting to both thumb1 and thumb2.
887:Drivers/CMSIS/Include/cmsis_gcc.h **** * For thumb1, use low register (r0-r7), specified by constraint "l"
888:Drivers/CMSIS/Include/cmsis_gcc.h **** * Otherwise, use general registers, specified by constraint "r" */
889:Drivers/CMSIS/Include/cmsis_gcc.h **** #if defined (__thumb__) && !defined (__thumb2__)
890:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_OUT_REG(r) "=l" (r)
891:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_RW_REG(r) "+l" (r)
ARM GAS /tmp/ccsIWRCI.s page 30
892:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_USE_REG(r) "l" (r)
893:Drivers/CMSIS/Include/cmsis_gcc.h **** #else
894:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_OUT_REG(r) "=r" (r)
895:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_RW_REG(r) "+r" (r)
896:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_USE_REG(r) "r" (r)
897:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif
898:Drivers/CMSIS/Include/cmsis_gcc.h ****
899:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
900:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief No Operation
901:Drivers/CMSIS/Include/cmsis_gcc.h **** \details No Operation does nothing. This instruction can be used for code alignment purposes.
902:Drivers/CMSIS/Include/cmsis_gcc.h **** */
903:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __NOP() __ASM volatile ("nop")
904:Drivers/CMSIS/Include/cmsis_gcc.h ****
905:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
906:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Wait For Interrupt
907:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Wait For Interrupt is a hint instruction that suspends execution until one of a number o
908:Drivers/CMSIS/Include/cmsis_gcc.h **** */
909:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __WFI() __ASM volatile ("wfi")
910:Drivers/CMSIS/Include/cmsis_gcc.h ****
911:Drivers/CMSIS/Include/cmsis_gcc.h ****
912:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
913:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Wait For Event
914:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Wait For Event is a hint instruction that permits the processor to enter
915:Drivers/CMSIS/Include/cmsis_gcc.h **** a low-power state until one of a number of events occurs.
916:Drivers/CMSIS/Include/cmsis_gcc.h **** */
917:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __WFE() __ASM volatile ("wfe")
918:Drivers/CMSIS/Include/cmsis_gcc.h ****
919:Drivers/CMSIS/Include/cmsis_gcc.h ****
920:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
921:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Send Event
922:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Send Event is a hint instruction. It causes an event to be signaled to the CPU.
923:Drivers/CMSIS/Include/cmsis_gcc.h **** */
924:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __SEV() __ASM volatile ("sev")
925:Drivers/CMSIS/Include/cmsis_gcc.h ****
926:Drivers/CMSIS/Include/cmsis_gcc.h ****
927:Drivers/CMSIS/Include/cmsis_gcc.h **** /**
928:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Instruction Synchronization Barrier
929:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Instruction Synchronization Barrier flushes the pipeline in the processor,
930:Drivers/CMSIS/Include/cmsis_gcc.h **** so that all instructions following the ISB are fetched from cache or memory,
931:Drivers/CMSIS/Include/cmsis_gcc.h **** after the instruction has been completed.
932:Drivers/CMSIS/Include/cmsis_gcc.h **** */
933:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __ISB(void)
52 .loc 2 933 27 view .LVU7
53 .LBB11:
934:Drivers/CMSIS/Include/cmsis_gcc.h **** {
935:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("isb 0xF":::"memory");
54 .loc 2 935 3 view .LVU8
55 .syntax unified
56 @ 935 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
57 000e BFF36F8F isb 0xF
58 @ 0 "" 2
59 .thumb
60 .syntax unified
61 .LBE11:
62 .LBE10:
713:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
714:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Program second word */
ARM GAS /tmp/ccsIWRCI.s page 31
715:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *(uint32_t *)(Address + 4U) = (uint32_t)(Data >> 32U);
63 .loc 1 715 3 view .LVU9
64 .loc 1 715 31 is_stmt 0 view .LVU10
65 0012 4360 str r3, [r0, #4]
716:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
66 .loc 1 716 1 view .LVU11
67 0014 5DF8044B ldr r4, [sp], #4
68 .LCFI1:
69 .cfi_restore 4
70 .cfi_def_cfa_offset 0
71 0018 7047 bx lr
72 .L4:
73 001a 00BF .align 2
74 .L3:
75 001c 00200240 .word 1073881088
76 .cfi_endproc
77 .LFE341:
79 .section .text.FLASH_Program_Fast,"ax",%progbits
80 .align 1
81 .syntax unified
82 .thumb
83 .thumb_func
85 FLASH_Program_Fast:
86 .LVL1:
87 .LFB342:
717:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
718:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /**
719:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @brief Fast program a row double-word (64-bit) at a specified address.
720:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param Address specifies the address to be programmed.
721:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @param DataAddress specifies the address where the data are stored.
722:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** * @retval None
723:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** */
724:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** static void FLASH_Program_Fast(uint32_t Address, uint32_t DataAddress)
725:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
88 .loc 1 725 1 is_stmt 1 view -0
89 .cfi_startproc
90 @ args = 0, pretend = 0, frame = 0
91 @ frame_needed = 0, uses_anonymous_args = 0
92 @ link register save eliminated.
726:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint8_t row_index = (2 * FLASH_NB_DOUBLE_WORDS_IN_ROW);
93 .loc 1 726 3 view .LVU13
727:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t *dest_addr = (uint32_t *)Address;
94 .loc 1 727 3 view .LVU14
728:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t *src_addr = (uint32_t *)DataAddress;
95 .loc 1 728 3 view .LVU15
729:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t primask_bit;
96 .loc 1 729 3 view .LVU16
730:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
731:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Check the parameters */
732:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** assert_param(IS_FLASH_MAIN_MEM_ADDRESS(Address));
97 .loc 1 732 3 view .LVU17
733:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
734:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Set FSTPG bit */
735:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** SET_BIT(FLASH->CR, FLASH_CR_FSTPG);
98 .loc 1 735 3 view .LVU18
99 0000 094A ldr r2, .L7
100 0002 5369 ldr r3, [r2, #20]
ARM GAS /tmp/ccsIWRCI.s page 32
101 0004 43F48023 orr r3, r3, #262144
102 0008 5361 str r3, [r2, #20]
736:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
737:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Enter critical section: Disable interrupts to avoid any interruption during the loop */
738:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** primask_bit = __get_PRIMASK();
103 .loc 1 738 3 view .LVU19
104 .LBB12:
105 .LBI12:
449:Drivers/CMSIS/Include/cmsis_gcc.h **** {
106 .loc 2 449 31 view .LVU20
107 .LBB13:
451:Drivers/CMSIS/Include/cmsis_gcc.h ****
108 .loc 2 451 3 view .LVU21
453:Drivers/CMSIS/Include/cmsis_gcc.h **** return(result);
109 .loc 2 453 3 view .LVU22
110 .syntax unified
111 @ 453 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
112 000a EFF3108C MRS ip, primask
113 @ 0 "" 2
114 .LVL2:
454:Drivers/CMSIS/Include/cmsis_gcc.h **** }
115 .loc 2 454 3 view .LVU23
454:Drivers/CMSIS/Include/cmsis_gcc.h **** }
116 .loc 2 454 3 is_stmt 0 view .LVU24
117 .thumb
118 .syntax unified
119 .LBE13:
120 .LBE12:
739:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __disable_irq();
121 .loc 1 739 3 is_stmt 1 view .LVU25
122 .LBB14:
123 .LBI14:
207:Drivers/CMSIS/Include/cmsis_gcc.h **** {
124 .loc 2 207 27 view .LVU26
125 .LBB15:
209:Drivers/CMSIS/Include/cmsis_gcc.h **** }
126 .loc 2 209 3 view .LVU27
127 .syntax unified
128 @ 209 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
129 000e 72B6 cpsid i
130 @ 0 "" 2
131 .thumb
132 .syntax unified
133 .LBE15:
134 .LBE14:
726:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t *dest_addr = (uint32_t *)Address;
135 .loc 1 726 11 is_stmt 0 view .LVU28
136 0010 4023 movs r3, #64
137 .LVL3:
138 .L6:
740:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
741:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Program the double words of the row */
742:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** do
139 .loc 1 742 3 is_stmt 1 discriminator 1 view .LVU29
743:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
744:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** *dest_addr = *src_addr;
140 .loc 1 744 5 discriminator 1 view .LVU30
ARM GAS /tmp/ccsIWRCI.s page 33
141 .loc 1 744 18 is_stmt 0 discriminator 1 view .LVU31
142 0012 51F8042B ldr r2, [r1], #4
143 .LVL4:
144 .loc 1 744 16 discriminator 1 view .LVU32
145 0016 40F8042B str r2, [r0], #4
146 .LVL5:
745:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** dest_addr++;
147 .loc 1 745 5 is_stmt 1 discriminator 1 view .LVU33
746:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** src_addr++;
148 .loc 1 746 5 discriminator 1 view .LVU34
747:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** row_index--;
149 .loc 1 747 5 discriminator 1 view .LVU35
150 .loc 1 747 14 is_stmt 0 discriminator 1 view .LVU36
151 001a 013B subs r3, r3, #1
152 .LVL6:
748:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
749:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** while (row_index != 0U);
153 .loc 1 749 20 is_stmt 1 discriminator 1 view .LVU37
154 001c 13F0FF03 ands r3, r3, #255
155 .LVL7:
156 .loc 1 749 20 is_stmt 0 discriminator 1 view .LVU38
157 0020 F7D1 bne .L6
750:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
751:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Exit critical section: restore previous priority mask */
752:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** __set_PRIMASK(primask_bit);
158 .loc 1 752 3 is_stmt 1 view .LVU39
159 .LBB16:
160 .LBI16:
479:Drivers/CMSIS/Include/cmsis_gcc.h **** {
161 .loc 2 479 27 view .LVU40
162 .LBB17:
481:Drivers/CMSIS/Include/cmsis_gcc.h **** }
163 .loc 2 481 3 view .LVU41
164 .syntax unified
165 @ 481 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
166 0022 8CF31088 MSR primask, ip
167 @ 0 "" 2
168 .thumb
169 .syntax unified
170 .LBE17:
171 .LBE16:
753:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
172 .loc 1 753 1 is_stmt 0 view .LVU42
173 0026 7047 bx lr
174 .L8:
175 .align 2
176 .L7:
177 0028 00200240 .word 1073881088
178 .cfi_endproc
179 .LFE342:
181 .section .text.HAL_FLASH_EndOfOperationCallback,"ax",%progbits
182 .align 1
183 .weak HAL_FLASH_EndOfOperationCallback
184 .syntax unified
185 .thumb
186 .thumb_func
188 HAL_FLASH_EndOfOperationCallback:
ARM GAS /tmp/ccsIWRCI.s page 34
189 .LVL8:
190 .LFB332:
442:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */
191 .loc 1 442 1 is_stmt 1 view -0
192 .cfi_startproc
193 @ args = 0, pretend = 0, frame = 0
194 @ frame_needed = 0, uses_anonymous_args = 0
195 @ link register save eliminated.
444:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
196 .loc 1 444 3 view .LVU44
449:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
197 .loc 1 449 1 is_stmt 0 view .LVU45
198 0000 7047 bx lr
199 .cfi_endproc
200 .LFE332:
202 .section .text.HAL_FLASH_OperationErrorCallback,"ax",%progbits
203 .align 1
204 .weak HAL_FLASH_OperationErrorCallback
205 .syntax unified
206 .thumb
207 .thumb_func
209 HAL_FLASH_OperationErrorCallback:
210 .LVL9:
211 .LFB333:
460:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Prevent unused argument(s) compilation warning */
212 .loc 1 460 1 is_stmt 1 view -0
213 .cfi_startproc
214 @ args = 0, pretend = 0, frame = 0
215 @ frame_needed = 0, uses_anonymous_args = 0
216 @ link register save eliminated.
462:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
217 .loc 1 462 3 view .LVU47
467:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
218 .loc 1 467 1 is_stmt 0 view .LVU48
219 0000 7047 bx lr
220 .cfi_endproc
221 .LFE333:
223 .section .text.HAL_FLASH_IRQHandler,"ax",%progbits
224 .align 1
225 .global HAL_FLASH_IRQHandler
226 .syntax unified
227 .thumb
228 .thumb_func
230 HAL_FLASH_IRQHandler:
231 .LFB331:
302:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t tmp_page;
232 .loc 1 302 1 is_stmt 1 view -0
233 .cfi_startproc
234 @ args = 0, pretend = 0, frame = 0
235 @ frame_needed = 0, uses_anonymous_args = 0
236 0000 10B5 push {r4, lr}
237 .LCFI2:
238 .cfi_def_cfa_offset 8
239 .cfi_offset 4, -8
240 .cfi_offset 14, -4
303:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t error;
241 .loc 1 303 3 view .LVU50
ARM GAS /tmp/ccsIWRCI.s page 35
304:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_ProcedureTypeDef procedure;
242 .loc 1 304 3 view .LVU51
305:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
243 .loc 1 305 3 view .LVU52
308:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** #if defined (FLASH_OPTR_DBANK)
244 .loc 1 308 3 view .LVU53
245 0002 454A ldr r2, .L31
246 0004 5369 ldr r3, [r2, #20]
247 0006 23F4FF73 bic r3, r3, #510
248 000a 23F00103 bic r3, r3, #1
249 000e 5361 str r3, [r2, #20]
314:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
250 .loc 1 314 3 view .LVU54
314:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
251 .loc 1 314 13 is_stmt 0 view .LVU55
252 0010 424B ldr r3, .L31+4
253 0012 1B7A ldrb r3, [r3, #8] @ zero_extendqisi2
254 0014 DBB2 uxtb r3, r3
314:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
255 .loc 1 314 6 view .LVU56
256 0016 042B cmp r3, #4
257 0018 3AD0 beq .L25
258 .L12:
320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
259 .loc 1 320 3 is_stmt 1 view .LVU57
320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
260 .loc 1 320 17 is_stmt 0 view .LVU58
261 001a 3F4B ldr r3, .L31
262 001c 1B69 ldr r3, [r3, #16]
320:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
263 .loc 1 320 9 view .LVU59
264 001e 4CF2FA32 movw r2, #50170
265 .LVL10:
322:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
266 .loc 1 322 3 is_stmt 1 view .LVU60
322:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
267 .loc 1 322 6 is_stmt 0 view .LVU61
268 0022 1340 ands r3, r3, r2
269 .LVL11:
322:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
270 .loc 1 322 6 view .LVU62
271 0024 15D0 beq .L13
325:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
272 .loc 1 325 5 is_stmt 1 view .LVU63
325:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
273 .loc 1 325 11 is_stmt 0 view .LVU64
274 0026 3D49 ldr r1, .L31+4
275 0028 4A68 ldr r2, [r1, #4]
325:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
276 .loc 1 325 22 view .LVU65
277 002a 1A43 orrs r2, r2, r3
278 002c 4A60 str r2, [r1, #4]
328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
279 .loc 1 328 5 is_stmt 1 view .LVU66
328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
280 .loc 1 328 5 view .LVU67
328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
ARM GAS /tmp/ccsIWRCI.s page 36
281 .loc 1 328 5 view .LVU68
328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
282 .loc 1 328 5 view .LVU69
283 002e 3A4A ldr r2, .L31
284 0030 1361 str r3, [r2, #16]
328:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
285 .loc 1 328 5 view .LVU70
331:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
286 .loc 1 331 5 view .LVU71
287 0032 FFF7FEFF bl FLASH_FlushCaches
288 .LVL12:
334:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (procedure == FLASH_PROC_PAGE_ERASE)
289 .loc 1 334 5 view .LVU72
334:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (procedure == FLASH_PROC_PAGE_ERASE)
290 .loc 1 334 15 is_stmt 0 view .LVU73
291 0036 394B ldr r3, .L31+4
292 0038 1B7A ldrb r3, [r3, #8] @ zero_extendqisi2
293 003a DBB2 uxtb r3, r3
294 .LVL13:
335:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
295 .loc 1 335 5 is_stmt 1 view .LVU74
335:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
296 .loc 1 335 8 is_stmt 0 view .LVU75
297 003c 012B cmp r3, #1
298 003e 2CD0 beq .L26
339:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
299 .loc 1 339 10 is_stmt 1 view .LVU76
339:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
300 .loc 1 339 13 is_stmt 0 view .LVU77
301 0040 022B cmp r3, #2
302 0042 2FD0 beq .L27
343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
303 .loc 1 343 10 is_stmt 1 view .LVU78
343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
304 .loc 1 343 48 is_stmt 0 view .LVU79
305 0044 033B subs r3, r3, #3
306 .LVL14:
343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
307 .loc 1 343 48 view .LVU80
308 0046 DBB2 uxtb r3, r3
309 .LVL15:
343:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
310 .loc 1 343 13 view .LVU81
311 0048 012B cmp r3, #1
312 004a 30D9 bls .L28
313 .LVL16:
314 .L16:
351:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
315 .loc 1 351 5 is_stmt 1 view .LVU82
354:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
316 .loc 1 354 5 view .LVU83
354:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
317 .loc 1 354 29 is_stmt 0 view .LVU84
318 004c 334B ldr r3, .L31+4
319 004e 0022 movs r2, #0
320 0050 1A72 strb r2, [r3, #8]
321 .LVL17:
ARM GAS /tmp/ccsIWRCI.s page 37
322 .L13:
358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
323 .loc 1 358 3 is_stmt 1 view .LVU85
358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
324 .loc 1 358 7 is_stmt 0 view .LVU86
325 0052 314B ldr r3, .L31
326 0054 1B69 ldr r3, [r3, #16]
358:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
327 .loc 1 358 6 view .LVU87
328 0056 13F0010F tst r3, #1
329 005a 47D0 beq .L18
361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
330 .loc 1 361 5 is_stmt 1 discriminator 4 view .LVU88
361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
331 .loc 1 361 5 discriminator 4 view .LVU89
361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
332 .loc 1 361 5 discriminator 4 view .LVU90
361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
333 .loc 1 361 5 discriminator 4 view .LVU91
334 005c 2E4B ldr r3, .L31
335 005e 0122 movs r2, #1
336 0060 1A61 str r2, [r3, #16]
361:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
337 .loc 1 361 5 discriminator 4 view .LVU92
363:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
338 .loc 1 363 5 discriminator 4 view .LVU93
363:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
339 .loc 1 363 15 is_stmt 0 discriminator 4 view .LVU94
340 0062 2E4B ldr r3, .L31+4
341 0064 1B7A ldrb r3, [r3, #8] @ zero_extendqisi2
342 0066 DBB2 uxtb r3, r3
363:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
343 .loc 1 363 8 discriminator 4 view .LVU95
344 0068 9342 cmp r3, r2
345 006a 31D1 bne .L19
366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
346 .loc 1 366 7 is_stmt 1 view .LVU96
366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
347 .loc 1 366 13 is_stmt 0 view .LVU97
348 006c 2B4B ldr r3, .L31+4
349 006e 9A69 ldr r2, [r3, #24]
366:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
350 .loc 1 366 28 view .LVU98
351 0070 013A subs r2, r2, #1
352 0072 9A61 str r2, [r3, #24]
369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
353 .loc 1 369 7 is_stmt 1 view .LVU99
369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
354 .loc 1 369 17 is_stmt 0 view .LVU100
355 0074 9B69 ldr r3, [r3, #24]
369:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
356 .loc 1 369 10 view .LVU101
357 0076 FBB1 cbz r3, .L20
372:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
358 .loc 1 372 9 is_stmt 1 view .LVU102
372:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
359 .loc 1 372 48 is_stmt 0 view .LVU103
ARM GAS /tmp/ccsIWRCI.s page 38
360 0078 284C ldr r4, .L31+4
361 007a 6069 ldr r0, [r4, #20]
372:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
362 .loc 1 372 9 view .LVU104
363 007c FFF7FEFF bl HAL_FLASH_EndOfOperationCallback
364 .LVL18:
375:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** tmp_page = pFlash.Page;
365 .loc 1 375 9 is_stmt 1 view .LVU105
375:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** tmp_page = pFlash.Page;
366 .loc 1 375 15 is_stmt 0 view .LVU106
367 0080 6369 ldr r3, [r4, #20]
375:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** tmp_page = pFlash.Page;
368 .loc 1 375 20 view .LVU107
369 0082 0133 adds r3, r3, #1
370 0084 6361 str r3, [r4, #20]
376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_PageErase(tmp_page, pFlash.Bank);
371 .loc 1 376 9 is_stmt 1 view .LVU108
376:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** FLASH_PageErase(tmp_page, pFlash.Bank);
372 .loc 1 376 18 is_stmt 0 view .LVU109
373 0086 6069 ldr r0, [r4, #20]
374 .LVL19:
377:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
375 .loc 1 377 9 is_stmt 1 view .LVU110
377:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
376 .loc 1 377 41 is_stmt 0 view .LVU111
377 0088 2169 ldr r1, [r4, #16]
377:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
378 .loc 1 377 9 view .LVU112
379 008a FFF7FEFF bl FLASH_PageErase
380 .LVL20:
377:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
381 .loc 1 377 9 view .LVU113
382 008e 2DE0 b .L18
383 .LVL21:
384 .L25:
316:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
385 .loc 1 316 5 is_stmt 1 view .LVU114
386 0090 5369 ldr r3, [r2, #20]
387 0092 23F48023 bic r3, r3, #262144
388 0096 5361 str r3, [r2, #20]
389 0098 BFE7 b .L12
390 .LVL22:
391 .L26:
337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
392 .loc 1 337 7 view .LVU115
337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
393 .loc 1 337 46 is_stmt 0 view .LVU116
394 009a 204B ldr r3, .L31+4
395 .LVL23:
337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
396 .loc 1 337 46 view .LVU117
397 009c 5869 ldr r0, [r3, #20]
337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
398 .loc 1 337 7 view .LVU118
399 009e FFF7FEFF bl HAL_FLASH_OperationErrorCallback
400 .LVL24:
337:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
ARM GAS /tmp/ccsIWRCI.s page 39
401 .loc 1 337 7 view .LVU119
402 00a2 D3E7 b .L16
403 .LVL25:
404 .L27:
341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
405 .loc 1 341 7 is_stmt 1 view .LVU120
341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
406 .loc 1 341 46 is_stmt 0 view .LVU121
407 00a4 1D4B ldr r3, .L31+4
408 .LVL26:
341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
409 .loc 1 341 46 view .LVU122
410 00a6 1869 ldr r0, [r3, #16]
341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
411 .loc 1 341 7 view .LVU123
412 00a8 FFF7FEFF bl HAL_FLASH_OperationErrorCallback
413 .LVL27:
341:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
414 .loc 1 341 7 view .LVU124
415 00ac CEE7 b .L16
416 .LVL28:
417 .L28:
346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
418 .loc 1 346 7 is_stmt 1 view .LVU125
346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
419 .loc 1 346 46 is_stmt 0 view .LVU126
420 00ae 1B4B ldr r3, .L31+4
421 00b0 D868 ldr r0, [r3, #12]
346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
422 .loc 1 346 7 view .LVU127
423 00b2 FFF7FEFF bl HAL_FLASH_OperationErrorCallback
424 .LVL29:
346:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
425 .loc 1 346 7 view .LVU128
426 00b6 C9E7 b .L16
427 .LVL30:
428 .L20:
383:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE;
429 .loc 1 383 9 is_stmt 1 view .LVU129
383:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** pFlash.ProcedureOnGoing = FLASH_PROC_NONE;
430 .loc 1 383 21 is_stmt 0 view .LVU130
431 00b8 184C ldr r4, .L31+4
432 00ba 4FF0FF33 mov r3, #-1
433 00be 6361 str r3, [r4, #20]
384:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
434 .loc 1 384 9 is_stmt 1 view .LVU131
384:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
435 .loc 1 384 33 is_stmt 0 view .LVU132
436 00c0 0023 movs r3, #0
437 00c2 2372 strb r3, [r4, #8]
387:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
438 .loc 1 387 9 is_stmt 1 view .LVU133
439 00c4 FFF7FEFF bl FLASH_FlushCaches
440 .LVL31:
390:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
441 .loc 1 390 9 view .LVU134
390:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
ARM GAS /tmp/ccsIWRCI.s page 40
442 .loc 1 390 48 is_stmt 0 view .LVU135
443 00c8 6069 ldr r0, [r4, #20]
390:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
444 .loc 1 390 9 view .LVU136
445 00ca FFF7FEFF bl HAL_FLASH_EndOfOperationCallback
446 .LVL32:
447 00ce 0DE0 b .L18
448 .L19:
396:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
449 .loc 1 396 7 is_stmt 1 view .LVU137
450 00d0 FFF7FEFF bl FLASH_FlushCaches
451 .LVL33:
398:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (procedure == FLASH_PROC_MASS_ERASE)
452 .loc 1 398 7 view .LVU138
398:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (procedure == FLASH_PROC_MASS_ERASE)
453 .loc 1 398 17 is_stmt 0 view .LVU139
454 00d4 114B ldr r3, .L31+4
455 00d6 1B7A ldrb r3, [r3, #8] @ zero_extendqisi2
456 00d8 DBB2 uxtb r3, r3
457 .LVL34:
399:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
458 .loc 1 399 7 is_stmt 1 view .LVU140
399:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
459 .loc 1 399 10 is_stmt 0 view .LVU141
460 00da 022B cmp r3, #2
461 00dc 12D0 beq .L29
405:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
462 .loc 1 405 12 is_stmt 1 view .LVU142
405:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
463 .loc 1 405 50 is_stmt 0 view .LVU143
464 00de 033B subs r3, r3, #3
465 .LVL35:
405:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
466 .loc 1 405 50 view .LVU144
467 00e0 DBB2 uxtb r3, r3
468 .LVL36:
405:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** (procedure == FLASH_PROC_PROGRAM_LAST))
469 .loc 1 405 15 view .LVU145
470 00e2 012B cmp r3, #1
471 00e4 13D9 bls .L30
472 .LVL37:
473 .L22:
415:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
474 .loc 1 415 7 is_stmt 1 view .LVU146
418:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
475 .loc 1 418 7 view .LVU147
418:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
476 .loc 1 418 31 is_stmt 0 view .LVU148
477 00e6 0D4B ldr r3, .L31+4
478 00e8 0022 movs r2, #0
479 00ea 1A72 strb r2, [r3, #8]
480 .LVL38:
481 .L18:
422:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
482 .loc 1 422 3 is_stmt 1 view .LVU149
422:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
483 .loc 1 422 13 is_stmt 0 view .LVU150
ARM GAS /tmp/ccsIWRCI.s page 41
484 00ec 0B4B ldr r3, .L31+4
485 00ee 1B7A ldrb r3, [r3, #8] @ zero_extendqisi2
422:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
486 .loc 1 422 6 view .LVU151
487 00f0 3BB9 cbnz r3, .L11
425:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
488 .loc 1 425 5 is_stmt 1 discriminator 4 view .LVU152
425:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
489 .loc 1 425 5 discriminator 4 view .LVU153
425:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
490 .loc 1 425 5 discriminator 4 view .LVU154
425:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
491 .loc 1 425 5 discriminator 4 view .LVU155
492 00f2 094A ldr r2, .L31
493 00f4 5369 ldr r3, [r2, #20]
494 00f6 23F04073 bic r3, r3, #50331648
495 00fa 5361 str r3, [r2, #20]
425:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
496 .loc 1 425 5 discriminator 4 view .LVU156
428:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
497 .loc 1 428 5 discriminator 4 view .LVU157
428:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
498 .loc 1 428 5 discriminator 4 view .LVU158
499 00fc 074B ldr r3, .L31+4
500 00fe 0022 movs r2, #0
501 0100 1A70 strb r2, [r3]
428:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
502 .loc 1 428 5 discriminator 4 view .LVU159
503 .L11:
430:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
504 .loc 1 430 1 is_stmt 0 view .LVU160
505 0102 10BD pop {r4, pc}
506 .LVL39:
507 .L29:
403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
508 .loc 1 403 9 is_stmt 1 view .LVU161
403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
509 .loc 1 403 48 is_stmt 0 view .LVU162
510 0104 054B ldr r3, .L31+4
511 .LVL40:
403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
512 .loc 1 403 48 view .LVU163
513 0106 1869 ldr r0, [r3, #16]
403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
514 .loc 1 403 9 view .LVU164
515 0108 FFF7FEFF bl HAL_FLASH_EndOfOperationCallback
516 .LVL41:
403:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
517 .loc 1 403 9 view .LVU165
518 010c EBE7 b .L22
519 .LVL42:
520 .L30:
410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
521 .loc 1 410 9 is_stmt 1 view .LVU166
410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
522 .loc 1 410 48 is_stmt 0 view .LVU167
523 010e 034B ldr r3, .L31+4
ARM GAS /tmp/ccsIWRCI.s page 42
524 0110 D868 ldr r0, [r3, #12]
410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
525 .loc 1 410 9 view .LVU168
526 0112 FFF7FEFF bl HAL_FLASH_EndOfOperationCallback
527 .LVL43:
410:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
528 .loc 1 410 9 view .LVU169
529 0116 E6E7 b .L22
530 .L32:
531 .align 2
532 .L31:
533 0118 00200240 .word 1073881088
534 011c 00000000 .word pFlash
535 .cfi_endproc
536 .LFE331:
538 .section .text.HAL_FLASH_Unlock,"ax",%progbits
539 .align 1
540 .global HAL_FLASH_Unlock
541 .syntax unified
542 .thumb
543 .thumb_func
545 HAL_FLASH_Unlock:
546 .LFB334:
493:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK;
547 .loc 1 493 1 is_stmt 1 view -0
548 .cfi_startproc
549 @ args = 0, pretend = 0, frame = 0
550 @ frame_needed = 0, uses_anonymous_args = 0
551 @ link register save eliminated.
494:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
552 .loc 1 494 3 view .LVU171
553 .LVL44:
496:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
554 .loc 1 496 3 view .LVU172
496:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
555 .loc 1 496 7 is_stmt 0 view .LVU173
556 0000 094B ldr r3, .L38
557 0002 5B69 ldr r3, [r3, #20]
496:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
558 .loc 1 496 6 view .LVU174
559 0004 002B cmp r3, #0
560 0006 01DB blt .L37
494:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
561 .loc 1 494 21 view .LVU175
562 0008 0020 movs r0, #0
563 000a 7047 bx lr
564 .L37:
499:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** WRITE_REG(FLASH->KEYR, FLASH_KEY2);
565 .loc 1 499 5 is_stmt 1 view .LVU176
566 000c 064B ldr r3, .L38
567 000e 074A ldr r2, .L38+4
568 0010 9A60 str r2, [r3, #8]
500:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
569 .loc 1 500 5 view .LVU177
570 0012 02F18832 add r2, r2, #-2004318072
571 0016 9A60 str r2, [r3, #8]
503:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
ARM GAS /tmp/ccsIWRCI.s page 43
572 .loc 1 503 5 view .LVU178
503:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
573 .loc 1 503 9 is_stmt 0 view .LVU179
574 0018 5B69 ldr r3, [r3, #20]
503:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
575 .loc 1 503 8 view .LVU180
576 001a 002B cmp r3, #0
577 001c 01DB blt .L36
494:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
578 .loc 1 494 21 view .LVU181
579 001e 0020 movs r0, #0
580 0020 7047 bx lr
581 .L36:
505:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
582 .loc 1 505 14 view .LVU182
583 0022 0120 movs r0, #1
584 .LVL45:
509:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
585 .loc 1 509 3 is_stmt 1 view .LVU183
510:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
586 .loc 1 510 1 is_stmt 0 view .LVU184
587 0024 7047 bx lr
588 .L39:
589 0026 00BF .align 2
590 .L38:
591 0028 00200240 .word 1073881088
592 002c 23016745 .word 1164378403
593 .cfi_endproc
594 .LFE334:
596 .section .text.HAL_FLASH_Lock,"ax",%progbits
597 .align 1
598 .global HAL_FLASH_Lock
599 .syntax unified
600 .thumb
601 .thumb_func
603 HAL_FLASH_Lock:
604 .LFB335:
517:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_ERROR;
605 .loc 1 517 1 is_stmt 1 view -0
606 .cfi_startproc
607 @ args = 0, pretend = 0, frame = 0
608 @ frame_needed = 0, uses_anonymous_args = 0
609 @ link register save eliminated.
518:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
610 .loc 1 518 3 view .LVU186
611 .LVL46:
521:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
612 .loc 1 521 3 view .LVU187
613 0000 054B ldr r3, .L43
614 0002 5A69 ldr r2, [r3, #20]
615 0004 42F00042 orr r2, r2, #-2147483648
616 0008 5A61 str r2, [r3, #20]
524:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
617 .loc 1 524 3 view .LVU188
524:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
618 .loc 1 524 7 is_stmt 0 view .LVU189
619 000a 5B69 ldr r3, [r3, #20]
ARM GAS /tmp/ccsIWRCI.s page 44
524:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
620 .loc 1 524 6 view .LVU190
621 000c 002B cmp r3, #0
622 000e 01DB blt .L42
518:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
623 .loc 1 518 21 view .LVU191
624 0010 0120 movs r0, #1
625 0012 7047 bx lr
626 .L42:
526:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
627 .loc 1 526 12 view .LVU192
628 0014 0020 movs r0, #0
629 .LVL47:
529:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
630 .loc 1 529 3 is_stmt 1 view .LVU193
530:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
631 .loc 1 530 1 is_stmt 0 view .LVU194
632 0016 7047 bx lr
633 .L44:
634 .align 2
635 .L43:
636 0018 00200240 .word 1073881088
637 .cfi_endproc
638 .LFE335:
640 .section .text.HAL_FLASH_OB_Unlock,"ax",%progbits
641 .align 1
642 .global HAL_FLASH_OB_Unlock
643 .syntax unified
644 .thumb
645 .thumb_func
647 HAL_FLASH_OB_Unlock:
648 .LFB336:
537:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_OK;
649 .loc 1 537 1 is_stmt 1 view -0
650 .cfi_startproc
651 @ args = 0, pretend = 0, frame = 0
652 @ frame_needed = 0, uses_anonymous_args = 0
653 @ link register save eliminated.
538:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
654 .loc 1 538 3 view .LVU196
655 .LVL48:
540:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
656 .loc 1 540 3 view .LVU197
540:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
657 .loc 1 540 7 is_stmt 0 view .LVU198
658 0000 0A4B ldr r3, .L49
659 0002 5B69 ldr r3, [r3, #20]
540:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
660 .loc 1 540 6 view .LVU199
661 0004 13F0804F tst r3, #1073741824
662 0008 0BD0 beq .L47
543:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY2);
663 .loc 1 543 5 is_stmt 1 view .LVU200
664 000a 084B ldr r3, .L49
665 000c 084A ldr r2, .L49+4
666 000e DA60 str r2, [r3, #12]
544:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
ARM GAS /tmp/ccsIWRCI.s page 45
667 .loc 1 544 5 view .LVU201
668 0010 02F14432 add r2, r2, #1145324612
669 0014 DA60 str r2, [r3, #12]
547:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
670 .loc 1 547 5 view .LVU202
547:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
671 .loc 1 547 9 is_stmt 0 view .LVU203
672 0016 5B69 ldr r3, [r3, #20]
547:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
673 .loc 1 547 8 view .LVU204
674 0018 13F0804F tst r3, #1073741824
675 001c 03D1 bne .L48
538:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
676 .loc 1 538 21 view .LVU205
677 001e 0020 movs r0, #0
678 0020 7047 bx lr
679 .L47:
680 0022 0020 movs r0, #0
681 0024 7047 bx lr
682 .L48:
549:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
683 .loc 1 549 14 view .LVU206
684 0026 0120 movs r0, #1
685 .LVL49:
553:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
686 .loc 1 553 3 is_stmt 1 view .LVU207
554:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
687 .loc 1 554 1 is_stmt 0 view .LVU208
688 0028 7047 bx lr
689 .L50:
690 002a 00BF .align 2
691 .L49:
692 002c 00200240 .word 1073881088
693 0030 3B2A1908 .word 135866939
694 .cfi_endproc
695 .LFE336:
697 .section .text.HAL_FLASH_OB_Lock,"ax",%progbits
698 .align 1
699 .global HAL_FLASH_OB_Lock
700 .syntax unified
701 .thumb
702 .thumb_func
704 HAL_FLASH_OB_Lock:
705 .LFB337:
561:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status = HAL_ERROR;
706 .loc 1 561 1 is_stmt 1 view -0
707 .cfi_startproc
708 @ args = 0, pretend = 0, frame = 0
709 @ frame_needed = 0, uses_anonymous_args = 0
710 @ link register save eliminated.
562:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
711 .loc 1 562 3 view .LVU210
712 .LVL50:
565:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
713 .loc 1 565 3 view .LVU211
714 0000 064B ldr r3, .L54
715 0002 5A69 ldr r2, [r3, #20]
ARM GAS /tmp/ccsIWRCI.s page 46
716 0004 42F08042 orr r2, r2, #1073741824
717 0008 5A61 str r2, [r3, #20]
568:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
718 .loc 1 568 3 view .LVU212
568:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
719 .loc 1 568 7 is_stmt 0 view .LVU213
720 000a 5B69 ldr r3, [r3, #20]
568:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
721 .loc 1 568 6 view .LVU214
722 000c 13F0804F tst r3, #1073741824
723 0010 01D1 bne .L53
562:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
724 .loc 1 562 21 view .LVU215
725 0012 0120 movs r0, #1
726 0014 7047 bx lr
727 .L53:
570:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
728 .loc 1 570 12 view .LVU216
729 0016 0020 movs r0, #0
730 .LVL51:
573:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
731 .loc 1 573 3 is_stmt 1 view .LVU217
574:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
732 .loc 1 574 1 is_stmt 0 view .LVU218
733 0018 7047 bx lr
734 .L55:
735 001a 00BF .align 2
736 .L54:
737 001c 00200240 .word 1073881088
738 .cfi_endproc
739 .LFE337:
741 .section .text.HAL_FLASH_GetError,"ax",%progbits
742 .align 1
743 .global HAL_FLASH_GetError
744 .syntax unified
745 .thumb
746 .thumb_func
748 HAL_FLASH_GetError:
749 .LFB339:
629:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** return pFlash.ErrorCode;
750 .loc 1 629 1 is_stmt 1 view -0
751 .cfi_startproc
752 @ args = 0, pretend = 0, frame = 0
753 @ frame_needed = 0, uses_anonymous_args = 0
754 @ link register save eliminated.
630:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
755 .loc 1 630 3 view .LVU220
630:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
756 .loc 1 630 16 is_stmt 0 view .LVU221
757 0000 014B ldr r3, .L57
758 0002 5868 ldr r0, [r3, #4]
631:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
759 .loc 1 631 1 view .LVU222
760 0004 7047 bx lr
761 .L58:
762 0006 00BF .align 2
763 .L57:
ARM GAS /tmp/ccsIWRCI.s page 47
764 0008 00000000 .word pFlash
765 .cfi_endproc
766 .LFE339:
768 .section .text.FLASH_WaitForLastOperation,"ax",%progbits
769 .align 1
770 .global FLASH_WaitForLastOperation
771 .syntax unified
772 .thumb
773 .thumb_func
775 FLASH_WaitForLastOperation:
776 .LVL52:
777 .LFB340:
653:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset.
778 .loc 1 653 1 is_stmt 1 view -0
779 .cfi_startproc
780 @ args = 0, pretend = 0, frame = 0
781 @ frame_needed = 0, uses_anonymous_args = 0
653:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset.
782 .loc 1 653 1 is_stmt 0 view .LVU224
783 0000 38B5 push {r3, r4, r5, lr}
784 .LCFI3:
785 .cfi_def_cfa_offset 16
786 .cfi_offset 3, -16
787 .cfi_offset 4, -12
788 .cfi_offset 5, -8
789 .cfi_offset 14, -4
790 0002 0546 mov r5, r0
658:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t error;
791 .loc 1 658 3 is_stmt 1 view .LVU225
658:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t error;
792 .loc 1 658 24 is_stmt 0 view .LVU226
793 0004 FFF7FEFF bl HAL_GetTick
794 .LVL53:
658:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t error;
795 .loc 1 658 24 view .LVU227
796 0008 0446 mov r4, r0
797 .LVL54:
659:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
798 .loc 1 659 3 is_stmt 1 view .LVU228
661:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
799 .loc 1 661 3 view .LVU229
800 .L60:
661:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
801 .loc 1 661 10 view .LVU230
802 000a 134B ldr r3, .L70
803 000c 1B69 ldr r3, [r3, #16]
804 000e 13F4803F tst r3, #65536
805 0012 06D0 beq .L68
663:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
806 .loc 1 663 5 view .LVU231
663:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
807 .loc 1 663 10 is_stmt 0 view .LVU232
808 0014 FFF7FEFF bl HAL_GetTick
809 .LVL55:
663:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
810 .loc 1 663 24 view .LVU233
811 0018 001B subs r0, r0, r4
ARM GAS /tmp/ccsIWRCI.s page 48
663:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
812 .loc 1 663 8 view .LVU234
813 001a A842 cmp r0, r5
814 001c F5D9 bls .L60
665:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
815 .loc 1 665 14 view .LVU235
816 001e 0320 movs r0, #3
817 .L61:
691:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
818 .loc 1 691 1 view .LVU236
819 0020 38BD pop {r3, r4, r5, pc}
820 .LVL56:
821 .L68:
670:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (error != 0u)
822 .loc 1 670 3 is_stmt 1 view .LVU237
670:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (error != 0u)
823 .loc 1 670 17 is_stmt 0 view .LVU238
824 0022 0D4B ldr r3, .L70
825 0024 1B69 ldr r3, [r3, #16]
670:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** if (error != 0u)
826 .loc 1 670 9 view .LVU239
827 0026 4CF2FA32 movw r2, #50170
828 .LVL57:
671:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
829 .loc 1 671 3 is_stmt 1 view .LVU240
671:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
830 .loc 1 671 6 is_stmt 0 view .LVU241
831 002a 1340 ands r3, r3, r2
832 .LVL58:
671:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
833 .loc 1 671 6 view .LVU242
834 002c 09D1 bne .L69
683:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
835 .loc 1 683 3 is_stmt 1 view .LVU243
683:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
836 .loc 1 683 7 is_stmt 0 view .LVU244
837 002e 0A4B ldr r3, .L70
838 .LVL59:
683:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
839 .loc 1 683 7 view .LVU245
840 0030 1B69 ldr r3, [r3, #16]
683:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
841 .loc 1 683 6 view .LVU246
842 0032 13F0010F tst r3, #1
843 0036 0CD0 beq .L66
686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
844 .loc 1 686 5 is_stmt 1 discriminator 4 view .LVU247
686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
845 .loc 1 686 5 discriminator 4 view .LVU248
686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
846 .loc 1 686 5 discriminator 4 view .LVU249
686:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
847 .loc 1 686 5 discriminator 4 view .LVU250
848 0038 074B ldr r3, .L70
849 003a 0122 movs r2, #1
850 003c 1A61 str r2, [r3, #16]
690:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
ARM GAS /tmp/ccsIWRCI.s page 49
851 .loc 1 690 10 is_stmt 0 discriminator 4 view .LVU251
852 003e 0020 movs r0, #0
853 0040 EEE7 b .L61
854 .LVL60:
855 .L69:
674:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
856 .loc 1 674 5 is_stmt 1 view .LVU252
674:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
857 .loc 1 674 11 is_stmt 0 view .LVU253
858 0042 0649 ldr r1, .L70+4
859 0044 4A68 ldr r2, [r1, #4]
674:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
860 .loc 1 674 22 view .LVU254
861 0046 1A43 orrs r2, r2, r3
862 0048 4A60 str r2, [r1, #4]
677:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
863 .loc 1 677 5 is_stmt 1 view .LVU255
677:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
864 .loc 1 677 5 view .LVU256
677:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
865 .loc 1 677 5 view .LVU257
677:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
866 .loc 1 677 5 view .LVU258
867 004a 034A ldr r2, .L70
868 004c 1361 str r3, [r2, #16]
677:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
869 .loc 1 677 5 view .LVU259
679:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
870 .loc 1 679 5 view .LVU260
679:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
871 .loc 1 679 12 is_stmt 0 view .LVU261
872 004e 0120 movs r0, #1
873 0050 E6E7 b .L61
874 .LVL61:
875 .L66:
690:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
876 .loc 1 690 10 view .LVU262
877 0052 0020 movs r0, #0
878 0054 E4E7 b .L61
879 .L71:
880 0056 00BF .align 2
881 .L70:
882 0058 00200240 .word 1073881088
883 005c 00000000 .word pFlash
884 .cfi_endproc
885 .LFE340:
887 .section .text.HAL_FLASH_Program,"ax",%progbits
888 .align 1
889 .global HAL_FLASH_Program
890 .syntax unified
891 .thumb
892 .thumb_func
894 HAL_FLASH_Program:
895 .LVL62:
896 .LFB329:
174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status;
897 .loc 1 174 1 is_stmt 1 view -0
ARM GAS /tmp/ccsIWRCI.s page 50
898 .cfi_startproc
899 @ args = 0, pretend = 0, frame = 0
900 @ frame_needed = 0, uses_anonymous_args = 0
174:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status;
901 .loc 1 174 1 is_stmt 0 view .LVU264
902 0000 F8B5 push {r3, r4, r5, r6, r7, lr}
903 .LCFI4:
904 .cfi_def_cfa_offset 24
905 .cfi_offset 3, -24
906 .cfi_offset 4, -20
907 .cfi_offset 5, -16
908 .cfi_offset 6, -12
909 .cfi_offset 7, -8
910 .cfi_offset 14, -4
911 0002 1646 mov r6, r2
175:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** uint32_t prog_bit = 0;
912 .loc 1 175 3 is_stmt 1 view .LVU265
176:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
913 .loc 1 176 3 view .LVU266
914 .LVL63:
179:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
915 .loc 1 179 3 view .LVU267
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
916 .loc 1 182 3 view .LVU268
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
917 .loc 1 182 3 view .LVU269
918 0004 1B4A ldr r2, .L83
919 .LVL64:
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
920 .loc 1 182 3 is_stmt 0 view .LVU270
921 0006 1278 ldrb r2, [r2] @ zero_extendqisi2
922 0008 012A cmp r2, #1
923 000a 31D0 beq .L77
924 000c 0446 mov r4, r0
925 000e 0D46 mov r5, r1
926 0010 1F46 mov r7, r3
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
927 .loc 1 182 3 is_stmt 1 discriminator 2 view .LVU271
928 0012 184B ldr r3, .L83
929 0014 0122 movs r2, #1
930 0016 1A70 strb r2, [r3]
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
931 .loc 1 182 3 discriminator 2 view .LVU272
185:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
932 .loc 1 185 3 discriminator 2 view .LVU273
185:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
933 .loc 1 185 12 is_stmt 0 discriminator 2 view .LVU274
934 0018 4FF47A70 mov r0, #1000
935 .LVL65:
185:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
936 .loc 1 185 12 discriminator 2 view .LVU275
937 001c FFF7FEFF bl FLASH_WaitForLastOperation
938 .LVL66:
187:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
939 .loc 1 187 3 is_stmt 1 discriminator 2 view .LVU276
187:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
940 .loc 1 187 6 is_stmt 0 discriminator 2 view .LVU277
ARM GAS /tmp/ccsIWRCI.s page 51
941 0020 80B9 cbnz r0, .L74
189:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
942 .loc 1 189 5 is_stmt 1 view .LVU278
189:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
943 .loc 1 189 22 is_stmt 0 view .LVU279
944 0022 144B ldr r3, .L83
945 0024 5860 str r0, [r3, #4]
191:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
946 .loc 1 191 5 is_stmt 1 view .LVU280
191:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
947 .loc 1 191 8 is_stmt 0 view .LVU281
948 0026 8CB1 cbz r4, .L81
197:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
949 .loc 1 197 10 is_stmt 1 view .LVU282
197:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
950 .loc 1 197 54 is_stmt 0 view .LVU283
951 0028 631E subs r3, r4, #1
197:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
952 .loc 1 197 13 view .LVU284
953 002a 012B cmp r3, #1
954 002c 15D9 bls .L82
176:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
955 .loc 1 176 12 view .LVU285
956 002e 0024 movs r4, #0
957 .LVL67:
958 .L76:
211:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
959 .loc 1 211 5 is_stmt 1 view .LVU286
214:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
960 .loc 1 214 5 view .LVU287
214:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
961 .loc 1 214 14 is_stmt 0 view .LVU288
962 0030 4FF47A70 mov r0, #1000
963 0034 FFF7FEFF bl FLASH_WaitForLastOperation
964 .LVL68:
217:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
965 .loc 1 217 5 is_stmt 1 view .LVU289
217:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
966 .loc 1 217 8 is_stmt 0 view .LVU290
967 0038 24B1 cbz r4, .L74
219:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
968 .loc 1 219 7 is_stmt 1 view .LVU291
969 003a 0F4A ldr r2, .L83+4
970 003c 5369 ldr r3, [r2, #20]
971 003e 23EA0403 bic r3, r3, r4
972 0042 5361 str r3, [r2, #20]
973 .LVL69:
974 .L74:
224:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
975 .loc 1 224 3 view .LVU292
224:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
976 .loc 1 224 3 view .LVU293
977 0044 0B4B ldr r3, .L83
978 0046 0022 movs r2, #0
979 0048 1A70 strb r2, [r3]
224:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
980 .loc 1 224 3 view .LVU294
ARM GAS /tmp/ccsIWRCI.s page 52
227:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
981 .loc 1 227 3 view .LVU295
982 .LVL70:
983 .L73:
228:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
984 .loc 1 228 1 is_stmt 0 view .LVU296
985 004a F8BD pop {r3, r4, r5, r6, r7, pc}
986 .LVL71:
987 .L81:
194:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** prog_bit = FLASH_CR_PG;
988 .loc 1 194 7 is_stmt 1 view .LVU297
989 004c 3246 mov r2, r6
990 004e 3B46 mov r3, r7
991 0050 2846 mov r0, r5
992 .LVL72:
194:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** prog_bit = FLASH_CR_PG;
993 .loc 1 194 7 is_stmt 0 view .LVU298
994 0052 FFF7FEFF bl FLASH_Program_DoubleWord
995 .LVL73:
195:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
996 .loc 1 195 7 is_stmt 1 view .LVU299
195:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
997 .loc 1 195 16 is_stmt 0 view .LVU300
998 0056 0124 movs r4, #1
999 .LVL74:
195:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1000 .loc 1 195 16 view .LVU301
1001 0058 EAE7 b .L76
1002 .LVL75:
1003 .L82:
200:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1004 .loc 1 200 7 is_stmt 1 view .LVU302
1005 005a 3146 mov r1, r6
1006 005c 2846 mov r0, r5
1007 .LVL76:
200:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1008 .loc 1 200 7 is_stmt 0 view .LVU303
1009 005e FFF7FEFF bl FLASH_Program_Fast
1010 .LVL77:
203:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1011 .loc 1 203 7 is_stmt 1 view .LVU304
203:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1012 .loc 1 203 10 is_stmt 0 view .LVU305
1013 0062 022C cmp r4, #2
1014 0064 01D0 beq .L79
176:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1015 .loc 1 176 12 view .LVU306
1016 0066 0024 movs r4, #0
1017 .LVL78:
176:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1018 .loc 1 176 12 view .LVU307
1019 0068 E2E7 b .L76
1020 .LVL79:
1021 .L79:
205:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1022 .loc 1 205 18 view .LVU308
1023 006a 4FF48024 mov r4, #262144
ARM GAS /tmp/ccsIWRCI.s page 53
1024 .LVL80:
205:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1025 .loc 1 205 18 view .LVU309
1026 006e DFE7 b .L76
1027 .LVL81:
1028 .L77:
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1029 .loc 1 182 3 view .LVU310
1030 0070 0220 movs r0, #2
1031 .LVL82:
182:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1032 .loc 1 182 3 view .LVU311
1033 0072 EAE7 b .L73
1034 .L84:
1035 .align 2
1036 .L83:
1037 0074 00000000 .word pFlash
1038 0078 00200240 .word 1073881088
1039 .cfi_endproc
1040 .LFE329:
1042 .section .text.HAL_FLASH_Program_IT,"ax",%progbits
1043 .align 1
1044 .global HAL_FLASH_Program_IT
1045 .syntax unified
1046 .thumb
1047 .thumb_func
1049 HAL_FLASH_Program_IT:
1050 .LVL83:
1051 .LFB330:
242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status;
1052 .loc 1 242 1 is_stmt 1 view -0
1053 .cfi_startproc
1054 @ args = 0, pretend = 0, frame = 0
1055 @ frame_needed = 0, uses_anonymous_args = 0
242:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** HAL_StatusTypeDef status;
1056 .loc 1 242 1 is_stmt 0 view .LVU313
1057 0000 2DE9F041 push {r4, r5, r6, r7, r8, lr}
1058 .LCFI5:
1059 .cfi_def_cfa_offset 24
1060 .cfi_offset 4, -24
1061 .cfi_offset 5, -20
1062 .cfi_offset 6, -16
1063 .cfi_offset 7, -12
1064 .cfi_offset 8, -8
1065 .cfi_offset 14, -4
1066 0004 1646 mov r6, r2
243:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1067 .loc 1 243 3 is_stmt 1 view .LVU314
246:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1068 .loc 1 246 3 view .LVU315
249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1069 .loc 1 249 3 view .LVU316
249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1070 .loc 1 249 3 view .LVU317
1071 0006 1D4A ldr r2, .L95
1072 .LVL84:
249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
ARM GAS /tmp/ccsIWRCI.s page 54
1073 .loc 1 249 3 is_stmt 0 view .LVU318
1074 0008 1278 ldrb r2, [r2] @ zero_extendqisi2
1075 000a 012A cmp r2, #1
1076 000c 32D0 beq .L91
1077 000e 0446 mov r4, r0
1078 0010 0D46 mov r5, r1
1079 0012 1F46 mov r7, r3
249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1080 .loc 1 249 3 is_stmt 1 discriminator 2 view .LVU319
1081 0014 194A ldr r2, .L95
1082 0016 0123 movs r3, #1
1083 0018 1370 strb r3, [r2]
249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1084 .loc 1 249 3 discriminator 2 view .LVU320
252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1085 .loc 1 252 3 discriminator 2 view .LVU321
252:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1086 .loc 1 252 20 is_stmt 0 discriminator 2 view .LVU322
1087 001a 0023 movs r3, #0
1088 001c 5360 str r3, [r2, #4]
255:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1089 .loc 1 255 3 is_stmt 1 discriminator 2 view .LVU323
255:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1090 .loc 1 255 12 is_stmt 0 discriminator 2 view .LVU324
1091 001e 4FF47A70 mov r0, #1000
1092 .LVL85:
255:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1093 .loc 1 255 12 discriminator 2 view .LVU325
1094 0022 FFF7FEFF bl FLASH_WaitForLastOperation
1095 .LVL86:
257:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1096 .loc 1 257 3 is_stmt 1 discriminator 2 view .LVU326
257:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1097 .loc 1 257 6 is_stmt 0 discriminator 2 view .LVU327
1098 0026 8046 mov r8, r0
1099 0028 28B1 cbz r0, .L87
260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1100 .loc 1 260 5 is_stmt 1 view .LVU328
260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1101 .loc 1 260 5 view .LVU329
1102 002a 144B ldr r3, .L95
1103 002c 0022 movs r2, #0
1104 002e 1A70 strb r2, [r3]
260:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1105 .loc 1 260 5 view .LVU330
1106 .LVL87:
1107 .L86:
295:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1108 .loc 1 295 1 is_stmt 0 view .LVU331
1109 0030 4046 mov r0, r8
1110 0032 BDE8F081 pop {r4, r5, r6, r7, r8, pc}
1111 .LVL88:
1112 .L87:
265:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1113 .loc 1 265 5 is_stmt 1 view .LVU332
265:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1114 .loc 1 265 8 is_stmt 0 view .LVU333
ARM GAS /tmp/ccsIWRCI.s page 55
1115 0036 022C cmp r4, #2
1116 0038 12D0 beq .L93
271:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1117 .loc 1 271 7 is_stmt 1 view .LVU334
271:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1118 .loc 1 271 31 is_stmt 0 view .LVU335
1119 003a 104B ldr r3, .L95
1120 003c 0322 movs r2, #3
1121 003e 1A72 strb r2, [r3, #8]
1122 .L89:
273:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1123 .loc 1 273 5 is_stmt 1 view .LVU336
273:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1124 .loc 1 273 20 is_stmt 0 view .LVU337
1125 0040 0E4B ldr r3, .L95
1126 0042 DD60 str r5, [r3, #12]
276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1127 .loc 1 276 5 is_stmt 1 view .LVU338
276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1128 .loc 1 276 5 view .LVU339
276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1129 .loc 1 276 5 view .LVU340
276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1130 .loc 1 276 5 view .LVU341
1131 0044 0E4A ldr r2, .L95+4
1132 0046 5369 ldr r3, [r2, #20]
1133 0048 43F04073 orr r3, r3, #50331648
1134 004c 5361 str r3, [r2, #20]
276:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1135 .loc 1 276 5 view .LVU342
278:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1136 .loc 1 278 5 view .LVU343
278:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1137 .loc 1 278 8 is_stmt 0 view .LVU344
1138 004e 5CB1 cbz r4, .L94
283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1139 .loc 1 283 10 is_stmt 1 view .LVU345
283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1140 .loc 1 283 54 is_stmt 0 view .LVU346
1141 0050 013C subs r4, r4, #1
1142 .LVL89:
283:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** {
1143 .loc 1 283 13 view .LVU347
1144 0052 012C cmp r4, #1
1145 0054 ECD8 bhi .L86
286:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1146 .loc 1 286 7 is_stmt 1 view .LVU348
1147 0056 3146 mov r1, r6
1148 0058 2846 mov r0, r5
1149 .LVL90:
286:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1150 .loc 1 286 7 is_stmt 0 view .LVU349
1151 005a FFF7FEFF bl FLASH_Program_Fast
1152 .LVL91:
1153 005e E7E7 b .L86
1154 .LVL92:
1155 .L93:
ARM GAS /tmp/ccsIWRCI.s page 56
267:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1156 .loc 1 267 7 is_stmt 1 view .LVU350
267:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1157 .loc 1 267 31 is_stmt 0 view .LVU351
1158 0060 064B ldr r3, .L95
1159 0062 0422 movs r2, #4
1160 0064 1A72 strb r2, [r3, #8]
1161 0066 EBE7 b .L89
1162 .L94:
281:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1163 .loc 1 281 7 is_stmt 1 view .LVU352
1164 0068 3246 mov r2, r6
1165 006a 3B46 mov r3, r7
1166 006c 2846 mov r0, r5
1167 .LVL93:
281:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1168 .loc 1 281 7 is_stmt 0 view .LVU353
1169 006e FFF7FEFF bl FLASH_Program_DoubleWord
1170 .LVL94:
1171 0072 DDE7 b .L86
1172 .LVL95:
1173 .L91:
249:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1174 .loc 1 249 3 view .LVU354
1175 0074 4FF00208 mov r8, #2
1176 0078 DAE7 b .L86
1177 .L96:
1178 007a 00BF .align 2
1179 .L95:
1180 007c 00000000 .word pFlash
1181 0080 00200240 .word 1073881088
1182 .cfi_endproc
1183 .LFE330:
1185 .section .text.HAL_FLASH_OB_Launch,"ax",%progbits
1186 .align 1
1187 .global HAL_FLASH_OB_Launch
1188 .syntax unified
1189 .thumb
1190 .thumb_func
1192 HAL_FLASH_OB_Launch:
1193 .LFB338:
581:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** /* Set the bit to force the option byte reloading */
1194 .loc 1 581 1 is_stmt 1 view -0
1195 .cfi_startproc
1196 @ args = 0, pretend = 0, frame = 0
1197 @ frame_needed = 0, uses_anonymous_args = 0
1198 0000 08B5 push {r3, lr}
1199 .LCFI6:
1200 .cfi_def_cfa_offset 8
1201 .cfi_offset 3, -8
1202 .cfi_offset 14, -4
583:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1203 .loc 1 583 3 view .LVU356
1204 0002 054A ldr r2, .L99
1205 0004 5369 ldr r3, [r2, #20]
1206 0006 43F00063 orr r3, r3, #134217728
1207 000a 5361 str r3, [r2, #20]
ARM GAS /tmp/ccsIWRCI.s page 57
586:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1208 .loc 1 586 3 view .LVU357
586:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c **** }
1209 .loc 1 586 11 is_stmt 0 view .LVU358
1210 000c 4FF47A70 mov r0, #1000
1211 0010 FFF7FEFF bl FLASH_WaitForLastOperation
1212 .LVL96:
587:Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.c ****
1213 .loc 1 587 1 view .LVU359
1214 0014 08BD pop {r3, pc}
1215 .L100:
1216 0016 00BF .align 2
1217 .L99:
1218 0018 00200240 .word 1073881088
1219 .cfi_endproc
1220 .LFE338:
1222 .global pFlash
1223 .section .data.pFlash,"aw"
1224 .align 2
1227 pFlash:
1228 0000 00 .byte 0
1229 0001 000000 .space 3
1230 0004 00000000 .word 0
1231 0008 00 .byte 0
1232 0009 000000 .space 3
1233 000c 00000000 .word 0
1234 0010 01000000 .word 1
1235 0014 00000000 .word 0
1236 0018 00000000 .word 0
1237 001c 00 .byte 0
1238 001d 000000 .space 3
1239 .text
1240 .Letext0:
1241 .file 3 "/usr/lib/gcc/arm-none-eabi/12.2.1/include/stdint.h"
1242 .file 4 "Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h"
1243 .file 5 "Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h"
1244 .file 6 "Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h"
1245 .file 7 "Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h"
1246 .file 8 "Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h"
ARM GAS /tmp/ccsIWRCI.s page 58
DEFINED SYMBOLS
*ABS*:00000000 stm32g4xx_hal_flash.c
/tmp/ccsIWRCI.s:21 .text.FLASH_Program_DoubleWord:00000000 $t
/tmp/ccsIWRCI.s:26 .text.FLASH_Program_DoubleWord:00000000 FLASH_Program_DoubleWord
/tmp/ccsIWRCI.s:75 .text.FLASH_Program_DoubleWord:0000001c $d
/tmp/ccsIWRCI.s:80 .text.FLASH_Program_Fast:00000000 $t
/tmp/ccsIWRCI.s:85 .text.FLASH_Program_Fast:00000000 FLASH_Program_Fast
/tmp/ccsIWRCI.s:177 .text.FLASH_Program_Fast:00000028 $d
/tmp/ccsIWRCI.s:182 .text.HAL_FLASH_EndOfOperationCallback:00000000 $t
/tmp/ccsIWRCI.s:188 .text.HAL_FLASH_EndOfOperationCallback:00000000 HAL_FLASH_EndOfOperationCallback
/tmp/ccsIWRCI.s:203 .text.HAL_FLASH_OperationErrorCallback:00000000 $t
/tmp/ccsIWRCI.s:209 .text.HAL_FLASH_OperationErrorCallback:00000000 HAL_FLASH_OperationErrorCallback
/tmp/ccsIWRCI.s:224 .text.HAL_FLASH_IRQHandler:00000000 $t
/tmp/ccsIWRCI.s:230 .text.HAL_FLASH_IRQHandler:00000000 HAL_FLASH_IRQHandler
/tmp/ccsIWRCI.s:533 .text.HAL_FLASH_IRQHandler:00000118 $d
/tmp/ccsIWRCI.s:1227 .data.pFlash:00000000 pFlash
/tmp/ccsIWRCI.s:539 .text.HAL_FLASH_Unlock:00000000 $t
/tmp/ccsIWRCI.s:545 .text.HAL_FLASH_Unlock:00000000 HAL_FLASH_Unlock
/tmp/ccsIWRCI.s:591 .text.HAL_FLASH_Unlock:00000028 $d
/tmp/ccsIWRCI.s:597 .text.HAL_FLASH_Lock:00000000 $t
/tmp/ccsIWRCI.s:603 .text.HAL_FLASH_Lock:00000000 HAL_FLASH_Lock
/tmp/ccsIWRCI.s:636 .text.HAL_FLASH_Lock:00000018 $d
/tmp/ccsIWRCI.s:641 .text.HAL_FLASH_OB_Unlock:00000000 $t
/tmp/ccsIWRCI.s:647 .text.HAL_FLASH_OB_Unlock:00000000 HAL_FLASH_OB_Unlock
/tmp/ccsIWRCI.s:692 .text.HAL_FLASH_OB_Unlock:0000002c $d
/tmp/ccsIWRCI.s:698 .text.HAL_FLASH_OB_Lock:00000000 $t
/tmp/ccsIWRCI.s:704 .text.HAL_FLASH_OB_Lock:00000000 HAL_FLASH_OB_Lock
/tmp/ccsIWRCI.s:737 .text.HAL_FLASH_OB_Lock:0000001c $d
/tmp/ccsIWRCI.s:742 .text.HAL_FLASH_GetError:00000000 $t
/tmp/ccsIWRCI.s:748 .text.HAL_FLASH_GetError:00000000 HAL_FLASH_GetError
/tmp/ccsIWRCI.s:764 .text.HAL_FLASH_GetError:00000008 $d
/tmp/ccsIWRCI.s:769 .text.FLASH_WaitForLastOperation:00000000 $t
/tmp/ccsIWRCI.s:775 .text.FLASH_WaitForLastOperation:00000000 FLASH_WaitForLastOperation
/tmp/ccsIWRCI.s:882 .text.FLASH_WaitForLastOperation:00000058 $d
/tmp/ccsIWRCI.s:888 .text.HAL_FLASH_Program:00000000 $t
/tmp/ccsIWRCI.s:894 .text.HAL_FLASH_Program:00000000 HAL_FLASH_Program
/tmp/ccsIWRCI.s:1037 .text.HAL_FLASH_Program:00000074 $d
/tmp/ccsIWRCI.s:1043 .text.HAL_FLASH_Program_IT:00000000 $t
/tmp/ccsIWRCI.s:1049 .text.HAL_FLASH_Program_IT:00000000 HAL_FLASH_Program_IT
/tmp/ccsIWRCI.s:1180 .text.HAL_FLASH_Program_IT:0000007c $d
/tmp/ccsIWRCI.s:1186 .text.HAL_FLASH_OB_Launch:00000000 $t
/tmp/ccsIWRCI.s:1192 .text.HAL_FLASH_OB_Launch:00000000 HAL_FLASH_OB_Launch
/tmp/ccsIWRCI.s:1218 .text.HAL_FLASH_OB_Launch:00000018 $d
/tmp/ccsIWRCI.s:1224 .data.pFlash:00000000 $d
UNDEFINED SYMBOLS
FLASH_FlushCaches
FLASH_PageErase
HAL_GetTick