I am having problems with a XUD_SetData call after some changes to the USB Audio code. I am trying to figure out how to debug this? The problem is MY changes, and not the XUD library. It is difficult to know what it may be without more information about this XUD call and XUD in general. It is being blocked here from XUD_EpFuncs.S:
testct r11, res[r0] // Test whether there is a RESET/SUSPEND exception
I assume there are no tokens at all coming in from XUD, which blocks the thread. I do not know anything about what, how, or why this is used or what conditions, etc. Without more information, I am left guessing and trying whatever makes sence till I get it by chance.
Any suggestions?
Debugging XUD Calls
-
- Respected Member
- Posts: 283
- Joined: Fri Mar 19, 2010 4:49 am
-
- Active Member
- Posts: 38
- Joined: Wed Jun 09, 2010 3:20 am
- Location: Maine, USA
The instruction testct will block until a byte of anything arrives in the channel, not just tokens. I have not used the XUD library, but is it possible that you are doing something that it no longer has any data to send through the channel?I assume there are no tokens at all coming in from XUD, which blocks the thread.
-
- Respected Member
- Posts: 283
- Joined: Fri Mar 19, 2010 4:49 am
Decided to debug the stock firmware against my changes. I had not thought of that one yet. Easy to do. That worked well to see what was going on and what variables should be.
I was able to determine that the call was supposed to block, so that was not the problem. It was basically my lack of knowledge of what the XDE was telling me. I was missing a couple includes which caused a compiler directive to be wrong (and XDE was showing me that, but I didn't understand what the gray shading meant).
I now have the analog in data going through a channel instead of shared memory so I can "decouple" the audio and USB.
I was able to determine that the call was supposed to block, so that was not the problem. It was basically my lack of knowledge of what the XDE was telling me. I was missing a couple includes which caused a compiler directive to be wrong (and XDE was showing me that, but I didn't understand what the gray shading meant).
I now have the analog in data going through a channel instead of shared memory so I can "decouple" the audio and USB.