USB Debugging with sigrok
Summary
Sep 25, 2017Advanced USB packet capture with logic analyzers and sigrok.
Microcontroller
Test Tools
- ST-LINK Debugger on Banggood @ $3.60
- USB TTL RS232 adaptor @ $1.63
- DreamSourceLab DSLogic Plus Logic Analyzer
Software
libopencm3 Bug
Source Code
Demo Firmware
control-test.py
#! /usr/bin/env python3 import usb.core import time dev = usb.core.find(idVendor=0x0925, idProduct=0xD100) if dev is None: raise ValueError('Device not found') res = dev.ctrl_transfer( bmRequestType=0x40, # OUT, VENDOR, DEVICE request bRequest=1, # Request #1 wValue=0xCAFE, wIndex=0xD00D, data_or_wLength=[0x01, 0x23, 0x45, 0x67])