discoverpixy
stm32f4xx_flash.h
Go to the documentation of this file.
1 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F4xx_FLASH_H
31 #define __STM32F4xx_FLASH_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f4xx.h"
39 
48 /* Exported types ------------------------------------------------------------*/
52 typedef enum
53 {
54  FLASH_BUSY = 1,
55  FLASH_ERROR_RD,
56  FLASH_ERROR_PGS,
57  FLASH_ERROR_PGP,
58  FLASH_ERROR_PGA,
59  FLASH_ERROR_WRP,
60  FLASH_ERROR_PROGRAM,
61  FLASH_ERROR_OPERATION,
62  FLASH_COMPLETE
64 
65 /* Exported constants --------------------------------------------------------*/
66 
74 #define FLASH_Latency_0 ((uint8_t)0x0000)
75 #define FLASH_Latency_1 ((uint8_t)0x0001)
76 #define FLASH_Latency_2 ((uint8_t)0x0002)
77 #define FLASH_Latency_3 ((uint8_t)0x0003)
78 #define FLASH_Latency_4 ((uint8_t)0x0004)
79 #define FLASH_Latency_5 ((uint8_t)0x0005)
80 #define FLASH_Latency_6 ((uint8_t)0x0006)
81 #define FLASH_Latency_7 ((uint8_t)0x0007)
82 #define FLASH_Latency_8 ((uint8_t)0x0008)
83 #define FLASH_Latency_9 ((uint8_t)0x0009)
84 #define FLASH_Latency_10 ((uint8_t)0x000A)
85 #define FLASH_Latency_11 ((uint8_t)0x000B)
86 #define FLASH_Latency_12 ((uint8_t)0x000C)
87 #define FLASH_Latency_13 ((uint8_t)0x000D)
88 #define FLASH_Latency_14 ((uint8_t)0x000E)
89 #define FLASH_Latency_15 ((uint8_t)0x000F)
92 #define IS_FLASH_LATENCY(LATENCY) (((LATENCY) == FLASH_Latency_0) || \
93  ((LATENCY) == FLASH_Latency_1) || \
94  ((LATENCY) == FLASH_Latency_2) || \
95  ((LATENCY) == FLASH_Latency_3) || \
96  ((LATENCY) == FLASH_Latency_4) || \
97  ((LATENCY) == FLASH_Latency_5) || \
98  ((LATENCY) == FLASH_Latency_6) || \
99  ((LATENCY) == FLASH_Latency_7) || \
100  ((LATENCY) == FLASH_Latency_8) || \
101  ((LATENCY) == FLASH_Latency_9) || \
102  ((LATENCY) == FLASH_Latency_10) || \
103  ((LATENCY) == FLASH_Latency_11) || \
104  ((LATENCY) == FLASH_Latency_12) || \
105  ((LATENCY) == FLASH_Latency_13) || \
106  ((LATENCY) == FLASH_Latency_14) || \
107  ((LATENCY) == FLASH_Latency_15))
108 
115 #define VoltageRange_1 ((uint8_t)0x00)
116 #define VoltageRange_2 ((uint8_t)0x01)
117 #define VoltageRange_3 ((uint8_t)0x02)
118 #define VoltageRange_4 ((uint8_t)0x03)
120 #define IS_VOLTAGERANGE(RANGE)(((RANGE) == VoltageRange_1) || \
121  ((RANGE) == VoltageRange_2) || \
122  ((RANGE) == VoltageRange_3) || \
123  ((RANGE) == VoltageRange_4))
124 
131 #define FLASH_Sector_0 ((uint16_t)0x0000)
132 #define FLASH_Sector_1 ((uint16_t)0x0008)
133 #define FLASH_Sector_2 ((uint16_t)0x0010)
134 #define FLASH_Sector_3 ((uint16_t)0x0018)
135 #define FLASH_Sector_4 ((uint16_t)0x0020)
136 #define FLASH_Sector_5 ((uint16_t)0x0028)
137 #define FLASH_Sector_6 ((uint16_t)0x0030)
138 #define FLASH_Sector_7 ((uint16_t)0x0038)
139 #define FLASH_Sector_8 ((uint16_t)0x0040)
140 #define FLASH_Sector_9 ((uint16_t)0x0048)
141 #define FLASH_Sector_10 ((uint16_t)0x0050)
142 #define FLASH_Sector_11 ((uint16_t)0x0058)
143 #define FLASH_Sector_12 ((uint16_t)0x0080)
144 #define FLASH_Sector_13 ((uint16_t)0x0088)
145 #define FLASH_Sector_14 ((uint16_t)0x0090)
146 #define FLASH_Sector_15 ((uint16_t)0x0098)
147 #define FLASH_Sector_16 ((uint16_t)0x00A0)
148 #define FLASH_Sector_17 ((uint16_t)0x00A8)
149 #define FLASH_Sector_18 ((uint16_t)0x00B0)
150 #define FLASH_Sector_19 ((uint16_t)0x00B8)
151 #define FLASH_Sector_20 ((uint16_t)0x00C0)
152 #define FLASH_Sector_21 ((uint16_t)0x00C8)
153 #define FLASH_Sector_22 ((uint16_t)0x00D0)
154 #define FLASH_Sector_23 ((uint16_t)0x00D8)
156 #define IS_FLASH_SECTOR(SECTOR) (((SECTOR) == FLASH_Sector_0) || ((SECTOR) == FLASH_Sector_1) ||\
157  ((SECTOR) == FLASH_Sector_2) || ((SECTOR) == FLASH_Sector_3) ||\
158  ((SECTOR) == FLASH_Sector_4) || ((SECTOR) == FLASH_Sector_5) ||\
159  ((SECTOR) == FLASH_Sector_6) || ((SECTOR) == FLASH_Sector_7) ||\
160  ((SECTOR) == FLASH_Sector_8) || ((SECTOR) == FLASH_Sector_9) ||\
161  ((SECTOR) == FLASH_Sector_10) || ((SECTOR) == FLASH_Sector_11) ||\
162  ((SECTOR) == FLASH_Sector_12) || ((SECTOR) == FLASH_Sector_13) ||\
163  ((SECTOR) == FLASH_Sector_14) || ((SECTOR) == FLASH_Sector_15) ||\
164  ((SECTOR) == FLASH_Sector_16) || ((SECTOR) == FLASH_Sector_17) ||\
165  ((SECTOR) == FLASH_Sector_18) || ((SECTOR) == FLASH_Sector_19) ||\
166  ((SECTOR) == FLASH_Sector_20) || ((SECTOR) == FLASH_Sector_21) ||\
167  ((SECTOR) == FLASH_Sector_22) || ((SECTOR) == FLASH_Sector_23))
168 
169 #if defined (STM32F427_437xx) || defined (STM32F429_439xx)
170 #define IS_FLASH_ADDRESS(ADDRESS) ((((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x081FFFFF)) ||\
171  (((ADDRESS) >= 0x1FFF7800) && ((ADDRESS) <= 0x1FFF7A0F)))
172 #endif /* STM32F427_437xx || STM32F429_439xx */
173 
174 #if defined (STM32F40_41xxx)
175 #define IS_FLASH_ADDRESS(ADDRESS) ((((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x080FFFFF)) ||\
176  (((ADDRESS) >= 0x1FFF7800) && ((ADDRESS) <= 0x1FFF7A0F)))
177 #endif /* STM32F40_41xxx */
178 
179 #if defined (STM32F401xx)
180 #define IS_FLASH_ADDRESS(ADDRESS) ((((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0803FFFF)) ||\
181  (((ADDRESS) >= 0x1FFF7800) && ((ADDRESS) <= 0x1FFF7A0F)))
182 #endif /* STM32F401xx */
183 
184 #if defined (STM32F411xE)
185 #define IS_FLASH_ADDRESS(ADDRESS) ((((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0807FFFF)) ||\
186  (((ADDRESS) >= 0x1FFF7800) && ((ADDRESS) <= 0x1FFF7A0F)))
187 #endif /* STM32F411xE */
188 
196 #define OB_WRP_Sector_0 ((uint32_t)0x00000001)
197 #define OB_WRP_Sector_1 ((uint32_t)0x00000002)
198 #define OB_WRP_Sector_2 ((uint32_t)0x00000004)
199 #define OB_WRP_Sector_3 ((uint32_t)0x00000008)
200 #define OB_WRP_Sector_4 ((uint32_t)0x00000010)
201 #define OB_WRP_Sector_5 ((uint32_t)0x00000020)
202 #define OB_WRP_Sector_6 ((uint32_t)0x00000040)
203 #define OB_WRP_Sector_7 ((uint32_t)0x00000080)
204 #define OB_WRP_Sector_8 ((uint32_t)0x00000100)
205 #define OB_WRP_Sector_9 ((uint32_t)0x00000200)
206 #define OB_WRP_Sector_10 ((uint32_t)0x00000400)
207 #define OB_WRP_Sector_11 ((uint32_t)0x00000800)
208 #define OB_WRP_Sector_12 ((uint32_t)0x00000001)
209 #define OB_WRP_Sector_13 ((uint32_t)0x00000002)
210 #define OB_WRP_Sector_14 ((uint32_t)0x00000004)
211 #define OB_WRP_Sector_15 ((uint32_t)0x00000008)
212 #define OB_WRP_Sector_16 ((uint32_t)0x00000010)
213 #define OB_WRP_Sector_17 ((uint32_t)0x00000020)
214 #define OB_WRP_Sector_18 ((uint32_t)0x00000040)
215 #define OB_WRP_Sector_19 ((uint32_t)0x00000080)
216 #define OB_WRP_Sector_20 ((uint32_t)0x00000100)
217 #define OB_WRP_Sector_21 ((uint32_t)0x00000200)
218 #define OB_WRP_Sector_22 ((uint32_t)0x00000400)
219 #define OB_WRP_Sector_23 ((uint32_t)0x00000800)
220 #define OB_WRP_Sector_All ((uint32_t)0x00000FFF)
222 #define IS_OB_WRP(SECTOR)((((SECTOR) & (uint32_t)0xFFFFF000) == 0x00000000) && ((SECTOR) != 0x00000000))
223 
230 #define OB_PcROP_Disable ((uint8_t)0x00)
231 #define OB_PcROP_Enable ((uint8_t)0x80)
232 #define IS_OB_PCROP_SELECT(PCROP) (((PCROP) == OB_PcROP_Disable) || ((PCROP) == OB_PcROP_Enable))
233 
240 #define OB_PCROP_Sector_0 ((uint32_t)0x00000001)
241 #define OB_PCROP_Sector_1 ((uint32_t)0x00000002)
242 #define OB_PCROP_Sector_2 ((uint32_t)0x00000004)
243 #define OB_PCROP_Sector_3 ((uint32_t)0x00000008)
244 #define OB_PCROP_Sector_4 ((uint32_t)0x00000010)
245 #define OB_PCROP_Sector_5 ((uint32_t)0x00000020)
246 #define OB_PCROP_Sector_6 ((uint32_t)0x00000040)
247 #define OB_PCROP_Sector_7 ((uint32_t)0x00000080)
248 #define OB_PCROP_Sector_8 ((uint32_t)0x00000100)
249 #define OB_PCROP_Sector_9 ((uint32_t)0x00000200)
250 #define OB_PCROP_Sector_10 ((uint32_t)0x00000400)
251 #define OB_PCROP_Sector_11 ((uint32_t)0x00000800)
252 #define OB_PCROP_Sector_12 ((uint32_t)0x00000001)
253 #define OB_PCROP_Sector_13 ((uint32_t)0x00000002)
254 #define OB_PCROP_Sector_14 ((uint32_t)0x00000004)
255 #define OB_PCROP_Sector_15 ((uint32_t)0x00000008)
256 #define OB_PCROP_Sector_16 ((uint32_t)0x00000010)
257 #define OB_PCROP_Sector_17 ((uint32_t)0x00000020)
258 #define OB_PCROP_Sector_18 ((uint32_t)0x00000040)
259 #define OB_PCROP_Sector_19 ((uint32_t)0x00000080)
260 #define OB_PCROP_Sector_20 ((uint32_t)0x00000100)
261 #define OB_PCROP_Sector_21 ((uint32_t)0x00000200)
262 #define OB_PCROP_Sector_22 ((uint32_t)0x00000400)
263 #define OB_PCROP_Sector_23 ((uint32_t)0x00000800)
264 #define OB_PCROP_Sector_All ((uint32_t)0x00000FFF)
266 #define IS_OB_PCROP(SECTOR)((((SECTOR) & (uint32_t)0xFFFFF000) == 0x00000000) && ((SECTOR) != 0x00000000))
267 
274 #define OB_RDP_Level_0 ((uint8_t)0xAA)
275 #define OB_RDP_Level_1 ((uint8_t)0x55)
276 /*#define OB_RDP_Level_2 ((uint8_t)0xCC)*/
278 #define IS_OB_RDP(LEVEL) (((LEVEL) == OB_RDP_Level_0)||\
279  ((LEVEL) == OB_RDP_Level_1))/*||\
280  ((LEVEL) == OB_RDP_Level_2))*/
281 
288 #define OB_IWDG_SW ((uint8_t)0x20)
289 #define OB_IWDG_HW ((uint8_t)0x00)
290 #define IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW))
291 
298 #define OB_STOP_NoRST ((uint8_t)0x40)
299 #define OB_STOP_RST ((uint8_t)0x00)
300 #define IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NoRST) || ((SOURCE) == OB_STOP_RST))
301 
309 #define OB_STDBY_NoRST ((uint8_t)0x80)
310 #define OB_STDBY_RST ((uint8_t)0x00)
311 #define IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NoRST) || ((SOURCE) == OB_STDBY_RST))
312 
319 #define OB_BOR_LEVEL3 ((uint8_t)0x00)
320 #define OB_BOR_LEVEL2 ((uint8_t)0x04)
321 #define OB_BOR_LEVEL1 ((uint8_t)0x08)
322 #define OB_BOR_OFF ((uint8_t)0x0C)
323 #define IS_OB_BOR(LEVEL) (((LEVEL) == OB_BOR_LEVEL1) || ((LEVEL) == OB_BOR_LEVEL2) ||\
324  ((LEVEL) == OB_BOR_LEVEL3) || ((LEVEL) == OB_BOR_OFF))
325 
332 #define OB_Dual_BootEnabled ((uint8_t)0x10)
333 #define OB_Dual_BootDisabled ((uint8_t)0x00)
334 #define IS_OB_BOOT(BOOT) (((BOOT) == OB_Dual_BootEnabled) || ((BOOT) == OB_Dual_BootDisabled))
335 
342 #define FLASH_IT_EOP ((uint32_t)0x01000000)
343 #define FLASH_IT_ERR ((uint32_t)0x02000000)
344 #define IS_FLASH_IT(IT) ((((IT) & (uint32_t)0xFCFFFFFF) == 0x00000000) && ((IT) != 0x00000000))
345 
352 #define FLASH_FLAG_EOP ((uint32_t)0x00000001)
353 #define FLASH_FLAG_OPERR ((uint32_t)0x00000002)
354 #define FLASH_FLAG_WRPERR ((uint32_t)0x00000010)
355 #define FLASH_FLAG_PGAERR ((uint32_t)0x00000020)
356 #define FLASH_FLAG_PGPERR ((uint32_t)0x00000040)
357 #define FLASH_FLAG_PGSERR ((uint32_t)0x00000080)
358 #define FLASH_FLAG_RDERR ((uint32_t)0x00000100)
359 #define FLASH_FLAG_BSY ((uint32_t)0x00010000)
360 #define IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFE0C) == 0x00000000) && ((FLAG) != 0x00000000))
361 #define IS_FLASH_GET_FLAG(FLAG) (((FLAG) == FLASH_FLAG_EOP) || ((FLAG) == FLASH_FLAG_OPERR) || \
362  ((FLAG) == FLASH_FLAG_WRPERR) || ((FLAG) == FLASH_FLAG_PGAERR) || \
363  ((FLAG) == FLASH_FLAG_PGPERR) || ((FLAG) == FLASH_FLAG_PGSERR) || \
364  ((FLAG) == FLASH_FLAG_BSY) || ((FLAG) == FLASH_FLAG_RDERR))
365 
372 #define FLASH_PSIZE_BYTE ((uint32_t)0x00000000)
373 #define FLASH_PSIZE_HALF_WORD ((uint32_t)0x00000100)
374 #define FLASH_PSIZE_WORD ((uint32_t)0x00000200)
375 #define FLASH_PSIZE_DOUBLE_WORD ((uint32_t)0x00000300)
376 #define CR_PSIZE_MASK ((uint32_t)0xFFFFFCFF)
377 
384 #define RDP_KEY ((uint16_t)0x00A5)
385 #define FLASH_KEY1 ((uint32_t)0x45670123)
386 #define FLASH_KEY2 ((uint32_t)0xCDEF89AB)
387 #define FLASH_OPT_KEY1 ((uint32_t)0x08192A3B)
388 #define FLASH_OPT_KEY2 ((uint32_t)0x4C5D6E7F)
389 
396 #define ACR_BYTE0_ADDRESS ((uint32_t)0x40023C00)
397 
400 #define OPTCR_BYTE0_ADDRESS ((uint32_t)0x40023C14)
401 
404 #define OPTCR_BYTE1_ADDRESS ((uint32_t)0x40023C15)
405 
408 #define OPTCR_BYTE2_ADDRESS ((uint32_t)0x40023C16)
409 
412 #define OPTCR_BYTE3_ADDRESS ((uint32_t)0x40023C17)
413 
417 #define OPTCR1_BYTE2_ADDRESS ((uint32_t)0x40023C1A)
418 
423 /* Exported macro ------------------------------------------------------------*/
424 /* Exported functions --------------------------------------------------------*/
425 
426 /* FLASH Interface configuration functions ************************************/
427 void FLASH_SetLatency(uint32_t FLASH_Latency);
428 void FLASH_PrefetchBufferCmd(FunctionalState NewState);
429 void FLASH_InstructionCacheCmd(FunctionalState NewState);
430 void FLASH_DataCacheCmd(FunctionalState NewState);
431 void FLASH_InstructionCacheReset(void);
432 void FLASH_DataCacheReset(void);
433 
434 /* FLASH Memory Programming functions *****************************************/
435 void FLASH_Unlock(void);
436 void FLASH_Lock(void);
437 FLASH_Status FLASH_EraseSector(uint32_t FLASH_Sector, uint8_t VoltageRange);
438 FLASH_Status FLASH_EraseAllSectors(uint8_t VoltageRange);
439 FLASH_Status FLASH_EraseAllBank1Sectors(uint8_t VoltageRange);
440 FLASH_Status FLASH_EraseAllBank2Sectors(uint8_t VoltageRange);
441 FLASH_Status FLASH_ProgramDoubleWord(uint32_t Address, uint64_t Data);
442 FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data);
443 FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data);
444 FLASH_Status FLASH_ProgramByte(uint32_t Address, uint8_t Data);
445 
446 /* Option Bytes Programming functions *****************************************/
447 void FLASH_OB_Unlock(void);
448 void FLASH_OB_Lock(void);
449 void FLASH_OB_WRPConfig(uint32_t OB_WRP, FunctionalState NewState);
450 void FLASH_OB_WRP1Config(uint32_t OB_WRP, FunctionalState NewState);
451 void FLASH_OB_PCROPSelectionConfig(uint8_t OB_PcROP);
452 void FLASH_OB_PCROPConfig(uint32_t OB_PCROP, FunctionalState NewState);
453 void FLASH_OB_PCROP1Config(uint32_t OB_PCROP, FunctionalState NewState);
454 void FLASH_OB_RDPConfig(uint8_t OB_RDP);
455 void FLASH_OB_UserConfig(uint8_t OB_IWDG, uint8_t OB_STOP, uint8_t OB_STDBY);
456 void FLASH_OB_BORConfig(uint8_t OB_BOR);
457 void FLASH_OB_BootConfig(uint8_t OB_BOOT);
459 uint8_t FLASH_OB_GetUser(void);
460 uint16_t FLASH_OB_GetWRP(void);
461 uint16_t FLASH_OB_GetWRP1(void);
462 uint16_t FLASH_OB_GetPCROP(void);
463 uint16_t FLASH_OB_GetPCROP1(void);
464 FlagStatus FLASH_OB_GetRDP(void);
465 uint8_t FLASH_OB_GetBOR(void);
466 
467 /* Interrupts and flags management functions **********************************/
468 void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState);
469 FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG);
470 void FLASH_ClearFlag(uint32_t FLASH_FLAG);
473 
474 #ifdef __cplusplus
475 }
476 #endif
477 
478 #endif /* __STM32F4xx_FLASH_H */
479 
488 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void FLASH_OB_WRP1Config(uint32_t OB_WRP, FunctionalState NewState)
Enables or disables the write protection of the desired sectors, for the second 1 Mb of the Flash...
Definition: stm32f4xx_flash.c:1048
FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data)
Programs a half word (16-bit) at a specified address.
Definition: stm32f4xx_flash.c:827
void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState)
Enables or disables the specified FLASH interrupts.
Definition: stm32f4xx_flash.c:1450
FLASH_Status FLASH_EraseAllBank1Sectors(uint8_t VoltageRange)
Erases all FLASH Sectors in Bank 1.
Definition: stm32f4xx_flash.c:618
void FLASH_OB_RDPConfig(uint8_t OB_RDP)
Sets the read protection level.
Definition: stm32f4xx_flash.c:1201
FLASH_Status FLASH_EraseAllBank2Sectors(uint8_t VoltageRange)
Erases all FLASH Sectors in Bank 2.
Definition: stm32f4xx_flash.c:685
FLASH_Status FLASH_WaitForLastOperation(void)
Waits for a FLASH operation to complete.
Definition: stm32f4xx_flash.c:1578
FLASH_Status FLASH_EraseSector(uint32_t FLASH_Sector, uint8_t VoltageRange)
Erases a specified FLASH Sector.
Definition: stm32f4xx_flash.c:469
uint16_t FLASH_OB_GetWRP1(void)
Returns the FLASH Write Protection Option Bytes value.
Definition: stm32f4xx_flash.c:1356
uint16_t FLASH_OB_GetWRP(void)
Returns the FLASH Write Protection Option Bytes value.
Definition: stm32f4xx_flash.c:1342
void FLASH_ClearFlag(uint32_t FLASH_FLAG)
Clears the FLASH's pending flags.
Definition: stm32f4xx_flash.c:1513
void FLASH_OB_Lock(void)
Locks the FLASH Option Control Registers access.
Definition: stm32f4xx_flash.c:983
FLASH_Status FLASH_EraseAllSectors(uint8_t VoltageRange)
Erases all FLASH Sectors.
Definition: stm32f4xx_flash.c:537
CMSIS Cortex-M4 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...
void FLASH_OB_PCROPConfig(uint32_t OB_PCROP, FunctionalState NewState)
Enables or disables the read/write protection (PCROP) of the desired sectors, for the first 1 MB of t...
Definition: stm32f4xx_flash.c:1128
void FLASH_OB_BORConfig(uint8_t OB_BOR)
Sets the BOR Level.
Definition: stm32f4xx_flash.c:1295
void FLASH_DataCacheCmd(FunctionalState NewState)
Enables or disables the Data Cache feature.
Definition: stm32f4xx_flash.c:335
void FLASH_InstructionCacheReset(void)
Resets the Instruction Cache.
Definition: stm32f4xx_flash.c:356
void FLASH_InstructionCacheCmd(FunctionalState NewState)
Enables or disables the Instruction Cache feature.
Definition: stm32f4xx_flash.c:314
FLASH_Status FLASH_ProgramDoubleWord(uint32_t Address, uint64_t Data)
Programs a double word (64-bit) at a specified address.
Definition: stm32f4xx_flash.c:742
void FLASH_Unlock(void)
Unlocks the FLASH control register access.
Definition: stm32f4xx_flash.c:414
void FLASH_OB_WRPConfig(uint32_t OB_WRP, FunctionalState NewState)
Enables or disables the write protection of the desired sectors, for the first 1 Mb of the Flash...
Definition: stm32f4xx_flash.c:1006
FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG)
Checks whether the specified FLASH flag is set or not.
Definition: stm32f4xx_flash.c:1482
void FLASH_OB_Unlock(void)
Unlocks the FLASH Option Control Registers access.
Definition: stm32f4xx_flash.c:968
void FLASH_DataCacheReset(void)
Resets the Data Cache.
Definition: stm32f4xx_flash.c:367
uint16_t FLASH_OB_GetPCROP1(void)
Returns the FLASH PC Read/Write Protection Option Bytes value.
Definition: stm32f4xx_flash.c:1384
void FLASH_OB_PCROPSelectionConfig(uint8_t OB_PcROP)
Select the Protection Mode (SPRMOD).
Definition: stm32f4xx_flash.c:1098
FlagStatus FLASH_OB_GetRDP(void)
Returns the FLASH Read Protection level.
Definition: stm32f4xx_flash.c:1397
uint8_t FLASH_OB_GetUser(void)
Returns the FLASH User Option Bytes values.
Definition: stm32f4xx_flash.c:1331
void FLASH_PrefetchBufferCmd(FunctionalState NewState)
Enables or disables the Prefetch Buffer.
Definition: stm32f4xx_flash.c:292
uint8_t FLASH_OB_GetBOR(void)
Returns the FLASH BOR level.
Definition: stm32f4xx_flash.c:1421
FLASH_Status FLASH_ProgramByte(uint32_t Address, uint8_t Data)
Programs a byte (8-bit) at a specified address.
Definition: stm32f4xx_flash.c:869
void FLASH_OB_PCROP1Config(uint32_t OB_PCROP, FunctionalState NewState)
Enables or disables the read/write protection (PCROP) of the desired sectors.
Definition: stm32f4xx_flash.c:1165
void FLASH_SetLatency(uint32_t FLASH_Latency)
Sets the code latency value.
Definition: stm32f4xx_flash.c:277
FLASH_Status FLASH_OB_Launch(void)
Launch the option byte loading.
Definition: stm32f4xx_flash.c:1312
FLASH_Status FLASH_GetStatus(void)
Returns the FLASH Status.
Definition: stm32f4xx_flash.c:1528
void FLASH_OB_BootConfig(uint8_t OB_BOOT)
Configure the Dual Bank Boot.
Definition: stm32f4xx_flash.c:1274
void FLASH_OB_UserConfig(uint8_t OB_IWDG, uint8_t OB_STOP, uint8_t OB_STDBY)
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY.
Definition: stm32f4xx_flash.c:1233
void FLASH_Lock(void)
Locks the FLASH control register access.
Definition: stm32f4xx_flash.c:429
FLASH_Status
FLASH Status.
Definition: stm32f4xx_flash.h:52
uint16_t FLASH_OB_GetPCROP(void)
Returns the FLASH PC Read/Write Protection Option Bytes value.
Definition: stm32f4xx_flash.c:1370
FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data)
Programs a word (32-bit) at a specified address.
Definition: stm32f4xx_flash.c:785