Check that g_statusRegister &= ~STATE_MACHINE_DISABLE;is the way the g_controlRegister & STATE_MACHINE_RUN bit should be cleared... Seems not since that's not how the others are cleared (and, you know, it's a different bit). Is this intended to trigger some secondary functionality instead of immediately clearing the bit? If so, that should be more evident.
Check that
g_statusRegister &= ~STATE_MACHINE_DISABLE;
is the way theg_controlRegister & STATE_MACHINE_RUN
bit should be cleared... Seems not since that's not how the others are cleared (and, you know, it's a different bit). Is this intended to trigger some secondary functionality instead of immediately clearing the bit? If so, that should be more evident.https://github.com/PlanetaryRobotics/CubeRoverPackage/blob/c10bc8bf5c76444d3799a6e2bf16fc76672437b8/Apps/FlightSoftware/MotorControl/i2c.c#L261-L264