File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 3636#define MPU_REGION_QSPI3 (MPU_REGION_NUMBER3)
3737#define MPU_REGION_SDRAM1 (MPU_REGION_NUMBER4)
3838#define MPU_REGION_SDRAM2 (MPU_REGION_NUMBER5)
39+ #define MPU_REGION_OPENAMP (MPU_REGION_NUMBER15)
3940
4041// Only relevant on CPUs with D-Cache, must be higher priority than SDRAM
4142#define MPU_REGION_DMA_UNCACHED_1 (MPU_REGION_NUMBER6)
9495 | MPU_REGION_ENABLE << MPU_RASR_ENABLE_Pos \
9596 )
9697
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+
97110static inline void mpu_init (void ) {
98111 MPU -> CTRL = MPU_PRIVILEGED_DEFAULT | MPU_CTRL_ENABLE_Msk ;
99112 SCB -> SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk ;
You can’t perform that action at this time.
0 commit comments