From: Kumar Abhishek <[email protected]>
This adds the driver for BeagleLogic into libsigrok which would run off the
BeagleBone [Black].
Steps to use libsigrok with the BeagleLogic module:
* Ensure that you have compiled and installed the BeagleLogic kernel module
on your BeagleBone [Black], along with the BB-BEAGLELOGIC virtual cape and
the PRU firmware files into /lib/firmware. For more details refer to:
www.beaglelogic.net/Build-BeagleLogic
www.beaglelogic.net/Getting-Started
* Use "modprobe beaglelogic" to load the module after the device tree overlay
and the PRU Firmware have been loaded. The module will fail to load if the
correct firmware is not found on the PRUs.
* Allocate the buffers using (for example):
'echo 33554432 > /sys/devices/virtual/misc/beaglelogic/memalloc'
(this gives 32 MiB of sample buffers, you can go all the way to 320MiB or more
on the BeagleBone Black but it is recommended to reserve a buffer of this
size
straight after booting up, it might fail if many applications were running)
The value entered will be rounded up to the next 4 MiB, starting from 8 MiB.
Even if zero is entered, it would allocate a minimum of 8 MB. The memory can
be freed up by unloading the module.
* By default BeagleLogic supports only 8 channels. To enable the 4 extra
channels in the driver scan, use the following command:
'echo 0 > /sys/devices/virtual/misc/beaglelogic/sampleunit'
* The module is ready for use with libsigrok.
Changes since last patch:
* beaglelogic.h reorganized and cleaned up.
* miscellaneous cleanups
Notes:
* The ABI for the kernel driver, and hence the contents of beaglelogic.h stands
frozen till refactoring of the kernel module [except for bugfixes]
* Continuous sampling is there but not completely supported as of now. This
will be completed after the userspace apps using libsigrok are validated to
be able to sustain the capture speed from BeagleLogic.
* Triggers are working in this version. However if capturing the entire buffer
[e.g. 33.5 MSa = 32 MiB buffer], the pre-trigger samples will not be
captured hence the samples received would be less. However if the buffer is
larger than the requested samples and the trigger fires within a buffer, then
the number of samples requested will be available.
* With the ABI, the driver is capable of setting the capture buffer size but
the relevant code has been removed as it is hardware-specific. The user has
to set the buffer size himself using the above command. There would be a
warning if there isn't sufficient buffer space for the samples and the
capture
will be truncated.
For more information, refer to documentation at www.beaglelogic.net
[redirects to the GitHub wiki]
The same repository carries the code for the kernel modules and firmware.
Best Regards
Abhishek
Kumar Abhishek (2):
beaglelogic: Initial driver skeleton.
beaglelogic: Implemented with soft triggers
Makefile.am | 6 +
configure.ac | 10 +
hardware/beaglelogic/api.c | 400 +++++++++++++++++++++++++++++++++++++
hardware/beaglelogic/beaglelogic.h | 213 ++++++++++++++++++++
hardware/beaglelogic/protocol.c | 107 ++++++++++
hardware/beaglelogic/protocol.h | 70 +++++++
hwdriver.c | 9 +
7 files changed, 815 insertions(+)
create mode 100644 hardware/beaglelogic/api.c
create mode 100644 hardware/beaglelogic/beaglelogic.h
create mode 100644 hardware/beaglelogic/protocol.c
create mode 100644 hardware/beaglelogic/protocol.h
--
1.9.1
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel