Cannot unlock or flash v3.6 (bricked?)

I’ve had quite a hard time getting firmware updated on a 56V v3.6 odrive. I’ve exhausted all options I know of, and have searched for similar errors with no luck. My steps and debugging so far is as follows:

  • odrivetool – this connects fine, but is running a different firmware version from the tool so obviously a little broken. Reports firmware v0.5.1-dev
  • odrivetool dfu reported something like unknown hardware version -- use stlink to manually flash
  • Bought the official/genuine stlink
  • Clone and build of the ODrive
  • make flash gives a segfault in openocd
  • build openocd from master – no segfault, moving along
  • make flash reports Error: error writing to flash at address 0x08000000 at offset 0x00000000
  • make unlock gets stuck in an infinite loop with the below output:
board version: v3.6-56V
openocd -f interface/stlink-v2.cfg  -f target/stm32f4x.cfg -c init -c 'reset halt' -c 'stm32f2x unlock 0'
Open On-Chip Debugger 0.11.0+dev-00615-gbe0d68eb6-dirty (2022-03-17-19:53)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 2000 kHz
Info : STLINK V2J29S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 2.926491
Info : [stm32f4x.cpu] Cortex-M4 r0p1 processor detected
Info : [stm32f4x.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f4x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
Info : device id = 0x10076413
Info : flash size = 1024 kbytes
stm32f2x unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f4x.cpu failed, trying to reexamine
Info : [stm32f4x.cpu] Cortex-M4 r0p1 processor detected
Info : [stm32f4x.cpu] target has 6 breakpoints, 4 watchpoints
Info : Previous state query failed, trying to reconnect
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001640 msp: 0x20020000
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f4x.cpu failed, trying to reexamine
........

At this point, odrivetool totally fails to detect the odrive. I’ve tried both make flash and make unlock with and without the DFU switch. The LED indicator is still on when powered, so no physical damage – board is just unresponsive through USB.

Any ideas? I’m happy to provide more information. I have 5 more boards from the same shipment that are also of firmware v0.5.1-dev, but not bricked.

2 Likes