libsigrok/hardware
Russ Dill 42ceb77726 zeroplus: Major rework of sample buffer processing
The sample buffer is a still a bit of a mystery, but this should help.
The variables in play:

triggerbar/ramsize_trigger - These two variables added together indicate
how many samples we want captured. ramsize_trigger - triggerbar
indicades how many samples must be captured. The ratio between the two
is determined by capture ratio.

memory_size - This indicates the number of samples in the circular
capture buffer. stop_address, now_address, and trigger_address are
pointers within the zeroplus that wrap based on this size.

now_address - The address that the zeroplus was about to write to when
it finished capturing, and now the address that will be read from when
reads are done from the capture buffer

stop_address - The address that the zeroplus last wrote to when it
completed capture.

trigger_address - The sample address for which the trigger occured.

status - This one is a bit tricky. Some testing has shown that if the
zeroplus has captured memory_size or less samples, the STATUS_READY bit
is set. For all captures generated with more samples than this,
STATUS_READY was cleared. However, boundary conditions are difficult to
test and values such as, memory_size + 1 have not been tested. We use
this to determine if the capture has wrapped through the sample buffer.

More testing is required, but this improves behavior in a number of
cases, specifically capturing sample amounts that are not a power of 2
of the sample buffer size. Before, random data was passed to libsigrok.

Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
2014-01-03 15:09:11 +01:00
..
agilent-dmm Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
alsa Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
appa-55ii appa-55ii: Don't use _t suffix for a typedef. 2013-12-27 17:27:52 +01:00
asix-sigma asix-sigma: fix incorrect pointer cast (non-aligned memory and endiannes issue) 2013-12-27 17:36:08 +01:00
brymen-dmm Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
cem-dt-885x Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
center-3xx Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
chronovu-la8 log prefixes: Cosmetics, consistency fixes, typo fixes. 2013-12-27 13:17:20 +01:00
colead-slm Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
common Add initial support for the V&A VA40B multimeter. 2014-01-02 01:46:15 +01:00
demo demo: Analog probe support. 2013-12-29 10:58:56 +01:00
fluke-dmm Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
fx2lafw fx2lafw: Fix incorrect unitsize when a trigger fires. 2013-12-29 14:18:51 +01:00
gmc-mh-1x-2x gmc_mh_1x_2x: Fixed sign and AC/DC for current measurements with Metrahit <= 16. 2014-01-02 19:38:52 +01:00
hameg-hmo hameg-hmo: Support DC LINE coupling. 2013-12-27 16:28:42 +01:00
hantek-dso Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
ikalogic-scanalogic2 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
ikalogic-scanaplus log prefixes: Cosmetics, consistency fixes, typo fixes. 2013-12-27 13:17:20 +01:00
kecheng-kc-330b Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
lascar-el-usb Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
link-mso19 log prefixes: Cosmetics, consistency fixes, typo fixes. 2013-12-27 13:17:20 +01:00
mic-985xx Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
norma-dmm Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
openbench-logic-sniffer ols: Use serial source management wrappers. 2013-12-30 14:19:39 +01:00
rigol-ds rigol-ds: Correct usage of NUM_TIMEBASE and NUM_VDIV config keys. 2013-12-29 13:22:32 +01:00
saleae-logic16 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
serial-dmm serial-dmm: Increase timeout when scanning for DMMs. 2014-01-02 14:25:06 +01:00
teleinfo teleinfo: Fix a compiler warning (clang). 2013-12-31 19:22:16 +01:00
tondaj-sl-814 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
uni-t-dmm uni-t-dmm: Fix incorrect order which breaks UT61B/C. 2014-01-01 16:40:36 +01:00
uni-t-ut32x Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
victor-dmm victor-dmm: Fix MIN/MAX always being reported. 2013-12-29 12:33:10 +01:00
zeroplus-logic-cube zeroplus: Major rework of sample buffer processing 2014-01-03 15:09:11 +01:00
Makefile.am appa-55ii: Initial driver skeleton. 2013-12-23 01:21:51 +01:00