Problem downloading firmware to device with dfu-util

2 years 3 months ago - 2 years 3 months ago #29533989 by mbs
Hi, I'm trying to use linux to update the SDC21xxS firmware. I can use minicom to put the device into DFU mode, and then can upload and read the firmware from the device with dfu-util. I've tried to download the SDC21xxS firmware files (.zdfu and .zbin) to the device but both files have failed. I do not have much experience with DFU, STM or Roboteq devices, so I would be grateful for any help.
dfu-util -v -D SDC21XXS-Firmware-Update-v18d-010818.zdfu 
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash  "
Memory segment at 0x08000000   8 x 2048 = 16384 (r)
Memory segment at 0x08004000 120 x 2048 = 245760 (rew)
dfu-util: Only DfuSe file version 1.1a is supported
dfu-util: (for raw binary download, use the --dfuse-address option)

Please Log in or Create an account to join the conversation.

2 years 3 months ago #29533990 by Gabriel_Isko
Replied by Gabriel_Isko on topic Problem downloading firmware to device with dfu-util
Which model controller and hardware revision are you using?

Please Log in or Create an account to join the conversation.

2 years 3 months ago #29533991 by mbs
It's an SDC2160S v2.1B

Please Log in or Create an account to join the conversation.

2 years 3 months ago #29533992 by Gabriel_Isko
Replied by Gabriel_Isko on topic Problem downloading firmware to device with dfu-util
You will have to change the .zdfu folder to a .zip file, extract it, and then use the F3 dfu file with dfu-util. I believe the usage of the utility for dfu files is a little different than what you have tried so far .

Would you mind posting the memory that you were able to read from our controller using dfu-utils? We would like to see if the dfu-utility is working properly with the DFU mode implementation on our controller.

Please Log in or Create an account to join the conversation.

2 years 3 months ago - 2 years 3 months ago #29533993 by mbs
Thanks!

I was able to download the firmware (v18d) using dfu-util, but when uploaded and read, it is different from what was read after downloading the same firmware using Roborun DFU Loader (I have attached both files).

That makes me believe that you are correct about using dfu-util for DfuSe devices. I will look into that and try to figure out what I need to do differently.

One interesting thing is that when I query the device with minicom I get the same response. ?FID returns "FID=Roboteq v1.8d SDC2XXX 1/8/2018" for both methods of downloading the firmware, and other commands seem the same.

File Attachment:

File Name: read-firmware.tar.gz
File Size:12 KB
Attachments:

Please Log in or Create an account to join the conversation.

2 years 2 months ago #29534013 by mbs
Hi Gabriel,

I did some testing and it looks like the dfu-util can update the firmware with any of these commands:
dfu-util -D new-firmware.dfu
dfu-util -a 0 -D new-firmware.dfu
dfu-util -a 0 -s 0x800400 -D new-firmware.bin
dfu-util -s 0x800400 -D new-firmware.bin

To read the firmware you need to specify the memory location:
dfu-util -s 0x800400 -U read-firmware.bin

The first part of that bin file matches the original firmware bin file, with the addition of whatever else was in memory. It would be nice if the dfu-util could trim it to just the firmware that was uploaded to the device originally, but for my purposes (just trying to verify that the firmware is correctly uploaded), I think it is good enough.

File Attachment:

File Name: F3-v18d-te...s.tar.gz
File Size:59 KB
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.155 seconds