Update perfc_port_pmu.c

This commit is contained in:
Gabriel Wang 2024-01-27 14:43:56 +00:00
parent 9b8a258ad8
commit c3ca73072f

View File

@ -878,6 +878,13 @@ void perfc_port_clear_system_timer_counter(void);
#if __PERFC_USE_PMU_PORTING__
__USED
void DebugMon_Handler(void)
{
}
bool perfc_port_init_system_timer(bool bIsTimeOccupied)
{
UNUSED_PARAM(bIsTimeOccupied);
@ -893,6 +900,9 @@ bool perfc_port_init_system_timer(bool bIsTimeOccupied)
perfc_port_clear_system_timer_counter();
perfc_port_clear_system_timer_ovf_pending();
/* enable interrupt */
PMU->INTENSET = PMU_INTENSET_CCYCNT_ENABLE_Msk;
ARM_PMU_CNTR_Enable(PMU_CNTENSET_CCNTR_ENABLE_Msk);
ARM_PMU_Enable();
}