Can't flash beta unit to either 2.11.6 or 3.1

If you're having problems with the hardware of a DM42, post about them here.
Post Reply
BruceH
Posts: 6
Joined: Sat May 06, 2017 12:39 am

Can't flash beta unit to either 2.11.6 or 3.1

Post by BruceH » Tue Dec 26, 2017 3:32 am

I'm trying to update to 3.1 but have a problem: the QSPI flash refuses to load. Any useful help would be much appreciated.

I'm using a Mac with the Homebrew version of dfu-util v9.0 and have an early beta calc which was still on the very first shipped out ROM. The SHA checksums of the downloaded files are correct.

Following the manual, I was able to download and install DMflash.bin successfully.

Code: Select all

$ sudo dfu-util -d 0483:df11 -D DMflash.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
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 = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08000000, size = 87728
Download	[=========================] 100%        87728 bytes
Download done.
File downloaded successfully
Next up is the QSPI flash but this fails every time:

Code: Select all

$ sudo dfu-util -d 0483:df11 -D DM42_qspi_3.1.bin -a "@QSPI Flash   /0x90000000/512*04Kg" -s 0x90000000
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
dfu-util: No DFU capable USB device available
Lastly, the main firmware flashes fine:

Code: Select all

$ sudo dfu-util -d 0483:df11 -D DM42_flash_3.1.bin -a "@Internal Flash  /0x08000000/512*0002Kg" -s 0x8000000
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
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 = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08000000, size = 865928
Download	[=========================] 100%       865928 bytes
Download done.
File downloaded successfully
The result of the above is that when the calc starts it says on the first splash screen that firmware 3.1 is installed. Pressing [EXIT] takes me to a 'Checking QSPI' screen which quickly fails with the error message: "The QSPI checksum failed due to old version or corruption of QSPI contents." The next key press takes me to the QSPI Load menu and I'm now stuck: the QSPI fails to load each time, whether by FAT or by Bootloader.

The FAT load error is "ERROR: 0a09" with 0% progress.

If it helps dfu-util -l gives:

Code: Select all

$ dfu-util -l
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Deducing device DFU version from functional descriptor length
Found Runtime: [05ac:8213] ver=0208, devnum=2, cfg=1, intf=3, path="6-1", alt=0, name="UNKNOWN", serial="002608D5DC49"
Found DFU: [0483:df11] ver=2200, devnum=3, cfg=1, intf=0, path="4-1", alt=2, name="@OTP Memory /0x1FFF7000/01*0001Ke", serial="205C32724834"
Found DFU: [0483:df11] ver=2200, devnum=3, cfg=1, intf=0, path="4-1", alt=1, name="@Option Bytes  /0x1FFF7800/01*040 e/0x1FFFF800/01*040 e", serial="205C32724834"
Found DFU: [0483:df11] ver=2200, devnum=3, cfg=1, intf=0, path="4-1", alt=0, name="@Internal Flash  /0x08000000/512*0002Kg", serial="205C32724834"

keithdalby
Posts: 483
Joined: Mon Apr 24, 2017 6:38 pm

Re: Can't flash beta unit to either 2.11.6 or 3.1

Post by keithdalby » Tue Dec 26, 2017 10:23 am

BruceH wrote:
Tue Dec 26, 2017 3:32 am
the QSPI flash refuses to load.
I've never had to update the QSPI, and I've had the device since beta testing. I'm curious; under what circumstances is its update is needed?

User avatar
Walter
Posts: 726
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: Can't flash beta unit to either 2.11.6 or 3.1

Post by Walter » Tue Dec 26, 2017 10:28 am

keithdalby wrote:
Tue Dec 26, 2017 10:23 am
BruceH wrote:
Tue Dec 26, 2017 3:32 am
the QSPI flash refuses to load.
I've never had to update the QSPI, and I've had the device since beta testing. I'm curious; under what circumstances is its update is needed?
Only when it's explicitly required in the update instructions.

@BruceH:
Apparently there's a QSPI flash necessary in your case. I don't remember any troubles in this matter with my beta but some other users experienced loading prob... ummh ... challenges. Please check the forum (searching for QSPI may be a good start) to find the precise circumstances and their way to solutions.
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

BruceH
Posts: 6
Joined: Sat May 06, 2017 12:39 am

Re: Can't flash beta unit to either 2.11.6 or 3.1

Post by BruceH » Wed Dec 27, 2017 12:21 am

Okay, I managed to recover it.

1) I re-loaded DMflash.bin.

2) Re-loaded DM42_flash_2.10.1.bin on the assumption that the oldest ROM version would be compatible with the QSPI in the calc.

This worked in that I now had a functioning calculator again, although one with an old ROM.

3) Next was to initialise FAT, then enable and copy DM42_qspi_3.1.bin into FAT as a file in the root directory. Don't load it yet.

4) Use dfu-util to download DM42_flash_3.1.bin

5) Load DM42_qspi_3.1 from FAT

(Re-started between each step just to be sure and all done using USB power with no battery installed. (This may be irrelevant - I took the battery out because I had a period where even reset wouldn't work so it was easier to kill the power this way.))

I don't know why this worked: I previously had errors when trying to load from flash. For whatever reason, loading the new QSPI ahead of needing it seems to be the trick.

To confirm: I never managed to make DM42_qspi_2.11.x.bin nor DM42_qspi_3.1.bin load via dfu-util successfully.

Post Reply