Logic analyzers

Page content

Over the years, I’ve owned several logig analyzers. For a long time, I used a Tektronix HP1241 and later an HP 16500 These were large and heavy devices, weighting twenty kilos or more. Usually equipped with a noisy fan.

These old logic analyzers usually suffer from a very small capture memory of some kilobytes. If you know the exact situation where some hardware situation to be tracked occurs, then this is ok. For more unclear situations, finding the interesting window in time to get all signals ofg importance was time consuming and difficult.

For a short time, I also used a Logicport logic analyzer with USB interface and as I remember 34 channels. But this thing also had only a small capture buffer of several KBytes.

Finally I ended up with a small Salea Logic Analyzer clone with 8 channels for a few bucks, and, for complex work, a KingST / Innomaker LA5032 with 32 channels.

These newer devices have large capture buffer or can use PC memory for buffering, possible due to hifg speed USB connectivity. So it is possible to capture for example 500 Mio samples, which may contain the first 10 seconds of a Z80 microcomputer booting at 4 Mhz, where all microcomputer pins are tracked by the analyzer.

After having captured this enormous amount of data, saved it as a file, the window of interest can easily be selected and analyzed.

Salea-Clone 24Mhz/8 channel

Super cheap (ca. 10 euros) mini logic analyzer. 24Mhz, 8 Channel. This is, as I read, from an original design and product from Salea company. Salea itself does not produce it anymore. The original design was copied by countless asian vendors and can be bought today for a few bucks from the big selling platforms.

Despite it is cheap and looks like a toy, it is not, but a valuable product. It is supported by Sigrok and Sigroks Pulseview, so it has a great, feature-rich user interface from the Open Source Community. Because Sigrok supports numerous, large and expensive logic analyzers, there is a upgrade path. You can start with the Salea clone, become experienced with Sigrok and change later to a more powerful product, using still Sigrok for all tasks.

  • Hi/Lo -0.5-0.8V/2.0V-5.25V
  • 1Mohm/10pF input impedance
  • error pwm measurement +-42ns (at 24Mhz)
  • 24/16/12/8/4/2/1 Mhz, 500/250/200/100/50/25Khz /10Bits

Chips on PCB:

  • Cypress CY7C68013A-56: An USB 2.0 Peripheral controller with 16K RAM, 24 GPIOs, 56-pin QFN for non-battery powered applications. This chip contains an 8051 CPU core and contains the firmware of the Logic Analyzer. USB speed is 480 MBit/s.
  • NXP LVC245A Octal bus transceiver tri-state, connecting the probes to the main chip
  • Atmel 02DM = 24C02 EEPROM, containing some persistent data, presumably the USB id and maybe more.

Some vendor doc

Sigrok page: https://sigrok.org/wiki/VKTECH_saleae_clone

24 MHz sampling speed.
Logical channel sampling speed of 24M/s. 
To accept from logic: 5V voltage 5.25 V, standard CMOS threshold logic low 
level of 0.8V. 2.0 V logic high. The input impedance is to about 1 MΩ see 
the additional specifications (10 pF)
dmesg
[616090.294204] usb 1-2.3.4: new high-speed USB device number 14 using xhci_hcd
[616090.396639] usb 1-2.3.4: New USB device found, idVendor=0925, idProduct=3881, bcdDevice= 0.01
[616090.396644] usb 1-2.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[616090.396647] usb 1-2.3.4: Product: fx2lafw
[616090.396649] usb 1-2.3.4: Manufacturer: sigrok
[616090.396651] usb 1-2.3.4: SerialNumber: Saleae Logic

InnoMaker LA5032

USB Logic Analyzer, main features:

  • 32 Channels
  • 500Mhz Max Sample Rate
  • 10G Samples
  • MCU/ARM/FPGA Debug Tool
  • English Software,
  • Supports Linux too

https://github.com/INNO-MAKER/Logic-Analyzer-KS/blob/main/ReadMe.txt

From Inno-Maker web site:


LA5032 is a high-performance logic analyzer with 32 channels and 500M max 
sampling rate.
Composed of two parts: software on personal computer and hardware equipment. 
It has the advantages of high sampling rate, large sampling depth, easy to use, 
etc.
LA5032 can sample 32 digital signal at same time. Then the sampled data can 
be displayed, analyzed, exported and saved on the computer. Software can 
also decode the data if it conform to the standard protocol of the software 
supported. Then the decoded data can be displayed, exported and saved.
Supported standard protocols: MIPI DSI LP,UART/RS-232/485, I2C, SPI, CAN, 
DMX512, HDMI CEC, I2S/PCM, JTAG, LIN, Manchester, Modbus, 1-Wire, UNI/O, SDIO, 
SMBus, USB1.1, PS/2, NEC InfraRed, Parallel, etc...
Support OS: Windows(32bit/64bit), MAC OS, LINUX.

