Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CPR configuration option to SC60228 Encoder #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

josephduchesne
Copy link

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.

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.
@runger1101001
Copy link
Member

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

@runger1101001
Copy link
Member

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.

@josephduchesne
Copy link
Author

That's a good point. I'm using a STM32G031F8. I'll see if there's an SPI configuration option that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants