Difference between revisions of "Measuring speed and distance"

From ArmadeusWiki
Jump to: navigation, search
(New page: {{Under_Construction}} On this page you will find informations to measure speed and distance of a vehicle, with an APF27. ==Principle== On one wheel of your vehicle, you will have a ...)
 
(Test)
Line 11: Line 11:
 
==Montage==
 
==Montage==
 
===Test===
 
===Test===
 +
* Load driver that will allocate GPT2 timer:
 +
<pre class="apf">
 +
# insmod gpt2_plat.ko
 +
</pre>
 +
* Configure GPT2 for taking TIN as input and activates it:
 +
<pre class="apf">
 +
# imxregs TCTL2 0x00000007
 +
</pre>
 +
* Check that counter is increasing:
 +
<pre class="apf">
 +
# imxregs TCN2
 +
 +
GPT Counter Register 2
 +
TCN2                    0x00000022  -> 00000000 00000000 00000000 00100010
 +
</pre>
  
 
==Links==
 
==Links==

Revision as of 18:08, 10 December 2010

Page under construction... Construction.png Informations on this page are not guaranteed !!

On this page you will find informations to measure speed and distance of a vehicle, with an APF27.

Principle

On one wheel of your vehicle, you will have a system with some holes that will generates a square signal. Each pulse will correspond to one or more turn, depending on the precision you need. == a kid of tachymeter. You have to adapt the signal level to 0-2,8V and limit the overshots.
Then, you will be able to inject on the TIN input of the APF27. This is only possible if you have an APF27Dev without HDMI chip. The TIN input is internally linked in the i.MX27 to some counters that we will configure and use to count the signal pulses.

Montage

Test

  • Load driver that will allocate GPT2 timer:
# insmod gpt2_plat.ko
  • Configure GPT2 for taking TIN as input and activates it:
# imxregs TCTL2 0x00000007
  • Check that counter is increasing:
# imxregs TCN2

GPT Counter Register 2
TCN2                     0x00000022  -> 00000000 00000000 00000000 00100010

Links