Hi Team,
Can you please help me with the guidelines for reprogramming MPU regions on Cortex-v7M architecture?
From cortex_m7_trm we have the below section:
4.1.1 Initializing the MPU
If the processor has been implemented with a Memory Protection Unit (MPU), before you can use it you must enable the MPU in the MPU_CTRL register. See the ARM®v7-M Architecture Reference Manual for more information.
When setting up the MPU, and if the MPU has previously been programmed, disable unused regions to prevent any previous region settings from affecting the new MPU setup
My application has a fixed range of MPU region attributes updated at run-time to satisfy different requirements. So to have a safe update, i.e. not to have interference of previously active MPU region while reprogramming the same MPU region with new attributes and range do I need to disable the MPU region, before programming the new value, and then re-enable the MPU region?
`Arm® Cortex®-M7 Devices - Generic User Guide`, section `4.6.8 Updating an MPU region` describes methods to update MPU region as separate and multi-word writes.
Arm Cortex-M7 Devices Generic User Guide r1p2
It is explicitly mentioned to disable the MPU regions before reprogramming when the MPU region is updated using a single-word update whereas the same is not mentioned for the multi-word update method. Does this mean that if I use a multi-word update approach for efficiency I can skip disabling for updating a previously active MPU region?
Any suggestions are highly appreciated, thank you.