Flashex Firmware Driver Api Description; Hal_Flashex_Erase; Flash Extension Features; How To Use This Driver - ST STM32F2 User Manual

Description of stm32f2 hal and low layer drivers
Hide thumbs Also See for STM32F2:
Table of Contents

Advertisement

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
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
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:
2.
Option Bytes Programming functions: Use HAL_FLASHEx_OBProgram() to :
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
Function name
Function description
Parameters
254/1371
FLASHEx_Banks
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()
Set/Reset the write protection
Set the Read protection Level
Set the BOR level
Program the user Option Bytes
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.
DocID028236 Rev 2
FLASHEx_BOR_Reset_Level
UM1940

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF