Ejemplo n.º 1
0
void cpu_profiler_reset(void)
{
	pmu_enable();
	pmu_user_enable();
	pmn_reset();
	ccnt_reset();
	ccnt_divider(0);
}
Ejemplo n.º 2
0
Archivo: main.c Proyecto: kunulee/f-stm
void pmu_start(void)
{
    enable_pmu();              // Enable the PMU
    ccnt_divider(0);
    reset_ccnt();              // Reset the CCNT (cycle counter)
    reset_pmn();               // Reset the configurable counters
    pmn_config(0, perf_event[0]);       // Configure counter 0 to count event code 0x03
    pmn_config(1, perf_event[1]);       // Configure counter 1 to count event code 0x03
    pmn_config(2, perf_event[2]);       // Configure counter 2 to count event code 0x03
    pmn_config(3, perf_event[3]);       // Configure counter 3 to count event code 0x03
    pmn_config(4, perf_event[4]);       // Configure counter 4 to count event code 0x03
    pmn_config(5, perf_event[5]);       // Configure counter 5 to count event code 0x03

    enable_ccnt();             // Enable CCNT
    enable_pmn(0);             // Enable counter
    enable_pmn(1);             // Enable counter
    enable_pmn(2);             // Enable counter
    enable_pmn(3);             // Enable counter
    enable_pmn(4);             // Enable counter
    enable_pmn(5);             // Enable counter
}