Where are the GPIO configs?

I’m trying to set up a motor with hall effect sensors by following the hoverboard tutorial.

It says I need to set the relevant GPIO pins to “GPIO_MODE_DIGITAL”, but the relevant configurables don’t appear to exist! Also, the constant “GPIO_MODE_DIGITAL” is suspiciously absent (not defined) in my odrivetool as well.

odrive.config gets me this output:

In [29]: odrv0.config
Out[29]: 
enable_uart = True (bool)
uart_baudrate = 115200 (int)
enable_i2c_instead_of_can = False (bool)
enable_ascii_protocol_on_usb = True (bool)
max_regen_current = 0.0 (float)
brake_resistance = 0.4699999988079071 (float)
dc_bus_undervoltage_trip_level = 8.0 (float)
dc_bus_overvoltage_trip_level = 25.68000030517578 (float)
enable_dc_bus_overvoltage_ramp = False (bool)
dc_bus_overvoltage_ramp_start = 25.68000030517578 (float)
dc_bus_overvoltage_ramp_end = 25.68000030517578 (float)
dc_max_positive_current = inf (float)
dc_max_negative_current = -9.999999974752427e-07 (float)
gpio1_pwm_mapping:
  endpoint = (0, 0) (RemoteProperty)
  min = 0.0 (float)
  max = 0.0 (float)
gpio2_pwm_mapping:
  endpoint = (0, 0) (RemoteProperty)
  min = 0.0 (float)
  max = 0.0 (float)
gpio3_pwm_mapping:
  endpoint = (0, 0) (RemoteProperty)
  min = 0.0 (float)
  max = 0.0 (float)
gpio4_pwm_mapping:
  endpoint = (0, 0) (RemoteProperty)
  min = 0.0 (float)
  max = 0.0 (float)
gpio3_analog_mapping:
  endpoint = (0, 0) (RemoteProperty)
  min = 0.0 (float)
  max = 0.0 (float)
gpio4_analog_mapping:
  endpoint = (0, 0) (RemoteProperty)
  min = 0.0 (float)
  max = 0.0 (float)

This odrive is almost brand new - is it possible it’s already outdated? The relevant gpio configurables only show up here, in a weird little spur API named “Odrive3” that includes these pins and nothing else.

Also relevant - AXIS_STATE_ENCODER_HALL_POLARITY_CALIBRATION also does not exist.

Hi Lucas,

We just updated the firmware (and docs) like last week. pip install --upgrade odrive and then odrivetool dfu to update.

1 Like

That’s what it was, thanks!

Hi,

I’m running the latest update and I have the same problem. “name ‘GPIO_MODE_DIGITAL’ is not defined”. Also “name ‘ENCODER_MODE_HALL’ is not defined”.
Can you help?

Hi Sophie, we just updated the odrivetool today and it fixes this problem. Please update with pip install --upgrade odrive