USB Audio device disappears running debugger, runs fine when flashed

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
User avatar
bowerymarc
Active Member
Posts: 40
Joined: Mon Dec 30, 2013 7:29 am
Contact:

USB Audio device disappears running debugger, runs fine when flashed

Post by bowerymarc »

Here's something really odd. Code based on the USB Audio kit (the MQA dev kit).... ported to custom hardware. When flashed, code runs great. In the debugger, if I set it to break at main, it shows up (USB Prober, Mac OS X) until you hit run, then the USB device disappears.

The USB Phy is connected to tile[0], whereas in the stock driver it's on tile[1], though changing to tile[0] in the stock kit still works fine in the debugger.

Just wondering where to look... I've made the setups, .xn files, etc. match as closely as possible. Seems like it's a timing issue where the USB firmware isn't responding quickly enough. The xmos is actually running, and everything looks ok from the debugger (sitting in the right calls when you manually break, etc.)


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Check the optimization flag (-O option) inside your makefile. Believe this is required to be -O3 for USB usage.

Aside from this, consider to test your custom PCB with another XMOS ref design such as XMOS USB CDC, HID, MOUSE examples. This to rule out any mods to your audio IP being a root cause. Do the other USB examples work ok with and without the debugger enabled on your board using tile[0]?
User avatar
bowerymarc
Active Member
Posts: 40
Joined: Mon Dec 30, 2013 7:29 am
Contact:

Post by bowerymarc »

-O3. I ran the stock USB audio project, and modified version to move USB core to tile 0, both run with the debugger. (audio clocks wouldn't be working though, those are assigned to different pins). Also the MQX dev kit firmware unmodified has the same characteristic (disappears while in the debugger). Strange....
Post Reply