From 755d3e7abf8aeca309017e5ce384dc1b3457812b Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Fri, 17 May 2024 11:02:13 +0200 Subject: [PATCH] imxrt: 1170 MPU config ensure no lockups can occur --- arch/arm/src/imxrt/imxrt117x_mpuinit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/imxrt/imxrt117x_mpuinit.c b/arch/arm/src/imxrt/imxrt117x_mpuinit.c index 2f5a9117ebacd..529705798fe85 100644 --- a/arch/arm/src/imxrt/imxrt117x_mpuinit.c +++ b/arch/arm/src/imxrt/imxrt117x_mpuinit.c @@ -51,6 +51,7 @@ MPU_RASR_XN; /* Execute-never to prevent instruction fetch */ putreg32(regval, MPU_RASR); +#ifdef CONFIG_IMXRT_SEMC mpu_configure_region(IMXRT_SEMC0_BASE, 512 * 1024 * 1024, /* Instruction access Enabled */ @@ -62,6 +63,7 @@ /* Not Shareable */ /* No Subregion disable */ ); +#endif mpu_configure_region(IMXRT_FLEXSPI2_CIPHER_BASE, 512 * 1024 * 1024, @@ -91,7 +93,7 @@ /* Instruction access Enabled */ - MPU_RASR_AP_RWRW | /* P:RW U:RW */ + MPU_RASR_AP_RORO | /* P:R0 U:R0 */ MPU_RASR_TEX_NOR /* Normal */ /* Not Cacheable */ /* Not Bufferable */