Skip to content

Commit 11a8ff6

Browse files
committed
soc: st: stm32: stm32h7rsx: configure special_region to resolve access violation
Adds an MPU region named SPECIAL_REGION at address 0x08FFF000 with a size of 4 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 11a8ff6

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
@@ -22,6 +22,9 @@ static const struct arm_mpu_region mpu_regions[] = {
2222
/* Region 2 */
2323
MPU_REGION_ENTRY("FLASH_0", CONFIG_FLASH_BASE_ADDRESS,
2424
REGION_FLASH_ATTR(REGION_FLASH_SIZE)),
25+
26+
/* Special region */
27+
MPU_REGION_ENTRY("SPECIAL_REGION", 0x08fff000, REGION_FLASH_ATTR(REGION_4K)),
2528
#endif
2629

2730
/* Region 3 */

0 commit comments

Comments
 (0)