Problems with AS5048A, ERROR_CPR_POLEPAIRS_MISMATCH

Hi all,
First off, I am trying to use this motor, that comes with an AS5048A absolute encoder:

I located the datasheet for the chip and soldered in some wires to attempt SPI communication and attached a ferrite ring. The setup was the same as the one located here:

Although I didn’t connect the MOSI to VDD as suggested as I wasn’t concerned with board space, and my GPIO pin of choice is 3.

Continued in comments…

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:

and 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.

My current values:

Then your encoder isn’t speaking properly. The AS5048A doesn’t seem to tri-state properly, so make sure to only plug in the power after the Odrive is already on (or add a tristate buffer)

Thanks for the tip. Any advice on how to resolve the POLEPAIRS_MISMATCH error?

Either you have the wrong pole_pairs setting, the wrong cpr for the encoder, or possibly you aren’t running far enough and should increase your calibration_distance

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?

Was this solved? If so, any and all guidance would be very helpful. I have a very similar situation.