HAL FLASH Extension Driver
uint32_t FLASH_OBProgramInitTypeDef::Banks
Select banks for WRP activation/deactivation of all sectors. This parameter must be a
value of FLASHEx_Banks
uint32_t FLASH_OBProgramInitTypeDef::RDPLevel
Set the read protection level. This parameter can be a value of
FLASHEx_Option_Bytes_Read_Protection
uint32_t FLASH_OBProgramInitTypeDef::BORLevel
Set the BOR Level. This parameter can be a value of FLASHEx_BOR_Reset_Level
uint8_t FLASH_OBProgramInitTypeDef::USERConfig
Program the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY.
19.2 FLASHEx Firmware driver API description
19.2.1 Flash Extension features
19.2.2 How to use this driver
This driver provides functions to configure and program the FLASH memory of all
STM32F2xx devices. It includes
1. FLASH Memory Erase functions:
Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and
HAL_FLASH_Lock() functions
Erase function: Erase sector, erase all sectors
There are two modes of erase :
Polling Mode using HAL_FLASHEx_Erase()
Interrupt Mode using HAL_FLASHEx_Erase_IT()
2. Option Bytes Programming functions: Use HAL_FLASHEx_OBProgram() to :
Set/Reset the write protection
Set the Read protection Level
Set the BOR level
Program the user Option Bytes
19.2.3 Extended programming operation functions
This subsection provides a set of functions allowing to manage the Extension FLASH
programming operations.
This section contains the following APIs:
HAL_FLASHEx_Erase()
HAL_FLASHEx_Erase_IT()
HAL_FLASHEx_OBProgram()
HAL_FLASHEx_OBGetConfig()
19.2.4 Detailed description of functions
HAL_FLASHEx_Erase
HAL_StatusTypeDef HAL_FLASHEx_Erase
(FLASH_EraseInitTypeDef * pEraseInit, uint32_t * SectorError)
Perform a mass erase or erase the specified FLASH memory
sectors.
pEraseInit: pointer to an FLASH_EraseInitTypeDef structure
that contains the configuration information for the erasing.