The MPC overrides are used to divide the address space into smaller regions and assign permissions to these regions.
When the device is reset, the memory in RAM and the non-volatile memory (NVM) is secure. Only secure CPUs and peripherals can read, write, or execute from secure memory.
To configure permission settings in a memory region, perform the following steps.
- Define the memory region by configuring STARTADDR and ENDADDR. The values must be multiples of the override region granularity, which is 4096.
- Use PERMMASK to define which of the access permissions in PERM to apply.
- Enable and lock the override using the CONFIG register.
To prevent unintended reconfiguration of MPC, all overrides should be safeguarded by using the LOCK bit in the CONFIG register.
Note: For overlapping regions, MPC will perform a logical OR between the permission bits.
The logical OR applies to both PERMMASK and PERM registers.
Because of this, it is not possible to retract the READ, WRITE or EXECUTE permissions.
For PERM.SECURE, the OR operation between Secure (1) and NonSecure (0) will result in a Secure overlap region.