No DFU communication between xmosdfu and xCore-200

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
polica
Junior Member
Posts: 4
Joined: Wed Jul 31, 2019 12:19 am

No DFU communication between xmosdfu and xCore-200

Post by polica »

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: https://www.xcore.com/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: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

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
XCore Addict
Posts: 186
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

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

Post by polica »

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
XCore Addict
Posts: 186
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

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: https://www.xcore.com/viewtopic.php?f=2 ... hex+editor
polica
Junior Member
Posts: 4
Joined: Wed Jul 31, 2019 12:19 am

Post by polica »

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?
Post Reply