RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
stm32h7xx_hal_flash.h File Reference

Header file of FLASH HAL module. More...

#include "stm32h7xx_hal_def.h"
#include "stm32h7xx_hal_flash_ex.h"

Go to the source code of this file.

Data Structures

struct  FLASH_ProcessTypeDef
 FLASH handle Structure definition. More...
 

Macros

#define HAL_FLASH_ERROR_NONE   0x00000000U
 
#define HAL_FLASH_ERROR_WRP   FLASH_FLAG_WRPERR
 
#define HAL_FLASH_ERROR_PGS   FLASH_FLAG_PGSERR
 
#define HAL_FLASH_ERROR_STRB   FLASH_FLAG_STRBERR
 
#define HAL_FLASH_ERROR_INC   FLASH_FLAG_INCERR
 
#define HAL_FLASH_ERROR_RDP   FLASH_FLAG_RDPERR
 
#define HAL_FLASH_ERROR_RDS   FLASH_FLAG_RDSERR
 
#define HAL_FLASH_ERROR_SNECC   FLASH_FLAG_SNECCERR
 
#define HAL_FLASH_ERROR_DBECC   FLASH_FLAG_DBECCERR
 
#define HAL_FLASH_ERROR_CRCRD   FLASH_FLAG_CRCRDERR
 
#define HAL_FLASH_ERROR_WRP_BANK1   FLASH_FLAG_WRPERR_BANK1
 
#define HAL_FLASH_ERROR_PGS_BANK1   FLASH_FLAG_PGSERR_BANK1
 
#define HAL_FLASH_ERROR_STRB_BANK1   FLASH_FLAG_STRBERR_BANK1
 
#define HAL_FLASH_ERROR_INC_BANK1   FLASH_FLAG_INCERR_BANK1
 
#define HAL_FLASH_ERROR_RDP_BANK1   FLASH_FLAG_RDPERR_BANK1
 
#define HAL_FLASH_ERROR_RDS_BANK1   FLASH_FLAG_RDSERR_BANK1
 
#define HAL_FLASH_ERROR_SNECC_BANK1   FLASH_FLAG_SNECCERR_BANK1
 
#define HAL_FLASH_ERROR_DBECC_BANK1   FLASH_FLAG_DBECCERR_BANK1
 
#define HAL_FLASH_ERROR_CRCRD_BANK1   FLASH_FLAG_CRCRDERR_BANK1
 
#define HAL_FLASH_ERROR_WRP_BANK2   FLASH_FLAG_WRPERR_BANK2
 
#define HAL_FLASH_ERROR_PGS_BANK2   FLASH_FLAG_PGSERR_BANK2
 
#define HAL_FLASH_ERROR_STRB_BANK2   FLASH_FLAG_STRBERR_BANK2
 
#define HAL_FLASH_ERROR_INC_BANK2   FLASH_FLAG_INCERR_BANK2
 
#define HAL_FLASH_ERROR_RDP_BANK2   FLASH_FLAG_RDPERR_BANK2
 
#define HAL_FLASH_ERROR_RDS_BANK2   FLASH_FLAG_RDSERR_BANK2
 
#define HAL_FLASH_ERROR_SNECC_BANK2   FLASH_FLAG_SNECCERR_BANK2
 
#define HAL_FLASH_ERROR_DBECC_BANK2   FLASH_FLAG_DBECCERR_BANK2
 
#define HAL_FLASH_ERROR_CRCRD_BANK2   FLASH_FLAG_CRCRDERR_BANK2
 
#define HAL_FLASH_ERROR_OB_CHANGE   FLASH_OPTSR_OPTCHANGEERR
 
#define FLASH_TYPEPROGRAM_FLASHWORD   0x01U
 
#define FLASH_FLAG_BSY   FLASH_SR_BSY
 
#define FLASH_FLAG_WBNE   FLASH_SR_WBNE
 
#define FLASH_FLAG_QW   FLASH_SR_QW
 
#define FLASH_FLAG_CRC_BUSY   FLASH_SR_CRC_BUSY
 
#define FLASH_FLAG_EOP   FLASH_SR_EOP
 
#define FLASH_FLAG_WRPERR   FLASH_SR_WRPERR
 
#define FLASH_FLAG_PGSERR   FLASH_SR_PGSERR
 
