STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Extended IO operation functions

Extended IO operation functions. More...

Collaboration diagram for Extended IO operation functions:

Functions

HAL_StatusTypeDef HAL_FLASHEx_Erase (FLASH_EraseInitTypeDef *pEraseInit, uint32_t *SectorError)
 Perform a mass erase or erase the specified FLASH memory sectors.
 
HAL_StatusTypeDef HAL_FLASHEx_Erase_IT (FLASH_EraseInitTypeDef *pEraseInit)
 Perform a mass erase or erase the specified FLASH memory sectors with interrupt enabled.
 
HAL_StatusTypeDef HAL_FLASHEx_OBProgram (FLASH_OBProgramInitTypeDef *pOBInit)
 Program option bytes.
 
void HAL_FLASHEx_OBGetConfig (FLASH_OBProgramInitTypeDef *pOBInit)
 Get the Option byte configuration.
 
HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram (FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
 Program option bytes.
 
void HAL_FLASHEx_AdvOBGetConfig (FLASH_AdvOBProgramInitTypeDef *pAdvOBInit)
 Get the OBEX byte configuration.
 
HAL_StatusTypeDef HAL_FLASHEx_OB_SelectPCROP (void)
 Select the Protection Mode.
 
HAL_StatusTypeDef HAL_FLASHEx_OB_DeSelectPCROP (void)
 Deselect the Protection Mode.
 

Detailed Description

Extended IO operation functions.

 ===============================================================================
                ##### Extended programming operation functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to manage the Extension FLASH
    programming operations.

Function Documentation

◆ HAL_FLASHEx_Erase()

HAL_StatusTypeDef HAL_FLASHEx_Erase ( FLASH_EraseInitTypeDef * pEraseInit,
uint32_t * SectorError )

#include <stm32f4xx_hal_flash_ex.h>

Perform a mass erase or erase the specified FLASH memory sectors.

Parameters
[in]pEraseInitpointer to an FLASH_EraseInitTypeDef structure that contains the configuration information for the erasing.
[out]SectorErrorpointer to variable that contains the configuration information on faulty sector in case of error (0xFFFFFFFFU means that all the sectors have been correctly erased)
Return values
HALStatus

Definition at line 160 of file stm32f4xx_hal_flash_ex.c.

References __HAL_LOCK, __HAL_UNLOCK, assert_param, FLASH_EraseInitTypeDef::Banks, FLASH_Erase_Sector(), FLASH_FlushCaches(), FLASH_MassErase(), FLASH_TIMEOUT_VALUE, FLASH_TYPEERASE_MASSERASE, FLASH_WaitForLastOperation(), HAL_ERROR, HAL_OK, IS_FLASH_NBSECTORS, IS_FLASH_TYPEERASE, FLASH_EraseInitTypeDef::NbSectors, pFlash, FLASH_EraseInitTypeDef::Sector, FLASH_EraseInitTypeDef::TypeErase, and FLASH_EraseInitTypeDef::VoltageRange.

◆ HAL_FLASHEx_Erase_IT()

◆ HAL_FLASHEx_OBProgram()

◆ HAL_FLASHEx_OBGetConfig()

void HAL_FLASHEx_OBGetConfig ( FLASH_OBProgramInitTypeDef * pOBInit)

#include <stm32f4xx_hal_flash_ex.h>

Get the Option byte configuration.

Parameters
pOBInitpointer to an FLASH_OBInitStruct structure that contains the configuration information for the programming.
Return values
None

Definition at line 340 of file stm32f4xx_hal_flash_ex.c.

References FLASH_OBProgramInitTypeDef::BORLevel, FLASH_OB_GetBOR(), FLASH_OB_GetRDP(), FLASH_OB_GetUser(), FLASH_OB_GetWRP(), OPTIONBYTE_BOR, OPTIONBYTE_RDP, OPTIONBYTE_USER, OPTIONBYTE_WRP, FLASH_OBProgramInitTypeDef::OptionType, FLASH_OBProgramInitTypeDef::RDPLevel, FLASH_OBProgramInitTypeDef::USERConfig, and FLASH_OBProgramInitTypeDef::WRPSector.

◆ HAL_FLASHEx_AdvOBProgram()

HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram ( FLASH_AdvOBProgramInitTypeDef * pAdvOBInit)

#include <stm32f4xx_hal_flash_ex.h>

Program option bytes.

Parameters
pAdvOBInitpointer to an FLASH_AdvOBProgramInitTypeDef structure that contains the configuration information for the programming.
Return values
HALStatus

Definition at line 369 of file stm32f4xx_hal_flash_ex.c.

References assert_param, FLASH_OB_DisablePCROP(), FLASH_OB_EnablePCROP(), HAL_ERROR, IS_OBEX, IS_PCROPSTATE, OB_PCROP_STATE_ENABLE, OPTIONBYTE_PCROP, FLASH_AdvOBProgramInitTypeDef::OptionType, FLASH_AdvOBProgramInitTypeDef::PCROPState, and FLASH_AdvOBProgramInitTypeDef::Sectors.

◆ HAL_FLASHEx_AdvOBGetConfig()

void HAL_FLASHEx_AdvOBGetConfig ( FLASH_AdvOBProgramInitTypeDef * pAdvOBInit)

#include <stm32f4xx_hal_flash_ex.h>

Get the OBEX byte configuration.

Parameters
pAdvOBInitpointer to an FLASH_AdvOBProgramInitTypeDef structure that contains the configuration information for the programming.
Return values
None

Definition at line 425 of file stm32f4xx_hal_flash_ex.c.

References OPTCR_BYTE0_ADDRESS, OPTCR_BYTE2_ADDRESS, and FLASH_AdvOBProgramInitTypeDef::Sectors.

◆ HAL_FLASHEx_OB_SelectPCROP()

HAL_StatusTypeDef HAL_FLASHEx_OB_SelectPCROP ( void )

#include <stm32f4xx_hal_flash_ex.h>

Select the Protection Mode.

Note
After PCROP activated Option Byte modification NOT POSSIBLE! excepted Global Read Out Protection modification (from level1 to level0)
Once SPRMOD bit is active unprotection of a protected sector is not possible
Read a protected sector will set RDERR Flag and write a protected sector will set WRPERR Flag
This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM32F446xx/ STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices.
Return values
HALStatus

Definition at line 457 of file stm32f4xx_hal_flash_ex.c.

References HAL_OK, OB_PCROP_SELECTED, and OPTCR_BYTE3_ADDRESS.

◆ HAL_FLASHEx_OB_DeSelectPCROP()

HAL_StatusTypeDef HAL_FLASHEx_OB_DeSelectPCROP ( void )

#include <stm32f4xx_hal_flash_ex.h>

Deselect the Protection Mode.

Note
After PCROP activated Option Byte modification NOT POSSIBLE! excepted Global Read Out Protection modification (from level1 to level0)
Once SPRMOD bit is active unprotection of a protected sector is not possible
Read a protected sector will set RDERR Flag and write a protected sector will set WRPERR Flag
This function can be used only for STM32F42xxx/STM32F43xxx/STM32F401xx/STM32F411xx/STM32F446xx/ STM32F469xx/STM32F479xx/STM32F412xx/STM32F413xx devices.
Return values
HALStatus

Definition at line 482 of file stm32f4xx_hal_flash_ex.c.

References HAL_OK, OB_PCROP_DESELECTED, and OPTCR_BYTE3_ADDRESS.