I am using a Kinetis K53. I am trying to set MPU_CESR to 0. Both lines of 'C' code below cause a bus fault. How do I set MPU_CESR to zero?
Currently, MPU_CESR == 0x00815100. I want to set it to zero. The code is executing in program flash.
//MPU_CESR=0;
*(unsigned long *)0x4000d000 = 0;
解決済! 解決策の投稿を見る。
HI,
The MPU needs a Privileged access to write to it (or supervisory mode, as mentioned in the Reference Manual). If not, then a Fault is generated meaning an unsolicited access was done.
To be in a supervisory mode, you need to look into ARM documentation for the specific core (M4 for the K53 family) to change the access type. When done, you should be able to have write access to this module.
Please, let us know if there anything else we can help you with.
HI,
The MPU needs a Privileged access to write to it (or supervisory mode, as mentioned in the Reference Manual). If not, then a Fault is generated meaning an unsolicited access was done.
To be in a supervisory mode, you need to look into ARM documentation for the specific core (M4 for the K53 family) to change the access type. When done, you should be able to have write access to this module.
Please, let us know if there anything else we can help you with.