|
STM32F439xx HAL User Manual
|
Header file of FLASH HAL Extension module. More...
#include "stm32f4xx_hal_def.h"Go to the source code of this file.
Data Structures | |
| struct | FLASH_EraseInitTypeDef |
| FLASH Erase structure definition. More... | |
| struct | FLASH_OBProgramInitTypeDef |
| FLASH Option Bytes Program structure definition. More... | |
| struct | FLASH_AdvOBProgramInitTypeDef |
| FLASH Advanced Option Bytes Program structure definition. More... | |
Defines | |
| #define | FLASH_TYPEERASE_SECTORS 0x00000000U |
| #define | FLASH_TYPEERASE_MASSERASE 0x00000001U |
| #define | FLASH_VOLTAGE_RANGE_1 0x00000000U |
| #define | FLASH_VOLTAGE_RANGE_2 0x00000001U |
| #define | FLASH_VOLTAGE_RANGE_3 0x00000002U |
| #define | FLASH_VOLTAGE_RANGE_4 0x00000003U |
| #define | OB_WRPSTATE_DISABLE 0x00000000U |
| #define | OB_WRPSTATE_ENABLE 0x00000001U |
| #define | OPTIONBYTE_WRP 0x00000001U |
| #define | OPTIONBYTE_RDP 0x00000002U |
| #define | OPTIONBYTE_USER 0x00000004U |
| #define | OPTIONBYTE_BOR 0x00000008U |
| #define | OB_RDP_LEVEL_0 ((uint8_t)0xAA) |
| #define | OB_RDP_LEVEL_1 ((uint8_t)0x55) |
| #define | OB_RDP_LEVEL_2 ((uint8_t)0xCC) |
| #define | OB_IWDG_SW ((uint8_t)0x20) |
| #define | OB_IWDG_HW ((uint8_t)0x00) |
| #define | OB_STOP_NO_RST ((uint8_t)0x40) |
| #define | OB_STOP_RST ((uint8_t)0x00) |
| #define | OB_STDBY_NO_RST ((uint8_t)0x80) |
| #define | OB_STDBY_RST ((uint8_t)0x00) |
| #define | OB_BOR_LEVEL3 ((uint8_t)0x00) |
| #define | OB_BOR_LEVEL2 ((uint8_t)0x04) |
| #define | OB_BOR_LEVEL1 ((uint8_t)0x08) |
| #define | OB_BOR_OFF ((uint8_t)0x0C) |
| #define | OB_PCROP_STATE_DISABLE 0x00000000U |
| #define | OB_PCROP_STATE_ENABLE 0x00000001U |
| #define | OPTIONBYTE_PCROP 0x00000001U |
| #define | OPTIONBYTE_BOOTCONFIG 0x00000002U |
| #define | FLASH_LATENCY_0 FLASH_ACR_LATENCY_0WS |
| #define | FLASH_LATENCY_1 FLASH_ACR_LATENCY_1WS |
| #define | FLASH_LATENCY_2 FLASH_ACR_LATENCY_2WS |
| #define | FLASH_LATENCY_3 FLASH_ACR_LATENCY_3WS |
| #define | FLASH_LATENCY_4 FLASH_ACR_LATENCY_4WS |
| #define | FLASH_LATENCY_5 FLASH_ACR_LATENCY_5WS |
| #define | FLASH_LATENCY_6 FLASH_ACR_LATENCY_6WS |
| #define | FLASH_LATENCY_7 FLASH_ACR_LATENCY_7WS |
| #define | FLASH_LATENCY_8 FLASH_ACR_LATENCY_8WS |
| #define | FLASH_LATENCY_9 FLASH_ACR_LATENCY_9WS |
| #define | FLASH_LATENCY_10 FLASH_ACR_LATENCY_10WS |
| #define | FLASH_LATENCY_11 FLASH_ACR_LATENCY_11WS |
| #define | FLASH_LATENCY_12 FLASH_ACR_LATENCY_12WS |
| #define | FLASH_LATENCY_13 FLASH_ACR_LATENCY_13WS |
| #define | FLASH_LATENCY_14 FLASH_ACR_LATENCY_14WS |
| #define | FLASH_LATENCY_15 FLASH_ACR_LATENCY_15WS |
| #define | FLASH_BANK_1 1U |
| #define | FLASH_BANK_2 2U |
| #define | FLASH_BANK_BOTH ((uint32_t)FLASH_BANK_1 | FLASH_BANK_2) |
| #define | FLASH_MER_BIT (FLASH_CR_MER1 | FLASH_CR_MER2) |
| #define | FLASH_SECTOR_0 0U |
| #define | FLASH_SECTOR_1 1U |
| #define | FLASH_SECTOR_2 2U |
| #define | FLASH_SECTOR_3 3U |
| #define | FLASH_SECTOR_4 4U |
| #define | FLASH_SECTOR_5 5U |
| #define | FLASH_SECTOR_6 6U |
| #define | FLASH_SECTOR_7 7U |
| #define | FLASH_SECTOR_8 8U |
| #define | FLASH_SECTOR_9 9U |
| #define | FLASH_SECTOR_10 10U |
| #define | FLASH_SECTOR_11 11U |
| #define | FLASH_SECTOR_12 12U |
| #define | FLASH_SECTOR_13 13U |
| #define | FLASH_SECTOR_14 14U |
| #define | FLASH_SECTOR_15 15U |
| #define | FLASH_SECTOR_16 16U |
| #define | FLASH_SECTOR_17 17U |
| #define | FLASH_SECTOR_18 18U |
| #define | FLASH_SECTOR_19 19U |
| #define | FLASH_SECTOR_20 20U |
| #define | FLASH_SECTOR_21 21U |
| #define | FLASH_SECTOR_22 22U |
| #define | FLASH_SECTOR_23 23U |
| #define | OB_WRP_SECTOR_0 0x00000001U |
| #define | OB_WRP_SECTOR_1 0x00000002U |
| #define | OB_WRP_SECTOR_2 0x00000004U |
| #define | OB_WRP_SECTOR_3 0x00000008U |
| #define | OB_WRP_SECTOR_4 0x00000010U |
| #define | OB_WRP_SECTOR_5 0x00000020U |
| #define | OB_WRP_SECTOR_6 0x00000040U |
| #define | OB_WRP_SECTOR_7 0x00000080U |
| #define | OB_WRP_SECTOR_8 0x00000100U |
| #define | OB_WRP_SECTOR_9 0x00000200U |
| #define | OB_WRP_SECTOR_10 0x00000400U |
| #define | OB_WRP_SECTOR_11 0x00000800U |
| #define | OB_WRP_SECTOR_12 0x00000001U << 12U |
| #define | OB_WRP_SECTOR_13 0x00000002U << 12U |
| #define | OB_WRP_SECTOR_14 0x00000004U << 12U |
| #define | OB_WRP_SECTOR_15 0x00000008U << 12U |
| #define | OB_WRP_SECTOR_16 0x00000010U << 12U |
| #define | OB_WRP_SECTOR_17 0x00000020U << 12U |
| #define | OB_WRP_SECTOR_18 0x00000040U << 12U |
| #define | OB_WRP_SECTOR_19 0x00000080U << 12U |
| #define | OB_WRP_SECTOR_20 0x00000100U << 12U |
| #define | OB_WRP_SECTOR_21 0x00000200U << 12U |
| #define | OB_WRP_SECTOR_22 0x00000400U << 12U |
| #define | OB_WRP_SECTOR_23 0x00000800U << 12U |
| #define | OB_WRP_SECTOR_All 0x00000FFFU << 12U |
| #define | OB_PCROP_SECTOR_0 0x00000001U |
| #define | OB_PCROP_SECTOR_1 0x00000002U |
| #define | OB_PCROP_SECTOR_2 0x00000004U |
| #define | OB_PCROP_SECTOR_3 0x00000008U |
| #define | OB_PCROP_SECTOR_4 0x00000010U |
| #define | OB_PCROP_SECTOR_5 0x00000020U |
| #define | OB_PCROP_SECTOR_6 0x00000040U |
| #define | OB_PCROP_SECTOR_7 0x00000080U |
| #define | OB_PCROP_SECTOR_8 0x00000100U |
| #define | OB_PCROP_SECTOR_9 0x00000200U |
| #define | OB_PCROP_SECTOR_10 0x00000400U |
| #define | OB_PCROP_SECTOR_11 0x00000800U |
| #define | OB_PCROP_SECTOR_12 0x00000001U |
| #define | OB_PCROP_SECTOR_13 0x00000002U |
| #define | OB_PCROP_SECTOR_14 0x00000004U |
| #define | OB_PCROP_SECTOR_15 0x00000008U |
| #define | OB_PCROP_SECTOR_16 0x00000010U |
| #define | OB_PCROP_SECTOR_17 0x00000020U |
| #define | OB_PCROP_SECTOR_18 0x00000040U |
| #define | OB_PCROP_SECTOR_19 0x00000080U |
| #define | OB_PCROP_SECTOR_20 0x00000100U |
| #define | OB_PCROP_SECTOR_21 0x00000200U |
| #define | OB_PCROP_SECTOR_22 0x00000400U |
| #define | OB_PCROP_SECTOR_23 0x00000800U |
| #define | OB_PCROP_SECTOR_All 0x00000FFFU |
| #define | OB_DUAL_BOOT_ENABLE ((uint8_t)0x10) |
| #define | OB_DUAL_BOOT_DISABLE ((uint8_t)0x00) |
| #define | OB_PCROP_DESELECTED ((uint8_t)0x00) |
| #define | OB_PCROP_SELECTED ((uint8_t)0x80) |
| #define | FLASH_SECTOR_TOTAL 24U |
| #define | OPTCR1_BYTE2_ADDRESS 0x40023C1AU |
| OPTCR1 register byte 2 (Bits[23:16]) base address. | |
| #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_PCROPSTATE(VALUE) |
| #define | IS_OBEX(VALUE) |
| #define | IS_FLASH_LATENCY(LATENCY) |
| #define | IS_FLASH_BANK(BANK) |
| #define | IS_FLASH_SECTOR(SECTOR) |
| #define | IS_FLASH_ADDRESS(ADDRESS) |
| #define | IS_FLASH_NBSECTORS(NBSECTORS) (((NBSECTORS) != 0) && ((NBSECTORS) <= FLASH_SECTOR_TOTAL)) |
| #define | IS_OB_WRP_SECTOR(SECTOR) ((((SECTOR) & 0xFF000000U) == 0x00000000U) && ((SECTOR) != 0x00000000U)) |
| #define | IS_OB_PCROP(SECTOR) ((((SECTOR) & 0xFFFFF000U) == 0x00000000U) && ((SECTOR) != 0x00000000U)) |
| #define | IS_OB_BOOT(BOOT) (((BOOT) == OB_DUAL_BOOT_ENABLE) || ((BOOT) == OB_DUAL_BOOT_DISABLE)) |
| #define | IS_OB_PCROP_SELECT(PCROP) (((PCROP) == OB_PCROP_SELECTED) || ((PCROP) == OB_PCROP_DESELECTED)) |
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. | |
| void | FLASH_Erase_Sector (uint32_t Sector, uint8_t VoltageRange) |
| Erase the specified FLASH memory sector. | |
| void | FLASH_FlushCaches (void) |
| Flush the instruction and data caches. | |
Header file of FLASH HAL Extension module.
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.
Definition in file stm32f4xx_hal_flash_ex.h.
1.7.6.1