| |||
| Home > System Control Coprocessor > About the system control coprocessor > Use of the system control coprocessor | |||
This section describes the general method for use of the system control coprocessor.
You can access system control coprocessor CP15 registers with MRC and MCR instructions.
MCR{cond} P15,<Opcode_1>,<Rd>,<CRn>,<CRm>,<Opcode_2>
MRC{cond} P15,<Opcode_1>,<Rd>,<CRn>,<CRm>,<Opcode_2>
Figure 3.9 shows the instruction bit pattern of MRC and MCR instructions.
The CRn field of MRC and MCR instructions specifies the coprocessor register to access. The CRm field and Opcode_2 fields specify a particular operation when addressing registers. The L bit distinguishes between an MRC (L=1) and an MCR (L=0).
Instructions CDP, LDC, and STC, together with unprivileged MRC and MCR instructions to privileged-only CP15 registers, and Non-secure accesses to Secure registers, cause the processor to take the Undefined instruction trap.
Attempting to read from a nonreadable register, or to write to a nonwriteable register causes Undefined exceptions.
The Opcode_1, Opcode_2, and CRm fields Should Be Zero in all instructions that access CP15, except when the values specified are used to select required operations. Using other values results in Undefined exceptions.
In all cases, reading from or writing any data values to any CP15 registers, including those fields specified as Unpredictable (UNP), Should Be One (SBO), or Should Be Zero (SBZ), does not cause any physical damage to the chip.