Is there any equivalent to x86 TSC that I could use to count the number of clocks? I am using IAR EWB and it does have a CYCLECOUNTER register. But I need to time some functions and I would appreciate some advice on how to access this counter (assuming it is accessible from the application).