Skip to content

gabeblack/Panalyzer

 
 

Repository files navigation

                                  Panalyzer

This is a Logic Analyzer that runs on the RaspberryPi.  The basic idea is that
it disables interrupts for a period, while sampling the GPIO pins once a
microsecond.  It then re-enables interupts and displays traces showing what the
relevant GPIO pins were doing.  Clearly the RaspberryPi is frozen while data is
being gathered, because interrupts are disabled, but a timeout is implemented
to avoid hanging for ever if a trigger word is not seen.

Panalyzer has features such as specifying trigger patterns, buffer depth, a
pair of cursors for measuring time periods on the trace, etc.  In the display
you can click and drag across part of the trace to zoom in on that section.

Not all features are implemented yet, and there is scope to improve
performance.  The UI may well be reworked as the idea develops.

Currently it expects you to use the following gpio pins:

Channel 0:  GPIO4   (P1-7)
Channel 1:  GPIO17  (P1-11)
Channel 2:  GPIO18  (P1-12)
Channel 3:  GPIO21  (P1-13)

Obviously you should be careful not to damage the RaspberryPi by feeding
signals above 3.3 volts to those pins.  Personally I added a 7417 open
collector buffer, driven from 5 volts, but with pullups on the outputs to 3.3
volts.  The idea being that I could then monitor 5 volt or 3.3 volt based
circuits safely.

While this project is in very early development, it has been tested monitoring
signals up to 250KHz, and capturing up to 2 seconds worth of data.  There is
obviously some sampling error at those speeds, as only it samples at 1000HKz.

Currently you cannot change the sampling frequency; it loops watching a 1MHz
counter in the processor, and takes a sample every time it changes.

The runtime comprises three files:

pandriver.ko is the kernel module that captures the data.
Panalyzer is the user space application that displays the data.
Panalyzer.ui is a Glade generated UI definition, and must be located in
the directory Panalyzer is invoked from.

If you wish to compile the module yourself, you should follow the instructions
on the wiki to compile the kernel, then edit the Makefile to point at your
kernel tree, and then run 'make' in the Panalyzer source directory.  The
Makefile is currently set up to cross-compile the kernel module; if you are
building natively remove the ARCH and CROSS_COMPILE settings.

As of August 31st 2012, the included module should load if you have recently
run rpi-update.  Read the comments at the top of pandriver.c for how to
create the /dev/panalyzer file.  The included Panalyzer binary uses gtk-3.0
and should run on Raspbian, at least.

Feedback welcome.

Richard Hirst <[email protected]>  August 31st 2012

['rgh' on the RaspberryPi forum]


About

A Logic Analyzer based on the RaspberryPi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published