STM32F0 Standard Peripheral bibliotheek
1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
|
This file contains all the functions prototypes for the FLASH firmware library. More...
#include "stm32f0xx.h"
Go to the source code of this file.
Macros | |
#define | FLASH_Latency_0 ((uint32_t)0x00000000) |
#define | FLASH_Latency_1 FLASH_ACR_LATENCY |
#define | IS_FLASH_LATENCY(LATENCY) |
#define | FLASH_IT_EOP FLASH_CR_EOPIE |
#define | FLASH_IT_ERR FLASH_CR_ERRIE |
#define | IS_FLASH_IT(IT) ((((IT) & (uint32_t)0xFFFFEBFF) == 0x00000000) && (((IT) != 0x00000000))) |
#define | IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0800FFFF)) |
#define | IS_OB_DATA_ADDRESS(ADDRESS) (((ADDRESS) == 0x1FFFF804) || ((ADDRESS) == 0x1FFFF806)) |
#define | OB_WRP_Pages0to3 ((uint32_t)0x00000001) /* Write protection of page 0 to 3 */ |
#define | OB_WRP_Pages4to7 ((uint32_t)0x00000002) /* Write protection of page 4 to 7 */ |
#define | OB_WRP_Pages8to11 ((uint32_t)0x00000004) /* Write protection of page 8 to 11 */ |
#define | OB_WRP_Pages12to15 ((uint32_t)0x00000008) /* Write protection of page 12 to 15 */ |
#define | OB_WRP_Pages16to19 ((uint32_t)0x00000010) /* Write protection of page 16 to 19 */ |
#define | OB_WRP_Pages20to23 ((uint32_t)0x00000020) /* Write protection of page 20 to 23 */ |
#define | OB_WRP_Pages24to27 ((uint32_t)0x00000040) /* Write protection of page 24 to 27 */ |
#define | OB_WRP_Pages28to31 ((uint32_t)0x00000080) /* Write protection of page 28 to 31 */ |
#define | OB_WRP_Pages32to35 ((uint32_t)0x00000100) /* Write protection of page 32 to 35 */ |
#define | OB_WRP_Pages36to39 ((uint32_t)0x00000200) /* Write protection of page 36 to 39 */ |
#define | OB_WRP_Pages40to43 ((uint32_t)0x00000400) /* Write protection of page 40 to 43 */ |
#define | OB_WRP_Pages44to47 ((uint32_t)0x00000800) /* Write protection of page 44 to 47 */ |
#define | OB_WRP_Pages48to51 ((uint32_t)0x00001000) /* Write protection of page 48 to 51 */ |
#define | OB_WRP_Pages52to55 ((uint32_t)0x00002000) /* Write protection of page 52 to 55 */ |
#define | OB_WRP_Pages56to59 ((uint32_t)0x00004000) /* Write protection of page 56 to 59 */ |
#define | OB_WRP_Pages60to63 ((uint32_t)0x00008000) /* Write protection of page 60 to 63 */ |
#define | OB_WRP_AllPages ((uint32_t)0x0000FFFF) |
#define | IS_OB_WRP(PAGE) (((PAGE) != 0x0000000)) |
#define | OB_RDP_Level_0 ((uint8_t)0xAA) |
FLASH_Read Protection Level. | |
#define | OB_RDP_Level_1 ((uint8_t)0xBB) |
#define | IS_OB_RDP(LEVEL) |
#define | OB_IWDG_SW ((uint8_t)0x01) |
#define | OB_IWDG_HW ((uint8_t)0x00) |
#define | IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW)) |
#define | OB_STOP_NoRST ((uint8_t)0x02) |
#define | OB_STOP_RST ((uint8_t)0x00) |
#define | IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NoRST) || ((SOURCE) == OB_STOP_RST)) |
#define | OB_STDBY_NoRST ((uint8_t)0x04) |
#define | OB_STDBY_RST ((uint8_t)0x00) |
#define | IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NoRST) || ((SOURCE) == OB_STDBY_RST)) |
#define | OB_BOOT1_RESET ((uint8_t)0x00) |
#define | OB_BOOT1_SET ((uint8_t)0x10) |
#define | IS_OB_BOOT1(BOOT1) (((BOOT1) == OB_BOOT1_RESET) || ((BOOT1) == OB_BOOT1_SET)) |
#define | OB_VDDA_ANALOG_ON ((uint8_t)0x00) |
#define | OB_VDDA_ANALOG_OFF ((uint8_t)0x20) |
#define | IS_OB_VDDA_ANALOG(ANALOG) (((ANALOG) == OB_VDDA_ANALOG_ON) || ((ANALOG) == OB_VDDA_ANALOG_OFF)) |
#define | OB_SRAM_PARITY_SET ((uint8_t)0x00) |
#define | OB_SRAM_PARITY_RESET ((uint8_t)0x40) |
#define | IS_OB_SRAM_PARITY(PARITY) (((PARITY) == OB_SRAM_PARITY_SET) || ((PARITY) == OB_SRAM_PARITY_RESET)) |
#define | FLASH_FLAG_BSY FLASH_SR_BSY |
#define | FLASH_FLAG_PGERR FLASH_SR_PGERR |
#define | FLASH_FLAG_WRPERR FLASH_SR_WRPERR |
#define | FLASH_FLAG_EOP FLASH_SR_EOP |
#define | IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFFC3) == 0x00000000) && ((FLAG) != 0x00000000)) |
#define | IS_FLASH_GET_FLAG(FLAG) |
#define | FLASH_ER_PRG_TIMEOUT ((uint32_t)0x000B0000) |
Enumerations | |
enum | FLASH_Status { FLASH_BUSY = 1, FLASH_ERROR_WRP, FLASH_ERROR_PROGRAM, FLASH_COMPLETE, FLASH_TIMEOUT } |
FLASH Status. | |
Functions | |
void | FLASH_SetLatency (uint32_t FLASH_Latency) |
FLASH memory functions that can be executed from FLASH. More... | |
void | FLASH_PrefetchBufferCmd (FunctionalState NewState) |
Enables or disables the Prefetch Buffer. More... | |
FlagStatus | FLASH_GetPrefetchBufferStatus (void) |
Checks whether the FLASH Prefetch Buffer status is set or not. More... | |
void | FLASH_Unlock (void) |
Unlocks the FLASH control register and program memory access. More... | |
void | FLASH_Lock (void) |
Locks the Program memory access. More... | |
FLASH_Status | FLASH_ErasePage (uint32_t Page_Address) |
Erases a specified page in program memory. More... | |
FLASH_Status | FLASH_EraseAllPages (void) |
Erases all FLASH pages. More... | |
FLASH_Status | FLASH_ProgramWord (uint32_t Address, uint32_t Data) |
Programs a word at a specified address. More... | |
FLASH_Status | FLASH_ProgramHalfWord (uint32_t Address, uint16_t Data) |
Programs a half word at a specified address. More... | |
void | FLASH_OB_Unlock (void) |
Unlocks the option bytes block access. More... | |
void | FLASH_OB_Lock (void) |
Locks the option bytes block access. More... | |
void | FLASH_OB_Launch (void) |
Launch the option byte loading. More... | |
FLASH_Status | FLASH_OB_Erase (void) |
Erases the FLASH option bytes. More... | |
FLASH_Status | FLASH_OB_EnableWRP (uint32_t OB_WRP) |
Write protects the desired pages. More... | |
FLASH_Status | FLASH_OB_RDPConfig (uint8_t OB_RDP) |
Enables or disables the read out protection. More... | |
FLASH_Status | 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_BOOTConfig (uint8_t OB_BOOT1) |
Sets or resets the BOOT1 option bit. 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_SRAMParityConfig (uint8_t OB_SRAM_Parity) |
Sets or resets the SRAM parity. More... | |
FLASH_Status | FLASH_OB_WriteUser (uint8_t OB_USER) |
Programs the FLASH User Option Byte: IWDG_SW, RST_STOP, RST_STDBY, BOOT1 and VDDA ANALOG monitoring. More... | |
FLASH_Status | FLASH_ProgramOptionByteData (uint32_t Address, uint8_t Data) |
Programs a half word at a specified Option Byte Data address. More... | |
uint8_t | FLASH_OB_GetUser (void) |
Returns the FLASH User Option Bytes values. More... | |
uint32_t | FLASH_OB_GetWRP (void) |
Returns the FLASH Write Protection Option Bytes value. More... | |
FlagStatus | FLASH_OB_GetRDP (void) |
Checks whether the FLASH Read out Protection Status is set or not. More... | |
void | FLASH_ITConfig (uint32_t FLASH_IT, FunctionalState NewState) |
Enables or disables the specified FLASH interrupts. More... | |
FlagStatus | FLASH_GetFlagStatus (uint32_t FLASH_FLAG) |
Checks whether the specified FLASH flag is set or not. More... | |
void | FLASH_ClearFlag (uint32_t FLASH_FLAG) |
Clears the FLASH's pending flags. More... | |
FLASH_Status | FLASH_GetStatus (void) |
Returns the FLASH Status. More... | |
FLASH_Status | FLASH_WaitForLastOperation (uint32_t Timeout) |
Waits for a FLASH operation to complete or a TIMEOUT to occur. 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.