Cannot flash Odrive3.5 with StLINK V2-1


#1

Hi,
I have my Odrive 3.5 48V since July, and it didn’t work since…
When I plug my board in my computer, odrivetool on my Ubuntu 16.04 doesn’t recognize the card.
I first thought it was the USB race condition issue, and I wait to the bug be fix…
but since the last update, it didn’t work…

So I wonder that the card don’t have any firmware install inside (and one post give me the confirmation).
First, I tried to compile the DFU using the usb (and flip the dfu force switch) but it didn’t work
So I have a ST-LINK V2-1 coming from a old Nucleo board, I install OCD and all the dependencies, and give it a shot connecting the SWC/GND/SWD programming port on my st-link V2-1 and changing the config like this :

openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase ODriveFirmware_v3.5-48V.elf" -c "reset run" -c exit

and the console give me this :

    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 : 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
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v20 API v2 SWIM v4 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 0.006307
Error: target voltage may be too low for reliable debugging
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x1fff3da0 msp: 0x20001d80
auto erase enabled
Info : device id = 0x10076413
Info : flash size = 1024kbytes
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x20000042 msp: 0x20001d80
Warn : no flash bank found for address 10000000
wrote 262144 bytes from file ODriveFirmware_v3.5-48V.elf in 9.242334s (27.699 KiB/s)

Then I thought, it was done, and but back the switch to RUN MODE.
Run the power
connect to my computer and run odrivetool
AND IT STILL DOESN’T WORK.

If you have any idea…
thanks in advance for your answer !


DFU to 4.6 problematic, need help
#2

Hi Neuro- I had troubles with openocd for days, i had the “exact” output as you had.

Ended up using WIN10 and followed this path “You can use the DfuSe app from ST.”

  1. Download the tool here

This has 1 of my ODrive boards working.

Hope this helps

Regards Jerry :grinning:


#3

I will give it a shot !
but how can windows can recognize the board without the firmware ?


#4

I use zazig to find the odrive, because when I connect the odrive my windows computer don’t detect the board.
(like : ODrive 3.x Native Interface (Interface 2))

is it the interface 2 ?


#5

There’s no voltage at the cpu. Can you measure the voltage on the board with a DVM?


#6

Maybe I have to flash with the target voltage coming from the STLINK ?

I will go with the alternative of using DfUSe on windows.
But I don’t know why windows don’t show up the board.
I use Zazig, to change the USB driver but now I don’t know which is the correct interface to modify…

please help…


#7

The STLINK won’t power the cpu, you’d need to apply your external power source at the screw terminals.

From “Getting Started” in the Docs area:
Use the Zadig utility to set ODrive driver to libusb-win32.

  • Check ‘List All Devices’ from the options menu, and select ‘ODrive 3.x Native Interface (Interface 2)’. With that selected in the device list choose ‘libusb-win32’ from the target driver list and then press the large ‘install driver’ button.

#8

Okey,
My board is powered with an 32V battery, and I check the terminal I’ve got 3.3V and 5V.
But when I use the zazig utility, When I check the list, there is no ODrive 3.x Native Interface (Interface 2)…
I don’t know what to do…


#9

I DID IT
I upgrade the firmware on my ST-LINK V2-1
and use ST-LINK utility to check some memory element, then I flash the board using the .hex file
and it work !

I think using the ST-link utility is a good option to diagnostic and flash the CPU !

thanks for your help !