-
Notifications
You must be signed in to change notification settings - Fork 8.1k
stm32: tests: drivers : fix mpu faults by enabling SRAM clocks and configuring MPU regions on stm32h7rsx #97731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,13 +60,19 @@ | |
| reg = <0x30000000 DT_SIZE_K(16)>; | ||
| compatible = "zephyr,memory-region", "mmio-sram"; | ||
| zephyr,memory-region = "SRAM1"; | ||
| zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_RAM)>; | ||
| }; | ||
|
|
||
| /* System data RAM accessible over AHB bus: SRAM2 in D2 domain */ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make SRAM2 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| sram2: memory@30004000 { | ||
| compatible = "zephyr,memory-region", "mmio-sram"; | ||
| reg = <0x30004000 DT_SIZE_K(16)>; | ||
| zephyr,memory-region = "SRAM2"; | ||
| /* Disable SRAM2 by default to avoid unintended access. | ||
| * To enable it, explicitly define zephyr,memory-attr | ||
| * to configure MPU attributes. | ||
| */ | ||
| status = "disabled"; | ||
| }; | ||
|
|
||
| dtcm: memory@20000000 { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /* | ||
| * Copyright (c) 2025 STMicroelectronics | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| &sram2 { | ||
| zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_RAM)>; | ||
mathieuchopstm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| status = "okay"; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should
sram1mapping attributes also be set by the system overlay, or at least the board?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I previously did that https://github.com/zephyrproject-rtos/zephyr/pull/97731#discussion_r2436709223 but is better to do it this way unless there is a conflict, such as with SRAM2