We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I'm facing some issue when I try to use MPU.
Here is the code :
r_MPU_Control = 0; r_MPU_Region_Num = 0x00000001; r_MPU_Region_BaseAdd = 0x00000000; r_MPU_Region_AttributeSize = 0x0300003F; r_MPU_Control = 1;
This means : - region 1 is selected - region base address is 0x00000000 - region size is 4 Gb with R/W/X rights and enabled.
(NB : the ST33F1M memory mapping fits in 4 Gb).
After the MPU is enabled, the 1st instruction executed leads to "hard fault" interruption.
What's wrong ?
Thanks in advance for your help.
Regards,
Laurent.
The setting look all right. Did you check that the compiler put the memory accesses in the correct order? I remember having had an issue with this. Also make sure there is an Instruction Synchronization Barrier following the MPU enable.
Regards Marcus http://www.doulos.com/arm/