|
STM32 RTOS 0.2.3
Bare-metal preemptive RTOS for STM32F446RE
|
Flash access control (latency, prefetch, caches). More...
Data Structures | |
| struct | FlashRegisters_t |
| Flash interface register block. More... | |
Macros | |
| #define | FLASH_BASE (0x40023C00UL) |
| Flash interface base address (AHB1). | |
| #define | FLASH ((FlashRegisters_t *)FLASH_BASE) |
| The Flash interface instance. | |
Typedefs | |
| typedef struct FlashRegisters_t | FlashRegisters_t |
| Flash interface register block. | |
ACR - access control (0x00) | |
| #define | FLASH_ACR_LATENCY_Pos (0U) |
| Bits 3:0. | |
| #define | FLASH_ACR_LATENCY_Msk ((uint32_t)0xFU << FLASH_ACR_LATENCY_Pos) |
| rw Wait states (0-15). | |
| #define | FLASH_ACR_PRFTEN_Pos (8U) |
| Bit 8. | |
| #define | FLASH_ACR_PRFTEN ((uint32_t)1U << FLASH_ACR_PRFTEN_Pos) |
| rw Enable prefetch. | |
| #define | FLASH_ACR_ICEN_Pos (9U) |
| Bit 9. | |
| #define | FLASH_ACR_ICEN ((uint32_t)1U << FLASH_ACR_ICEN_Pos) |
| rw Enable the instruction cache. | |
| #define | FLASH_ACR_DCEN_Pos (10U) |
| Bit 10. | |
| #define | FLASH_ACR_DCEN ((uint32_t)1U << FLASH_ACR_DCEN_Pos) |
| rw Enable the data cache. | |
| #define | FLASH_ACR_ICRST_Pos (11U) |
| Bit 11. | |
| #define | FLASH_ACR_ICRST ((uint32_t)1U << FLASH_ACR_ICRST_Pos) |
| rw Reset the instruction cache; only while it is disabled. | |
| #define | FLASH_ACR_DCRST_Pos (12U) |
| Bit 12. | |
| #define | FLASH_ACR_DCRST ((uint32_t)1U << FLASH_ACR_DCRST_Pos) |
| rw Reset the data cache; only while it is disabled. | |
SR - status (0x0C) | |
| #define | FLASH_SR_EOP_Pos (0U) |
| Bit 0. | |
| #define | FLASH_SR_EOP ((uint32_t)1U << FLASH_SR_EOP_Pos) |
| rc_w1 End of operation. | |
| #define | FLASH_SR_WRPERR_Pos (4U) |
| Bit 4. | |
| #define | FLASH_SR_WRPERR ((uint32_t)1U << FLASH_SR_WRPERR_Pos) |
| rc_w1 Write-protection error. | |
| #define | FLASH_SR_BSY_Pos (16U) |
| Bit 16. | |
| #define | FLASH_SR_BSY ((uint32_t)1U << FLASH_SR_BSY_Pos) |
| ro A flash operation is in progress. | |
Flash access control (latency, prefetch, caches).
| #define FLASH_BASE (0x40023C00UL) |
Flash interface base address (AHB1).
Definition at line 22 of file flash_reg.h.
| #define FLASH ((FlashRegisters_t *)FLASH_BASE) |
The Flash interface instance.
Definition at line 36 of file flash_reg.h.
| #define FLASH_ACR_LATENCY_Pos (0U) |
Bits 3:0.
Definition at line 40 of file flash_reg.h.
Referenced by flashSetLatency(), and rccSysclkSwitch().
| #define FLASH_ACR_LATENCY_Msk ((uint32_t)0xFU << FLASH_ACR_LATENCY_Pos) |
rw Wait states (0-15).
Read back to confirm a change took effect.
Definition at line 42 of file flash_reg.h.
Referenced by flashSetLatency(), and rccSysclkSwitch().
| #define FLASH_ACR_PRFTEN_Pos (8U) |
Bit 8.
Definition at line 43 of file flash_reg.h.
| #define FLASH_ACR_PRFTEN ((uint32_t)1U << FLASH_ACR_PRFTEN_Pos) |
| #define FLASH_ACR_ICEN_Pos (9U) |
Bit 9.
Definition at line 46 of file flash_reg.h.
| #define FLASH_ACR_ICEN ((uint32_t)1U << FLASH_ACR_ICEN_Pos) |
rw Enable the instruction cache.
Definition at line 48 of file flash_reg.h.
Referenced by flashEnableCaches().
| #define FLASH_ACR_DCEN_Pos (10U) |
Bit 10.
Definition at line 49 of file flash_reg.h.
| #define FLASH_ACR_DCEN ((uint32_t)1U << FLASH_ACR_DCEN_Pos) |
rw Enable the data cache.
Definition at line 51 of file flash_reg.h.
Referenced by flashEnableCaches().
| #define FLASH_ACR_ICRST_Pos (11U) |
Bit 11.
Definition at line 52 of file flash_reg.h.
| #define FLASH_ACR_ICRST ((uint32_t)1U << FLASH_ACR_ICRST_Pos) |
rw Reset the instruction cache; only while it is disabled.
Definition at line 54 of file flash_reg.h.
| #define FLASH_ACR_DCRST_Pos (12U) |
Bit 12.
Definition at line 55 of file flash_reg.h.
| #define FLASH_ACR_DCRST ((uint32_t)1U << FLASH_ACR_DCRST_Pos) |
rw Reset the data cache; only while it is disabled.
Definition at line 57 of file flash_reg.h.
| #define FLASH_SR_EOP_Pos (0U) |
Bit 0.
Definition at line 62 of file flash_reg.h.
| #define FLASH_SR_EOP ((uint32_t)1U << FLASH_SR_EOP_Pos) |
rc_w1 End of operation.
Definition at line 64 of file flash_reg.h.
| #define FLASH_SR_WRPERR_Pos (4U) |
Bit 4.
Definition at line 65 of file flash_reg.h.
| #define FLASH_SR_WRPERR ((uint32_t)1U << FLASH_SR_WRPERR_Pos) |
rc_w1 Write-protection error.
Definition at line 67 of file flash_reg.h.
| #define FLASH_SR_BSY_Pos (16U) |
Bit 16.
Definition at line 68 of file flash_reg.h.
| #define FLASH_SR_BSY ((uint32_t)1U << FLASH_SR_BSY_Pos) |
ro A flash operation is in progress.
Definition at line 70 of file flash_reg.h.