At first, I was running the default v0.5.1 firmware. I received ERROR_ABS_SPI_COM_FAIL every time I tried to perform the encoder offset calibration, but was able to resolve this using the changes suggested here:
I can now enter the encoder offset calibration but it fails halfway and returns a CPR_POLEPAIRS_MISMATCH error.
I have confirmed that motor.config.pole_pairs = 14, as per the datasheet, using the detent method here:
The encoder.config.cpr value is set to 2**14, as instructed. I have also checked this against the count_in_cpr and shadow_count to confirm (although somehow I can no longer compare shadow_count after moving by hand, as the value doesn’t change)
I have altered the calib_range value to 0.05 as suggested in the Encoder Calibration section of the ODrvie documents, and have changed calib_scan_distance a number of times to values ranging from 100-600.
Nothing has helped to resolve this error. I am hoping someone has a suggestion.
As I have said, I have double-checked my cpr and pole_pairs values, and have increased the calibration distance by a factor of 4 (from default, 150, to 600) and various values inbetween. Are you suggesting that if I just keep cranking up the calibration_distance, I’ll eventually find a value that works?
Is anyone aware of a situation where the cpr is one or two values above or below 2**14?