Skip to content

Commit 5cd44f6

Browse files
committed
soc: st: stm32: stm32h7rsx: enable special_region to fix access violation
Adds an MPU region named SPECIAL_REGION at address 0x08FFF800 with a size of 2 KB in Flash memory. The region was previously unprotected, leading to an MPU fault when accessed. By marking it as executable and readable with appropriate flash memory attributes, the test now completes without triggering a fault. This change resolves a data Access Violation observed during multiple tests, where the faulting address was 0x08FFF808. Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent 7c82c06 commit 5cd44f6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

soc/st/stm32/stm32h7rsx/mpu_regions.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ static const struct arm_mpu_region mpu_regions[] = {
2626

2727
/* Region 3 */
2828
MPU_REGION_ENTRY("SRAM_0", CONFIG_SRAM_BASE_ADDRESS, REGION_RAM_ATTR(REGION_SRAM_SIZE)),
29+
30+
/* Special region */
31+
MPU_REGION_ENTRY("SPECIAL_REGION", 0x08fff800, REGION_FLASH_ATTR(REGION_2K)),
2932
};
3033

3134
const struct arm_mpu_config mpu_config = {

0 commit comments

Comments
 (0)