No DFU communication between xmosdfu and xCore-200

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
polica
Junior Member
Posts: 4
Joined: Wed Jul 31, 2019 12:19 am

No DFU communication between xmosdfu and xCore-200

Postby polica » Wed Jul 31, 2019 1:20 am

I'm using an XUF216-512-TQ128-C20 board and I have it loaded with the stock app_usb_mic_array and I'm trying to upgrade the firmware with DFU.

When I run xmosdfu it tells me that it's starting to write a block, but then it just hangs after that.
I set the XUD core to be high priority to ensure USB communication is working properly and followed all the steps in this document: https://www.xmos.com/download/DFU-loade ... ces(4).pdf
I've also run through these steps: viewtopic.php?t=5051
I've inserted debug statements into the DFU functions in dfu.xc and it seems that none of them get called at all when I run xmosdfu. The same is true when I force the board into DFU mode and run xmosdfu
I've also switched out my cables to ensure that they're good.

Can anyone provide any insight here on what to try next?
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Jul 31, 2019 2:14 pm

What did the following step reveal?

Read the content of the flash with xflash --read-all. Then compare it with a diff tool like Hex Fiend


Try with

Code: Select all

xflash --verbose --read-all -o flash_dump.bin

And what is the output if you try for example:

Code: Select all

xmosdfu --upload test.bin
RitchRock
Experienced Member
Posts: 125
Joined: Tue Jan 17, 2017 9:25 pm

Postby RitchRock » Wed Jul 31, 2019 4:35 pm

If you added code, try commenting out -DFLASH_MAX_UPGRADE_SIZE=64*1024 from the BUILD_FLAGS in the makefile.
polica
Junior Member
Posts: 4
Joined: Wed Jul 31, 2019 12:19 am

Postby polica » Wed Jul 31, 2019 7:31 pm

Running this

Code: Select all

xmosdfu --upload test.bin
hangs after reaching this point

Code: Select all

... DFU firmware upgrade device opened
... Uploading image (test.bin) from device
And when I kill it and open test.bin I get the following data repeated a few million times

Code: Select all

00 00 00 00 00 00 00 00 03 F4 BB C9 EB 7F 00 00 26 00 00 00 00 00 00 00 60 E7 F1 C9 EB 7F 00 00 68 65 F4 FD 16 56 00 00 62 2B BB C9 EB 7F 00 00 12 01 00 02 00 00 00 40 00 00 00 00 00 00 00 00
RitchRock
Experienced Member
Posts: 125
Joined: Tue Jan 17, 2017 9:25 pm

Postby RitchRock » Wed Jul 31, 2019 10:45 pm

Use

Code: Select all

xflash --read-all --target-file <yourxnfile.xn> -o flash.bin
to download what is actually on the flash. Do this before and after you attempt DFU. Then compare the result sin a hex editor like HxD. I successfully debugged DFU in this manner, noticing that it was truncated. Read through this thread if you haven't already: viewtopic.php?f=26&t=6746&hilit=DFU+hex+editor
polica
Junior Member
Posts: 4
Joined: Wed Jul 31, 2019 12:19 am

Postby polica » Fri Aug 02, 2019 12:57 am

I did the xflash read-all before and after DFU and the 2 images are exactly the same, so it looks like nothing got written at all.

I wonder if things are going wrong on the USB side?

Are there any steps I can do to test that?

Who is online

Users browsing this forum: No registered users and 2 guests