DFU with sw_usb_audio_v9.0.0 on XE216 Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
YaoTing
Newbie
Posts: 1
Joined: Wed Mar 05, 2025 3:01 am

DFU with sw_usb_audio_v9.0.0 on XE216

Post by YaoTing »

Hi,

I am currently working on implementing DFU on my custom PCB using the XE216 device. My board has been successfully flashed with the firmware "app_usb_aud_xk_216_mc" via xTAG3, which allows it to be recognized by a host. I have closely followed the instructions provided in the USBDFU_AN02019_v1.0.0 document and used the xmosdfu/dfu-util loader for upgrading.

However, upon detaching the device from application mode, I face an issue where the host is unable to reclaim the interface and returns "LIBUSB_ERROR_NO_DEVICE" when calling the libusb_claim_interface(devh, XMOS_DFU_IF) function. Is there any suggestions or advice on how to resolve this issue so that the host can reclaim the interface properly.

Software configuration:
  • sw_usb_audio-sw_9_0_0
  • XMOS_XTC_15.3.1
Log:

Code: Select all

_mc/bin/1AMi16o16xxxxxx/app_usb_aud_xk_216_mc_1AMi16o16xxxxxx.bin
runtime vid 0x20b1, pid 0x000e. DFU vid 0x20b1, pid 0xd00e
Found Runtime: [20b1:000e] ver=0900
Opening DFU capable USB device, [20b1:000e], Runtime mode.
XMOS DFU application started - Interface 3 claimed
Detaching device from application mode.
Waiting for device to restart and enter DFU mode...
Found DFU: [20b1:000e] ver=0900
Error claiming interface 0
The device has been disconnected
View Solution
YaoTing
Newbie
Posts: 1
Joined: Wed Mar 05, 2025 3:01 am

Post by YaoTing »

I discovered that the DFU_PID definition for the XE216 differs from that of the XU316 in the xua_conf.h file. Unlike the XU316, which has a specific DFU_PID definition, the XE216 does not define it in xua_conf.h, instead relying on the default definition from xua_conf_default.h.

After correcting the DFU_PID value in upgrade command for the XE216, the firmware upgrade was successful.

XU316 for AUDIO CLASS 2:
#define DFU_PID (0xD000 + PID_AUDIO_2)

XE216 for AUDIO CLASS 2:
No definition in xua_conf.h. Referring to xua_conf_default.h, the definition of DFU_PID is
#define DFU_PID PID_AUDIO_2
Last edited by YaoTing on Wed Mar 05, 2025 9:44 am, edited 1 time in total.
User avatar
Ross
Verified
XCore Legend
Posts: 1163
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Thanks for the feedback!
Technical Director @ XMOS. Opinions expressed are my own
User avatar
Ross
Verified
XCore Legend
Posts: 1163
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Just taken a look and it looks okay to me?

https://github.com/xmos/sw_usb_audio/bl ... onf.h#L142
Technical Director @ XMOS. Opinions expressed are my own