I have added a USB interface to the "USB 2.0 Audio Device Software" available on this page : https://www.xmos.com/support/boards?pro ... 4&secure=1
It enumerates in Windows just fine, and I've installed a custom WinUSB driver for my particular interface. I can also successfully open this device through the WinUSB API and send a control transfer to the device.
I have added special handling code to endpoint0.c in module_usb_audio, which detects specific requests made. All I am currently attempting to do is read a byte sent with a control transfer, like so:
Code: Select all
result = XUD_GetBuffer(c_ep0_out, buffer, &length);
Code: Select all
sp details:
sp.bRequestType: 0x0040
vend req type: 0x0040
sp.bRequest: 0x0050
sp.wValue: 0x0000
sp.wIndex: 0x0001
sp.wLength: 0x0001
in WRITE_COMMAND_REQUEST...
xrun: Program received signal ET_LOAD_STORE, Memory access exception.
[Switching to tile[0] core[3] (dual issue)]
XUD_GetData () at C:/Users/erolson/xu216work/module_xud/src/XUD_EpFuncs.S:280
280 ldw r10, r0[9] // Check if we missed a reset
Current language: auto; currently asm
Does anyone know why I am getting a memory access exception here? Is there another way to read usb data in endpoint0.c ?