Skip to content

Commit ba95743

Browse files
committed
dts: arm: st: h7rs: Add zephyr,memory-attr to SRAM1 and SRAM2 regions
adds the `zephyr,memory-attr` property to the SRAM1 and SRAM2 memory nodes to explicitly define their MPU attributes as normal RAM. This ensures proper memory protection and caching behavior when these regions are used by the kernel or application. Resolve a Data Access Violation encountered during test, where the faulting address was 0x30000000. Note: add the zephyr,memory-attr property in the board overlay for SRAM2 to avoid conflict with the support of h7rs ethernet with MPU regions enabled. see link below for more details : https://github.com/zephyrproject-rtos/zephyr/pull/97364/files#r2439668915 Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent 815ea69 commit ba95743

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

dts/arm/st/h7rs/stm32h7rs.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
reg = <0x30000000 DT_SIZE_K(16)>;
6161
compatible = "zephyr,memory-region", "mmio-sram";
6262
zephyr,memory-region = "SRAM1";
63+
zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_RAM)>;
6364
};
6465

6566
/* System data RAM accessible over AHB bus: SRAM2 in D2 domain */
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&sram2 {
8+
zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_RAM)>;
9+
};

0 commit comments

Comments
 (0)