DFU always fail with xu232

Discussions about USB Audio on XMOS devices
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

DFU always fail with xu232

Post by TonyXiao »

Hi all

based on xcore-200 MC Audio board,which DFU function works, and i just change to xu232,nothing change to program, the usb device can be recognized by PC, but the DFU function always failed. and it reports:
TUSBAUDIO_GetDfuStatus: Function failed with error code 0xEE000003.
some time: TUSBAUDIO_GetDfuStatus: Function failed with error code 0xEF000011.

how can i going on? thanks!


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

Post by mon2 »

Which version of the tool chain was used for this firmware?

Be sure that the audio IP is the latest which others have reported to be an issue. That is, older IP from XMOS will raise the error you have referenced.
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi Mon2

i am using xTIME Composer Studio (Community_14.3.3),
and the firmware base on sw_usb_audio Version 6.15.2rc1 Released 2016-04-06, which is latest from xmos website.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. Please review and test the ideas posted by Infiniteimprobability here:

https://www.xcore.com/viewtopic.php?f=26&t=6746

(update) and also this thread:

https://www.xcore.com/viewtopic.php?t=5051
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi mon2

i used Thomas's method below, the dfu works once, and power off and on again can do another once upload.
so where is the problem? the hardware or the firmware side?
how can i fix it?

3. Force the Device to boot in DFU mode
The advantage is that the debugger can be used to step through the code and pinpoint where the DFU logic fails.

The device can be forced to boot in DFU mode by hardcoding the return value of GetDFUFlag() in dfu.xc to 0x11042011:
Code: Select all

static unsigned GetDFUFlag()
{
unsigned x;
//asm volatile("ldw %0, %1[0]" : "=r"(x) : "r"(FLAG_ADDRESS));
//return x;
return 0x11042011;
}
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi, mon2

i captured USB communication data, and found when i press start, then CTL 21 f2 00 00 05 00 00 00 is sending out.
the one DFU works, it will immediately reset. but for my custom board, it won't reset.
dfu fail.png
(24.29 KiB) Not downloaded yet
dfu fail.png
(24.29 KiB) Not downloaded yet
and program seems stucks below in dfu.xc:
program stucks.png
(24.96 KiB) Not downloaded yet
program stucks.png
(24.96 KiB) Not downloaded yet
and not going to reset the device. so what's the problem?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Do run the TDD.EXE from TheSycon which is a USB descriptor validation tool that also raised assorted errors with the XMOS IP. How does your IP score against this test tool ?
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi
when runs TDD.exe, the XU216 Audio MC board and my custom XU232 board report the same errors.
such as below:
*** ERROR: Descriptor has errors! ***
*** ERROR: Invalid wMaxPacketSize. Max 64 bytes allowed in full speed mode.
Microsoft OS Descriptor is not available. Error code: 0x0000001F

XU216 Audio MC board DFU works, but not on my custom board.
it needs to modify for such descripters?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi.

1) The TDD.EXE program is to alert you that the descriptors should be fixed before releasing this design to the market. This is mainly to be fully compliant to the USB spec and prevent future issues with different boxes.

2) The descriptor fix is not necessary during this debugging phase of the design.

3) Does the custom XU232 board work properly - other than the DFU failing? Can you code up a simple LED blinky program and boot everytime from your external flash device without problems?
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi

actually i am using XUF232 + XU208, the two xmos are xlinked, and it works well every time for two USB device,I2S,SPI and led, all other project requirements is implemented but DFU.
i have tried only using XUF232, and the same issue.
Post Reply