Page 1 of 1

How to access circle counter in Red Pitaya?

Posted: Thu Jun 18, 2015 5:17 pm
by Cong
Hey guys, I'm a newer to Red Pitaya. Now I'm trying to write a program to access the circle counter of ARM, but some problems bothered me.

In some threads(http://neocontra.blogspot.de/2013/05/us ... s-for.html and http://stackoverflow.com/questions/3247 ... 35#3250835) there are some tips about this topic, I tried the following code but got "Illegal instruction".

/* Enable user-mode access to counters. */
asm volatile("mcr p15, 0, %0, c9, c14, 0" :: "r"(1));

I'm not sure if I should access kernel mode firstly? Does anyone know something about how to access the circle counter?

Thanks