title: Time measurement using Performance Monitors Register on Cortex-A72
body: <p>I am writing the Bare Metal program on ARM Cortex-A72. I follow some examples to configure the Performance Monitors Registers to do timing measurement.</p>
  <p>The initializing step is as below:</p>
  <p>Set bit EN, ER, CR (bit 0, 2, 3) of <strong>PMUSERENR_EL0</strong> to 1</p>
  <p>Set bit E, C, P (bit 0, 1, 2) of <strong>PMCR_EL0</strong> to 1</p>
  <p>Set bit C (bit 31) of <strong>PMCNTENSET_EL0</strong> to 1</p>
  <p>After initalize, I read back the register value is:</p>
  <p>PMUSERENR_EL0 : 0xD
  PMCR_EL0 : 0x41023001
  PMCNTENSET_EL0 : 0x80000000
  However, when I read the counter by reading the register <strong>PMCCNTR_EL0</strong>, I always get 0.</p>
  <p>May I know any wrong with the setting or any register missing? Or can you suggest any way to enable PMU for timing measurement? Thanks a lot for your help.</p>