主题中讨论的其他部件:HALCOGEN
大家好:
如何禁用MPU功能? 例如将0写入某些寄存器?
祝你一切顺利
李
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
大家好:
如何禁用MPU功能? 例如将0写入某些寄存器?
祝你一切顺利
李
如何禁用MPU功能? [/引述]以下代码是禁用MPU的示例:
MRC P15,0,R1,C1,c0, 0;读取CP15寄存器1
BIC R1,R1,#0x1
DSB
MCR P15,0,R1,C1,c0, 0;禁用MPU
ISB.HALCoGen生成代码以配置MPU,启用MPU或禁用MPU:
_mpuInit_();
_mpuEnable_();
_mpuDisable_();
您可以使用c代码调用ARM指令。
ASM (" MRC P15,0,R1,C1,c0, 0英寸); //读取CP15寄存器1
ASM (" BIC R1,R1,#0x1");
ASM (" DSB");
ASM (" MCR P15,0,R1,C1,c0, 0); //禁用MPU
ASM (" ISB");
正如我所说,您可以调用“_mpuDisable_();”来禁用MPU。