File tree Expand file tree Collapse file tree
firmware/hw_layer/ports/stm32/stm32h7 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#ifndef STM32_NOCACHE_ENABLE
55#define STM32_NOCACHE_ENABLE TRUE
66#endif
7+
8+ #if STM32_NOCACHE_IN_AXI
9+ // first 16 Kb in AXI SRAM.
10+ #define STM32_NOCACHE_MPU_REGION MPU_REGION_6
11+ #define STM32_NOCACHE_RBAR 0x24000000U
12+ #define STM32_NOCACHE_RASR MPU_RASR_SIZE_16K
13+ #else
14+ // whole SRAM2 region.
15+ // NOTE: this region is not accesable by some bus master
16+ // For example by SDMMC1 !!!
717#define STM32_NOCACHE_MPU_REGION MPU_REGION_6
818#define STM32_NOCACHE_RBAR 0x30002000U
919#define STM32_NOCACHE_RASR MPU_RASR_SIZE_16K
20+ #endif
1021
1122/*
1223 * PWR system settings.
Original file line number Diff line number Diff line change 22#define CCM_OPTIONAL __attribute__((section(".ram5")))
33//TODO: update LD file!
44#define SDRAM_OPTIONAL __attribute__((section(".ram8")))
5- // SRAM3 is 32k and set to disable dcache
6- #define NO_CACHE __attribute__((aligned(4))) __attribute__((section(".ram3")))
5+ #if STM32_NOCACHE_IN_AXI
6+ #define NO_CACHE __attribute__((aligned(4))) __attribute__((section(".ram0")))
7+ #else
8+ // SRAM3 is 32k and set to disable dcache
9+ #define NO_CACHE __attribute__((aligned(4))) __attribute__((section(".ram3")))
10+ #endif
711
812#define BKUP_RAM_NOINIT __attribute__((section(".bkup_ram_noinit")))
You can’t perform that action at this time.
0 commit comments