Firmware update error


Whenever I try to run a firmware upgrade, I get the following output. Any thoughts?
Initially the driver loaded is the STM Bootloader because of other projects. When asked I use the zadig utility to switch. Then I get this error. Rerunning the “odrivetool dfu” after causes the same.

ODrive control utility v0.4.6
Waiting for ODrive...
Found ODrive 367433693037 (v3.5-24V) with firmware v0.4.6-dev
Checking online for newest firmware... found v0.4.7
Downloading firmware v0.4.7...
Saving configuration
Configuration saved.
Putting device 367433693037 into DFU mode...
Still waiting for the device to reappear.
Use the Zadig utility to set the driver of 'STM32 BOOTLOADER' to libusb-win32.
Erasing... done
Flashing... (sector 0/6)
RuntimeError                              Traceback (most recent call last)
~\Anaconda3\Scripts\odrivetool in <module>()
    140         print_version()
    141         import odrive.dfu
--> 142         odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
    144     elif args.command == 'liveplotter':

~\Anaconda3\lib\site-packages\odrive\ in launch_dfu(args, logger, cancellation_token)
    452     firmware = FirmwareFromFile(args.file) if args.file else None
--> 454     update_device(device, firmware, logger, cancellation_token)

~\Anaconda3\lib\site-packages\odrive\ in update_device(device, firmware, logger, cancellation_token)
    380         for i, (sector, data) in enumerate(touched_sectors):
    381             print("Flashing... (sector {}/{})  \r".format(i, len(touched_sectors)), end='', flush=True)
--> 382             dfudev.write_sector(sector, data)
    383         print('Flashing... done            \r', end='', flush=True)
    384     finally:

~\Anaconda3\lib\site-packages\odrive\dfuse\ in write_sector(self, sector, data)
    185             status = self.wait_while_state(DfuState.DFU_DOWNLOAD_BUSY)
    186             if status[1] != DfuState.DFU_DOWNLOAD_IDLE:
--> 187                 raise RuntimeError("An error occured. Device Status: {!r}".format(status))
    189     def read_sector(self, sector):

RuntimeError: An error occured. Device Status: (0, 2, 0, 0)


Please try one of the other firmware upgrade methods:


Sure, the other modes work. I use the odrivetool dfu command to bring the controller into dfu mode (or via the dip switches) and then the dfusedemo tool from STM.

Just wanted to report that this method (odrivetool dfu) of firmware upgrade does not work.
(And I do not like that you have to use zadig to swap the drivers. I have multiple microcontrollers that are upgraded via STM DFU hardware implementation and now I (would) have to swap the drivers constantly.)