annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_flash.h @ 115:3834b6272ee5 FlipDisplay

Merge with 68181cd61f2069d061621c2cd2a6afddb7486f5e
author Ideenmodellierer
date Thu, 03 Jan 2019 19:59:36 +0100
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_flash.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of FLASH HAL module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_FLASH_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_FLASH_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 /** @addtogroup FLASH
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 /** @defgroup FLASH_Exported_Types FLASH Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 * @brief FLASH Procedure structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 FLASH_PROC_NONE = 0,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 FLASH_PROC_SECTERASE,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 FLASH_PROC_MASSERASE,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 FLASH_PROC_PROGRAM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 } FLASH_ProcedureTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 * @brief FLASH handle Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 __IO FLASH_ProcedureTypeDef ProcedureOnGoing; /*Internal variable to indicate which procedure is ongoing or not in IT context*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 __IO uint32_t NbSectorsToErase; /*Internal variable to save the remaining sectors to erase in IT context*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 __IO uint8_t VoltageForErase; /*Internal variable to provide voltage range selected by user in IT context*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 __IO uint32_t Sector; /*Internal variable to define the current sector which is erasing*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 __IO uint32_t Bank; /*Internal variable to save current bank selected during mass erase*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 __IO uint32_t Address; /*Internal variable to save address selected for program*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 HAL_LockTypeDef Lock; /* FLASH locking object */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 __IO uint32_t ErrorCode; /* FLASH error code */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 }FLASH_ProcessTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 /** @defgroup FLASH_Exported_Constants FLASH Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 /** @defgroup FLASH_Error_Code FLASH Error Code
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 * @brief FLASH Error Code
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 #define HAL_FLASH_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 #define HAL_FLASH_ERROR_RD ((uint32_t)0x00000001) /*!< Read Protection error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 #define HAL_FLASH_ERROR_PGS ((uint32_t)0x00000002) /*!< Programming Sequence error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 #define HAL_FLASH_ERROR_PGP ((uint32_t)0x00000004) /*!< Programming Parallelism error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 #define HAL_FLASH_ERROR_PGA ((uint32_t)0x00000008) /*!< Programming Alignment error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 #define HAL_FLASH_ERROR_WRP ((uint32_t)0x00000010) /*!< Write protection error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 #define HAL_FLASH_ERROR_OPERATION ((uint32_t)0x00000020) /*!< Operation Error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 /** @defgroup FLASH_Type_Program FLASH Type Program
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 #define FLASH_TYPEPROGRAM_BYTE ((uint32_t)0x00) /*!< Program byte (8-bit) at a specified address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 #define FLASH_TYPEPROGRAM_HALFWORD ((uint32_t)0x01) /*!< Program a half-word (16-bit) at a specified address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 #define FLASH_TYPEPROGRAM_WORD ((uint32_t)0x02) /*!< Program a word (32-bit) at a specified address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 #define FLASH_TYPEPROGRAM_DOUBLEWORD ((uint32_t)0x03) /*!< Program a double word (64-bit) at a specified address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 /** @defgroup FLASH_Flag_definition FLASH Flag definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 * @brief Flag definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 #define FLASH_FLAG_EOP FLASH_SR_EOP /*!< FLASH End of Operation flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 #define FLASH_FLAG_OPERR FLASH_SR_SOP /*!< FLASH operation Error flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 #define FLASH_FLAG_WRPERR FLASH_SR_WRPERR /*!< FLASH Write protected error flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 #define FLASH_FLAG_PGAERR FLASH_SR_PGAERR /*!< FLASH Programming Alignment error flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 #define FLASH_FLAG_PGPERR FLASH_SR_PGPERR /*!< FLASH Programming Parallelism error flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 #define FLASH_FLAG_PGSERR FLASH_SR_PGSERR /*!< FLASH Programming Sequence error flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 #define FLASH_FLAG_RDERR ((uint32_t)0x00000100) /*!< Read Protection error flag (PCROP) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 #define FLASH_FLAG_BSY FLASH_SR_BSY /*!< FLASH Busy flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 /** @defgroup FLASH_Interrupt_definition FLASH Interrupt definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 * @brief FLASH Interrupt definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 #define FLASH_IT_EOP FLASH_CR_EOPIE /*!< End of FLASH Operation Interrupt source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 #define FLASH_IT_ERR ((uint32_t)0x02000000) /*!< Error Interrupt source */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 /** @defgroup FLASH_Program_Parallelism FLASH Program Parallelism
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 #define FLASH_PSIZE_BYTE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 #define FLASH_PSIZE_HALF_WORD ((uint32_t)0x00000100)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 #define FLASH_PSIZE_WORD ((uint32_t)0x00000200)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 #define FLASH_PSIZE_DOUBLE_WORD ((uint32_t)0x00000300)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 #define CR_PSIZE_MASK ((uint32_t)0xFFFFFCFF)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 /** @defgroup FLASH_Keys FLASH Keys
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 #define RDP_KEY ((uint16_t)0x00A5)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 #define FLASH_KEY1 ((uint32_t)0x45670123)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 #define FLASH_KEY2 ((uint32_t)0xCDEF89AB)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 #define FLASH_OPT_KEY1 ((uint32_t)0x08192A3B)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 #define FLASH_OPT_KEY2 ((uint32_t)0x4C5D6E7F)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 /** @defgroup FLASH_Exported_Macros FLASH Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 * @brief Set the FLASH Latency.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 * @param __LATENCY__: FLASH Latency
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 * The value of this parameter depend on device used within the same series
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 #define __HAL_FLASH_SET_LATENCY(__LATENCY__) (*(__IO uint8_t *)ACR_BYTE0_ADDRESS = (uint8_t)(__LATENCY__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 * @brief Enable the FLASH prefetch buffer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 #define __HAL_FLASH_PREFETCH_BUFFER_ENABLE() (FLASH->ACR |= FLASH_ACR_PRFTEN)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 * @brief Disable the FLASH prefetch buffer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 #define __HAL_FLASH_PREFETCH_BUFFER_DISABLE() (FLASH->ACR &= (~FLASH_ACR_PRFTEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 * @brief Enable the FLASH instruction cache.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 #define __HAL_FLASH_INSTRUCTION_CACHE_ENABLE() (FLASH->ACR |= FLASH_ACR_ICEN)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 * @brief Disable the FLASH instruction cache.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 #define __HAL_FLASH_INSTRUCTION_CACHE_DISABLE() (FLASH->ACR &= (~FLASH_ACR_ICEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 * @brief Enable the FLASH data cache.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 #define __HAL_FLASH_DATA_CACHE_ENABLE() (FLASH->ACR |= FLASH_ACR_DCEN)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 * @brief Disable the FLASH data cache.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 #define __HAL_FLASH_DATA_CACHE_DISABLE() (FLASH->ACR &= (~FLASH_ACR_DCEN))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 * @brief Resets the FLASH instruction Cache.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 * @note This function must be used only when the Instruction Cache is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 #define __HAL_FLASH_INSTRUCTION_CACHE_RESET() (FLASH->ACR |= FLASH_ACR_ICRST)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 * @brief Resets the FLASH data Cache.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 * @note This function must be used only when the data Cache is disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 #define __HAL_FLASH_DATA_CACHE_RESET() (FLASH->ACR |= FLASH_ACR_DCRST)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 * @brief Enable the specified FLASH interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 * @param __INTERRUPT__ : FLASH interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 * @arg FLASH_IT_EOP: End of FLASH Operation Interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 * @arg FLASH_IT_ERR: Error Interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 #define __HAL_FLASH_ENABLE_IT(__INTERRUPT__) (FLASH->CR |= (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 * @brief Disable the specified FLASH interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 * @param __INTERRUPT__ : FLASH interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 * @arg FLASH_IT_EOP: End of FLASH Operation Interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 * @arg FLASH_IT_ERR: Error Interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 #define __HAL_FLASH_DISABLE_IT(__INTERRUPT__) (FLASH->CR &= ~(uint32_t)(__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 * @brief Get the specified FLASH flag status.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 * @param __FLAG__: specifies the FLASH flag to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 * @arg FLASH_FLAG_EOP : FLASH End of Operation flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 * @arg FLASH_FLAG_OPERR : FLASH operation Error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 * @arg FLASH_FLAG_PGAERR: FLASH Programming Alignment error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 * @arg FLASH_FLAG_PGPERR: FLASH Programming Parallelism error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 * @arg FLASH_FLAG_PGSERR: FLASH Programming Sequence error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 * @arg FLASH_FLAG_RDERR : FLASH Read Protection error flag (PCROP)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 * @arg FLASH_FLAG_BSY : FLASH Busy flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 * @retval The new state of __FLAG__ (SET or RESET).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 #define __HAL_FLASH_GET_FLAG(__FLAG__) ((FLASH->SR & (__FLAG__)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 * @brief Clear the specified FLASH flag.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 * @param __FLAG__: specifies the FLASH flags to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 * @arg FLASH_FLAG_EOP : FLASH End of Operation flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 * @arg FLASH_FLAG_OPERR : FLASH operation Error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 * @arg FLASH_FLAG_PGAERR: FLASH Programming Alignment error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 * @arg FLASH_FLAG_PGPERR: FLASH Programming Parallelism error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 * @arg FLASH_FLAG_PGSERR: FLASH Programming Sequence error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 * @arg FLASH_FLAG_RDERR : FLASH Read Protection error flag (PCROP)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 * @retval none
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 #define __HAL_FLASH_CLEAR_FLAG(__FLAG__) (FLASH->SR = (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 /* Include FLASH HAL Extension module */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 #include "stm32f4xx_hal_flash_ex.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 #include "stm32f4xx_hal_flash_ramfunc.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 /** @addtogroup FLASH_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 /** @addtogroup FLASH_Exported_Functions_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 /* Program operation functions ***********************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 /* FLASH IRQ handler method */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 void HAL_FLASH_IRQHandler(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 /* Callbacks in non blocking modes */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 /** @addtogroup FLASH_Exported_Functions_Group2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 /* Peripheral Control functions **********************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 HAL_StatusTypeDef HAL_FLASH_Unlock(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 HAL_StatusTypeDef HAL_FLASH_Lock(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 HAL_StatusTypeDef HAL_FLASH_OB_Lock(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 /* Option bytes control */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 HAL_StatusTypeDef HAL_FLASH_OB_Launch(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 /** @addtogroup FLASH_Exported_Functions_Group3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 /* Peripheral State functions ************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 uint32_t HAL_FLASH_GetError(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 /** @defgroup FLASH_Private_Variables FLASH Private Variables
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 /** @defgroup FLASH_Private_Constants FLASH Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 * @brief ACR register byte 0 (Bits[7:0]) base address
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 #define ACR_BYTE0_ADDRESS ((uint32_t)0x40023C00)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 * @brief OPTCR register byte 0 (Bits[7:0]) base address
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 #define OPTCR_BYTE0_ADDRESS ((uint32_t)0x40023C14)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 * @brief OPTCR register byte 1 (Bits[15:8]) base address
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 #define OPTCR_BYTE1_ADDRESS ((uint32_t)0x40023C15)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 * @brief OPTCR register byte 2 (Bits[23:16]) base address
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 #define OPTCR_BYTE2_ADDRESS ((uint32_t)0x40023C16)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 * @brief OPTCR register byte 3 (Bits[31:24]) base address
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 #define OPTCR_BYTE3_ADDRESS ((uint32_t)0x40023C17)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 /** @defgroup FLASH_Private_Macros FLASH Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 /** @defgroup FLASH_IS_FLASH_Definitions FLASH Private macros to check input parameters
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 #define IS_FLASH_TYPEPROGRAM(VALUE)(((VALUE) == FLASH_TYPEPROGRAM_BYTE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 ((VALUE) == FLASH_TYPEPROGRAM_HALFWORD) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 ((VALUE) == FLASH_TYPEPROGRAM_WORD) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 ((VALUE) == FLASH_TYPEPROGRAM_DOUBLEWORD))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 /** @defgroup FLASH_Private_Functions FLASH Private Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 #endif /* __STM32F4xx_HAL_FLASH_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/