Critical Issue
You might observe an error if you try to read or write an MMU or MPU register via the Nios II Debugger.
To read an MPU region, execute the following steps:
- Set region
INDEXin theMPUBASEregister. - Exit and reenter debug mode, that is, single step.
- Set the
RDbit in theMPUACCregister. - Exit and reenter debug mode, that is, single step.
- Read back
MPUBASEfor pertinent information. - Read back
MPUACCfor pertinent information.
For a system with an MMU or MPU, this Workaroundallows you to read and write the current values of the registers. However, you cannot use it to control MPU regions or MMU TLB entries.
The debug core copies the Nios II processor’s register values to its internal memory when the processor enters debug mode. The debug core writes register values back to the processor only when the processor leaves debug mode. Therefore, if you attempt to set an MPU region with several consecutive values, only the last one, when leaving debug mode, is committed to the processor.