Firmware Update

Device Firmware Update

Warning

Your configuration will be erased during a firmware update. See Configuration Backup if you want to keep it.

To update the ODrive to the newest firmware release, simply open up a terminal and run the following command:

odrivetool dfu

This will wait for an ODrive to be connected and then check online for the latest stable firmware release for your ODrive version.

ODrive control utility v0.6.1.post0
Waiting for ODrive...
Checking online for latest ODrive Pro v4.4-58V firmware on channel master...
Found compatible firmware (0.6.1). Install now? [Y/n]

You should then seem a prompt to confirm installation, type y and Enter to continue:

Downloading firmware...
Putting device ************ into DFU mode...
Erasing... done
Flashing... done
Verifying... done
Waiting for the device to reappear...
Device firmware update successful.

Other Options

  • Install firmware from our semi-stable development channel:

    odrivetool dfu --channel devel
    
  • Install a specific firmware version (0.6.1 in this example):

    odrivetool dfu --version 0.6.1
    
  • Install a local firmware file:

    odrivetool dfu firmware.elf
    

    You can manually download firmware files from here.

    Warning

    Make sure the selected firmware file matches your hardware version! There are no checks in place to prevent you from installing incompatible firmware.

Troubleshooting

During the update, a new device called “STM32 BOOTLOADER” will appear. Open the Zadig utility and set the driver for “STM32 BOOTLOADER” to libusb-win32. After that the firmware update will continue.

On some machines you will need to unplug and plug back in the USB cable to make the PC understand that we switched from regular mode to bootloader mode… _force-dfu:

Forcing DFU Mode

If the DFU script can’t find the device, try forcing it into DFU mode:

  1. Flick the DIP switch that says “DFU, RUN” to “DFU” and power cycle the board.

  2. After you’re done upgrading firmware, don’t forget to put the switch back into the “RUN” position and power cycle the board again.

Alternative DFU Tool

Some people have had issues using the python dfu tool, so below is a guide on how to manually use different tools.

Before starting the below steps, you need to get firmware binary. You can download one of the officially released firmware files here. Make sure you select the file that matches your board version.

Multi-platform

ST has a tool called STM32CubeProgrammer.

  1. Download the tool here. You will need to make an account with ST to download the tool.

  2. Install the tool. On Windows, make sure to let it make a desktop shortcut.

  3. Force the ODrive into DFU mode.

  4. Launch STM32CubeProgrammer.

  5. Under “Memory & File edition”, there are two tabs called “Device memory” and “Open file”. Click “Open file” and choose the ODrive firmware elf file that you downloaded.

  6. In the top right, there is a dropdown menu containing the different methods to connect to an STM32 device. Choose “USB”.

  7. Under “USB configuration”, a USB port should be automatically selected and the ODrive serial number should be present next to “Serial number.”

  8. Click “Connect” above “USB configuration”.

  9. Click the tab with the name of your firmware file (example: firmware.elf) if it is not already selected.

  10. Click “Download” to flash your ODrive with the firmware. Your ODrive is now flashed!

  11. Close STM32CubeProgrammer.

  12. Turn off the power to the ODrive and set the DIP swtich back to RUN mode.

You can use the DfuSe app from ST.

  1. Download the tool here. Unfortunately they make you create a login to download. Sorry about that.

  2. After installing the tool, launch DfuFileMgr.exe which probably got added to the start menu as “Dfu file manager”.

  3. Select “I want to GENERATE a DFU file from S19, HEX or BIN files”, press OK.

  4. Click the button that says “S19 or Hex…”, find the firmware.elf file you built or downloaded.

  5. Leave all the other settings as default and click the “Generate…” button.

  6. Save the output file as ODriveFirmware.dfu. Note that the success message has a warning sign for some reason…

  7. Launch DfuSeDemo.exe which probably got added to the start menu as “DfuSeDemo”.

  8. Force the ODrive into DFU mode, as per the instructions above “How to force DFU mode”.

  9. In the top left it should now be connected to “STM Device in DFU Mode”.

  10. If it doesn’t appear, it may be because the driver is set to libusb by Zadig. We need to set it back to the original driver. Follow these instructions.

  11. If, after doing the above step, the ODrive still installs itself as a libusb device in Device Manager, you can try to delete the libusb driver (this is OK, since we can use Zadig to install it again). You can simply delete the file C:WindowsSystem32driverslibusb0.sys.

  12. In the bottom right section called “Upgrade or Verify Action” click the button “Choose…”.

  13. Locate the ODriveFirmware.dfu we made before.

  14. Click button “Upgrade”.

  15. If you get a warning that it’s not possible to check that it’s the correct device type: click yes to continue.

  16. Congratulations your ODrive should now be flashed; you can now quit DfuSeDemo.

  17. Turn off the power to the ODrive and set the DIP switch back to RUN mode.