#define FLASH_FLAG_STRBERR   FLASH_SR_STRBERR
 
#define FLASH_FLAG_INCERR   FLASH_SR_INCERR
 
#define FLASH_FLAG_RDPERR   FLASH_SR_RDPERR
 
#define FLASH_FLAG_RDSERR   FLASH_SR_RDSERR
 
#define FLASH_FLAG_SNECCERR   FLASH_SR_SNECCERR
 
#define FLASH_FLAG_DBECCERR   FLASH_SR_DBECCERR
 
#define FLASH_FLAG_CRCEND   FLASH_SR_CRCEND
 
#define FLASH_FLAG_CRCRDERR   FLASH_SR_CRCRDERR
 
#define FLASH_FLAG_BSY_BANK1   FLASH_SR_BSY
 
#define FLASH_FLAG_WBNE_BANK1   FLASH_SR_WBNE
 
#define FLASH_FLAG_QW_BANK1   FLASH_SR_QW
 
#define FLASH_FLAG_CRC_BUSY_BANK1   FLASH_SR_CRC_BUSY
 
#define FLASH_FLAG_EOP_BANK1   FLASH_SR_EOP
 
#define FLASH_FLAG_WRPERR_BANK1   FLASH_SR_WRPERR
 
#define FLASH_FLAG_PGSERR_BANK1   FLASH_SR_PGSERR
 
#define FLASH_FLAG_STRBERR_BANK1   FLASH_SR_STRBERR
 
#define FLASH_FLAG_INCERR_BANK1   FLASH_SR_INCERR
 
#define FLASH_FLAG_RDPERR_BANK1   FLASH_SR_RDPERR
 
#define FLASH_FLAG_RDSERR_BANK1   FLASH_SR_RDSERR
 
#define FLASH_FLAG_SNECCERR_BANK1   FLASH_SR_SNECCERR
 
#define FLASH_FLAG_DBECCERR_BANK1   FLASH_SR_DBECCERR
 
#define FLASH_FLAG_CRCEND_BANK1   FLASH_SR_CRCEND
 
#define FLASH_FLAG_CRCRDERR_BANK1   FLASH_SR_CRCRDERR
 
#define FLASH_FLAG_ALL_ERRORS_BANK1
 
#define FLASH_FLAG_ALL_BANK1
 
#define FLASH_FLAG_BSY_BANK2   (FLASH_SR_BSY | 0x80000000U)
 
#define FLASH_FLAG_WBNE_BANK2   (FLASH_SR_WBNE | 0x80000000U)
 
#define FLASH_FLAG_QW_BANK2   (FLASH_SR_QW | 0x80000000U)
 
#define FLASH_FLAG_CRC_BUSY_BANK2   (FLASH_SR_CRC_BUSY | 0x80000000U)
 
#define FLASH_FLAG_EOP_BANK2   (FLASH_SR_EOP | 0x80000000U)
 
#define FLASH_FLAG_WRPERR_BANK2   (FLASH_SR_WRPERR | 0x80000000U)
 
#define FLASH_FLAG_PGSERR_BANK2   (FLASH_SR_PGSERR | 0x80000000U)
 
#define FLASH_FLAG_STRBERR_BANK2   (FLASH_SR_STRBERR | 0x80000000U)
 
#define FLASH_FLAG_INCERR_BANK2   (FLASH_SR_INCERR | 0x80000000U)
 
#define FLASH_FLAG_RDPERR_BANK2   (FLASH_SR_RDPERR | 0x80000000U)
 
#define FLASH_FLAG_RDSERR_BANK2   (FLASH_SR_RDSERR | 0x80000000U)
 
#define FLASH_FLAG_SNECCERR_BANK2   (FLASH_SR_SNECCERR | 0x80000000U)
 
#define FLASH_FLAG_DBECCERR_BANK2   (FLASH_SR_DBECCERR | 0x80000000U)
 
#define FLASH_FLAG_CRCEND_BANK2   (FLASH_SR_CRCEND | 0x80000000U)
 
#define FLASH_FLAG_CRCRDERR_BANK2   (FLASH_SR_CRCRDERR | 0x80000000U)
 
#define FLASH_FLAG_ALL_ERRORS_BANK2
 
#define FLASH_FLAG_ALL_BANK2
 
