HAL FLASH Overview ¶
Introducing FLASH ¶
- group FLASH_Introduction
-
The FLASH IO Hardware Abstraction Layer (HAL) provides high-level, user-friendly APIs for managing non-volatile memory (FLASH) operations on STM32 microcontrollers.
This layer offers firmware functions to handle key FLASH functionalities, including:
Initialization and de-initialization of FLASH handling.
Programming operations across different FLASH memory areas.
Management of operation completion and error interrupt requests.
Retrieval of FLASH memory topology and configuration information.
The abstraction provided by this layer ensures portability and simplifies application development across various STM32 microcontroller series.
- group FLASH_ITF_Introduction
-
The FLASH ITF Hardware Abstraction Layer (HAL) provides high-level, user-friendly interface APIs for managing non-volatile memory (FLASH) configuration and control on STM32 microcontrollers.
This layer offers firmware functions to support key FLASH interface functionalities, including:
Lock and unlock management.
Control operations.
Option byte configuration.
Option byte process interrupt handling.
The abstraction provided by this layer ensures portability and simplifies application development across various STM32 microcontroller series.
Module and files ¶
The following diagram illustrates the FLASH module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the FLASH module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL FLASH module, specifying their locations, default values, and descriptions:
- group FLASH_Configuration_Table
-
Configuration inside the FLASH driver ¶
Configuration defines
Description
Default value
Note
PRODUCT
from IDE
NA
The selected device (ex STM32H7P5xx)
USE_HAL_FLASH_MODULE
from hal_conf.h
1
Allows to use HAL FLASH module.
USE_ASSERT_DBG_PARAM
from IDE
None
Allows to use the assert check parameters.
USE_ASSERT_DBG_STATE
from IDE
None
Allows to use the assert check states.
USE_HAL_CHECK_PARAM
from hal_conf.h
0
Allows to use the run-time checks parameters.
USE_HAL_CHECK_PROCESS_STATE
from hal_conf.h
0
Allows to use the load and store exclusive.
USE_HAL_FLASH_REGISTER_CALLBACKS
from hal_conf.h
0
Allows to use the register callbacks
USE_HAL_FLASH_GET_LAST_ERRORS
from hal_conf.h
0
Allows to use error code mechanism.
USE_HAL_FLASH_USER_DATA
from hal_conf.h
0
Allows to use user data.
USE_HAL_FLASH_PROGRAM_BY_ADDR
from hal_conf.h
1
Allows to use program by address feature APIs
USE_HAL_FLASH_ERASE_BY_ADDR
from hal_conf.h
1
Allows to use erase by address feature APIs
USE_HAL_FLASH_ERASE_PAGE
from hal_conf.h
1
Allows to use erase by page feature APIs
USE_HAL_FLASH_ERASE_BANK
from hal_conf.h
1
Allows to use erase by bank feature APIs
USE_HAL_FLASH_MASS_ERASE
from hal_conf.h
1
Allows to use mass erase feature APIs
USE_HAL_FLASH_CALCULATE_CRC
from hal_conf.h
1
Allows to use calculate CRC feature APIs
USE_HAL_FLASH_ECC
from hal_conf.h
1
Allows to use ECC errors handling APIs
- group FLASH_ITF_Configuration_Table
-
Configuration inside the FLASH ITF driver ¶
Configuration defines
Description
Default value
Note
PRODUCT
from IDE
NA
The selected device (ex STM32H7P75xx)
USE_HAL_FLASH_MODULE
from hal_conf.h
1
Allows to use HAL FLASH ITF module.
USE_ASSERT_DBG_PARAM
from IDE
None
Allows to use the assert check parameters.
USE_HAL_CHECK_PARAM
from hal_conf.h
0
Allows to use the run-time checks parameters.
USE_HAL_FLASH_ECC
from hal_conf.h
1
Allows to use ECC errors features APIs.