pmu.c 571 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. */
  9. #include <rtthread.h>
  10. #include "pmu.h"
  11. #define DBG_TAG "PMU"
  12. #define DBG_LVL DBG_WARNING
  13. #include <rtdbg.h>
  14. void rt_hw_pmu_dump_feature(void)
  15. {
  16. unsigned long reg;
  17. reg = rt_hw_pmu_get_control();
  18. LOG_D("ARM PMU Implementor: %c, ID code: %02x, %d counters\n",
  19. reg >> 24, (reg >> 16) & 0xff, (reg >> 11) & 0x1f);
  20. RT_ASSERT(ARM_PMU_CNTER_NR == ((reg >> 11) & 0x1f));
  21. RT_UNUSED(reg);
  22. }