Hi sigrok Development Team, I am writing to report an issue I encountered while using the sigrok command-line tool with my Kingst LA5016 logic analyzer.
When using PulseView (GUI), the trigger function works correctly. However, when I attempt to configure triggering via the command-line tool (sigrok-cli), the sampling starts immediately even without a trigger signal, rendering the trigger function ineffective. Both PulseView and sigrok-cli are installed from the nightly builds, and I have ensured that the logic analyzer’s firmware and bitfile are identical for both tools. Below is the log output from the command-line execution for your reference: text d:\Program Files\sigrok\sigrok-cli>sigrok-cli.exe -d kingst-la2016:conn=3.4 --config samplerate=1MHz:voltage_threshold=2.5-2.5 --channels CH0,CH1,CH2,CH3 --time 1000 --output-file D:\testwave1.sr -w -t CH0=f -l 5 sr: [00:00.000000] log: libsigrok loglevel set to 5. sr: [00:00.001000] backend: libsigrok 0.6.0-git-883c2ac/4:0:0. sr: [00:00.002000] backend: Libs: glib 2.44.1 (rt: 2.44.1/4401:1), zlib 1.2.11, libzip 1.5.2, minilzo 2.10, libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1), libusb-1.0 1.0.20.11003-rc3 API 0x01000104, hidapi 0.11.0-dev, libftdi 1.4. sr: [00:00.002000] backend: Host: x86_64-w64-mingw32.static.posix, little-endian. sr: [00:00.003000] backend: SCPI backends: TCP, serial, USBTMC. sr: [00:00.004000] backend: Firmware search paths: sr: [00:00.037000] backend: - C:\Users\chipon\AppData\Local\sigrok-firmware sr: [00:00.039000] backend: - C:\ProgramData\sigrok-firmware sr: [00:00.041000] backend: - C:\Users\Public\Documents\sigrok-firmware sr: [00:00.042000] backend: - d:\Program Files\sigrok\sigrok-cli\share\sigrok-firmware sr: [00:00.043000] backend: - d:\Program Files\sigrok\sigrok-cli\share\sigrok-firmware sr: [00:00.043000] backend: Sanity-checking all drivers. sr: [00:00.044000] backend: Sanity-checking all input modules. sr: [00:00.045000] backend: Sanity-checking all output modules. sr: [00:00.045000] backend: Sanity-checking all transform modules. srd: libsigrokdecode loglevel set to 5. sr: [00:00.052000] hwdriver: sr_config_list(): key 2147418112 (NULL) sdi 0000000000000000 cg NULL -> [uint32 20000, 20004] sr: [00:00.058000] usb: Found USB device (VID:PID = 77a1:01a2, bus.address = 3.4). sr: [00:00.059000] usb: Found USB device (VID:PID = 8087:0029, bus.address = 3.4). sr: [00:00.066000] kingst-la2016: Bus 3, addr 3 do not match specified filter. sr: [00:00.067000] kingst-la2016: Bus 1, addr 1 do not match specified filter. sr: [00:00.067000] kingst-la2016: Bus 4, addr 2 do not match specified filter. sr: [00:00.069000] kingst-la2016: Bus 2, addr 2 do not match specified filter. sr: [00:00.071000] kingst-la2016: Bus 3, addr 1 do not match specified filter. sr: [00:00.072000] kingst-la2016: Bus 4, addr 1 do not match specified filter. sr: [00:00.073000] kingst-la2016: Bus 2, addr 2 do not match specified filter. sr: [00:00.074000] kingst-la2016: Bus 4, addr 2 do not match specified filter. sr: [00:00.075000] kingst-la2016: Bus 2, addr 1 do not match specified filter. sr: [00:00.075000] kingst-la2016: USB enum found 77a1:01a2 at path usb/3-2, 3.4. sr: [00:00.076000] kingst-la2016: USB PID 01a2, MCU firmware 'kingst-la-01a2.fw'. sr: [00:00.078000] kingst-la2016: Manufacture date bytes 22 10 dd ef. sr: [00:00.078000] kingst-la2016: Manufacture date: 2022-10. sr: [00:00.081000] kingst-la2016: EEPROM magic bytes 0c f3 00 00 0c f3 10 ef. sr: [00:00.082000] kingst-la2016: Using secondary magic 0xc (0x10). sr: [00:00.082000] kingst-la2016: Model 'LA5016', 16 channels, max 500MHz. sr: [00:00.083000] kingst-la2016: FPGA bitstream file 'kingst-la5016a2-fpga.bitstream'. sr: [00:00.084000] kingst-la2016: Checking operation of the FPGA bitstream. sr: [00:00.087000] kingst-la2016: FPGA registers dump: bitstream check sr: [00:00.088000] kingst-la2016: 0000 ed 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:00.090000] kingst-la2016: 0010 aa 0f 00 00 00 00 00 00 20 32 00 00 00 00 00 00 sr: [00:00.090000] kingst-la2016: 0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:00.091000] kingst-la2016: 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:00.092000] kingst-la2016: 0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:00.093000] kingst-la2016: 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:00.094000] kingst-la2016: 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:00.094000] kingst-la2016: 0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:00.095000] kingst-la2016: FPGA register: run state 0x85ed. sr: [00:00.096000] kingst-la2016: FPGA register: PWM enable 0x00. sr: [00:00.097000] kingst-la2016: Could re-use current FPGA bitstream. No upload required. sr: [00:00.180000] kingst-la2016: Run state: 0x85ed (idle). sr: [00:00.181000] kingst-la2016: Device should be initialized. sr: [00:00.182000] kingst-la2016: Bus 3, addr 2 do not match specified filter. sr: [00:00.183000] hwdriver: Scan found 1 devices (kingst-la2016). sr: [00:00.184000] device: kingst-la2016: Opening device instance. sr: [00:00.189000] kingst-la2016: PWM config, app spec, ch 0, en 0, freq 1000.0, duty 50.0. sr: [00:00.190000] kingst-la2016: PWM config, reg 0x0070, freq 200000, duty 100000. sr: [00:00.191000] kingst-la2016: PWM config, enable all 0x00, cfg 0x01. sr: [00:00.191000] kingst-la2016: PWM config, disabling before param change. sr: [00:00.192000] kingst-la2016: PWM config, app spec, ch 1, en 0, freq 100000.0, duty 50.0. sr: [00:00.192000] kingst-la2016: PWM config, reg 0x0078, freq 2000, duty 1000. sr: [00:00.193000] kingst-la2016: PWM config, enable all 0x00, cfg 0x02. sr: [00:00.194000] kingst-la2016: PWM config, disabling before param change. sr: [00:00.196000] hwdriver: sr_config_set(): key 30000 (samplerate) sdi 000000000129bc80 cg NULL -> uint64 1000000 sr: [00:00.198000] hwdriver: sr_config_set(): key 30023 (voltage_threshold) sdi 000000000129bc80 cg NULL -> (2.5, 2.5) sr: [00:00.198000] hwdriver: sr_config_list(): key 30014 (triggermatch) sdi 000000000129bc80 cg NULL -> [1, 2, 3, 4] sr: [00:00.198000] hwdriver: sr_config_set(): key 50000 (limit_time) sdi 000000000129bc80 cg NULL -> uint64 1000 sr: [00:00.199000] session: Checking trigger: sr: [00:00.201000] session: Stage 0 match on channel CH0, match 4 sr: [00:00.201000] session: Using thread-default main context. sr: [00:00.201000] session: Starting. sr: [00:00.203000] hwdriver: kingst-la2016: Starting acquisition. sr: [00:00.203000] kingst-la2016: Set threshold voltage 2.50V. sr: [00:00.203000] kingst-la2016: Duty cycle values: R56 0x036c, R79 0x00f2. sr: [00:00.205000] kingst-la2016: Set trigger config: enabled-channels 0x000f, triggering-channels 0x0001, level-triggered 0x0000, high/falling 0x0001. sr: [00:00.205000] kingst-la2016: Passing 10000000000 to HW for unlimited samples. sr: [00:00.206000] kingst-la2016: Set sample config: 1000kHz (div 800), 10000000000 samples. sr: [00:00.207000] kingst-la2016: Capture ratio 50%, count 5000000000, mem 134217728. sr: [00:00.208000] session: bus: Received SR_DF_HEADER packet. cli: Received SR_DF_HEADER. sr: [00:00.214000] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 000000000129bc80 cg NULL -> uint64 1000000 sr: [00:00.218000] kingst-la2016: Run state: 0x85e2 (pre-trigger sampling). sr: [00:01.204000] sw_limits: Requested sampling time (1000ms) reached. sr: [00:01.205000] kingst-la2016: Limit reached. Stopping acquisition. sr: [00:01.207000] kingst-la2016: Run state: 0x85e1 (idle). sr: [00:01.207000] kingst-la2016: Acquisition completion seen (hardware). sr: [00:01.209000] kingst-la2016: FPGA registers dump: acquisition complete sr: [00:01.210000] kingst-la2016: 0000 e1 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:01.211000] kingst-la2016: 0010 91 0f 00 00 00 00 00 00 d0 31 00 00 00 00 00 00 sr: [00:01.211000] kingst-la2016: 0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:01.212000] kingst-la2016: 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:01.213000] kingst-la2016: 0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:01.213000] kingst-la2016: 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:01.214000] kingst-la2016: 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:01.214000] kingst-la2016: 0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sr: [00:01.215000] session: bus: Received SR_DF_FRAME_BEGIN packet. cli: Received SR_DF_FRAME_BEGIN. sr: [00:01.218000] kingst-la2016: Capture info: n_rep_packets: 0x00000f91/3985, before_trigger: 0x00000000/0, write_pos: 0x000031d0/12752. sr: [00:01.219000] kingst-la2016: Want to read 797 xfer-packets starting from pos 0. sr: [00:01.220000] kingst-la2016: Will read from 0x00000000, 0x000031d0 bytes. sr: [00:01.224000] kingst-la2016: Acquisition data download started. sr: [00:01.227000] kingst-la2016: receive_transfer(): status LIBUSB_SUCCESS / LIBUSB_TRANSFER_COMPLETED received 12752 bytes. sr: [00:01.228000] session: bus: Received SR_DF_TRIGGER packet. cli: Received SR_DF_TRIGGER. sr: [00:01.236000] kingst-la2016: Download finished, flushing session feed queue. sr: [00:01.236000] session: bus: Received SR_DF_LOGIC packet (1992492 bytes, unitsize = 2). cli: Received SR_DF_LOGIC (1992492 bytes, unitsize = 2). sr: [00:01.243000] hwdriver: sr_config_get(): key 30000 (samplerate) sdi 000000000129bc80 cg NULL -> uint64 1000000 sr: [00:01.248000] output/srzip: output unit size 2, feed unit size 2. sr: [00:01.249000] output/srzip: Matching unit size, passing logic data as is. sr: [00:01.250000] kingst-la2016: Total samples after chunk: 996246. sr: [00:01.251000] kingst-la2016: Download finished, post processing. sr: [00:01.252000] kingst-la2016: receive_transfer(): status LIBUSB_TRANSFER_CANCELLED received 0 bytes. sr: [00:01.255000] kingst-la2016: receive_transfer(): status LIBUSB_TRANSFER_CANCELLED received 0 bytes. sr: [00:01.256000] kingst-la2016: receive_transfer(): status LIBUSB_TRANSFER_CANCELLED received 0 bytes. sr: [00:01.257000] kingst-la2016: receive_transfer(): status LIBUSB_TRANSFER_CANCELLED received 0 bytes. sr: [00:01.258000] kingst-la2016: receive_transfer(): status LIBUSB_TRANSFER_CANCELLED received 0 bytes. sr: [00:01.258000] kingst-la2016: receive_transfer(): status LIBUSB_TRANSFER_CANCELLED received 0 bytes. sr: [00:01.259000] kingst-la2016: receive_transfer(): status LIBUSB_TRANSFER_CANCELLED received 0 bytes. sr: [00:01.260000] session: bus: Received SR_DF_FRAME_END packet. cli: Received SR_DF_FRAME_END. sr: [00:01.262000] session: bus: Received SR_DF_END packet. cli: Received SR_DF_END. sr: [00:01.280000] kingst-la2016: Download finished, done post processing. sr: [00:01.281000] usb: usb_source_finalize sr: [00:01.284000] session: Stopped. sr: [00:01.286000] hwdriver: Cleaning up all drivers. sr: [00:01.287000] kingst-la2016: Closing device on 3.4 (logical) / usb/3-2 (physical) interface 0. I would appreciate it if you could help analyze the cause of this issue. Please let me know if you need further details or testing from my side. Thank you for your time and support. Best regards, Yellen
_______________________________________________ sigrok-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sigrok-devel