#define FLASH_IT_EOP_BANK1   FLASH_CR_EOPIE
 
#define FLASH_IT_WRPERR_BANK1   FLASH_CR_WRPERRIE
 
#define FLASH_IT_PGSERR_BANK1   FLASH_CR_PGSERRIE
 
#define FLASH_IT_STRBERR_BANK1   FLASH_CR_STRBERRIE
 
#define FLASH_IT_INCERR_BANK1   FLASH_CR_INCERRIE
 
#define FLASH_IT_RDPERR_BANK1   FLASH_CR_RDPERRIE
 
#define FLASH_IT_RDSERR_BANK1   FLASH_CR_RDSERRIE
 
#define FLASH_IT_SNECCERR_BANK1   FLASH_CR_SNECCERRIE
 
#define FLASH_IT_DBECCERR_BANK1   FLASH_CR_DBECCERRIE
 
#define FLASH_IT_CRCEND_BANK1   FLASH_CR_CRCENDIE
 
#define FLASH_IT_CRCRDERR_BANK1   FLASH_CR_CRCRDERRIE
 
#define FLASH_IT_ALL_BANK1
 
#define FLASH_IT_EOP_BANK2   (FLASH_CR_EOPIE | 0x80000000U)
 
#define FLASH_IT_WRPERR_BANK2   (FLASH_CR_WRPERRIE | 0x80000000U)
 
#define FLASH_IT_PGSERR_BANK2   (FLASH_CR_PGSERRIE | 0x80000000U)
 
#define FLASH_IT_STRBERR_BANK2   (FLASH_CR_STRBERRIE | 0x80000000U)
 
#define FLASH_IT_INCERR_BANK2   (FLASH_CR_INCERRIE | 0x80000000U)
 
#define FLASH_IT_RDPERR_BANK2   (FLASH_CR_RDPERRIE | 0x80000000U)
 
#define FLASH_IT_RDSERR_BANK2   (FLASH_CR_RDSERRIE | 0x80000000U)
 
#define FLASH_IT_SNECCERR_BANK2   (FLASH_CR_SNECCERRIE | 0x80000000U)
 
#define FLASH_IT_DBECCERR_BANK2   (FLASH_CR_DBECCERRIE | 0x80000000U)
 
#define FLASH_IT_CRCEND_BANK2   (FLASH_CR_CRCENDIE | 0x80000000U)
 
#define FLASH_IT_CRCRDERR_BANK2   (FLASH_CR_CRCRDERRIE | 0x80000000U)
 
#define FLASH_IT_ALL_BANK2
 
#define FLASH_KEY1   0x45670123U
 
#define FLASH_KEY2   0xCDEF89ABU
 
#define FLASH_OPT_KEY1   0x08192A3BU
 
#define FLASH_OPT_KEY2   0x4C5D6E7FU
 
#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 __HAL_FLASH_SET_LATENCY(__LATENCY__)    MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(__LATENCY__))
 Set the FLASH Latency.
 
#define __HAL_FLASH_GET_LATENCY()   (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))
 Get the FLASH Latency.
 
#define __HAL_FLASH_ENABLE_IT_BANK1(__INTERRUPT__)   (FLASH->CR1 |= (__INTERRUPT__))
 Enable the specified FLASH interrupt.
 
#define __HAL_FLASH_ENABLE_IT_BANK2(__INTERRUPT__)   (FLASH->CR2 |= ((__INTERRUPT__) & 0x7FFFFFFFU))
 
#define __HAL_FLASH_ENABLE_IT(__INTERRUPT__)   __HAL_FLASH_ENABLE_IT_BANK1(__INTERRUPT__)
 
#define __HAL_FLASH_DISABLE_IT_BANK1(__INTERRUPT__)   (FLASH->CR1 &= ~(uint32_t)(__INTERRUPT__))
 Disable the specified FLASH interrupt.
 
#define __HAL_FLASH_DISABLE_IT_BANK2(__INTERRUPT__)   (FLASH->CR2 &= ~(uint32_t)((__INTERRUPT__) & 0x7FFFFFFFU))
 
#define __HAL_FLASH_DISABLE_IT(__INTERRUPT__)   __HAL_FLASH_DISABLE_IT_BANK1(__INTERRUPT__)
 
