Permalink
Browse files

Updated comments

  • Loading branch information...
1 parent d06b42e commit 9f2de5ff641d2dd763d9f07af0bdffcc0f48178a @scottellis committed Oct 11, 2010
Showing with 30 additions and 23 deletions.
  1. +30 −23 README
View
@@ -1,27 +1,34 @@
-A linux module to measure gpio irq latency of an OMAP3 system and
-measure the time it takes to toggle a gpio pin in a kernel module.
+A linux module to measure gpio irq latency and the time it takes to toggle a
+gpio pin in an OMAP3 kernel.
-The test requires an oscope to do the actual measurements. The
-module requires two gpio pins jumpered together. The pins should
-already be mux'd as GPIO and not otherwise used.
+The test requires an oscope to do the actual measurements and two gpio pins
+jumpered together. The pins are assumed to already mux'd as GPIO and not
+otherwise being used.
-The example is using a Gumstix Overo and two convenient pins on
-the expansion board headers.
+In the code the pins are labeled TEST_PIN and IRQ_PIN. They are interchangeable.
-Jumper GPIO_146 to GPIO_147 and hook an oscope probe to do the
+The example in the code is using a Gumstix Overo and two convenient pins on the
+expansion board headers. Substitute different pins as needed.
+
+IRQ_PIN - GPIO_146
+TEST_PIN - GPIO_147
+
+Jumper IRQ_PIN to TEST_PIN and hook an oscope probe to do the
measurement between them.
-GPIO_146 ---- TP ---- GPIO_147
- |
- oscope
+IRQ_PIN ---- TP ---- TEST_PIN
+ |
+ oscope
Build the module, insert it and then write 1 to do an irq latency
test or anything else to do a gpio toggle speed test.
For example:
+insmod irqlat.ko
+
echo 1 > /dev/irqlat
or
@@ -31,20 +38,20 @@ echo 2 > /dev/irqlat
Set your scope to trigger on a rising signal.
-The program sets up GPIO_146 as an input and irq enables it for an
+The program sets up IRQ_PIN as an input and irq enables it for an
IRQ_TRIGGER_RISING signal.
+
+I last tested with a 2.6.34 kernel.
-For the irq latency test, the program raises GPIO_147 and in the
-GPIO_146 irq handler, it lowers GPIO_147 again. The difference
-between the rise and fall of GPIO_147 is the irq latency, minus
-the time the gpio_set() call takes. I get values in the neighborhood
-of 8-9 microseconds.
-
-For the gpio toggle test, the GPIO_146 irq is not enabled and not
-part of the test. The module just runs a tight loop setting GPIO_147
-high then low again for 1000 iterations. You can watch with an
-oscope the time this takes. I get a number around 200 nanoseconds
-to go from one state to the other.
+For the irq latency test, the program raises TEST_PIN and in the IRQ_PIN irq
+handler, it lowers TEST_PIN again. The difference between the rise and fall of
+TEST_PIN is the irq latency, minus the time the gpio_set() call takes. I get
+values in the neighborhood of 8-9 microseconds.
+
+For the gpio toggle test, the IRQ_PIN irq handler is not enabled and not used
+in the test. The module just runs a tight loop setting TEST_PIN high then low
+again for 1000 iterations. You can watch with an oscope the time this takes.
+I get a number around 200 nanoseconds to go from one state to the other.
See the source code for more details.

0 comments on commit 9f2de5f

Please sign in to comment.