Can someone help me? I have some trouble with configuration of MPU in ARM MCU. I would configure two regions in RAM that are unprivileged permissions (RW for privileged and RO for unprivileged).
So, 1st region can write in here region but not in 2nd region.
I try this without success:
/* Region 6 setting: Memory with Normal type, not shareable, outer/inner write back */
MPU->RBAR = ARM_MPU_RBAR(6, 0x20000000U);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_URO, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_64KB);
/* Region 6 setting: Memory with Normal type, not shareable, outer/inner write back */
MPU->RBAR = ARM_MPU_RBAR(7, 0x20010000U);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_URO, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_64KB);
ARM_MPU_Enable(MPU_CTRL_PRIVDEFENA_Msk);
Any idea?
Thanks.
Morgan