Watchdog and index search recommended procedure when using CAN

We (university group and I) have multiple motors and ODrive Pros with an incremental encoders (with index pulse) and we’re am communicating with the ODrives over CAN Bus, using another microcontroller (Also an STM32). We’re using this setup on a mobile robot, so we’d like to enable watchdogs on all ODrives to make sure the robot stops in case CAN communication breaks down during operation. We’ve had some problems with the watchdog during our initialisation sequence, specifically during index search.

The initialisation procedure:

  1. Reboot.
  2. Wait for heartbeats and until initialisation is done.
  3. Change state to index search.
  4. If succesful, change state to closed loop control and start sending references

Before enabling the watchdog, we have confirmed that the initialisation procedure works and that ODrive indeed enters closed loop control at the end. As soon as we enable the watchdog though, we start getting watchdog timeouts during the index search procedure. In the docs it says you have to send either a “set_input_x” message or “change state to closed loop control” message to reset the watchdog, but we don’t want to this, as we just want to wait till the procedure is done. We also tried sending messages on command id 0x000, but that didn’t seem to reset the watchdog either.

What is the recommended procedure for this use case?

Hi! Apologies for the delay in my reply.

I’d recommend just disabling the watchdog on all ODrives via arbitrary parameter access, running your index search, then re-enabling the watchdog before entering closed loop control.