Commit Graph

4957 Commits

Author SHA1 Message Date
Uwe Hermann d025fce937 chronovu-la: Fix broken triggering.
This fixes bug #1369.
2019-03-22 00:59:39 +01:00
Thomas Andres 27a9b6639e korad-kaxxxxp: support for Stamos S-LS-31 power supply 2019-03-17 17:06:28 +01:00
Michael Klengel 88e6a8da9c manson-hcs-3xxx: Add HCS-3300 / DPPS-32-15 / HCS-3302 support.
Manson HCS-3300 (1-16 V, 30 A):

  $ sigrok-cli --show -d manson-hcs-3xxx:conn=/dev/cu.SLAB_USBtoUART5
  [...]
  sr: manson-hcs-3xxx: Unknown model ID 'HCS-3300' detected, aborting.

Voltcraft DPPS-32-15 (1-32 V, 15 A), identical to Manson HCS-3302:

  $ sigrok-cli --show -d manson-hcs-3xxx:conn=/dev/cu.SLAB_USBtoUART
  [...]
  sr: manson-hcs-3xxx: Unknown model ID 'HCS-3302' detected, aborting.
2019-03-09 18:23:05 +01:00
Michael Klengel dfd1daf25f manson-hcs-3xxx: Whitespace changes for models[]. 2019-03-09 18:23:05 +01:00
Frank Stettner 02d4db3562 hp-3478a: Check via GPIB serial poll if new data is available.
When just reading the data without check, the bus is blocked until new
data is available.
2019-03-09 18:01:11 +01:00
Uwe Hermann 1b6b9c01df ipdbg-la: Minor cosmetic and comment fixes. 2019-01-29 23:18:41 +01:00
Daniel Anselmi 8e249032d3 ipdbg-la: improve speed 2019-01-29 23:18:30 +01:00
danselmi c54ca32340 ipdbg-la: working on windows 2019-01-29 23:18:23 +01:00
Wolfram Sang f6ce25ec05 ols: add feature to support >256K memory
Add support for the Pepino-style of accessing >256K of memory. Because
this the only known extension of accessing >256K currently, we apply it
as soon as the sample size is bigger than 256K.  Let's hope other
devices (if any) will follow this style. If not, we need to add support
depending on the device name later.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang ec26d9e1df pipistrello: rename registers to match actual function
Magnus (creator of the Pipistrello) confirmed that he mixed up the
register names. The code was doing it correctly nonetheless but was
confusing to read because of this. Fix it to make it easier to
comprehend.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang 60143473c9 ols: mention compatible devices in driver name
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang ae4e6999c5 ols: extend reponse delay when scanning device
My Pepino needs 15ms instead of 10ms, so let's use 20ms to be on the
safe side.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang a88114183a ols: sort commands according to their hex value
Makes adding new ones easier.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang ea642977e5 ols: refactor using max_channels
Let max_channels really carry the number of maximum channels the
hardware supports. We will handle the limitation of only half the
channels available in 200MHz mode later. Note that there won't be a
regression because we only set the variable but never check it. The
desired result of this patch is the removal of the NUM_CHANNELS macro.
The number of channels needs to be dealt with at runtime.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang 4a34a74d73 ols: refactor channel initialization
We needs this twice so put it into a seperate function, so updates to it
will automatically handled for both callers.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang aad0c77708 ols: simplify calculation of readcount
Somewhen we probably want DIV_ROUND_UP from the Kernel.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang be15c51ed4 ols: drop wrong usage of macro
commit f51acd69 ("ols: combine demux samples") wrongly replaced the bit
pattern of 0x20 with the number of channels which just happens to be 32
as well. So, the code works but is confusing to read. Reword the
for-loop to make it more comprehensible.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang 6e5a1a0178 ols: use 32bit for handling sample counts
The OLS protocol sends 16bit values to specify the sample count and
delay count. However, this 16bit value is the number of 32bit words to
be sampled, so the actual sample count is 4 times larger and does not
fit into a uint16_t. Extend it to support the full range of 256K
(LogicShrimp will need this) and to prepare support for devices with
even more memory (Pepino).

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang 6745488b1a ols: remove needless initialization
channel_mask is recalculated before it gets accessed, so this
initialization is not needed.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Wolfram Sang 082537602a ols: remove unused define
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2019-01-13 20:07:27 +01:00
Gerhard Sittig f0e6b41f7a uni-t-ut32x: rephrase the receive buffer and packets relation
The previous implementation assumed that a receive data chunk ends
exactly with a sensor packet's end. Yet the buffer had 32 bytes while
the packets have 19 bytes.

Separate the data reception from the packet processing. Collect whatever
chunks the USB connection provides, and scan the resulting buffer for
packets. Cope with either incomplete or corrupt or misaligned packets as
well as with multiple packets in receive chunks. The latter might happen
upon initial synchronization, when a device already sends data or the
serial port buffered previously communicated data.

In the regular case, the computer will process so fast that each single
character will be handled individually. We don't mind. The frequency is
some 60 times per second, and the data volume is 19 bytes. The software
works for the regular case, and synchronizes fast at startup or after
comm errors.
2019-01-13 19:34:10 +01:00
Gerhard Sittig a0ba75bda2 uni-t-ut32x: improve robustness of packet parser, more diagnostics
Always print the data bytes of received buffers in the packet parser,
then check some more fixed fields to not process invalid packets, then
process the packet content as the previous implementation did.

Call the packet parser for incomplete packets and discarded input
buffers as well (initial synchronization, re-sync after comm errors).
This results in the availability of more diagnostics during development.

Pass the packet's location and size from outside. This prepares the
logic to cope with situations where the receive buffer contains multiple
(potentially incomplete) packets.
2019-01-13 19:34:10 +01:00
Gerhard Sittig 4b3197828d uni-t-ut32x: use ASCII literals in packet parser, symbols for magic numbers
Slightly unobfuscate the UT32x packet parser. The protocol is mostly
ASCII based, checks for hex numbers may be unexpected. Use symbolic
identifiers for the packet length and some special characters.
2019-01-13 19:34:10 +01:00
Gerhard Sittig 2631d9320d uni-t-ut32x: comment on the "T1-T2" channel name (looks like a range) 2019-01-13 19:34:10 +01:00
Gerhard Sittig 9e11197246 uni-t-ut32x: use common code for sw limits, minor data type fixup (data source) 2019-01-13 19:34:10 +01:00
Gerhard Sittig bf700f679a uni-t-ut32x: pre-set to default conn= spec
The previous implementation of the UT32x driver expected to see a conn=
spec, without it no device is found. Default to the USB identification
of the CH9325 chip, to make the driver work out of the box. Users still
can provide conn= specs and override the default for other cables.
2019-01-13 19:34:10 +01:00
Gerhard Sittig de805ae50d doc: update README.devices (USB detection, enable serial comm)
Slightly rephrase README.devices since there is no strict distinction
into "fully automatic" and "always manual". Some drivers _accept_ conn=
specs when provided, _and_ support automatic detection of enumerable
devices, _and_ might implement defaults but also support overrides.

Nit, numerically sort the list of Uni-T cables (which is about to grow
in the future) for improved readability.

