STM32F439xx HAL User Manual
Defines
FLASH Exported Macros
FLASH

Defines

#define __HAL_FLASH_SET_LATENCY(__LATENCY__)   (*(__IO uint8_t *)ACR_BYTE0_ADDRESS = (uint8_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_PREFETCH_BUFFER_ENABLE()   (FLASH->ACR |= FLASH_ACR_PRFTEN)
 Enable the FLASH prefetch buffer.
#define __HAL_FLASH_PREFETCH_BUFFER_DISABLE()   (FLASH->ACR &= (~FLASH_ACR_PRFTEN))
 Disable the FLASH prefetch buffer.
#define __HAL_FLASH_INSTRUCTION_CACHE_ENABLE()   (FLASH->ACR |= FLASH_ACR_ICEN)
 Enable the FLASH instruction cache.
#define __HAL_FLASH_INSTRUCTION_CACHE_DISABLE()   (FLASH->ACR &= (~FLASH_ACR_ICEN))
 Disable the FLASH instruction cache.
#define __HAL_FLASH_DATA_CACHE_ENABLE()   (FLASH->ACR |= FLASH_ACR_DCEN)
 Enable the FLASH data cache.
#define __HAL_FLASH_DATA_CACHE_DISABLE()   (FLASH->ACR &= (~FLASH_ACR_DCEN))
 Disable the FLASH data cache.
#define __HAL_FLASH_INSTRUCTION_CACHE_RESET()
 Resets the FLASH instruction Cache.
#define __HAL_FLASH_DATA_CACHE_RESET()
 Resets the FLASH data Cache.
#define __HAL_FLASH_ENABLE_IT(__INTERRUPT__)   (FLASH->CR |= (__INTERRUPT__))
 Enable the specified FLASH interrupt.
#define __HAL_FLASH_DISABLE_IT(__INTERRUPT__)   (FLASH->CR &= ~(uint32_t)(__INTERRUPT__))
 Disable the specified FLASH interrupt.
#define __HAL_FLASH_GET_FLAG(__FLAG__)   ((FLASH->SR & (__FLAG__)))
 Get the specified FLASH flag status.
#define __HAL_FLASH_CLEAR_FLAG(__FLAG__)   (FLASH->SR = (__FLAG__))
 Clear the specified FLASH flags.

Define Documentation

#define __HAL_FLASH_CLEAR_FLAG (   __FLAG__)    (FLASH->SR = (__FLAG__))

Clear the specified FLASH flags.

Parameters:
__FLAG__specifies the FLASH flags to clear. This parameter can be any combination of the following values:
  • FLASH_FLAG_EOP : FLASH End of Operation flag
  • FLASH_FLAG_OPERR : FLASH operation Error flag
  • FLASH_FLAG_WRPERR: FLASH Write protected error flag
  • FLASH_FLAG_PGAERR: FLASH Programming Alignment error flag
  • FLASH_FLAG_PGPERR: FLASH Programming Parallelism error flag
  • FLASH_FLAG_PGSERR: FLASH Programming Sequence error flag
  • FLASH_FLAG_RDERR : FLASH Read Protection error flag (PCROP) (*) (*) FLASH_FLAG_RDERR is not available for STM32F405xx/407xx/415xx/417xx devices
Return values:
none

Definition at line 307 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_SetErrorCode(), FLASH_WaitForLastOperation(), HAL_FLASH_IRQHandler(), and HAL_FLASHEx_Erase_IT().

#define __HAL_FLASH_DATA_CACHE_DISABLE ( )    (FLASH->ACR &= (~FLASH_ACR_DCEN))

Disable the FLASH data cache.

Return values:
none

Definition at line 237 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_FlushCaches().

#define __HAL_FLASH_DATA_CACHE_ENABLE ( )    (FLASH->ACR |= FLASH_ACR_DCEN)

Enable the FLASH data cache.

Return values:
none

Definition at line 231 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_FlushCaches(), and HAL_Init().

Value:
do {FLASH->ACR |= FLASH_ACR_DCRST;  \
                                           FLASH->ACR &= ~FLASH_ACR_DCRST; \
                                          }while(0U)

Resets the FLASH data Cache.

Note:
This function must be used only when the data Cache is disabled.
Return values:
None

Definition at line 253 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_FlushCaches().

#define __HAL_FLASH_DISABLE_IT (   __INTERRUPT__)    (FLASH->CR &= ~(uint32_t)(__INTERRUPT__))

Disable the specified FLASH interrupt.

