Continuous logic analyzer for UART, I2C, SPI? - Page 1
Forum section: electronics / general

author: guillep2k
author_rank: Contributor
timestamp: May 14, 2018, 12:48:39 am
content: Hi! I own one of those cheap USB logic analyzers and it's very lacking in the software department. It's compatible with Sigrok, which is nice, but all I was able to do is "after the fact" buffer analysis. I have a project where I have several chips talking to each other, like three CPUs, communication modules, etc. The protocols involved are UART, I²C and SPI. To debug my programs properly, I'd like to log everything they interchange, like a text log with all their talking, plus a couple more of digital signals. No fancy decoding. Just bytes and timestamps.Do you guys know of any software (Open Source or cheap) that could do that in real time with this kind of USB interface? I mean to log at least one hour of interaction in a way that I can check it while it's happening (and after the fact as well, of course). I know I'm short on signals, but at least one I²C plus two UARTs should be of great help.Thanks!

author: HwAoRrDk
author_rank: Super Contributor
timestamp: May 14, 2018, 01:42:07 am
content: If it's a Salae clone you have, I believe sigrok-cli - the command line tool - can do continuous capture with those. You can also directly apply protocol decoding and log the output to a file.

author: guillep2k
author_rank: Contributor
timestamp: May 14, 2018, 01:47:42 am
content: Intresting... I'll check that out. Thanks.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: May 14, 2018, 01:55:17 am
content: They give an example command on a page in the sigrok wiki:sigrok-cli --config samplerate=1M --driver=fx2lafw --continuous -P spi:mosi=1:clk=3:cs=4https://sigrok.org/wiki/Getting_started_with_a_logic_analyzer

author: guillep2k
author_rank: Contributor
timestamp: May 17, 2018, 02:02:59 am
content: Yes, sigrok-cli is exactly what I was looking for, thank you.Unfortunately, my el-cheapo USBee AX clone does not seem to fully support it and interrupts the parsing after a short while (also the parsed output doesn't look right).But I've got the answer I was looking for. Now it's a matter of finding a less-sucking device, picking from the sigrok's supported hardware list.Thank you, guys!

author: abraxa
author_rank: Frequent Contributor
timestamp: May 17, 2018, 06:55:20 pm
content: As of now, sigrok-cli doesn't do much buffering at all, so the interruption you describe could be caused by sigrok-cli spending too much time processing the data and being unable to pull data from the device. The FIFO in the FX2 then overflows and data acquisition ends.Can you tell us what parameters you used and show the output of "sigrok-cli -V"?

author: guillep2k
author_rank: Contributor
timestamp: May 17, 2018, 08:44:19 pm
content: AFAIK it's the latest:Code:c:\Program Files (x86)\sigrok\sigrok-cli>sigrok-cli.exe -Vsigrok-cli 0.8.0-git-690617bLibraries and features:- libsigrok 0.6.0-git-cdb134e/4:0:0 (rt: 0.6.0-git-cdb134e/4:0:0).- Libs:- glib 2.50.2 (rt: 2.50.2/5002:2)- libzip 1.1.3- libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)- libusb-1.0 1.0.20.11003-rc3- libftdi 1.2- Host: i686-w64-mingw32.static.posix, little-endian.- SCPI backends: TCP, serial, USBTMC.- libsigrokdecode 0.6.0-git-ef10cea/4:0:0 (rt: 0.6.0-git-ef10cea/4:0:0).- Libs:- glib 2.50.2 (rt: 2.50.2/5002:2)- Python 3.4.4 / 0x30404f0 (API 1013, ABI 3)- Host: i686-w64-mingw32.static.posix, little-endian.I don't remember the exact parameters, but I've used 2 MS/s for a test SPI signal with a clock <400 MHz. I specified my inputs and added CPOL=0 & CPHA=0 accordingly. PulseView shows the signals correctly.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 17, 2018, 11:44:24 pm
content: PulseView is more efficient with high bandwidth usb devices compared to cli (cli starves the usb host even without decoders).