| |||
| Home > Control Coprocessor CP15 > Register descriptions > c15, Cycle Counter Register (CCNT) | |||
The Cycle Counter Register counts the processor clock cycles. It is a 32-bit counter that can trigger an interrupt on overflow. You can use it in conjunction with the Performance Monitor Control Register and the two Counter Registers to provide a variety of useful metrics that enable you to optimize system performance.
You can access the Cycle Counter Register by reading or writing CP15 c15 with the Opcode_2 field set to 1:
MRC p15, 0, <Rd>, c15, c12, 1 ; Read Cycle Counter Register
MCR p15, 0, <Rd>, c15, c12, 1 ; Write Cycle Counter Register
The value in the Cycle Counter Register is Unpredictable at Reset. The counter can be set to zero by the Performance Monitor Control Register.
The Cycle Counter Register can be configured to count every 64th clock cycle by the Performance Monitor Control Register.