Open josephduchesne opened 2 years ago
May I ask which MCU you are using? Could you try changing the SPI mode to see if it makes a difference? I recently noted a similar thing for the MT6701 sensor, where some MCU types read an extra bit at the start, and others do not...
If we can figure out what's causing the problem and fix it, or at least figure out the MCU types that have it one way vs the ones that have it the other, we can fix it in the code and not make it up to the user... users will find it difficult otherwise.
That's a good point. I'm using a STM32G031F8. I'll see if there's an SPI configuration option that helps.
The SC60228 encoders that I have are reporting 2048 ticks rather than the expected 4096. This is probably an SPI register setting, but I can't find documentation on the chip's register map.
As a solution (interim maybe?) I'm proposing making the encoder ticks a parameter, placing it 2nd in the list since I suspect it's more likely to be overridden than the SPI settings.