This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MPU violation with SC300 on ST33F1M

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.

0