STM32L443xx HAL User Manual
Functions
stm32l4xx_hal_flash_ex.c File Reference

Extended FLASH HAL module driver. This file provides firmware functions to manage the following functionalities of the FLASH extended peripheral: + Extended programming operations functions. More...

#include "stm32l4xx_hal.h"

Go to the source code of this file.

Functions

static void FLASH_MassErase (uint32_t Banks)
 Mass erase of FLASH memory.
static HAL_StatusTypeDef FLASH_OB_WRPConfig (uint32_t WRPArea, uint32_t WRPStartOffset, uint32_t WRDPEndOffset)
 Configure the write protection of the desired pages.
static HAL_StatusTypeDef FLASH_OB_RDPConfig (uint32_t RDPLevel)
 Set the read protection level.
static HAL_StatusTypeDef FLASH_OB_UserConfig (uint32_t UserType, uint32_t UserConfig)
 Program the FLASH User Option Byte.
static HAL_StatusTypeDef FLASH_OB_PCROPConfig (uint32_t PCROPConfig, uint32_t PCROPStartAddr, uint32_t PCROPEndAddr)
 Configure the Proprietary code readout protection of the desired addresses.
static void FLASH_OB_GetWRP (uint32_t WRPArea, uint32_t *WRPStartOffset, uint32_t *WRDPEndOffset)
 Return the FLASH Write Protection Option Bytes value.
static uint32_t FLASH_OB_GetRDP (void)
 Return the FLASH Read Protection level.
static uint32_t FLASH_OB_GetUser (void)
 Return the FLASH User Option Byte value.
static void FLASH_OB_GetPCROP (uint32_t *PCROPConfig, uint32_t *PCROPStartAddr, uint32_t *PCROPEndAddr)
 Return the FLASH Write Protection Option Bytes value.
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.
HAL_StatusTypeDef HAL_FLASHEx_OBProgram (FLASH_OBProgramInitTypeDef *pOBInit)
 Program Option bytes.
void HAL_FLASHEx_OBGetConfig (FLASH_OBProgramInitTypeDef *pOBInit)
 Get the Option bytes configuration.
void FLASH_PageErase (uint32_t Page, uint32_t Banks)
 Erase the specified FLASH memory page.
void FLASH_FlushCaches (void)
 Flush the instruction and data caches.

Detailed Description

Extended FLASH HAL module driver. This file provides firmware functions to manage the following functionalities of the FLASH extended peripheral: + Extended programming operations functions.

Author:
MCD Application Team
 ==============================================================================
                   ##### Flash Extended features #####
  ==============================================================================

  [..] Comparing to other previous devices, the FLASH interface for STM32L4xx
       devices contains the following additional features

       (+) Capacity up to 2 Mbyte with dual bank architecture supporting read-while-write
           capability (RWW)
       (+) Dual bank memory organization
       (+) PCROP protection for all banks

                        ##### How to use this driver #####
 ==============================================================================
  [..] This driver provides functions to configure and program the FLASH memory
       of all STM32L4xx devices. It includes
      (#) Flash Memory Erase functions:
           (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and
                HAL_FLASH_Lock() functions
           (++) Erase function: Erase page, erase all sectors
           (++) There are two modes of erase :
             (+++) Polling Mode using HAL_FLASHEx_Erase()
             (+++) Interrupt Mode using HAL_FLASHEx_Erase_IT()

      (#) Option Bytes Programming function: Use HAL_FLASHEx_OBProgram() to :
        (++) Set/Reset the write protection
        (++) Set the Read protection Level
        (++) Program the user Option Bytes
        (++) Configure the PCROP protection

      (#) Get Option Bytes Configuration function: Use HAL_FLASHEx_OBGetConfig() to :
        (++) Get the value of a write protection area
        (++) Know if the read protection is activated
        (++) Get the value of the user Option Bytes
        (++) Get the value of a PCROP area

 
Attention:

Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32l4xx_hal_flash_ex.c.