Prusa MINI Firmware overview
|
Go to the documentation of this file.
37 #ifndef __STM32F4xx_HAL_FLASH_H
38 #define __STM32F4xx_HAL_FLASH_H
106 #define HAL_FLASH_ERROR_NONE 0x00000000U
107 #define HAL_FLASH_ERROR_RD 0x00000001U
108 #define HAL_FLASH_ERROR_PGS 0x00000002U
109 #define HAL_FLASH_ERROR_PGP 0x00000004U
110 #define HAL_FLASH_ERROR_PGA 0x00000008U
111 #define HAL_FLASH_ERROR_WRP 0x00000010U
112 #define HAL_FLASH_ERROR_OPERATION 0x00000020U
120 #define FLASH_TYPEPROGRAM_BYTE 0x00000000U
121 #define FLASH_TYPEPROGRAM_HALFWORD 0x00000001U
122 #define FLASH_TYPEPROGRAM_WORD 0x00000002U
123 #define FLASH_TYPEPROGRAM_DOUBLEWORD 0x00000003U
132 #define FLASH_FLAG_EOP FLASH_SR_EOP
133 #define FLASH_FLAG_OPERR FLASH_SR_SOP
134 #define FLASH_FLAG_WRPERR FLASH_SR_WRPERR
135 #define FLASH_FLAG_PGAERR FLASH_SR_PGAERR
136 #define FLASH_FLAG_PGPERR FLASH_SR_PGPERR
137 #define FLASH_FLAG_PGSERR FLASH_SR_PGSERR
138 #if defined(FLASH_SR_RDERR)
139 #define FLASH_FLAG_RDERR FLASH_SR_RDERR
141 #define FLASH_FLAG_BSY FLASH_SR_BSY
150 #define FLASH_IT_EOP FLASH_CR_EOPIE
151 #define FLASH_IT_ERR 0x02000000U
159 #define FLASH_PSIZE_BYTE 0x00000000U
160 #define FLASH_PSIZE_HALF_WORD 0x00000100U
161 #define FLASH_PSIZE_WORD 0x00000200U
162 #define FLASH_PSIZE_DOUBLE_WORD 0x00000300U
163 #define CR_PSIZE_MASK 0xFFFFFCFFU
171 #define RDP_KEY ((uint16_t)0x00A5)
172 #define FLASH_KEY1 0x45670123U
173 #define FLASH_KEY2 0xCDEF89ABU
174 #define FLASH_OPT_KEY1 0x08192A3BU
175 #define FLASH_OPT_KEY2 0x4C5D6E7FU
194 #define __HAL_FLASH_SET_LATENCY(__LATENCY__) (*(__IO uint8_t *)ACR_BYTE0_ADDRESS = (uint8_t)(__LATENCY__))
201 #define __HAL_FLASH_GET_LATENCY() (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))
207 #define __HAL_FLASH_PREFETCH_BUFFER_ENABLE() (FLASH->ACR |= FLASH_ACR_PRFTEN)
213 #define __HAL_FLASH_PREFETCH_BUFFER_DISABLE() (FLASH->ACR &= (~FLASH_ACR_PRFTEN))
219 #define __HAL_FLASH_INSTRUCTION_CACHE_ENABLE() (FLASH->ACR |= FLASH_ACR_ICEN)
225 #define __HAL_FLASH_INSTRUCTION_CACHE_DISABLE() (FLASH->ACR &= (~FLASH_ACR_ICEN))
231 #define __HAL_FLASH_DATA_CACHE_ENABLE() (FLASH->ACR |= FLASH_ACR_DCEN)
237 #define __HAL_FLASH_DATA_CACHE_DISABLE() (FLASH->ACR &= (~FLASH_ACR_DCEN))
244 #define __HAL_FLASH_INSTRUCTION_CACHE_RESET() do {FLASH->ACR |= FLASH_ACR_ICRST; \
245 FLASH->ACR &= ~FLASH_ACR_ICRST; \
253 #define __HAL_FLASH_DATA_CACHE_RESET() do {FLASH->ACR |= FLASH_ACR_DCRST; \
254 FLASH->ACR &= ~FLASH_ACR_DCRST; \
264 #define __HAL_FLASH_ENABLE_IT(__INTERRUPT__) (FLASH->CR |= (__INTERRUPT__))
274 #define __HAL_FLASH_DISABLE_IT(__INTERRUPT__) (FLASH->CR &= ~(uint32_t)(__INTERRUPT__))
291 #define __HAL_FLASH_GET_FLAG(__FLAG__) ((FLASH->SR & (__FLAG__)))
307 #define __HAL_FLASH_CLEAR_FLAG(__FLAG__) (FLASH->SR = (__FLAG__))
379 #define ACR_BYTE0_ADDRESS 0x40023C00U
383 #define OPTCR_BYTE0_ADDRESS 0x40023C14U
387 #define OPTCR_BYTE1_ADDRESS 0x40023C15U
391 #define OPTCR_BYTE2_ADDRESS 0x40023C16U
395 #define OPTCR_BYTE3_ADDRESS 0x40023C17U
409 #define IS_FLASH_TYPEPROGRAM(VALUE)(((VALUE) == FLASH_TYPEPROGRAM_BYTE) || \
410 ((VALUE) == FLASH_TYPEPROGRAM_HALFWORD) || \
411 ((VALUE) == FLASH_TYPEPROGRAM_WORD) || \
412 ((VALUE) == FLASH_TYPEPROGRAM_DOUBLEWORD))
Definition: stm32f4xx_hal_flash.h:67
This file contains HAL common defines, enumeration, macros and structures definitions.
Header file of FLASH HAL Extension module.
__IO FLASH_ProcedureTypeDef ProcedureOnGoing
Definition: stm32f4xx_hal_flash.h:76
uint32_t HAL_FLASH_GetError(void)
Header file of FLASH RAMFUNC driver.
void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue)
__IO uint32_t ErrorCode
Definition: stm32f4xx_hal_flash.h:90
HAL_StatusTypeDef HAL_FLASH_Unlock(void)
__IO uint32_t Bank
Definition: stm32f4xx_hal_flash.h:84
Definition: stm32f4xx_hal_flash.h:68
HAL_StatusTypeDef HAL_FLASH_OB_Lock(void)
HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout)
HAL_LockTypeDef Lock
Definition: stm32f4xx_hal_flash.h:88
void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue)
FLASH_ProcedureTypeDef
FLASH Procedure structure definition.
Definition: stm32f4xx_hal_flash.h:63
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32f4xx_hal_def.h:55
__IO uint32_t Address
Definition: stm32f4xx_hal_flash.h:86
HAL_StatusTypeDef HAL_FLASH_Lock(void)
__IO uint8_t VoltageForErase
Definition: stm32f4xx_hal_flash.h:80
__IO uint32_t NbSectorsToErase
Definition: stm32f4xx_hal_flash.h:78
void HAL_FLASH_IRQHandler(void)
HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data)
Definition: stm32f4xx_hal_flash.h:66
const uint8_t[]
Definition: 404_html.c:3
HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void)
HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data)
FLASH handle Structure definition.
Definition: stm32f4xx_hal_flash.h:74
HAL_StatusTypeDef HAL_FLASH_OB_Launch(void)
HAL_LockTypeDef
HAL Lock structures definition.
Definition: stm32f4xx_hal_def.h:66
__IO uint32_t Sector
Definition: stm32f4xx_hal_flash.h:82
Definition: stm32f4xx_hal_flash.h:65