STM32F10x Standard Peripherals Library
3.5.0
|
This file provides all the FLASH firmware functions. More...
#include "stm32f10x_flash.h"
Go to the source code of this file.
Defines | |
#define | ACR_LATENCY_Mask ((uint32_t)0x00000038) |
#define | ACR_HLFCYA_Mask ((uint32_t)0xFFFFFFF7) |
#define | ACR_PRFTBE_Mask ((uint32_t)0xFFFFFFEF) |
#define | ACR_PRFTBS_Mask ((uint32_t)0x00000020) |
#define | CR_PG_Set ((uint32_t)0x00000001) |
#define | CR_PG_Reset ((uint32_t)0x00001FFE) |
#define | CR_PER_Set ((uint32_t)0x00000002) |
#define | CR_PER_Reset ((uint32_t)0x00001FFD) |
#define | CR_MER_Set ((uint32_t)0x00000004) |
#define | CR_MER_Reset ((uint32_t)0x00001FFB) |
#define | CR_OPTPG_Set ((uint32_t)0x00000010) |
#define | CR_OPTPG_Reset ((uint32_t)0x00001FEF) |
#define | CR_OPTER_Set ((uint32_t)0x00000020) |
#define | CR_OPTER_Reset ((uint32_t)0x00001FDF) |
#define | CR_STRT_Set ((uint32_t)0x00000040) |
#define | CR_LOCK_Set ((uint32_t)0x00000080) |
#define | RDPRT_Mask ((uint32_t)0x00000002) |
#define | WRP0_Mask ((uint32_t)0x000000FF) |
#define | WRP1_Mask ((uint32_t)0x0000FF00) |
#define | WRP2_Mask ((uint32_t)0x00FF0000) |
#define | WRP3_Mask ((uint32_t)0xFF000000) |
#define | OB_USER_BFB2 ((uint16_t)0x0008) |
#define | RDP_Key ((uint16_t)0x00A5) |
#define | FLASH_KEY1 ((uint32_t)0x45670123) |
#define | FLASH_KEY2 ((uint32_t)0xCDEF89AB) |
#define | FLASH_BANK1_END_ADDRESS ((uint32_t)0x807FFFF) |
#define | EraseTimeout ((uint32_t)0x000B0000) |
#define | ProgramTimeout ((uint32_t)0x00002000) |
Functions | |
void | FLASH_SetLatency (uint32_t FLASH_Latency) |
Sets the code latency value. | |
void | FLASH_HalfCycleAccessCmd (uint32_t FLASH_HalfCycleAccess) |
Enables or disables the Half cycle flash access. | |
void | FLASH_PrefetchBufferCmd (uint32_t FLASH_PrefetchBuffer) |
Enables or disables the Prefetch Buffer. | |
void | FLASH_Unlock (void) |
Unlocks the FLASH Program Erase Controller. | |
void | FLASH_UnlockBank1 (void) |
Unlocks the FLASH Bank1 Program Erase Controller. | |
void | FLASH_Lock (void) |
Locks the FLASH Program Erase Controller. | |
void | FLASH_LockBank1 (void) |
Locks the FLASH Bank1 Program Erase Controller. | |
FLASH_Status | FLASH_ErasePage (uint32_t Page_Address) |
Erases a specified FLASH page. | |
FLASH_Status | FLASH_EraseAllPages (void) |
Erases all FLASH pages. | |
FLASH_Status | FLASH_EraseAllBank1Pages (void) |
Erases all Bank1 FLASH pages. | |
FLASH_Status | FLASH_EraseOptionBytes (void) |
Erases the FLASH option bytes. | |
FLASH_Status | FLASH_ProgramWord (uint32_t Address, uint32_t Data) |
Programs a word at a specified address. | |
FLASH_Status | FLASH_ProgramHalfWord (uint32_t Address, uint16_t Data) |
Programs a half word at a specified address. | |
FLASH_Status | FLASH_ProgramOptionByteData (uint32_t Address, uint8_t Data) |
Programs a half word at a specified Option Byte Data address. | |
FLASH_Status | FLASH_EnableWriteProtection (uint32_t FLASH_Pages) |
Write protects the desired pages. | |
FLASH_Status | FLASH_ReadOutProtection (FunctionalState NewState) |
Enables or disables the read out protection. | |
FLASH_Status | FLASH_UserOptionByteConfig (uint16_t OB_IWDG, uint16_t OB_STOP, uint16_t OB_STDBY) |
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY. | |
uint32_t | FLASH_GetUserOptionByte (void) |
Returns the FLASH User Option Bytes values. | |
uint32_t | FLASH_GetWriteProtectionOptionByte (void) |
Returns the FLASH Write Protection Option Bytes Register value. | |
FlagStatus | FLASH_GetReadOutProtectionStatus (void) |
Checks whether the FLASH Read Out Protection Status is set or not. | |
FlagStatus | FLASH_GetPrefetchBufferStatus (void) |
Checks whether the FLASH Prefetch Buffer status is set or not. | |
void | FLASH_ITConfig (uint32_t FLASH_IT, FunctionalState NewState) |
Enables or disables the specified FLASH interrupts. | |
FlagStatus | FLASH_GetFlagStatus (uint32_t FLASH_FLAG) |
Checks whether the specified FLASH flag is set or not. | |
void | FLASH_ClearFlag (uint32_t FLASH_FLAG) |
Clears the FLASH's pending flags. | |
FLASH_Status | FLASH_GetStatus (void) |
Returns the FLASH Status. | |
FLASH_Status | FLASH_GetBank1Status (void) |
Returns the FLASH Bank1 Status. | |
FLASH_Status | FLASH_WaitForLastOperation (uint32_t Timeout) |
Waits for a Flash operation to complete or a TIMEOUT to occur. | |
FLASH_Status | FLASH_WaitForLastBank1Operation (uint32_t Timeout) |
Waits for a Flash operation on Bank1 to complete or a TIMEOUT to occur. |
This file provides all the FLASH firmware functions.
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
Definition in file stm32f10x_flash.c.