Skip to content

Commit 66d1877

Browse files
committed
soc: st: stm32: stm32h7rs: enable mpu regions for SRAM1&2 access
Introduces two MPU regions for SRAM1 and SRAM2 with both 16KB size. Both regions use REGION_RAM_ATTR to provide read/write access and appropriate cacheability for SRAM-like memory. The regions were previously missing from the MPU configuration, causing the system to halt due to unauthorized access. These additions resolve a Data Access Violation encountered during test, where the faulting address was 0x30000000. Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent 1a06df6 commit 66d1877

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

soc/st/stm32/stm32h7rsx/mpu_regions.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ static const struct arm_mpu_region mpu_regions[] = {
2929

3030
/* Region 3 */
3131
MPU_REGION_ENTRY("SRAM_0", CONFIG_SRAM_BASE_ADDRESS, REGION_RAM_ATTR(REGION_SRAM_SIZE)),
32+
33+
/* Region 4 */
34+
MPU_REGION_ENTRY("SRAM_1", 0x30000000, REGION_RAM_ATTR(REGION_16K)),
35+
36+
/* Region 5 */
37+
MPU_REGION_ENTRY("SRAM_2", 0x30004000, REGION_RAM_ATTR(REGION_16K)),
3238
};
3339

3440
const struct arm_mpu_config mpu_config = {

0 commit comments

Comments
 (0)