ODrive Brake Resistor Config/Enable Error

New ODrive trying to run for the first time. I am unable to enable the brake resistor. My code and error message is pasted below:

[11]: odrv0.config.brake_resistance =0.50

In [12]: odrv0.config.brake_resistance
Out[12]: 0.5

In [13]: odrv0.config.enable_brake_resistor

AttributeError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py in ()
----> 1 odrv0.config.enable_brake_resistor

C:\ProgramData\Anaconda3\lib\site-packages\fibre\remote_object.py in getattribute(self, name)
243 return attr
244 else:
→ 245 return object.getattribute(self, name)
246 #raise AttributeError(“Attribute {} not found”.format(name))
247

AttributeError: ‘RemoteObject’ object has no attribute ‘enable_brake_resistor’

In [14]:

Any ideas on how to resolve this issue?

Have you enabled it like that:

odrv0.config.enable_brake_resistor = True

Correct. See below

In [14]: odrv0.config.enable_brake_resistor = True

AttributeError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py in ()
----> 1 odrv0.config.enable_brake_resistor = True

C:\ProgramData\Anaconda3\lib\site-packages\fibre\remote_object.py in setattr(self, name, value)
256 object.getattribute(self, “dict”)[name] = value
257 else:
→ 258 raise AttributeError(“Attribute {} not found”.format(name))
259
260 def _tear_down(self):

AttributeError: Attribute enable_brake_resistor not found

In [15]:

We tried another brake resistor from a previous odrive, and this command has worked as expected on the first odrive. Both resistors ohm out correctly. Not sure what we are missing. Thanks for the help.

You need to update your odrive firmware.

This is a brand new ODrive. Why would the firmware not be updated on the new board? This is the second board I have purchased in 3 years with the first one also not having updated firmware. What are other potential checks I can investigate besides the firmware to solve this error?

I’ve been working with a new Odrive during the last couple of days (received it a week ago). It didn’t recognize the commands for arnabling the brake resistor or setting GPIO pins to digital. I thought it was due to an update, but couldn’t get the board to run my motors (got errors). I searched the forum and found a thread by somebody who encountered the same problems. Turned out it was a bug in the firmware that had been fixed. So I updated my board to the latest firmware and everything worked. So yes, sometimes it’s necessary to update the firmware, even if the board is new (to you).

Okay, thanks for sharing. What is the proper way to update the firmware on the ODrive. I ran into several issues flashing my old board to update the firmware. Thanks for the quick response.

It depends on the platform you’re using. I’m running Windows 10. I downloaded the hex file for my board from the Odrive site. Then I followed this tutorial: Reflashing an ODrive after losing its firmware - YouTube.
But instead of the DfuseDemo software, I used STM32CubeProgrammer.
If you’re having problems finding or connecting to your board, you might have to change the driver using Zadig.
The instructions on the Odrive site: ODrive Tool | ODrive together with the tutorial should be enough to get your board upgraded.

ODrive firmware currently ships with 0.5.1, which is a bit older.

To update, follow the instructions helpfully posted by micropuller, or to summarize:

pip install --upgrade odrive
odrivetool dfu

In DFU mode but ODrive not responding as seen below. What is this an indicator of?

image

After installing new firmware and rebooting, the following message appears even after setting the driver using ZADIG. Finally after several attempts, the drive booted correctly and then a differt error appears attached below.

Tried to go back and reflash new firmware since first attempt was an incomplete upload and the following error now appears:

Can you try using a raspberry pi to flash? I think this is a Windows libusb issue.

We have also logic-ed that this is probably a libusb issue. We used the Zadig utiity to update drivers when prompted, but we seem to go in circles.
I have some Raspberry Pis here, but I would need to set all that up and more learning will continue with the delays. That could be a project unto itself.
I do have an ST link V2 here, and have began trying to figure out the openocd instructions, but have gotten lost. Can you advise that as a reasonable route?

Thanks for the help.

Try STM32CubeProg - STM32CubeProgrammer software for all STM32 - STMicroelectronics

Thanks. We will start checking it out. Have you flashed firmware successfully on Odrive V3.6 with this before?

Hi, Just updating. It looks like we will make some ground with the STM32Cube from the initial checkout. Will keep you posted and appreciate all the help. We have an issue with being locked out from reading the odrive MCU that have not figured out how to clear. Unfortunately, we will be several days before getting back to this project.

Thanks again, more to come.

Not connecting because of READ OUT Protection.

ok first off, your odrivetool is way out of date.

pip install --ugprade odrive

To clear the read out protection, you can do odrivetool unlock