STM CMSIS
stm32f4xx_hal_flash_ex.h File Reference

Header file of FLASH HAL Extension module. More...

Go to the source code of this file.

Classes

struct  FLASH_EraseInitTypeDef
 FLASH Erase structure definition. More...
 
struct  FLASH_OBProgramInitTypeDef
 FLASH Option Bytes Program structure definition. More...
 

Macros

#define FLASH_TYPEERASE_SECTORS   ((uint32_t)0x00U)
 
#define FLASH_TYPEERASE_MASSERASE   ((uint32_t)0x01U)
 
#define FLASH_VOLTAGE_RANGE_1   ((uint32_t)0x00U)
 
#define FLASH_VOLTAGE_RANGE_2   ((uint32_t)0x01U)
 
#define FLASH_VOLTAGE_RANGE_3   ((uint32_t)0x02U)
 
#define FLASH_VOLTAGE_RANGE_4   ((uint32_t)0x03U)
 
#define OB_WRPSTATE_DISABLE   ((uint32_t)0x00U)
 
#define OB_WRPSTATE_ENABLE   ((uint32_t)0x01U)
 
#define OPTIONBYTE_WRP   ((uint32_t)0x01U)
 
#define OPTIONBYTE_RDP   ((uint32_t)0x02U)
 
#define OPTIONBYTE_USER   ((uint32_t)0x04U)
 
#define OPTIONBYTE_BOR   ((uint32_t)0x08U)
 
#define OB_RDP_LEVEL_0   ((uint8_t)0xAAU)
 
#define OB_RDP_LEVEL_1   ((uint8_t)0x55U)
 
#define OB_RDP_LEVEL_2   ((uint8_t)0xCCU)
 
#define OB_IWDG_SW   ((uint8_t)0x20U)
 
#define OB_IWDG_HW   ((uint8_t)0x00U)
 
#define OB_STOP_NO_RST   ((uint8_t)0x40U)
 
#define OB_STOP_RST   ((uint8_t)0x00U)
 
#define OB_STDBY_NO_RST   ((uint8_t)0x80U)
 
#define OB_STDBY_RST   ((uint8_t)0x00U)
 
#define OB_BOR_LEVEL3   ((uint8_t)0x00U)
 
#define OB_BOR_LEVEL2   ((uint8_t)0x04U)
 
#define OB_BOR_LEVEL1   ((uint8_t)0x08U)
 
#define OB_BOR_OFF   ((uint8_t)0x0CU)
 
#define IS_FLASH_TYPEERASE(VALUE)
 
#define IS_VOLTAGERANGE(RANGE)
 
#define IS_WRPSTATE(VALUE)
 
#define IS_OPTIONBYTE(VALUE)   (((VALUE) <= (OPTIONBYTE_WRP|OPTIONBYTE_RDP|OPTIONBYTE_USER|OPTIONBYTE_BOR)))
 
#define IS_OB_RDP_LEVEL(LEVEL)
 
#define IS_OB_IWDG_SOURCE(SOURCE)   (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW))
 
#define IS_OB_STOP_SOURCE(SOURCE)   (((SOURCE) == OB_STOP_NO_RST) || ((SOURCE) == OB_STOP_RST))
 
#define IS_OB_STDBY_SOURCE(SOURCE)   (((SOURCE) == OB_STDBY_NO_RST) || ((SOURCE) == OB_STDBY_RST))
 
#define IS_OB_BOR_LEVEL(LEVEL)
 
#define IS_FLASH_ADDRESS(ADDRESS)   (((ADDRESS) >= FLASH_BASE) && ((ADDRESS) <= FLASH_END))
 
#define IS_FLASH_NBSECTORS(NBSECTORS)   (((NBSECTORS) != 0) && ((NBSECTORS) <= FLASH_SECTOR_TOTAL))
 

Functions

HAL_StatusTypeDef HAL_FLASHEx_Erase (FLASH_EraseInitTypeDef *pEraseInit, uint32_t *SectorError)
 
HAL_StatusTypeDef HAL_FLASHEx_Erase_IT (FLASH_EraseInitTypeDef *pEraseInit)
 
HAL_StatusTypeDef HAL_FLASHEx_OBProgram (FLASH_OBProgramInitTypeDef *pOBInit)
 
void HAL_FLASHEx_OBGetConfig (FLASH_OBProgramInitTypeDef *pOBInit)
 
void FLASH_Erase_Sector (uint32_t Sector, uint8_t VoltageRange)
 
void FLASH_FlushCaches (void)
 

Detailed Description

Header file of FLASH HAL Extension module.

Author
MCD Application Team
Version
V1.5.0
Date
06-May-2016
Attention

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.