Feature:
- Portable and lightweight
- 500M sampling rate @ full channels
- Large sampling depth and support compression
- The built-in PWM generator
- Compatible USB2.0/3.0 interface
- Powerful software and easy to use
- Support online upgrade automatically

Specification:
- Input channels number: 32
- Max sampling rate: 500M
- Measurement bandwidth: 80M
- Min pulse width can be captured: 6.25ns
- Hardware memory size: 1Gbits
- Hardware sampling depth: 50M/channel
- Max compressed depth: 10G/channel
- Input voltage range: -50V ~ +50V
- Input impedance: 220KΩ, 12pF
- Adjustable threshold voltage: -4V ~ +4V, step: 0.01V
- PWM channels number: 2
- PWM frequency range: 0.1 ~ 20MHz
- PWM frequency adjust step: 10ns
- PWM pulse width adjust step: 5ns
- PWM output voltage: +3.3V
- PWM output impedance: 50Ω
- Standby current: 200mA
- Max operating current: 400mA
- Support OS: Windows XP, Vista, Windows 7/8/10(32bit/64bit)
- Supported standard protocols: MIPI DSI LP,UART/RS-232/485, I2C, SPI, CAN, DMX512, HDMI CEC, I2S/PCM, JTAG, LIN, Manchester, Modbus, 1-Wire, UNI/O, SDIO, SMBus, USB1.1, PS/2, NEC InfraRed, Parallel, etc...

Packing List:
- 1 x LA5032 Logic Analyzer
- 2 x 9P Test Lead Set
- 1 x 2P Test Lead Set
- 20 x Test Hook Clip
- 1 x USB2.0 Cable
- 1 x CD-ROM

dmesg output for this device:

[695415.736006] usb 1-2.3.4: new high-speed USB device number 31 using xhci_hcd
[695415.837610] usb 1-2.3.4: New USB device found, idVendor=77a1, idProduct=01a2, bcdDevice= 0.00
[695415.837623] usb 1-2.3.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0

So product id is 01a2. Vendor Id is 77a1.

Install vendor software

Download, extract. Then install, install.sh script there. This will the binary and a udev rule:

# Kingst Virtual Instruments
# This file should be installed to /etc/udev/rules.d so that you can access the hardware without being root
#
# type this at the command prompt: sudo cp 99-Kingst.rules /etc/udev/rules.d

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="01a1", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="01a2", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="01a3", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="01a4", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="02a1", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="02a2", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="02a3", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="03a1", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="03a2", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="77a1", ATTR{idProduct}=="03a3", MODE="0666"

After that, lsusb lists the device correctly:

Bus 001 Device 036: ID 77a1:01a2 Kingst Kingst Logic Analyzer

Configure Software to use LA from sigrok software (pulseview, sigrok-cli)

We need to download and install the LA5032 firmware to be accessible for sigrok. Extract firmware from binary file. We need 1) KingsST installation to have the vbinary file and 2) an extractor that can extract the firmware.

1) Install KingstVIS

Download KingstVIS software, in my case for Linux and extract in home directory. For Linux: http://www.qdkingst.com/download/vis_linux

This extracts the software unter $HOME/KingstVIS. The executable there is also called KingstVIS.

Next Image shows KinstVIS, with a single channel (1Khz signal), captured 1MSa with 500Mhz (totally useless, of course, but just for trying out).

2) Extract firmware

Download the complete git repo from https://sigrok.org/gitweb/?p=sigrok-util.git;a=summary . This is the sigrok-util project. Extract and go to directory firmware/kingst-la. There, execute the extraction script and give as parameter the location of the just extracted binary:

./sigrok-fwextract-kingst-la2016 /home/dennis/KingstVIS/KingstVIS

This results in the creation of a whole bunch of firmware files.

