Skip to content

CRC Mismatch fix #27

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

Merged
merged 3 commits into from
Dec 29, 2021
Merged

CRC Mismatch fix #27

merged 3 commits into from
Dec 29, 2021

Conversation

KeithTheEE
Copy link
Contributor

This needs to be tested on hardware, but it should fix #26

There are two changes: CRC's returned value is now anded with 0xFF to ensure it's one byte only.

The second change is from the CRC Polynomial, which was 0x131 and is now 0x31. The datasheet and other Sensirion sensors all use 0x31, however if you go through the Sensirion download center to download sample c++ code, the sample code uses 0x131. Given the Sensirion github is more likely to be up to date, and given they now use a helper library for the CRC which sets the polynomial to 0x31I think 0x31 is the correct option.

But because that's a large enough change, I need that to be tested to be sure it fixes #26

…the datasheet and the other crc code from Sensirion. It is 0x131 in the original code from Sensirion, however their docs and github now use a helper library which uses 0x31. 0x31 is Probably the correct polynomial.
@ladyada ladyada merged commit da47e6d into adafruit:main Dec 29, 2021
@ladyada
Copy link
Member

ladyada commented Dec 29, 2021

seems ok! did not test

@juatafe
Copy link

juatafe commented Dec 30, 2021

Thx! fixed. The problem was not enough current.

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 4, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM303_Accel to 1.1.9 from 1.1.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM303_Accel#13 from adafruit/dhalbert-ustruct
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_SHT31D to 2.3.9 from 2.3.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_SHT31D#27 from KeithTheEE/crc_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_Touchscreen to 1.1.9 from 1.1.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_Touchscreen#19 from CedarGroveStudios/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.11.2 from 1.11.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#42 from bjnhur/master
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_PIOASM to 0.5.2 from 0.5.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PIOASM#32 from dannystaple/patch-1
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.

CRC mismatch
3 participants