Boron stuck in DFU mode

I (foolishly) tried to update the firmware on my Boron to rc.26 before setting it up with the iOS app.

The boron is now stuck in DFU mode. When I try to flash hybrid-0.8.0-rc.26-boron.bin I get the following error:

particle flash -v --usb hybrid-0.8.0-rc.26-boron.bin 
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!!!
Opening DFU capable USB device...
ID 2b04:d00d
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 4096
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x00030000, size = 645396
Download	[                         ]   0%            0 bytesdfu-util: dfuse_download: libusb_control_transfer returned -9
Error writing firmware: dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: dfuse_download: libusb_control_transfer returned -9

VError: Error writing firmware: dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: dfuse_download: libusb_control_transfer returned -9

    at Promise.resolve.then.then.then.then.then.then.catch.err (/usr/lib/node_modules/particle-cli/dist/cmd/flash.js:156:10)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)
caused by: Error: dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: dfuse_download: libusb_control_transfer returned -9

    at ensureError (/usr/lib/node_modules/particle-cli/dist/lib/utilities.js:592:11)
    at Promise.resolve.then.then.then.then.then.then.catch.err (/usr/lib/node_modules/particle-cli/dist/cmd/flash.js:156:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)

Something about libusb_control_transfer returned -9

I've tried the steps here:

But it won't reach rapid blue flashing like @ScruffR describes.

I have the debugger and I'd like to try to revive my boron.

You might have corrupted the bootloader (perhaps by resetting the device after flashing rc.26 while it was upgrading the bootloader). You’ll need to get OpenOCD >= 0.10.0 and try running something like this:

$ openocd -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init; program /path/to/bootloader.bin 0xf4000 verify reset exit"

You can also flash the system firmware in the same manner:

$ openocd -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init; program /path/to/system-part1.bin 0x30000 verify reset exit"
1 Like

Thanks,

I get the following error though:

openocd -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init; program /home/nrobinson/projects/dTemp/bootloader-0.8.0-rc.26-boron.bin 0xf4000 verify reset exit"
Open On-Chip Debugger 0.9.0 (2018-01-24-01:05)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
embedded:startup.tcl:60: Error: Can't find target/nrf52.cfg
in procedure 'script' 
at file "embedded:startup.tcl", line 60

I assume I have to download target/nrf52.cfg from somewhere?

Wait, I have 0.9.0 for some reason:

openocd -v
Open On-Chip Debugger 0.9.0 (2018-01-24-01:05)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html

Edit:
I’ve installed 0.10.0 from source.

I now get:

openocd -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init; program /home/nrobinson/projects/dTemp/bootloader-0.8.0-rc.26-boron.bin 0xf4000 verify reset exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Error: The specified debug interface was not found (cmsis-dap)
The following debug interfaces are available:
1: ftdi
2: usb_blaster
3: jlink
4: vsllink
5: ulink
6: hla
7: osbdm
8: opendous
9: aice

You did not enable cmsis-dap support (--enable-cmsis-dap). AFAIK it requires libhid as well.

Yup. I found a tutorial, trying it now.

I’m getting the following error now:

sudo openocd -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init; program /home/nrobinson/projects/dTemp/bootloader-0.8.0-rc.26-boron.bin 0xf4000 verify reset exit"
[sudo] password for nrobinson: 
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
adapter speed: 10000 kHz
cortex_m reset_config sysresetreq
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.10
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : reduce speed request: 10000kHz to 5000kHz maximum
Info : clock speed 10000 kHz
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000998 msp: 0x20000400
** Programming Started **
** Programming Failed **
shutdown command invoked
embedded:startup.tcl:512: Error: 
in procedure 'flash' called at file "embedded:startup.tcl", line 512

Works for me, however I’m using a dev revision of OpenOCD:

Open On-Chip Debugger 0.10.0+dev-00331-gf94f0c12 (2018-05-28-20:52)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
cortex_m reset_config sysresetreq
bld_addr
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.10
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000998 msp: 0x20000400
** Programming Started **
auto erase enabled
Warn : Unknown device (HWID 0x00000150)
Warn : using fast async flash loader. This is currently supported
Warn : only with ST-Link and CMSIS-DAP. If you have issues, add
Warn : "set WORKAREASIZE 0" before sourcing nrf51.cfg/nrf52.cfg to disable it
wrote 36864 bytes from file bootloader-0.8.0-rc.26-argon.bin in 2.699028s (13.338 KiB/s)
** Programming Finished **
** Verify Started **
verified 33440 bytes in 0.286032s (114.170 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked

Try building out of OpenOCD master?

2 Likes

I’ll try that.

I’ve installed it:

Open On-Chip Debugger 0.10.0+dev-00620-g02279e2 (2018-12-13-23:38)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html

Trying to flash now.

UPDATE:

IT WORKED!

Thanks so much @avtolstoy

3 Likes

Which tutorial was this?

I think it was https://www.hashdefineelectronics.com/compiling-and-installing-openocd-with-cmcsis-dap-support/