Sigrok
ARMFLY AX Pro is a Chinese clone of the CWAV USBee AX. supported by sigrok project, this page is using ARMFLY AX Pro or ARMFLY Mini-Logic, both are MAX 24MSPS(in short of Million Samples per Second).
Contents |
Install
Samplerate
Samplerate should always be higher then the rate of your signal, at least twice as high usually, the more the better, usage: -d 0:samplerate=4mhz
$ sigrok-cli -d 0 #list supported samplerates
CWAV USBee AX with 8 probes
Supported triggers: 0 1
Supported options:
samplerate - supported samplerates:
20 kHz
25 kHz
50 kHz
100 kHz
200 kHz
250 kHz
500 kHz
1 MHz
2 MHz
3 MHz
4 MHz
6 MHz
8 MHz
12 MHz
16 MHz
24 MHz
Decode UART
- Dump the UART output to sigrok format:
# sigrok-cli -A uart=hex -d 0:samplerate=4mhz --time 4s -o serial-output.sr --probes 1,2 -a uart:tx=0:rx=1:baudrate=115200
- Decode the UART output
# while true; do sleep 1s && echo "hello world" > /dev/ttyATH0 ; done # sigrok-cli -i serial-output.sr -a uart:baudrate=115200:tx=0:rx=1 uart: "Start bit" "Start" "S" uart: "TX: h" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: e" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: l" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: l" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: o" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: " uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: w" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: o" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: r" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: l" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: d" uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" " rt: "TX: uart: "Stop bit" "Stop" "P" uart: "Start bit" "Start" "S" uart: "TX: " uart: "Stop bit" "Stop" "P"
Decode USB
- Logic analyzer setup
Probe Device ---------------------- 0 DM (D-) 1 DP (D+)
- USB color codes
PIN Color ---------------------- VCC Red +5 V Dā White Data ā D+ Green Data + GND Black Signal Ground
- Sniffing
# sigrok-cli -d 0:samplerate=24mhz --time 1s -o out.sr --probes 1,2 -a usb:dp=1:dm=0
- Decoding
# sigrok-cli -i out.sr -a usb:dp=1:dm=0 usb: "BIT STUFF ERROR" usb: "RESET" usb: "RESET" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" usb: "SYNC INVALID!" "000000110010110011000011001000" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" usb: "IN DEV 6 EP 3" "00000001100101100110000110010000" ... ...
- Using sigrok-gtk open the out.sr file
- Low speed device option
For Low speed device we need one more option signalling=low-speed for example
# sigrok-cli -d 0:samplerate=24mhz --time 1s -o out.sr --probes 1,2 -a usb:dp=1:dm=0:signalling=low-speed
Forcing a USB host port to full-speed
Hantek DSO 2090
Dump firmware
After dump firmware, sigrok will works fine with Hantek DSO 2090
# git clone git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok-util # cd sigrok-util # ./hantek-dso-extract.py /mnt/64bitDriver/Dso2090X861.sys #mount the driver disk # sudo cp hantek-dso-2090.fw /usr/local/share/sigrok-firmware/
Run
Those devices don't sample for a time or # of samples, like an LA, they capture a buffer's full, send it out, then do it all again in other words: frames, so don't use --time or --samples, use --frames. e.g. 1 to capture one frame, send it out, then stop. second, the default is to trigger on CH1, so hook some signal into it or it'll wait forever. for all the other options, do: sigrok-cli -d hantek-dso
# sigrok-cli --frames 1 -O float FRAME-BEGIN CH1: 0.258824 CH2: -0.007843 CH1: 0.258824 CH2: -0.007843 CH1: 0.258824 CH2: -0.007843 ...... FRAME-END