M1 not working correctly on both our ODrives

Hello,
For our senior project, we are using Ali Express v3.6 56V ODrives on version 0.5.1. They connect to odrivetool fine on my computer, but we have been having an issue with the M1 on all of them acting aggressive (video below is of the startup sequence). The odrivetool is not showing any errors when the motor is spinning, like in the video.

We are finding the index automatically through the config on the Drive, but we are putting into closed loop through Arduino code. The point of this was to avoid a problem with missing the index before putting into closed loop and causing it to also act strange.

Any help would be very appreciated, thanks.

ezgif.com-gif-maker-2

At what point does it do this strange maneuver?

0.5.1 is quite old…

It happens after the motors go into closed loop.

It seems that we are having some errors trying to update the firmware. Any tips on updating them?