File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 36
36
#define MPU_REGION_QSPI3 (MPU_REGION_NUMBER3)
37
37
#define MPU_REGION_SDRAM1 (MPU_REGION_NUMBER4)
38
38
#define MPU_REGION_SDRAM2 (MPU_REGION_NUMBER5)
39
+ #define MPU_REGION_OPENAMP (MPU_REGION_NUMBER15)
39
40
40
41
// Only relevant on CPUs with D-Cache, must be higher priority than SDRAM
41
42
#define MPU_REGION_DMA_UNCACHED_1 (MPU_REGION_NUMBER6)
94
95
| MPU_REGION_ENABLE << MPU_RASR_ENABLE_Pos \
95
96
)
96
97
98
+ #define MPU_CONFIG_SHARED_UNCACHED (size ) ( \
99
+ MPU_INSTRUCTION_ACCESS_DISABLE << MPU_RASR_XN_Pos \
100
+ | MPU_REGION_FULL_ACCESS << MPU_RASR_AP_Pos \
101
+ | MPU_TEX_LEVEL1 << MPU_RASR_TEX_Pos \
102
+ | MPU_ACCESS_SHAREABLE << MPU_RASR_S_Pos \
103
+ | MPU_ACCESS_NOT_CACHEABLE << MPU_RASR_C_Pos \
104
+ | MPU_ACCESS_NOT_BUFFERABLE << MPU_RASR_B_Pos \
105
+ | 0x00 << MPU_RASR_SRD_Pos \
106
+ | (size) << MPU_RASR_SIZE_Pos \
107
+ | MPU_REGION_ENABLE << MPU_RASR_ENABLE_Pos \
108
+ )
109
+
97
110
static inline void mpu_init (void ) {
98
111
MPU -> CTRL = MPU_PRIVILEGED_DEFAULT | MPU_CTRL_ENABLE_Msk ;
99
112
SCB -> SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk ;
You can’t perform that action at this time.
0 commit comments