DFU questions

Technical questions regarding the XTC tools and programming with XMOS.
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Post by dweeb4 »

mon2 wrote:Not sure on how protected the CPU can be but considering the vendor is noting that you can obtain firmware for this widget from XMOS, you could probably do the same from XMOS channels. Not into audio but what is this ? An audio device with a VU meter using OLED displays ? Check around the website and you may be able to locate the source and/or binary file for this device.
It's a USB to I2S bridge device
If the internal flash is not protected, you should be able to read it out. Have you attempted to connect to an external XTAG-3 tool ? If yes, run the xflash tool and attempt to read out the FLASH ID only. DO NOT attempt any writes to this target device till you have a clean backup of the firmware.

This CPU must be with internal flash. About to post some details in a few minutes to compare notes on the markings.
Yes connected to XTAG-3 but don't know where how to use this - do I need to use xflash tool with XTAG to read flash ID?

Where does the DFU loader fit into this scenario? I'm confused - I thought DFU was the way to load/retrieve firmware from XMOS device?

This is more than a little confusing with different datasheets showing different id markings & the above DFU Vs xflash info

BTW, I very much appreciate your time & efforts, mon2 in trying to alleviate my confusion


dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Post by dweeb4 »

Hmmm, curiouser & curiouser
I just looked at the datasheets on XMOS & the XU216 datasheet is dated 2015/8/27 - older than the XU216 datasheet on digikey (2016/4/20) - what the hell??
So which one has the correct id markings??
It would seem the Digikey XU216 is correct & this has the id marking U11692C20 - same as XUF216 which agrees with the id markings on the DIYINHK board's XMOS chip which doesn't have extranl flash ROM - it must be internal in the XMOS chip

As I said, pity XMOS don't put different id markings on these two different chips?

Maybe somebody from XMOS can clear this up, definitively??
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Ok. It make sense. The IC in the photo reads as:

U11692C20

The "9" defines as 512K of internal SRAM. If this value is 8 then 256K of internal SRAM.

The "2" after the 9 defines the amount of internal FLASH. If this value is 0 then NO internal FLASH on the device.

The "C" after the 2 defines the Commercial temp

The "20" after the C defines the speed grade of the IC.

This calculator can assist with the confirmation of the amount of internal SRAM or internal FLASH:

http://logbase2.blogspot.ca/2008/08/log-calculator.html

Summary - you have internal flash inside this CPU.

=======

Yes, you will need to install the latest and complete toolchain for the XMOS devices (free download from xmos.com) -> review the use of the xflash tool and throw a command to read out the FLASH ID. That is all I would do at this stage to confirm you can communicate with the device. It is possible the flash device is locked which will prevent you from reading out the contents but you can explore this option once the XTAG-3 tool is working. The vendor shows a photo where they dock the older XTAG tool to communicate with the PCB.

The IC markings posted in this thread are from the xmos.com website and assuming that they are the most current documents for the respective devices.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

http://www.diyaudio.com/forums/vendors- ... l-pcb.html
The usb audio source code can be downloaded from xmos.com and the VU meter patch can be downloaded from xcore.com released under bsd license.
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Post by dweeb4 »

mon2 wrote:Ok. It make sense. The IC in the photo reads as:

U11692C20

The "9" defines as 512K of internal SRAM. If this value is 8 then 256K of internal SRAM.

The "2" after the 9 defines the amount of internal FLASH. If this value is 0 then NO internal FLASH on the device.

The "C" after the 2 defines the Commercial temp

The "20" after the C defines the speed grade of the IC.

This calculator can assist with the confirmation of the amount of internal SRAM or internal FLASH:

http://logbase2.blogspot.ca/2008/08/log-calculator.html

Summary - you have internal flash inside this CPU.

=======
Ah, thanks for clarifying this - I was being stupid missing the number for the internal flash
Yes, you will need to install the latest and complete toolchain for the XMOS devices (free download from xmos.com) -> review the use of the xflash tool and throw a command to read out the FLASH ID. That is all I would do at this stage to confirm you can communicate with the device. It is possible the flash device is locked which will prevent you from reading out the contents but you can explore this option once the XTAG-3 tool is working. The vendor shows a photo where they dock the older XTAG tool to communicate with the PCB.

