diff --git a/include/hal/cv32e40p/cv32e40p.h b/include/hal/cv32e40p/cv32e40p.h index 039b92d..59ae522 100644 --- a/include/hal/cv32e40p/cv32e40p.h +++ b/include/hal/cv32e40p/cv32e40p.h @@ -296,7 +296,23 @@ static inline void cpu_perf_conf(unsigned int confMask) * the rest of the config can be given through conf parameter */ static inline void cpu_perf_start() { #ifndef PLP_NO_PERF_COUNTERS + // enable all counters asm volatile("csrc 0x320, %0" : : "r"(0xffffffff)); + // arbitrary association of one event to one counter, + // just the implemented ones will increase + asm volatile("csrw 0x323, %0" : : "r"(1<