Add two more devices which require users to manually enable the serial
communication (Brymen BM257s, EEVBlog 121GW).
2019-01-13 19:34:10 +01:00
Martin Ling ea7a83a437 bindings: Add Output::format() 2018-12-30 14:10:13 +01:00
Martin Ling 47b821dc7d rigol-ds: Fix memory buffer readout on DS4000 series. 2018-12-29 03:24:23 +01:00
majekw e150d55046 Add support for YiXingDianZi MDSO in hantek-6xxx driver. 2018-12-28 13:49:33 +01:00
Mike Williams c3bfb95959 scpi-pps: add support for BK Precision 9130 2018-12-28 13:10:05 +01:00
Mike Williams 08e8c0e5bf scpi-dmm: add experimental Keysight 34465A support
Tested DC current, DC voltage, and resistance. Instrument gives an error
only on first measurement but the output of the measurements is correct.
2018-12-28 13:10:05 +01:00
Uwe Hermann 0bad836f95 contrib/60-libsigrok.rules: Mention FT232H/ftdi-la item. 2018-12-28 13:01:45 +01:00
Paul c7a51272a5 ftdi-la: added FT232H device ID 2018-12-28 13:01:03 +01:00
Martin Ling a9ed2eb069 bindings: Add new Context::create_end_packet() method. 2018-12-28 12:47:59 +01:00
Martin Ling 62bd644f55 python: Add override for Context.create_logic_packet() 2018-12-28 12:47:59 +01:00
Gerhard Sittig 6f7e15090e dmm/eev121gw: fix a typo in a comment 2018-12-27 11:26:19 +01:00
Gerhard Sittig fbbf21dcf5 pickit2: avoid NULL dereference in close code path 2018-12-27 11:26:19 +01:00
Daniel Anselmi f3549a1ccf ipdbg-la: Check if limit samples is valid (leq size of ringuffer) 2018-12-27 11:26:02 +01:00
Martin Ling 942719b46c Don't reference SR_PACKAGE_VERSION_STRING directly in backend.c.
Reporting build versus runtime versions makes sense for a client,
but not inside the library itself.
2018-12-20 19:12:34 +01:00
Martin Ling 2868bca35b Don't reference SR_PACKAGE_VERSION_STRING directly in output modules. 2018-12-20 19:12:34 +01:00
Uwe Hermann 3f34a40268 drivers: Make per-driver sr_dev_driver structs static. 2018-12-20 17:29:36 +01:00
Uwe Hermann 3aadf5c479 microchip-pickit2: Drop unneeded prefix. 2018-12-20 16:36:09 +01:00
Uwe Hermann e760f2cdaf microchip-pickit2: Minor cosmetics. 2018-12-20 16:36:09 +01:00
Gerhard Sittig bde6a99b33 microchip-pickit2: first driver implementation (acquisition works, triggers don't)
Fill in the scan, open/close, get/set/list, acquisition start/stop logic
such that data acquisition with a PICkit2 works.

Trigger support needs more attention. User specified triggers either
seem to not take effect, or the trigger position is not in the expected
location. It's yet to get determined what's the issue.

This implementation is based on protocol information gathered from the
pk2-la project.
2018-12-20 16:19:42 +01:00
Gerhard Sittig a5c0259c4a microchip-pickit2: Initial driver skeleton. 2018-12-20 16:19:42 +01:00
Gerhard Sittig d9a3c0b749 brymen-bm86x: drop redundant free call, fixup channel index
Remove a free() call in an error path for a list which immediately
before the call was determined to be NULL. Use index 0 and 1 for
channels P1 and P2 respectively (the previous implementation used 0
for both channels).
2018-12-20 16:19:42 +01:00
Gerhard Sittig 2887799404 scpi-dmm: run OPC queries immediately before essential commands
The current implementation of the SCPI DMM driver is conservative about
checking the device's being operational, but the *OPC? queries are found
in unfortunate locations. Run the OPC query right before running the
next "actual" command, not afterwards. And certainly not between sending
requests and potentially gathering responses in subsequent calls.

This commit does not change current behaviour, but improves maintenance
before pending commits.
2018-11-17 20:19:13 +01:00
Gerhard Sittig 08f3b427b6 scpi-dmm: return MQ table entry to "get MQ" routine callers
The "get MQ" helper routine communicates SCPI responses and translates
them to internal "MQ and flag" values. Optionally return the MQ table
entry reference to callers, so they don't have to repeat the table
lookup when the function's default precision is required, or should
future "start acquisition" requests need to refer to the meter's current
function.
2018-11-17 20:19:13 +01:00
Gerhard Sittig 64d03de1c2 scpi-dmm: adjust MQ table for Agilent 34405A
Rename the table to reflect that it's model specific. Remove the 4-wire
resistance function which this device does not support.
2018-11-17 20:17:48 +01:00