From 47b225848deb2a40f34a9437887dcbc10b690dcc Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 12 Mar 2015 08:00:53 -0600 Subject: [PATCH] ARMv7-M MPU. Bad syntax will cause failure to write the correct value to the MPU_RASR register. From Juha Niskanen --- arch/arm/src/armv7-m/mpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/armv7-m/mpu.h b/arch/arm/src/armv7-m/mpu.h index f6b61816b37..a48be1f90ed 100644 --- a/arch/arm/src/armv7-m/mpu.h +++ b/arch/arm/src/armv7-m/mpu.h @@ -500,7 +500,7 @@ static inline void mpu_peripheral(uintptr_t base, size_t size) l2size = mpu_log2regionceil(size); subregions = mpu_subregion(base, size, l2size); - /* The configure the region */ + /* Then configure the region */ regval = MPU_RASR_ENABLE | /* Enable region */ MPU_RASR_SIZE_LOG2((uint32_t)l2size) | /* Region size */ @@ -508,7 +508,7 @@ static inline void mpu_peripheral(uintptr_t base, size_t size) MPU_RASR_S | /* Shareable */ MPU_RASR_B | /* Bufferable */ MPU_RASR_AP_RWNO | /* P:RW U:None */ - MPU_RASR_XN | /* Instruction access disable */ + MPU_RASR_XN; /* Instruction access disable */ putreg32(regval, MPU_RASR); }