-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CRC failure reading word in 6.1.0-beta.2 #3795
Comments
probably isnt handling clock stretching properly |
@FoamyGuy what board are you on? |
@tannewt It was definitely ESP32-S2 port. I tested some on MagTag and some on Unexpected maker Feather S2. I'm not 100% sure if I tested both versions on both devices or not though. |
We should test on nRF and SAMD also. Unfortunately I don't have this sensor. I did stumble across this interesting post about adding clock stretching to a different fuel gauge sensor, while I was looking for something else: https://www.esp32.com/viewtopic.php?f=13&t=15999 |
I can try out out on those ports sometime today. I'll make note of my findings here. |
On:
Results seem to be the same with and without bus_device in my lib folder. On beta.2 it's back to the same as above:
|
I'm confused about why this is happening, based on reading the code. I thought perhaps the new native implementation was faster. You could try adding some short delays in various places in the driver .py file. I wish I had one of these to test, or something that exhibits similar behavior. |
Strangely on nRF the beta.1 has the CRC error as well:
same on beta.2
adafruit_bus_device and adafruit_lc709203f libraries tested were from 20201208 bundle. |
Here's what an attempt to read cell voltage looks like on esp32s2 near the tip of main (f2204d7): Edited to add: Here's what the whole transaction looks like: |
yeah we default to repeated start when using write_then_readinto...because linux does and cannot otherwise. if you need to generate a stop (which some chips need) you have to do a separate write and then a separate readinto |
Hi, I'm having this same error with this fuel gauge. I'm not a developer so I can't quite tackle this, but I have the Feather nRF52840 Express and this fuel gauge. I'n getting this same error: Traceback (most recent call last): when I try and use this sensor with the code:
|
I'm also having this issue on:
|
This basic code for the battery fuel gauge succeeds on beta.1 but fails with this error on beta.2:
I would guess it's related to bus device moving into the core. But I'm not really sure what the specific error means.
The text was updated successfully, but these errors were encountered: