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相关问题求教



Hi:

     我们使用的使C6670芯片,现在想使用MPU(memory protection Unit)来保护特定的内存范围。在阅读MPU的文档的时候有如下几个问题想请教各位大侠。

    1 在MPU文档SPRUGW5A KeyStone Architecture Memory Protection Unit (MPU) User Guide中有提到MPSAR寄存器,其中有一个Start Address位域,只有22bit,请问这个地址是什么地址?如果实际保护的起始地址使0x0c000000,那么MPSAR寄存器该填什么值

    2 在MPU文档SPRUGW5A KeyStone Architecture Memory Protection Unit (MPU) User Guide中有提到MPEAR寄存器,其中有一个End Address,只有22bit,请问这个地址是什么地址?如果实际保护的结束地址是0x0c100000,那么MPEAR寄存器该填什么值?

   谢谢!

  •  如手册有注明memory protection要保证page boundary align,每个memory page size是1kB,所以对于MPSAR的地10bit为0,在进行配置时需要把地址低10bitqingling后填入MPSAR,每一个memory保护的size也必须是page size的整数倍,所以end address低10bit是全1.

    请参考STK中robust例程:http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/t/47664.aspx

  • Andy:

        谢谢你的回答,我是否可以理解为MPSAR就是填入我需要保护的地址的高22bit,低10bit丢弃就可以,同样的方式填写MPEAR?

        STK的例程我正在阅读,谢谢你提供的支持。

  • 必须保证每一个受保护起始地址是1KB对齐,地址长度是1KB的整数倍,这样的话地址低10bit自动就是0。