This file contains all the functions prototypes for the FLASH firmware library. More...
#include "stm32f4xx.h"
Go to the source code of this file.
Macros | |
#define | ACR_BYTE0_ADDRESS ((uint32_t)0x40023C00) |
ACR register byte 0 (Bits[7:0]) base address. More... | |
#define | CR_PSIZE_MASK ((uint32_t)0xFFFFFCFF) |
#define | FLASH_FLAG_BSY ((uint32_t)0x00010000) |
#define | FLASH_FLAG_EOP ((uint32_t)0x00000001) |
#define | FLASH_FLAG_OPERR ((uint32_t)0x00000002) |
#define | FLASH_FLAG_PGAERR ((uint32_t)0x00000020) |
#define | FLASH_FLAG_PGPERR ((uint32_t)0x00000040) |
#define | FLASH_FLAG_PGSERR ((uint32_t)0x00000080) |
#define | FLASH_FLAG_WRPERR ((uint32_t)0x00000010) |
#define | FLASH_IT_EOP ((uint32_t)0x01000000) |
#define | FLASH_IT_ERR ((uint32_t)0x02000000) |
#define | FLASH_KEY1 ((uint32_t)0x45670123) |
#define | FLASH_KEY2 ((uint32_t)0xCDEF89AB) |
#define | FLASH_Latency_0 ((uint8_t)0x0000) |
#define | FLASH_Latency_1 ((uint8_t)0x0001) |
#define | FLASH_Latency_2 ((uint8_t)0x0002) |
#define | FLASH_Latency_3 ((uint8_t)0x0003) |
#define | FLASH_Latency_4 ((uint8_t)0x0004) |
#define | FLASH_Latency_5 ((uint8_t)0x0005) |
#define | FLASH_Latency_6 ((uint8_t)0x0006) |
#define | FLASH_Latency_7 ((uint8_t)0x0007) |
#define | FLASH_OPT_KEY1 ((uint32_t)0x08192A3B) |
#define | FLASH_OPT_KEY2 ((uint32_t)0x4C5D6E7F) |
#define | FLASH_PSIZE_BYTE ((uint32_t)0x00000000) |
#define | FLASH_PSIZE_DOUBLE_WORD ((uint32_t)0x00000300) |
#define | FLASH_PSIZE_HALF_WORD ((uint32_t)0x00000100) |
#define | FLASH_PSIZE_WORD ((uint32_t)0x00000200) |
#define | FLASH_Sector_0 ((uint16_t)0x0000) |
#define | FLASH_Sector_1 ((uint16_t)0x0008) |
#define | FLASH_Sector_10 ((uint16_t)0x0050) |
#define | FLASH_Sector_11 ((uint16_t)0x0058) |
#define | FLASH_Sector_12 ((uint16_t)0x0080) |
#define | FLASH_Sector_13 ((uint16_t)0x0088) |
#define | FLASH_Sector_14 ((uint16_t)0x0090) |
#define | FLASH_Sector_15 ((uint16_t)0x0098) |
#define | FLASH_Sector_16 ((uint16_t)0x00A0) |
#define | FLASH_Sector_17 ((uint16_t)0x00A8) |
#define | FLASH_Sector_18 ((uint16_t)0x00B0) |
#define | FLASH_Sector_19 ((uint16_t)0x00B8) |
#define | FLASH_Sector_2 ((uint16_t)0x0010) |
#define | FLASH_Sector_20 ((uint16_t)0x00C0) |
#define | FLASH_Sector_21 ((uint16_t)0x00C8) |
#define | FLASH_Sector_22 ((uint16_t)0x00D0) |
#define | FLASH_Sector_23 ((uint16_t)0x00D8) |
#define | FLASH_Sector_3 ((uint16_t)0x0018) |
#define | FLASH_Sector_4 ((uint16_t)0x0020) |
#define | FLASH_Sector_5 ((uint16_t)0x0028) |
#define | FLASH_Sector_6 ((uint16_t)0x0030) |
#define | FLASH_Sector_7 ((uint16_t)0x0038) |
#define | FLASH_Sector_8 ((uint16_t)0x0040) |
#define | FLASH_Sector_9 ((uint16_t)0x0048) |
#define | IS_FLASH_ADDRESS(ADDRESS) |
#define | IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFE0C) == 0x00000000) && ((FLAG) != 0x00000000)) |
#define | IS_FLASH_GET_FLAG(FLAG) |
#define | IS_FLASH_IT(IT) ((((IT) & (uint32_t)0xFCFFFFFF) == 0x00000000) && ((IT) != 0x00000000)) |
#define | IS_FLASH_LATENCY(LATENCY) |
#define | IS_FLASH_SECTOR(SECTOR) |
#define | IS_OB_BOR(LEVEL) |
#define | IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW)) |
#define | IS_OB_RDP(LEVEL) |
#define | IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NoRST) || ((SOURCE) == OB_STDBY_RST)) |
#define | IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NoRST) || ((SOURCE) == OB_STOP_RST)) |
#define | IS_OB_WRP(SECTOR) ((((SECTOR) & (uint32_t)0xFFFFF000) == 0x00000000) && ((SECTOR) != 0x00000000)) |
#define | IS_VOLTAGERANGE(RANGE) |
#define | OB_BOR_LEVEL1 ((uint8_t)0x08) |
#define | OB_BOR_LEVEL2 ((uint8_t)0x04) |
#define | OB_BOR_LEVEL3 ((uint8_t)0x00) |
#define | OB_BOR_OFF ((uint8_t)0x0C) |
#define | OB_IWDG_HW ((uint8_t)0x00) |
#define | OB_IWDG_SW ((uint8_t)0x20) |
#define | OB_RDP_Level_0 ((uint8_t)0xAA) |
#define | OB_RDP_Level_1 ((uint8_t)0x55) |
#define | OB_STDBY_NoRST ((uint8_t)0x80) |
#define | OB_STDBY_RST ((uint8_t)0x00) |
#define | OB_STOP_NoRST ((uint8_t)0x40) |
#define | OB_STOP_RST ((uint8_t)0x00) |
#define | OB_WRP_Sector_0 ((uint32_t)0x00000001) |
#define | OB_WRP_Sector_1 ((uint32_t)0x00000002) |
#define | OB_WRP_Sector_10 ((uint32_t)0x00000400) |
#define | OB_WRP_Sector_11 ((uint32_t)0x00000800) |
#define | OB_WRP_Sector_12 ((uint32_t)0x00000001) |
#define | OB_WRP_Sector_13 ((uint32_t)0x00000002) |
#define | OB_WRP_Sector_14 ((uint32_t)0x00000004) |
#define | OB_WRP_Sector_15 ((uint32_t)0x00000008) |
#define | OB_WRP_Sector_16 ((uint32_t)0x00000010) |
#define | OB_WRP_Sector_17 ((uint32_t)0x00000020) |
#define | OB_WRP_Sector_18 ((uint32_t)0x00000040) |
#define | OB_WRP_Sector_19 ((uint32_t)0x00000080) |
#define | OB_WRP_Sector_2 ((uint32_t)0x00000004) |
#define | OB_WRP_Sector_20 ((uint32_t)0x00000100) |
#define | OB_WRP_Sector_21 ((uint32_t)0x00000200) |
#define | OB_WRP_Sector_22 ((uint32_t)0x00000400) |
#define | OB_WRP_Sector_23 ((uint32_t)0x00000800) |
#define | OB_WRP_Sector_3 ((uint32_t)0x00000008) |
#define | OB_WRP_Sector_4 ((uint32_t)0x00000010) |
#define | OB_WRP_Sector_5 ((uint32_t)0x00000020) |
#define | OB_WRP_Sector_6 ((uint32_t)0x00000040) |
#define | OB_WRP_Sector_7 ((uint32_t)0x00000080) |
#define | OB_WRP_Sector_8 ((uint32_t)0x00000100) |
#define | OB_WRP_Sector_9 ((uint32_t)0x00000200) |
#define | OB_WRP_Sector_All ((uint32_t)0x00000FFF) |
#define | OPTCR1_BYTE2_ADDRESS ((uint32_t)0x40023C1A) |
OPTCR1 register byte 0 (Bits[7:0]) base address. More... | |
#define | OPTCR_BYTE0_ADDRESS ((uint32_t)0x40023C14) |
OPTCR register byte 0 (Bits[7:0]) base address. More... | |
#define | OPTCR_BYTE1_ADDRESS ((uint32_t)0x40023C15) |
OPTCR register byte 1 (Bits[15:8]) base address. More... | |
#define | OPTCR_BYTE2_ADDRESS ((uint32_t)0x40023C16) |
OPTCR register byte 2 (Bits[23:16]) base address. More... | |
#define | OPTCR_BYTE3_ADDRESS ((uint32_t)0x40023C17) |
OPTCR register byte 3 (Bits[31:24]) base address. More... | |
#define | RDP_KEY ((uint16_t)0x00A5) |
#define | VoltageRange_1 ((uint8_t)0x00) |
#define | VoltageRange_2 ((uint8_t)0x01) |
#define | VoltageRange_3 ((uint8_t)0x02) |
#define | VoltageRange_4 ((uint8_t)0x03) |
Enumerations | |
enum | FLASH_Status { FLASH_BUSY = 1, FLASH_ERROR_PGS, FLASH_ERROR_PGP, FLASH_ERROR_PGA, FLASH_ERROR_WRP, FLASH_ERROR_PROGRAM, FLASH_ERROR_OPERATION, FLASH_COMPLETE, FLASH_BUSY = 1, FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE, FLASH_TIMEOUT, FLASH_BUSY = 1, FLASH_ERROR_WRP, FLASH_ERROR_PROGRAM, FLASH_COMPLETE, FLASH_TIMEOUT } |
FLASH Status. More... | |
Functions | |
void | FLASH_ClearFlag (uint32_t FLASH_FLAG) |
Clears the FLASH's pending flags. More... | |
void | FLASH_DataCacheCmd (FunctionalState NewState) |
Enables or disables the Data Cache feature. More... | |
void | FLASH_DataCacheReset (void) |
Resets the Data Cache. More... | |
FLASH_Status | FLASH_EraseAllSectors (uint8_t VoltageRange) |
Erases all FLASH Sectors. More... | |
FLASH_Status | FLASH_EraseSector (uint32_t FLASH_Sector, uint8_t VoltageRange) |
Erases a specified FLASH Sector. More... | |
FlagStatus | FLASH_GetFlagStatus (uint32_t FLASH_FLAG) |
Checks whether the specified FLASH flag is set or not. More... | |
FLASH_Status | FLASH_GetStatus (void) |
Returns the FLASH Status. More... | |
void | FLASH_InstructionCacheCmd (FunctionalState NewState) |
Enables or disables the Instruction Cache feature. More... | |
void | FLASH_InstructionCacheReset (void) |
Resets the Instruction Cache. More... | |
void | FLASH_ITConfig (uint32_t FLASH_IT, FunctionalState NewState) |
Enables or disables the specified FLASH interrupts. More... | |
void | FLASH_Lock (void) |
Locks the FLASH control register access. More... | |
void | FLASH_OB_BORConfig (uint8_t OB_BOR) |
Sets the BOR Level. More... | |
uint8_t | FLASH_OB_GetBOR (void) |
Returns the FLASH BOR level. More... | |
FlagStatus | FLASH_OB_GetRDP (void) |
Checks whether the FLASH Read out Protection Status is set or not. More... | |
uint8_t | FLASH_OB_GetUser (void) |
Returns the FLASH User Option Bytes values. More... | |
uint16_t | FLASH_OB_GetWRP (void) |
Returns the FLASH Write Protection Option Bytes value. More... | |
uint16_t | FLASH_OB_GetWRP1 (void) |
Returns the FLASH Write Protection Option Bytes value. More... | |
FLASH_Status | FLASH_OB_Launch (void) |
Launch the option byte loading. More... | |
void | FLASH_OB_Lock (void) |
Locks the option bytes block access. More... | |
void | FLASH_OB_RDPConfig (uint8_t OB_RDP) |
Enables or disables the read out protection. More... | |
void | FLASH_OB_Unlock (void) |
Unlocks the option bytes block access. More... | |
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. More... | |
void | FLASH_OB_WRP1Config (uint32_t OB_WRP, FunctionalState NewState) |
Enables or disables the write protection of the desired sectors. More... | |
void | FLASH_OB_WRPConfig (uint32_t OB_WRP, FunctionalState NewState) |
Enables or disables the write protection of the desired sectors. More... | |
void | FLASH_PrefetchBufferCmd (FunctionalState NewState) |
Enables or disables the Prefetch Buffer. More... | |
FLASH_Status | FLASH_ProgramByte (uint32_t Address, uint8_t Data) |
Programs a byte (8-bit) at a specified address. More... | |
FLASH_Status | FLASH_ProgramDoubleWord (uint32_t Address, uint64_t Data) |
Programs a double word (64-bit) at a specified address. More... | |
FLASH_Status | FLASH_ProgramHalfWord (uint32_t Address, uint16_t Data) |
Programs a half word at a specified address. More... | |
FLASH_Status | FLASH_ProgramWord (uint32_t Address, uint32_t Data) |
Programs a word at a specified address. More... | |
void | FLASH_SetLatency (uint32_t FLASH_Latency) |
Sets the code latency value. More... | |
void | FLASH_Unlock (void) |
Unlocks the FLASH control register access. More... | |
FLASH_Status | FLASH_WaitForLastOperation (void) |
Waits for a FLASH operation to complete. More... | |
This file contains all the functions prototypes for the FLASH firmware library.
Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.st.com/software_license_agreement_liberty_v2
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file stm32f4xx_flash.h.