Parameters:
__INTERRUPT__FLASH interrupt This parameter can be any combination of the following values:
  • FLASH_IT_EOP: End of FLASH Operation Interrupt
  • FLASH_IT_ERR: Error Interrupt
Return values:
none

Definition at line 274 of file stm32f4xx_hal_flash.h.

Referenced by HAL_FLASH_IRQHandler().

#define __HAL_FLASH_ENABLE_IT (   __INTERRUPT__)    (FLASH->CR |= (__INTERRUPT__))

Enable the specified FLASH interrupt.

Parameters:
__INTERRUPT__FLASH interrupt This parameter can be any combination of the following values:
  • FLASH_IT_EOP: End of FLASH Operation Interrupt
  • FLASH_IT_ERR: Error Interrupt
Return values:
none

Definition at line 264 of file stm32f4xx_hal_flash.h.

Referenced by HAL_FLASH_Program_IT(), and HAL_FLASHEx_Erase_IT().

#define __HAL_FLASH_GET_FLAG (   __FLAG__)    ((FLASH->SR & (__FLAG__)))

Get the specified FLASH flag status.

Parameters:
__FLAG__specifies the FLASH flags to check. This parameter can be any combination of the following values:
  • FLASH_FLAG_EOP : FLASH End of Operation flag
  • FLASH_FLAG_OPERR : FLASH operation Error flag
  • FLASH_FLAG_WRPERR: FLASH Write protected error flag
  • FLASH_FLAG_PGAERR: FLASH Programming Alignment error flag
  • FLASH_FLAG_PGPERR: FLASH Programming Parallelism error flag
  • FLASH_FLAG_PGSERR: FLASH Programming Sequence error flag
  • FLASH_FLAG_RDERR : FLASH Read Protection error flag (PCROP) (*)
  • FLASH_FLAG_BSY : FLASH Busy flag (*) FLASH_FLAG_RDERR is not available for STM32F405xx/407xx/415xx/417xx devices
Return values:
Thenew state of __FLAG__ (SET or RESET).

Definition at line 291 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_SetErrorCode(), FLASH_WaitForLastOperation(), and HAL_FLASH_IRQHandler().

#define __HAL_FLASH_GET_LATENCY ( )    (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))

Get the FLASH Latency.

Return values:
FLASHLatency The value of this parameter depend on device used within the same series

Definition at line 201 of file stm32f4xx_hal_flash.h.

Referenced by HAL_RCC_ClockConfig().

#define __HAL_FLASH_INSTRUCTION_CACHE_DISABLE ( )    (FLASH->ACR &= (~FLASH_ACR_ICEN))

Disable the FLASH instruction cache.

Return values:
none

Definition at line 225 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_FlushCaches().

#define __HAL_FLASH_INSTRUCTION_CACHE_ENABLE ( )    (FLASH->ACR |= FLASH_ACR_ICEN)

Enable the FLASH instruction cache.

Return values:
none

Definition at line 219 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_FlushCaches(), and HAL_Init().

Value:
do {FLASH->ACR |= FLASH_ACR_ICRST;  \
                                                  FLASH->ACR &= ~FLASH_ACR_ICRST; \
                                                 }while(0U)

Resets the FLASH instruction Cache.

Note:
This function must be used only when the Instruction Cache is disabled.
Return values:
None

Definition at line 244 of file stm32f4xx_hal_flash.h.

Referenced by FLASH_FlushCaches().

#define __HAL_FLASH_PREFETCH_BUFFER_DISABLE ( )    (FLASH->ACR &= (~FLASH_ACR_PRFTEN))

Disable the FLASH prefetch buffer.

Return values:
none

Definition at line 213 of file stm32f4xx_hal_flash.h.

#define __HAL_FLASH_PREFETCH_BUFFER_ENABLE ( )    (FLASH->ACR |= FLASH_ACR_PRFTEN)

Enable the FLASH prefetch buffer.

Return values:
none

Definition at line 207 of file stm32f4xx_hal_flash.h.

Referenced by HAL_Init().

#define __HAL_FLASH_SET_LATENCY (   __LATENCY__)    (*(__IO uint8_t *)ACR_BYTE0_ADDRESS = (uint8_t)(__LATENCY__))

Set the FLASH Latency.

Parameters:
__LATENCY__FLASH Latency The value of this parameter depend on device used within the same series
Return values:
none

Definition at line 194 of file stm32f4xx_hal_flash.h.

Referenced by HAL_RCC_ClockConfig().