STM8L15x Standard Peripherals Drivers
|
FLASH driver modules. More...
Modules | |
FLASH_Private_Define | |
FLASH_Private_Functions | |
FLASH_Exported_Constants | |
FLASH_Exported_Types | |
FLASH_Exported_Macros | |
Functions | |
void | FLASH_DeInit (void) |
Deinitializes the FLASH registers to their default reset values. | |
void | FLASH_EraseByte (uint32_t Address) |
Erases one byte in the program or data EEPROM memory. | |
void | FLASH_EraseOptionByte (uint16_t Address) |
Erases option byte. | |
uint16_t | FLASH_GetBootSize (void) |
Returns the Boot memory size in bytes. | |
uint16_t | FLASH_GetCodeSize (void) |
Returns the Code Area size in bytes. | |
FlagStatus | FLASH_GetFlagStatus (FLASH_FLAG_TypeDef FLASH_FLAG) |
Checks whether the specified FLASH flag is set or not. | |
FLASH_ProgramTime_TypeDef | FLASH_GetProgrammingTime (void) |
Returns the fixed programming time. | |
FunctionalState | FLASH_GetReadOutProtectionStatus (void) |
Returns the FLASH Read Out Protection Status. | |
void | FLASH_ITConfig (FunctionalState NewState) |
Enables or Disables the Flash interrupt mode. | |
void | FLASH_Lock (FLASH_MemType_TypeDef FLASH_MemType) |
Locks the program or data EEPROM memory. | |
void | FLASH_PowerWaitModeConfig (FLASH_Power_TypeDef FLASH_Power) |
Configures the power state for Flash program and data EEPROM during wait for interrupt mode. | |
void | FLASH_ProgramByte (uint32_t Address, uint8_t Data) |
Programs one byte in program or data EEPROM memory. | |
void | FLASH_ProgramOptionByte (uint16_t Address, uint8_t Data) |
Programs option byte. | |
void | FLASH_ProgramWord (uint32_t Address, uint32_t Data) |
Programs one word (4 bytes) in program or data EEPROM memory. | |
uint8_t | FLASH_ReadByte (uint32_t Address) |
Reads one byte from flash memory. | |
void | FLASH_SetProgrammingTime (FLASH_ProgramTime_TypeDef FLASH_ProgTime) |
Sets the fixed programming time. | |
void | FLASH_Unlock (FLASH_MemType_TypeDef FLASH_MemType) |
Unlocks the program or data EEPROM memory. | |
IN_RAM (void FLASH_PowerRunModeConfig(FLASH_Power_TypeDef FLASH_Power)) | |
IN_RAM (void FLASH_EraseBlock(uint16_t BlockNum, FLASH_MemType_TypeDef FLASH_MemType)) | |
IN_RAM (void FLASH_ProgramBlock(uint16_t BlockNum, FLASH_MemType_TypeDef FLASH_MemType, FLASH_ProgramMode_TypeDef FLASH_ProgMode, uint8_t *Buffer)) | |
IN_RAM (FLASH_Status_TypeDef FLASH_WaitForLastOperation(FLASH_MemType_TypeDef FLASH_MemType)) | |
IN_RAM (FLASH_PowerStatus_TypeDef FLASH_GetPowerStatus(void)) |
Detailed Description
FLASH driver modules.
Function Documentation
void FLASH_DeInit | ( | void | ) |
Deinitializes the FLASH registers to their default reset values.
Definition at line 253 of file stm8l15x_flash.c.
References FLASH, FLASH_CR1_RESET_VALUE, FLASH_CR2_RESET_VALUE, and FLASH_IAPSR_RESET_VALUE.
void FLASH_EraseByte | ( | uint32_t | Address | ) |
Erases one byte in the program or data EEPROM memory.
Definition at line 324 of file stm8l15x_flash.c.
References FLASH_CLEAR_BYTE, IS_FLASH_ADDRESS, and PointerAttr.
void FLASH_EraseOptionByte | ( | uint16_t | Address | ) |
Erases option byte.
Definition at line 432 of file stm8l15x_flash.c.
References FLASH, FLASH_CLEAR_BYTE, FLASH_CR2_OPT, FLASH_MemType_Program, IS_OPTION_BYTE_ADDRESS, and PointerAttr.
uint16_t FLASH_GetBootSize | ( | void | ) |
Returns the Boot memory size in bytes.
Definition at line 478 of file stm8l15x_flash.c.
References OPT.
uint16_t FLASH_GetCodeSize | ( | void | ) |
Returns the Code Area size in bytes.
Definition at line 502 of file stm8l15x_flash.c.
References OPT.
FlagStatus FLASH_GetFlagStatus | ( | FLASH_FLAG_TypeDef | FLASH_FLAG | ) |
Checks whether the specified FLASH flag is set or not.
Definition at line 571 of file stm8l15x_flash.c.
References FLASH, IS_FLASH_FLAGS, RESET, and SET.
FLASH_ProgramTime_TypeDef FLASH_GetProgrammingTime | ( | void | ) |
Returns the fixed programming time.
Definition at line 182 of file stm8l15x_flash.c.
References FLASH, and FLASH_CR1_FIX.
FunctionalState FLASH_GetReadOutProtectionStatus | ( | void | ) |
Returns the FLASH Read Out Protection Status.
Definition at line 455 of file stm8l15x_flash.c.
References DISABLE, ENABLE, FLASH_READOUTPROTECTION_KEY, and OPT.
void FLASH_ITConfig | ( | FunctionalState | NewState | ) |
Enables or Disables the Flash interrupt mode.
Definition at line 541 of file stm8l15x_flash.c.
References DISABLE, FLASH, FLASH_CR1_IE, and IS_FUNCTIONAL_STATE.
void FLASH_Lock | ( | FLASH_MemType_TypeDef | FLASH_MemType | ) |
Locks the program or data EEPROM memory.
Definition at line 297 of file stm8l15x_flash.c.
References FLASH, and IS_FLASH_MEMORY_TYPE.
void FLASH_PowerWaitModeConfig | ( | FLASH_Power_TypeDef | FLASH_Power | ) |
Configures the power state for Flash program and data EEPROM during wait for interrupt mode.
Definition at line 197 of file stm8l15x_flash.c.
References FLASH, FLASH_CR1_WAITM, FLASH_Power_On, and IS_FLASH_POWER.
Programs one byte in program or data EEPROM memory.
Definition at line 311 of file stm8l15x_flash.c.
References IS_FLASH_ADDRESS, and PointerAttr.
Programs option byte.
Definition at line 410 of file stm8l15x_flash.c.
References FLASH, FLASH_CR2_OPT, FLASH_MemType_Program, IS_OPTION_BYTE_ADDRESS, and PointerAttr.
Programs one word (4 bytes) in program or data EEPROM memory.
Definition at line 338 of file stm8l15x_flash.c.
References FLASH, FLASH_CR2_WPRG, IS_FLASH_ADDRESS, and PointerAttr.
Reads one byte from flash memory.
Definition at line 360 of file stm8l15x_flash.c.
References PointerAttr.
void FLASH_SetProgrammingTime | ( | FLASH_ProgramTime_TypeDef | FLASH_ProgTime | ) |
Sets the fixed programming time.
Definition at line 168 of file stm8l15x_flash.c.
References FLASH, FLASH_CR1_FIX, and IS_FLASH_PROGRAM_TIME.
void FLASH_Unlock | ( | FLASH_MemType_TypeDef | FLASH_MemType | ) |
Unlocks the program or data EEPROM memory.
Definition at line 269 of file stm8l15x_flash.c.
References FLASH, FLASH_MemType_Data, FLASH_MemType_Program, FLASH_RASS_KEY1, FLASH_RASS_KEY2, and IS_FLASH_MEMORY_TYPE.
IN_RAM | ( | void | FLASH_PowerRunModeConfigFLASH_Power_TypeDef FLASH_Power | ) |
All the functions declared below must be executed from RAM exclusively, except for the FLASH_WaitForLastOperation function which can be executed from Flash. Steps of the execution from RAM differs from one toolchain to another. for more details refer to stm8l15x_flash.c file. To enable execution from RAM you can either uncomment the following define in the stm8s.h file or define it in your toolchain compiler preprocessor - #define RAM_EXECUTION (1)
IN_RAM | ( | void | FLASH_EraseBlockuint16_t BlockNum, FLASH_MemType_TypeDef FLASH_MemType | ) |
IN_RAM | ( | void | FLASH_ProgramBlockuint16_t BlockNum, FLASH_MemType_TypeDef FLASH_MemType, FLASH_ProgramMode_TypeDef FLASH_ProgMode, uint8_t *Buffer | ) |
IN_RAM | ( | FLASH_Status_TypeDef | FLASH_WaitForLastOperationFLASH_MemType_TypeDef FLASH_MemType | ) |
IN_RAM | ( | FLASH_PowerStatus_TypeDef | FLASH_GetPowerStatusvoid | ) |