Prusa MINI Firmware overview
FLASH Exported Macros
Collaboration diagram for FLASH Exported Macros:

Macros

#define __HAL_FLASH_SET_LATENCY(__LATENCY__)   (*(__IO uint8_t *)ACR_BYTE0_ADDRESS = (uint8_t)(__LATENCY__))
 Set the FLASH Latency. More...
 
#define __HAL_FLASH_GET_LATENCY()   (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))
 Get the FLASH Latency. More...
 
#define __HAL_FLASH_PREFETCH_BUFFER_ENABLE()   (FLASH->ACR |= FLASH_ACR_PRFTEN)
 Enable the FLASH prefetch buffer. More...
 
#define __HAL_FLASH_PREFETCH_BUFFER_DISABLE()   (FLASH->ACR &= (~FLASH_ACR_PRFTEN))
 Disable the FLASH prefetch buffer. More...
 
#define __HAL_FLASH_INSTRUCTION_CACHE_ENABLE()   (FLASH->ACR |= FLASH_ACR_ICEN)
 Enable the FLASH instruction cache. More...
 
#define __HAL_FLASH_INSTRUCTION_CACHE_DISABLE()   (FLASH->ACR &= (~FLASH_ACR_ICEN))
 Disable the FLASH instruction cache. More...
 
#define __HAL_FLASH_DATA_CACHE_ENABLE()   (FLASH->ACR |= FLASH_ACR_DCEN)
 Enable the FLASH data cache. More...
 
#define __HAL_FLASH_DATA_CACHE_DISABLE()   (FLASH->ACR &= (~FLASH_ACR_DCEN))
 Disable the FLASH data cache. More...
 
#define __HAL_FLASH_INSTRUCTION_CACHE_RESET()
 Resets the FLASH instruction Cache. More...
 
#define __HAL_FLASH_DATA_CACHE_RESET()
 Resets the FLASH data Cache. More...
 
#define __HAL_FLASH_ENABLE_IT(__INTERRUPT__)   (FLASH->CR |= (__INTERRUPT__))
 Enable the specified FLASH interrupt. More...
 
#define __HAL_FLASH_DISABLE_IT(__INTERRUPT__)   (FLASH->CR &= ~(uint32_t)(__INTERRUPT__))
 Disable the specified FLASH interrupt. More...
 
#define __HAL_FLASH_GET_FLAG(__FLAG__)   ((FLASH->SR & (__FLAG__)))
 Get the specified FLASH flag status. More...
 
#define __HAL_FLASH_CLEAR_FLAG(__FLAG__)   (FLASH->SR = (__FLAG__))
 Clear the specified FLASH flags. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_FLASH_SET_LATENCY

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

Set the FLASH Latency.

Parameters
<strong>LATENCY</strong>FLASH Latency The value of this parameter depend on device used within the same series
Return values
none

◆ __HAL_FLASH_GET_LATENCY

#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

◆ __HAL_FLASH_PREFETCH_BUFFER_ENABLE

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

Enable the FLASH prefetch buffer.

Return values
none

◆ __HAL_FLASH_PREFETCH_BUFFER_DISABLE

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

Disable the FLASH prefetch buffer.

Return values
none

◆ __HAL_FLASH_INSTRUCTION_CACHE_ENABLE

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

Enable the FLASH instruction cache.

Return values
none

◆ __HAL_FLASH_INSTRUCTION_CACHE_DISABLE

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

Disable the FLASH instruction cache.

Return values
none

◆ __HAL_FLASH_DATA_CACHE_ENABLE

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

Enable the FLASH data cache.

Return values
none

◆ __HAL_FLASH_DATA_CACHE_DISABLE

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

Disable the FLASH data cache.

Return values
none

◆ __HAL_FLASH_INSTRUCTION_CACHE_RESET

#define __HAL_FLASH_INSTRUCTION_CACHE_RESET ( )
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

◆ __HAL_FLASH_DATA_CACHE_RESET

#define __HAL_FLASH_DATA_CACHE_RESET ( )
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

◆ __HAL_FLASH_ENABLE_IT

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

Enable the specified FLASH interrupt.

Parameters
<strong>INTERRUPT</strong>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

◆ __HAL_FLASH_DISABLE_IT

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

Disable the specified FLASH interrupt.

Parameters
<strong>INTERRUPT</strong>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

◆ __HAL_FLASH_GET_FLAG

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

Get the specified FLASH flag status.

Parameters
<strong>FLAG</strong>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).

◆ __HAL_FLASH_CLEAR_FLAG

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

Clear the specified FLASH flags.

Parameters
<strong>FLAG</strong>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