Here is some simple example code for a USB application running on an XMOS device and the PC libusb code that talks to it. We use this on the XTAG-2 programmer.DrNO wrote:Hey mkassner, would you be willing to share your project files with your tester file? I'm interested in starting a USB project but starting with test code for bulk transfer would GREATLY help. Also what hardware are you using (what USB IC are you using)?
XMOS side / 1 IN 1 OUT Bulk USB device
https://github.com/xcore/proj_xtag2/tre ... usb_loader
PC side / libusb interface to XMOS device
https://github.com/xcore/proj_xtag2/tre ... ial_number
Probably best not to run the host side without the OTP programming code commented out ;-) just incase but it will give you a simple reference for a complete USB device including host access code. This basically implements a USB bootloader to an XMOS device which in this example programs the serial numbers into manufactured XTAG-2 devices by loading and running code. In the deployed system the bootloader is contained in the device OTP.