Problem with SPI firmware

Hello. I use a 3.5-48v board and AS5047 Encoders.
Must use absolute angle through SPI.
I clone https://github.com/TobinHall/ODrive/tree/Non-Blocking_Absolute_SPI repository and compile in Visual Studio Code successfully!!!.
But when trying to flash sudo dfu-util -a 0 -s 0x08000000 -D build/ODriveFirmware.bin.
Errors pop up;

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08000000, size = 134283264
dfu-util: Last page at 0x1000ffff is not writeable

Help.

The official firmware is successfully uploaded. https://github.com/madcowswe/ODrive

File size firmware Non-Blocking_Absolute_SPI, ODriveFirmware.bin = 134,3 MB
File size official firmware ODrive, ODriveFirmware.bin = 161,4 kB

Aren’t you supposed to flash hex files?

I use Linux Ubuntu 18.04. The official documentation on the site https://docs.odriverobotics.com/odrivetool says:
Force DFU mode, as per the instructions above. In the Firmware directory, after finishing building the firmware: sudo dfu-util -a 0 -s 0x08000000 -D build/ODriveFirmware.bin

If you write like this: sudo dfu-util -a 0 -s 0x08000000 -D build/ODriveFirmware.hex
The firmware is successfully installed but the program odrivetool does not see the connected board.
For official firmware sudo dfu-util -a 0 -s 0x08000000 -D build/ODriveFirmware.hex also does not see the board odrivetool program.

Have you tried installing through sudo odrivetool dfu odrivefirmware.hex from the build directory?

Take a look under https://docs.odriverobotics.com/odrivetool Device firmware update: how to flash custom firmware. I’m on mobile, so it’s hard to link correctly…

  1. I tried like this: sudo dfu-util -a 0 -s 0x08000000 -D build/ODriveFirmware.bin - it works.
  2. I tried like this: sudo dfu-util -a 0 -s 0x08000000 -D build/ODriveFirmware.hex - this does not work.
  3. Should I try like this? sudo odrivetool dfu build/ODriveFirmware.hex

Option 3 is what I always use.

1 Like

Thank you very much!

~/ODriveSPI/ODrive/Firmware$ sudo odrivetool dfu build/ODriveFirmware.hex
[sudo] password for innopolis: 
ODrive control utility v0.4.11
Waiting for ODrive...
Found ODrive 206537793548 (v3.5-48V) with firmware [unknown version]

You are about to flash firmware [unknown version] which is the same version as the firmware on the device ([unknown version]).
Do you want to flash this firmware anyway? [y/N] y
Saving configuration to /tmp/odrive-config-206537793548.json...
Configuration saved.
Putting device 206537793548 into DFU mode...
Erasing... done            
Flashing... done            
Verifying... done            
Waiting for the device to reappear...
Restoring configuration from /tmp/odrive-config-206537793548.json...
Could not restore axis0.config.watchdog_timeout: property not found on device
Could not restore axis0.config.step_gpio_pin: property not found on device
Could not restore axis0.config.dir_gpio_pin: property not found on device
Could not restore axis0.motor.config.current_lim_tolerance: property not found on device
Could not restore axis0.motor.config.inverter_temp_limit_lower: property not found on device
Could not restore axis0.motor.config.inverter_temp_limit_upper: property not found on device
Could not restore axis0.controller.config.vel_limit_tolerance: property not found on device
Could not restore axis0.controller.config.vel_ramp_rate: property not found on device
Could not restore axis0.controller.config.setpoints_in_cpr: property not found on device
Could not restore axis0.encoder.config.find_idx_on_lockin_only: property not found on device
Could not restore axis0.encoder.config.zero_count_on_find_idx: property not found on device
Could not restore axis0.encoder.config.enable_phase_interpolation: property not found on device
Could not restore axis0.encoder.config.calib_scan_distance: property not found on device
Could not restore axis0.encoder.config.calib_scan_omega: property not found on device
Could not restore axis0.encoder.config.idx_search_unidirectional: property not found on device
Could not restore axis0.encoder.config.ignore_illegal_hall_state: property not found on device
Could not restore axis1.config.watchdog_timeout: property not found on device
Could not restore axis1.config.step_gpio_pin: property not found on device
Could not restore axis1.config.dir_gpio_pin: property not found on device
Could not restore axis1.motor.config.current_lim_tolerance: property not found on device
Could not restore axis1.motor.config.inverter_temp_limit_upper: property not found on device
Could not restore axis1.controller.config.vel_limit_tolerance: property not found on device
Could not restore axis1.controller.config.vel_ramp_rate: property not found on device
Could not restore axis1.controller.config.setpoints_in_cpr: property not found on device
Could not restore axis1.encoder.config.find_idx_on_lockin_only: property not found on device
Could not restore axis1.encoder.config.zero_count_on_find_idx: property not found on device
Could not restore axis1.encoder.config.enable_phase_interpolation: property not found on device
Could not restore axis1.encoder.config.calib_scan_distance: property not found on device
Could not restore axis1.encoder.config.calib_scan_omega: property not found on device
Could not restore axis1.encoder.config.idx_search_unidirectional: property not found on device
Could not restore axis1.encoder.config.ignore_illegal_hall_state: property not found on device
Some of the configuration could not be restored.
Configuration restored.
Device firmware update successful.
1 Like

Tell me please. What is this problem?

In the firmware you are uploading this option no longer exists. Odrivetool is trying to restore all the values, but let’s you know which values it could not find anymore. Don’t worry about these notifications.

Judging by the values you are listing, the firmware you are uploading is quite a bit older than the one you had installed. It might be worth looking at the branch razorsedge by @Wetmelon. I’m not sure if it has the feature you are trying to add, but it probably does.