Odrive 3.5 24V crashes when trying PWM control

Hi All,

To test my hardware (2 motors driving belts / “tank”) I wanted to connect an RC receiver and remote control the setup. I am using a Spectrum AR400, and the receiver is tested with servos to be sending the appropriate pulses.

I have wired up the Odrive to the motors and encoders, and via USB I can control both axis by following the examples in the documentaiton.

But following the RC/PWM example, nd wiring a PWM output from the receiver to GPIO4, I get a software crash in the Odrive:

In [9]: odrv0.config.gpio4_pwm_mapping.min = -1500

In [10]: odrv0.config.gpio4_pwm_mapping.max = 1500

In [11]: odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis0.controller._remote_attributes['pos_setpoint']

In [12]: odrv0.save_configuration
Out[12]: <fibre.remote_object.RemoteFunction at 0x26cf1fac748>

In [13]: odrv0.reboot
Out[13]: <fibre.remote_object.RemoteFunction at 0x26cf1fac828>

In [14]: odrv0.save_configuration()

In [15]: odrv0.reboot()
---------------------------------------------------------------------------
ChannelBrokenException                    Traceback (most recent call last)
~\Anaconda3\lib\site-packages\fibre\shell.py in <module>()
----> 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(self, endpoint_id, input, expect_ack, outpu
t_length)
    313                     return self._responses.pop(seq_no)
    314                     # TODO: record channel statistics
--> 315                 raise ChannelBrokenException() # Too many resend attempts
    316             finally:
    317                 self._expected_acks.pop(seq_no)

ChannelBrokenException:

In [16]:

It is expected to get a ChannelBrokenException when you reboot. The ODrive should show up again after 10-20s by itself.