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

Memory Protection Unit -R7

各位专家,您好!

       我enable R7的MPU后,发生软件跑飞的情况,不知道怎样入手调试。麻烦各位专家指导下,谢谢!

调试信息如下:


        /* Now we can safely enable the MPU in SCTLR register. */
        mrc             p15, #0, r0, c1, c0, #0
        orr             r0, r0, #MK_MPU_ENABLE
        dsb
        mcr             p15, #0, r0, c1, c0, #0
        isb

    (1)执行完上面的 mcr             p15, #0, r0, c1, c0, #0后,SCTLR寄存器的M位就被置1了,就使能MPU了,但执行完后,软件就跑飞了

    (2)在开启MPU前,通过在debug工具手动开启background region或者讲region 0的大小改为4G,就不会跑飞了。