ARM: MPU configuration causes hardfault
Information in this knowledgebase article applies to:
When initializing the MPU, I configure the on-chip RAM of my ST-device to Shareable, but my application ends up at a hardfault when I access the RAM.
Probably the address-range is configured as Not-Shareable by the chip vendor.
It is required to refer to the vendor manual for detailed information about Memory region shareability and cache policies.
As an example:
The STM32F7-Programming manual confirms:
If now you configure the MPU at address 0x20010000 as Shareable at the MPU-window of the µVision Debugger, the hardfault is triggered:
Last Reviewed: Friday, April 7, 2017
of your data.