Keil Logo

ARM: MPU configuration causes hardfault


Information in this knowledgebase article applies to:

  • MDK-ARM V5.23 and newer

SYMPTOM

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.

CAUSE

Probably the address-range is configured as Not-Shareable by the chip vendor.

RESOLUTION

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:

MORE INFORMATION

Last Reviewed: Friday, April 7, 2017


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.