#define __HAL_FLASH_GET_FLAG_BANK1(__FLAG__)   (READ_BIT(FLASH->SR1, (__FLAG__)) == (__FLAG__))
 Checks whether the specified FLASH flag is set or not.
 
#define __HAL_FLASH_GET_FLAG_BANK2(__FLAG__)   (READ_BIT(FLASH->SR2, ((__FLAG__) & 0x7FFFFFFFU)) == (((__FLAG__) & 0x7FFFFFFFU)))
 
#define __HAL_FLASH_GET_FLAG(__FLAG__)   __HAL_FLASH_GET_FLAG_BANK1(__FLAG__)
 
#define __HAL_FLASH_CLEAR_FLAG_BANK1(__FLAG__)   WRITE_REG(FLASH->CCR1, (__FLAG__))
 Clear the specified FLASH flag.
 
#define __HAL_FLASH_CLEAR_FLAG_BANK2(__FLAG__)   WRITE_REG(FLASH->CCR2, ((__FLAG__) & 0x7FFFFFFFU))
 
#define __HAL_FLASH_CLEAR_FLAG(__FLAG__)   __HAL_FLASH_CLEAR_FLAG_BANK1(__FLAG__)
 
#define IS_FLASH_TYPEPROGRAM(VALUE)   ((VALUE) == FLASH_TYPEPROGRAM_FLASHWORD)
 
#define IS_FLASH_IT_BANK1(IT)   (((IT) & FLASH_IT_ALL_BANK1) == (IT))
 
#define IS_FLASH_FLAG_BANK1(FLAG)   (((FLAG) & FLASH_FLAG_ALL_BANK1) == (FLAG))
 
#define IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS)   (((ADDRESS) >= FLASH_BANK1_BASE) && ((ADDRESS) <= FLASH_END))
 
#define IS_FLASH_PROGRAM_ADDRESS(ADDRESS)   (IS_FLASH_PROGRAM_ADDRESS_BANK1(ADDRESS))
 
#define IS_BOOT_ADDRESS(ADDRESS)   ((ADDRESS) <= (0x3FFF0000U))
 
#define IS_FLASH_BANK(BANK)   ((BANK) == FLASH_BANK_1)
 
#define IS_FLASH_BANK_EXCLUSIVE(BANK)   ((BANK) == FLASH_BANK_1)
 

Enumerations

enum  FLASH_ProcedureTypeDef {
  FLASH_PROC_NONE = 0U , FLASH_PROC_SECTERASE_BANK1 , FLASH_PROC_MASSERASE_BANK1 , FLASH_PROC_PROGRAM_BANK1 ,
  FLASH_PROC_SECTERASE_BANK2 , FLASH_PROC_MASSERASE_BANK2 , FLASH_PROC_PROGRAM_BANK2 , FLASH_PROC_ALLBANK_MASSERASE
}
 FLASH Procedure structure definition.
 

Functions

HAL_StatusTypeDef HAL_FLASH_Program (uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
 
HAL_StatusTypeDef HAL_FLASH_Program_IT (uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
 
void HAL_FLASH_IRQHandler (void)
 
void HAL_FLASH_EndOfOperationCallback (uint32_t ReturnValue)
 
void HAL_FLASH_OperationErrorCallback (uint32_t ReturnValue)
 
HAL_StatusTypeDef HAL_FLASH_Unlock (void)
 
HAL_StatusTypeDef HAL_FLASH_Lock (void)
 
HAL_StatusTypeDef HAL_FLASH_OB_Unlock (void)
 
HAL_StatusTypeDef HAL_FLASH_OB_Lock (void)
 
HAL_StatusTypeDef HAL_FLASH_OB_Launch (void)
 
uint32_t HAL_FLASH_GetError (void)
 
HAL_StatusTypeDef FLASH_WaitForLastOperation (uint32_t Timeout, uint32_t Bank)
 
HAL_StatusTypeDef FLASH_OB_WaitForLastOperation (uint32_t Timeout)
 
HAL_StatusTypeDef FLASH_CRC_WaitForLastOperation (uint32_t Timeout, uint32_t Bank)
 

Variables

FLASH_ProcessTypeDef pFlash
 

Detailed Description

Header file of FLASH HAL module.

Author
MCD Application Team
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.