We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
You running bare-metal? As you can't typically access the PMU directly from user space under Linux.
You should probably make "c" and/or a volatile, even at a low optimization level the compiler might eliminate your code otherwise.