The IC markings posted in this thread are from the xmos.com website and assuming that they are the most current documents for the respective devices.
OK, am I being stupid again about DFU Vs xFlash - I guess DFU is used for in-field firmware updates when DFU has been turned on in firmware build & xflash is used when DFU facility hasn't been turned on in the build?
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Post by dweeb4 »

Sorry, more questions:
- I ran DFU upgrade app that came with thesyscon driver & it reports that "current firmware" as V21.01
- I plugged in Xtag & tried to run flash from within xTIMEcomposer & it seems to want me to have a built firmware ready for flashing to the board in order for it to run?

Is there no way I can check the existing firmware & retrieve it without having a new firmware ready to replace it?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

No real experience in testing the DFU but the following sounds logical:

Code: Select all

Uploading existing firmware from the device

You can retrieve a firmware image from the device, providing an upgrade image is present. 

Run the command:

    dfucons upload currentfirmware.bin

The file currentfirmware.bin contains the latest upgrade image. This file is an exact copy of the data from the flash and can be downloaded to the device again to test.
The way I see the above command working is that the DFU tool will extract the contents of the internal flash and output the contents to the target file currentfirmware.bin for safe keeping.

reference:
https://www.xmos.com/support/silicon?ve ... 441&page=2

Try it and post your results.
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Post by dweeb4 »

mon2 wrote:No real experience in testing the DFU but the following sounds logical:

Code: Select all

Uploading existing firmware from the device

You can retrieve a firmware image from the device, providing an upgrade image is present. 

Run the command:

    dfucons upload currentfirmware.bin

The file currentfirmware.bin contains the latest upgrade image. This file is an exact copy of the data from the flash and can be downloaded to the device again to test.
The way I see the above command working is that the DFU tool will extract the contents of the internal flash and output the contents to the target file currentfirmware.bin for safe keeping.

reference:
https://www.xmos.com/support/silicon?ve ... 441&page=2

Try it and post your results.
Yes this was the way I also read it & why I started this thread but there really isn't much info in the XMOS doc.
Is dfucons an exe file? Where do I download it? Or is it built into xTIMEcomposer? I can't find it ?
I simply don't know where to run these "dfucons" commands which is where I started this thread!
I was hoping someone with DFU experience would answer, not that I don't appreciate your time & efforts, mon2 but you are at the same point as me i.e. how is the command "dfucon" run?
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Post by dweeb4 »

Alternately, how do I run xflash (without having new firmware build to flash) just to retrieve the existing firmware on the board?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

1) DFUCONS
Thesycon provide both GUI and CLI DFU tools, TUSBAudioDfu.exe and dfucons.exe respectively.
reference:
https://www.xmos.com/support/boards?com ... 441&page=2

This is a console based flash programming utility and is available from this download:

https://www.xmos.com/published/usb-audi ... er-windows

Download and extract this package. The dfucons.exe program is posted inside the following folder (after you run the download):

C:\Thesycon\TUSBAudio_v3.34.0\EvaluationKit\utilities

Copy the dfucons.exe program and paste into the following folder:

C:\Thesycon\TUSBAudio_v3.34.0\EvaluationKit\DriverPackages\XMOS_EVAL_KITS_DEMO\DriverSetup\release

This is because when you run the dfucons.exe program, the application will search for the supporting dll files to launch.

Once you have done this, enter the dos prompt (aka Command Prompt - admin) and enter the following commands:

cd\ <ENTER> ; to take you to the root folder on your hard drive

cd C:\Thesycon\TUSBAudio_v3.34.0\EvaluationKit\DriverPackages\XMOS_EVAL_KITS_DEMO\DriverSetup\release

to enter the folder with the dfucons.exe program.

Then type:

dfucons info <ENTER>

dfucons upload currentfirmware.bin

The file currentfirmware.bin contains the latest upgrade image. This file is an exact copy of the data from the flash and can be downloaded to the device again to test.



2) From my first post, you can also try:

Code: Select all

xflash --read-all -o currentfirmware.bin

Reads the contents of all memory on the flash device and writes it to a file on the host. Must be used with -o.
Recommend to view the contents of the target file with a binary editor to be sure the file is not blank before erasing your flash memory.
Post Reply