STM32L4xx_HAL_Driver  1.14.0
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: More...

Go to the source code of this file.

Functions

static void FLASH_MassErase (uint32_t Banks)
 Mass erase of FLASH memory. More...
 
static HAL_StatusTypeDef FLASH_OB_WRPConfig (uint32_t WRPArea, uint32_t WRPStartOffset, uint32_t WRDPEndOffset)
 Configure the write protection of the desired pages. More...
 
static HAL_StatusTypeDef FLASH_OB_RDPConfig (uint32_t RDPLevel)
 Set the read protection level. More...
 
static HAL_StatusTypeDef FLASH_OB_UserConfig (uint32_t UserType, uint32_t UserConfig)
 Program the FLASH User Option Byte. More...
 
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. More...
 
static void FLASH_OB_GetWRP (uint32_t WRPArea, uint32_t *WRPStartOffset, uint32_t *WRDPEndOffset)
 Return the FLASH Write Protection Option Bytes value. More...
 
static uint32_t FLASH_OB_GetRDP (void)
 Return the FLASH Read Protection level. More...
 
static uint32_t FLASH_OB_GetUser (void)
 Return the FLASH User Option Byte value. More...
 
static void FLASH_OB_GetPCROP (uint32_t *PCROPConfig, uint32_t *PCROPStartAddr, uint32_t *PCROPEndAddr)
 Return the FLASH Write Protection Option Bytes value. More...
 
HAL_StatusTypeDef HAL_FLASHEx_Erase (FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError)
 Perform a mass erase or erase the specified FLASH memory pages. More...
 
HAL_StatusTypeDef HAL_FLASHEx_Erase_IT (FLASH_EraseInitTypeDef *pEraseInit)
 Perform a mass erase or erase the specified FLASH memory pages with interrupt enabled. More...
 
HAL_StatusTypeDef HAL_FLASHEx_OBProgram (FLASH_OBProgramInitTypeDef *pOBInit)
 Program Option bytes. More...
 
void HAL_FLASHEx_OBGetConfig (FLASH_OBProgramInitTypeDef *pOBInit)
 Get the Option bytes configuration. More...
 
HAL_StatusTypeDef HAL_FLASHEx_ConfigLVEPin (uint32_t ConfigLVE)
 Configuration of the LVE pin of the Flash (managed by power controller or forced to low in order to use an external SMPS) More...
 
void FLASH_PageErase (uint32_t Page, uint32_t Banks)
 Erase the specified FLASH memory page. More...
 
void FLASH_FlushCaches (void)
 Flush the instruction and data caches. More...
 

Detailed Description

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

Author
MCD Application Team
  • Extended programming operations functions
==============================================================================
                  ##### 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 component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l4xx_hal_flash_ex.c.