pmu.c 333 B

123456789101112
  1. #include <rtthread.h>
  2. #include "pmu.h"
  3. void rt_hw_pmu_dump_feature(void)
  4. {
  5. unsigned long reg;
  6. reg = rt_hw_pmu_get_control();
  7. rt_kprintf("ARM PMU Implementor: %c, ID code: %02x, %d counters\n",
  8. reg >> 24, (reg >> 16) & 0xff, (reg >> 11) & 0x1f);
  9. RT_ASSERT(ARM_PMU_CNTER_NR == ((reg >> 11) & 0x1f));
  10. }