DFU always fail with xu232

New to XMOS and XCore? Get started here.
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

DFU always fail with xu232

Postby TonyXiao » Tue Dec 17, 2019 11:11 am

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

Postby mon2 » Tue Dec 17, 2019 2:53 pm

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

Postby TonyXiao » Wed Dec 18, 2019 3:31 am

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

Postby mon2 » Wed Dec 18, 2019 3:39 am

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

viewtopic.php?f=26&t=6746

(update) and also this thread:

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

Postby TonyXiao » Wed Dec 18, 2019 9:31 am

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

Postby TonyXiao » Thu Dec 19, 2019 10:25 am

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
and program seems stucks below in dfu.xc:
program stucks.png
and not going to reset the device. so what's the problem?
You do not have the required permissions to view the files attached to this post.
User avatar
mon2
XCore Legend
Posts: 1749
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Thu Dec 19, 2019 1:16 pm

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

Postby TonyXiao » Sat Dec 21, 2019 4:22 am

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

Postby mon2 » Sat Dec 21, 2019 4:26 pm

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

Postby TonyXiao » Mon Dec 23, 2019 2:43 am

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.

Who is online

Users browsing this forum: No registered users and 1 guest