title: How to read the external timer counter on the BeagleBone Black?
body: <p>I need to count the transitions of a 50KHz binary signal using a BBB. I think using the <code>TIMER4</code> triggered by the external signal connected to the pin <code>P8.07</code> would be the easiest way.</p>
  
  <p>So, I issued the following commands to load the proper cape and setup the pin as a timer :</p>
  
  <pre><code>./config-pin overlay cape-universaln
  ./config-pin P8.07 timer
  </code></pre>
  
  <p>Everything seems to work and nothing appears in <code>dmesg</code>.</p>
  
  <p><strong>My question is</strong> : How can I read the value of <code>TIMER4</code> ? I looked in SysFs and find nothing interesting. Nothing in <code>/dev</code> as well. How can I retrieve the value of the timer counter I just setup ? I'm open to a C/C++ solution as well, but I would like to avoid doing kernel-space programming.</p>
  
  <p>I'm using the latest Ubuntu Linux for BeagleBone, kernel 4.1.10-ti-r21.</p>