STM32F439xx HAL User Manual
Functions
Extended IO operation functions
FLASHEx Exported Functions

Extended IO operation functions. More...

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.
uint16_t HAL_FLASHEx_OB_GetBank2WRP (void)
 Returns the FLASH Write Protection Option Bytes value for Bank 2.

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

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 446 of file stm32f4xx_hal_flash_ex.c.

References FLASH_AdvOBProgramInitTypeDef::BootConfig, OPTCR1_BYTE2_ADDRESS, OPTCR_BYTE0_ADDRESS, OPTCR_BYTE2_ADDRESS, FLASH_AdvOBProgramInitTypeDef::SectorsBank1, and FLASH_AdvOBProgramInitTypeDef::SectorsBank2.

HAL_StatusTypeDef HAL_FLASHEx_AdvOBProgram ( FLASH_AdvOBProgramInitTypeDef pAdvOBInit)
HAL_StatusTypeDef HAL_FLASHEx_Erase ( FLASH_EraseInitTypeDef pEraseInit,
uint32_t *  SectorError 
)

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 178 of file stm32f4xx_hal_flash_ex.c.

References assert_param, FLASH_EraseInitTypeDef::Banks, FLASH_Erase_Sector(), FLASH_FlushCaches(), FLASH_MassErase(), FLASH_MER_BIT, FLASH_TIMEOUT_VALUE, FLASH_TYPEERASE_MASSERASE, FLASH_WaitForLastOperation(), IS_FLASH_NBSECTORS, IS_FLASH_TYPEERASE, FLASH_EraseInitTypeDef::NbSectors, FLASH_EraseInitTypeDef::Sector, FLASH_EraseInitTypeDef::TypeErase, and FLASH_EraseInitTypeDef::VoltageRange.

HAL_StatusTypeDef HAL_FLASHEx_Erase_IT ( FLASH_EraseInitTypeDef pEraseInit)
HAL_StatusTypeDef HAL_FLASHEx_OB_DeSelectPCROP ( void  )

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 503 of file stm32f4xx_hal_flash_ex.c.

References OB_PCROP_DESELECTED, and OPTCR_BYTE3_ADDRESS.

uint16_t HAL_FLASHEx_OB_GetBank2WRP ( void  )

Returns the FLASH Write Protection Option Bytes value for Bank 2.

Note:
This function can be used only for STM32F42xxx/STM32F43xxx/STM32F469xx/STM32F479xx devices.
Return values:
TheFLASH Write Protection Option Bytes value

Definition at line 525 of file stm32f4xx_hal_flash_ex.c.

References OPTCR1_BYTE2_ADDRESS.

HAL_StatusTypeDef HAL_FLASHEx_OB_SelectPCROP ( void  )

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 478 of file stm32f4xx_hal_flash_ex.c.

References OB_PCROP_SELECTED, and OPTCR_BYTE3_ADDRESS.

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 361 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_StatusTypeDef HAL_FLASHEx_OBProgram ( FLASH_OBProgramInitTypeDef pOBInit)