resource fwusb/fw01A1, file kingst-la-01a1.fw, size 5350, checksum 800fff37
resource fwusb/fw01A2, file kingst-la-01a2.fw, size 5430, checksum 720551a9
resource fwusb/fw01A3, file kingst-la-01a3.fw, size 5697, checksum 1c4f4184
resource fwusb/fw01A4, file kingst-la-01a4.fw, size 142412, checksum 066af8de
resource fwusb/fw03A1, file kingst-la-03a1.fw, size 5459, checksum 797a67ea
resource fwfpga/LA1010A0, file kingst-la1010a0-fpga.bitstream, size 124412, checksum a655cdd2
resource fwfpga/LA1010A1, file kingst-la1010a1-fpga.bitstream, size 125301, checksum 2333d203
resource fwfpga/LA1010A2, file kingst-la1010a2-fpga.bitstream, size 342524, checksum d2cf8e9e
resource fwfpga/LA1016, file kingst-la1016-fpga.bitstream, size 178151, checksum 7db70001
resource fwfpga/LA1016A1, file kingst-la1016a1-fpga.bitstream, size 178379, checksum 166866be
resource fwfpga/LA2016, file kingst-la2016-fpga.bitstream, size 178542, checksum 20694ff1
resource fwfpga/LA2016A1, file kingst-la2016a1-fpga.bitstream, size 178362, checksum 7cc894fa
resource fwfpga/LA2016A2, file kingst-la2016a2-fpga.bitstream, size 577892, checksum f7377457
resource fwfpga/LA5016, file kingst-la5016-fpga.bitstream, size 181322, checksum c0799f49
resource fwfpga/LA5016A1, file kingst-la5016a1-fpga.bitstream, size 247485, checksum d8adbcff
resource fwfpga/LA5016A2, file kingst-la5016a2-fpga.bitstream, size 593076, checksum 3a555fcd

resource fwfpga/LA5032A0, file kingst-la5032a0-fpga.bitstream, size 451116, checksum 6e32f945 <--- the related LA5032 file

resource fwfpga/MS6218, file kingst-ms6218-fpga.bitstream, size 127244, checksum 64079d0e

These files need to be copied to locations where sigrok search for firmware files.

dennis-pc:/home/dennis/innomaker-la5032/sigrok/sigrok-util-HEAD-249b79d/firmware/kingst-la # cp kingst-* /usr/share/sigrok-firmware/

dennis-pc:/home/dennis/innomaker-la5032/sigrok/sigrok-util-HEAD-249b79d/firmware/kingst-la # ls /usr/share/sigrok-firmware/
fx2lafw-braintechnology-usb-lps.fw  fx2lafw-sigrok-fx2-8ch.fw       kingst-la1016-fpga.bitstream
fx2lafw-cwav-usbeeax.fw             fx2lafw-yixingdianzi-mdso.fw    kingst-la2016a1-fpga.bitstream
fx2lafw-cwav-usbeedx.fw             kingst-la-01a1.fw               kingst-la2016a2-fpga.bitstream
fx2lafw-cwav-usbeesx.fw             kingst-la-01a2.fw               kingst-la2016-fpga.bitstream
fx2lafw-cwav-usbeezx.fw             kingst-la-01a3.fw               kingst-la5016a1-fpga.bitstream
fx2lafw-cypress-fx2.fw              kingst-la-01a4.fw               kingst-la5016a2-fpga.bitstream
fx2lafw-hantek-6022be.fw            kingst-la-03a1.fw               kingst-la5016-fpga.bitstream
fx2lafw-hantek-6022bl.fw            kingst-la1010a0-fpga.bitstream  kingst-la5032a0-fpga.bitstream
fx2lafw-sainsmart-dds120.fw         kingst-la1010a1-fpga.bitstream  kingst-ms6218-fpga.bitstream
fx2lafw-saleae-logic.fw             kingst-la1010a2-fpga.bitstream
fx2lafw-sigrok-fx2-16ch.fw          kingst-la1016a1-fpga.bitstream

Set up working system

I found that the OpenSuse Leap packages (from 15.4) do not contain code for KingST LA5032. So I needed to compile+install Sigrok tools from scratch myself.

Complete sourcecode is at github, https://github.com/sigrokproject/libsigrok .

Required sigrok parts were:

There was an issue when building pulseview with some python file. I have python2 and python3 on my machine and the dependency was downloaded for python3 but pulseview build was using python2, then complaining for missing dependency. I fixed that by removing python2 from the configure script.

Besides this, a bunch of devel packages needed to be loaded. Then the build went smoothly for all required sigrok parts.

All new sigrok tools and libs were installed to /usr/local, so this path needs to be present when startinmg pulseview binary, e.g. like:

LD_LIBRARY_PATH=/usr/local/lib64 pulseview

Next image shows nicely running pulseview, with some I2C communication and the decoding feature for I2C.

Connect Kingst LA5032 directly to Notebooks USB port, not via USB Hub

Connection via Hub does not work for me. I get errors like this on console:

sr: kingst-la2016: Unexpected run state, want 0x85eX, got 0x0000.

If all works well, for a test acquisition we should get:

Acquisition took 0.06 s