Settings are lost at reboot


#1

I had that now multiple times.
I set the pre_calibrated=True, save_config(), reboot but this setting is false then. (Yes, the motor was calibrated before setting that).
I set the startup_closed_loop_control=True because startup_encoder_offset_calibration is already true and works, save_config() but after re-connecting the board to power it is not in closed loop mode.
I set the odrv0.axis0.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL, all works, save_config(), next time I send a speed command after reboot, it does not work any longer and I have to set it again.

I cannot see a pattern for that. I started to validate that setting the variables did work by reading them immediately after - so it is not that. And I don’t think these are side effects from other things, e.g. neither motor, encoder or anything shows an error, hence should work.

Did you experience similar things?


#2

Lack of an action step to store restart



odrv0.save_configuration()
odrv0.reboot()




#3

@wdaehn There is a known issue about the state machine we use for the configuration saving. Specifically, there are issues with saving configuration more than once per boot. Please see if this workaround works for you?


#4

I did definitely multiple saves without reboots. Hence very likely I did hit that. Thanks!


#5

I have noticed that some settings are not saving after reboot. Most of the settings are persisting but at least one will not. I did follow the instructions to only do one save per reboot but after multiple attempts still the same result. I even power cycled the board and started and new anaconda (see below) but it is still loosing the odrv0.axis0.controller.vel_setpoint = 400 recommended in the setting up sensorless mode:

"Please connect your ODrive.
You can also type help() or quit().

Connected to ODrive 206C35833948 as odrv0
In [1]: odrv0.axis0.controller.vel_setpoint
Out[1]: 0.0

In [2]: odrv0.axis0.controller.vel_setpoint=400

In [3]: odrv0.axis0.controller.vel_setpoint
Out[3]: 400.0

In [4]: odrv0.save_configuration()

In [5]: odrv0.axis0.controller.vel_setpoint
Out[5]: 400.0

In [6]: odrv0.reboot()

ChannelBrokenException Traceback (most recent call last)
~\Anaconda3\lib\site-packages\fibre\shell.py in ()
----> 1 odrv0.reboot()

~\Anaconda3\lib\site-packages\fibre\remote_object.py in call(self, *args)
160 for i in range(len(args)):
161 self._inputs[i].set_value(args[i])
–> 162 self._parent.channel.remote_endpoint_operation(self._trigger
_id, None, True, 0)
163 if len(self._outputs) > 0:
164 return self._outputs[0].get_value()

~\Anaconda3\lib\site-packages\fibre\protocol.py in remote_endpoint_operation(sel
f, endpoint_id, input, expect_ack, output_length)
313 return self._responses.pop(seq_no)
314 # TODO: record channel statistics
–> 315 raise ChannelBrokenException() # Too many resend attempt
s
316 finally:
317 self._expected_acks.pop(seq_no)

ChannelBrokenException:

Reconnected to ODrive 206C35833948 as odrv0
In [7]: odrv0.axis0.controller.vel_setpoint
Out[7]: 0.0

In [8]:"


#6

Anyone have thoughts on the above?


#7

Only “config” settings are saved. All the others are not.