This file provides firmware functions to manage the following functionalities of the FLASH peripheral: More...
#include "stm32f30x_flash.h"
Go to the source code of this file.
Macros | |
#define | RDPRT_MASK ((uint32_t)0x00000002) |
#define | WRP01_MASK ((uint32_t)0x0000FFFF) |
#define | WRP23_MASK ((uint32_t)0xFFFF0000) |
Functions | |
void | FLASH_ClearFlag (uint32_t FLASH_FLAG) |
Clears the FLASH's pending flags. More... | |
FLASH_Status | FLASH_EraseAllPages (void) |
Erases all FLASH pages. More... | |
FLASH_Status | FLASH_ErasePage (uint32_t Page_Address) |
Erases a specified page in program memory. 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_HalfCycleAccessCmd (FunctionalState NewState) |
Enables or disables the Half cycle flash access. 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... | |
FLASH_Status | FLASH_OB_BOOTConfig (uint8_t OB_BOOT1) |
Sets or resets the BOOT1. More... | |
FLASH_Status | FLASH_OB_EnableWRP (uint32_t OB_WRP) |
Write protects the desired pages. More... | |
FLASH_Status | FLASH_OB_Erase (void) |
Erases the FLASH option bytes. More... | |
FlagStatus | FLASH_OB_GetRDP (void) |
Returns the FLASH Read Protection level. 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... | |
FLASH_Status | FLASH_OB_Launch (void) |
Launch the option byte loading. More... | |
void | FLASH_OB_Lock (void) |
Locks the FLASH Option Control Registers access. More... | |
void | FLASH_OB_RDPConfig (uint8_t OB_RDP) |
Sets the read protection level. More... | |
FLASH_Status | FLASH_OB_SRAMParityConfig (uint8_t OB_SRAM_Parity) |
Sets or resets the SRAM partiy. More... | |
void | FLASH_OB_Unlock (void) |
Unlocks the FLASH Option Control Registers 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... | |
FLASH_Status | FLASH_OB_VDDAConfig (uint8_t OB_VDDA_ANALOG) |
Sets or resets the analogue monitoring on VDDA Power source. More... | |
FLASH_Status | FLASH_OB_WriteUser (uint8_t OB_USER) |
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY/ BOOT1 and OB_VDDA_ANALOG. More... | |
void | FLASH_PrefetchBufferCmd (FunctionalState NewState) |
Enables or disables the Prefetch Buffer. More... | |
FLASH_Status | FLASH_ProgramHalfWord (uint32_t Address, uint16_t Data) |
Programs a half word (16-bit) at a specified address. More... | |
FLASH_Status | FLASH_ProgramOptionByteData (uint32_t Address, uint8_t Data) |
Programs a half word at a specified Option Byte Data address. More... | |
FLASH_Status | FLASH_ProgramWord (uint32_t Address, uint32_t Data) |
Programs a word (32-bit) 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 (uint32_t Timeout) |
Waits for a FLASH operation to complete or a TIMEOUT to occur. More... | |
This file provides firmware functions to manage the following functionalities of the FLASH peripheral:
=============================================================================== ##### How to use this driver ##### =============================================================================== [..] This driver provides functions to configure and program the FLASH memory of all STM32F30x devices. These functions are split in 4 groups: (#) FLASH Interface configuration functions: this group includes the management of following features: (++) Set the latency. (++) Enable/Disable the Half Cycle Access. (++) Enable/Disable the prefetch buffer. (#) FLASH Memory Programming functions: this group includes all needed functions to erase and program the main memory: (++) Lock and Unlock the FLASH interface. (++) Erase function: Erase page, erase all pages. (++) Program functions: Half Word and Word write. (#) FLASH Option Bytes Programming functions: this group includes all needed functions to manage the Option Bytes: (++) Lock and Unlock the Flash Option bytes. (++) Launch the Option Bytes loader (++) Erase the Option Bytes (++) Set/Reset the write protection (++) Set the Read protection Level (++) Program the user option Bytes (++) Set/Reset the BOOT1 bit (++) Enable/Disable the VDDA Analog Monitoring (++) Enable/Disable the SRAM parity (++) Get the user option bytes (++) Get the Write protection (++) Get the read protection status (#) FLASH Interrupts and flags management functions: this group includes all needed functions to: (++) Enable/Disable the FLASH interrupt sources. (++) Get flags status. (++) Clear flags. (++) Get FLASH operation status. (++) Wait for last FLASH operation.
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 stm32f30x_flash.c.