Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

FLASHEx Memory Erasing functions

FLASHEx Memory Erasing functions
[FLASHEx Exported Functions]

FLASH Memory Erasing functions. More...

Functions

HAL_StatusTypeDef HAL_FLASHEx_Erase (FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError)
 Perform a mass erase or erase the specified FLASH memory pages.
HAL_StatusTypeDef HAL_FLASHEx_Erase_IT (FLASH_EraseInitTypeDef *pEraseInit)
 Perform a mass erase or erase the specified FLASH memory pages with interrupt enabled.

Detailed Description

FLASH Memory Erasing functions.

  ==============================================================================
                ##### FLASH Erasing Programming functions ##### 
  ==============================================================================

    [..] The FLASH Memory Erasing functions, includes the following functions:
    (+) @ref HAL_FLASHEx_Erase: return only when erase has been done
    (+) @ref HAL_FLASHEx_Erase_IT: end of erase is done when @ref HAL_FLASH_EndOfOperationCallback 
        is called with parameter 0xFFFFFFFF

    [..] Any operation of erase should follow these steps:
    (#) Call the @ref HAL_FLASH_Unlock() function to enable the flash control register and 
        program memory access.
    (#) Call the desired function to erase page.
    (#) Call the @ref HAL_FLASH_Lock() to disable the flash program memory access 
       (recommended to protect the FLASH memory against possible unwanted operation).


Function Documentation

HAL_StatusTypeDef HAL_FLASHEx_Erase ( FLASH_EraseInitTypeDef *  pEraseInit,
uint32_t *  PageError 
)

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

Note:
To correctly run this function, the HAL_FLASH_Unlock() function must be called before. Call the HAL_FLASH_Lock() to disable the flash memory access (recommended to protect the FLASH memory against possible unwanted operation)
Parameters:
[in]pEraseInitpointer to an FLASH_EraseInitTypeDef structure that contains the configuration information for the erasing.
[out]PageErrorpointer to variable that contains the configuration information on faulty page in case of error (0xFFFFFFFF means that all the pages have been correctly erased)
Return values:
HAL_StatusTypeDefHAL Status

Definition at line 176 of file stm32f1xx_hal_flash_ex.c.

HAL_StatusTypeDef HAL_FLASHEx_Erase_IT ( FLASH_EraseInitTypeDef *  pEraseInit )

Perform a mass erase or erase the specified FLASH memory pages with interrupt enabled.

Note:
To correctly run this function, the HAL_FLASH_Unlock() function must be called before. Call the HAL_FLASH_Lock() to disable the flash memory access (recommended to protect the FLASH memory against possible unwanted operation)
Parameters:
pEraseInitpointer to an FLASH_EraseInitTypeDef structure that contains the configuration information for the erasing.
Return values:
HAL_StatusTypeDefHAL Status

Definition at line 336 of file stm32f1xx_hal_flash_ex.c.