Hey Oskar,
Thanks for looking at this. This is the device manager after I power on the ODrive.
It’s almost the same for the one that doesn’t work and the one that does. The “broken” one gets set to COM3 and the working one gets set to COM4. When I run Anaconda against the “working” one, the drive is recognized immediately, YEAH! It also calibrates the very light weight BLDC motor I have attached (15V, pulls about an amp at 600 rpm) That works fine. I’m getting a middle sized motor to try out and see how that goes.
I tried the odrivetool dfu command, it just hangs at Waiting for ODrive. So I put the board in DFU mode and it connected and started rewriting it and then failed with the following:
I’m including the text below in case the png is unreadable:
(base) C:\temp>odrivetool dfu
ODrive control utility v0.4.1
Waiting for ODrive...
Found ODrive 206736743548 (v3.5-48V) with firmware [unknown version] in DFU mode
Checking online for newest firmware... found v0.4.2
Downloading firmware v0.4.2...
The configuration cannot be backed up because the device is already in DFU mode. The configuration may be lost after updating. Do you want to continue anyway? [Y/n] y
Erasing... done
Flashing... (sector 0/6)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
C:\ProgramData\Anaconda3\Scripts\odrivetool in <module>()
140 print_version()
141 import odrive.dfu
--> 142 odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
143
144 elif args.command == 'liveplotter':
C:\ProgramData\Anaconda3\lib\site-packages\odrive\dfu.py in launch_dfu(args, logger, cancellation_token)
448 firmware = FirmwareFromFile(args.file) if args.file else None
449
--> 450 update_device(device, firmware, logger, cancellation_token)
451
452
C:\ProgramData\Anaconda3\lib\site-packages\odrive\dfu.py in update_device(device, firmware, logger, cancellation_token)
379 for i, (sector, data) in enumerate(touched_sectors):
380 print("Flashing... (sector {}/{}) \r".format(i, len(touched_sectors)), end='', flush=True)
--> 381 dfudev.write_sector(sector, data)
382 print('Flashing... done \r', end='', flush=True)
383 finally:
C:\ProgramData\Anaconda3\lib\site-packages\odrive\dfuse\DfuDevice.py 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))
188
189 def read_sector(self, sector):
RuntimeError: An error occured. Device Status: (0, 2, 0, 0)
(base) C:\temp>
I then tried it on the Pi and got
pi@raspberrypi:~ $ odrivetool dfu
ODrive control utility v0.4.1
Waiting for ODrive...
Traceback (most recent call last):
File "/usr/local/bin/odrivetool", line 142, in <module>
odrive.dfu.launch_dfu(args, logger, app_shutdown_token)
File "/usr/local/lib/python3.5/dist-packages/odrive/dfu.py", line 450, in launch_dfu
update_device(device, firmware, logger, cancellation_token)
File "/usr/local/lib/python3.5/dist-packages/odrive/dfu.py", line 257, in update_device
serial_number = device.serial_number
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 830, in serial_number
self._serial_number = util.get_string(self, self.iSerialNumber)
File "/usr/local/lib/python3.5/dist-packages/usb/util.py", line 314, in get_string
raise ValueError("The device has no langid")
ValueError: The device has no langid
I have some experience with programming microprocessors and would be happy to reflash this one using the ST-Link if you think that is a good idea. I just bought the gear and I’m going to be gone till Thursday, I could do it then. Let me know what you think would be good.
Thanks again for looking at this,
Tom