USB Audio device disappears running debugger, runs fine when flashed

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
bowerymarc
Active Member
Posts: 39
Joined: Mon Dec 30, 2013 7:29 am
Contact:

USB Audio device disappears running debugger, runs fine when flashed

Postby bowerymarc » Sat Sep 22, 2018 4:51 am

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: 1254
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Sat Sep 22, 2018 2:36 pm

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: 39
Joined: Mon Dec 30, 2013 7:29 am
Contact:

Postby bowerymarc » Mon Sep 24, 2018 11:42 pm

-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....

Who is online

Users browsing this forum: Dimdim and 33 guests