-
Notifications
You must be signed in to change notification settings - Fork 58
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
LIS3DH_DATARATE_LOWPOWER_5KHZ mode is not setting the accelerometer in 5kHz low power mode but in 1.344 kHz High resolution mode #14
Comments
I was looking into setting a faster data rate in my sketch and came across this reported issue. I haven't tried implementing it yet, but I wanted to share some additional information from the docs in case it helps anyone to confirm (and/or fix) the issue reported above. Based on what I've read and the information below, I believe the following code is needed to use low-power (5khz) mode. Please double-check before trying it for yourself.
Datasheet infoThe following is taken directly from page 9 of the Application Note.
I believe these correlate to the these data rate options in Adafruit_LIS3DH.h. References
|
@ladyada Is this repo still being maintained? There are several open PRs and Issues, like this one, which have not had responses. |
Some suggestions from my part as I just saw that you replied.
Here the December 2016 version which is the current version.
|
HR bit is in LIS3DH_REG_CTRL4 |
Note, same issue raised via this forum thread: Is this issue pending a resolution, stuck, or merely forgotten? |
Hardware arriving on Wednesday, so I'll have a look + test then |
Hey @nalexopo @erichiggins @hakeemta @T-Mosher, there is a PR in to add the functionality, see #50 , it would be really appreciated if you folks could give it a thorough testing! There is a new constructor argument (frequency - last arg for SPI overloads, defaulting to 500kHz) to allow raising the SPI frequency as needed for the 5KHz rate. I went up to 2MHz. |
Sorry, can't test it, don't have the hardware. |
@nalexopo @erichiggins @hakeemta final testing reminder prod ☝️ before I merge it tomorrow and release anyway. We can always fix it afterwards. |
I'm currently traveling and unable to test this |
Thanks for the thought, and happy travels!
…On Mon, 8 Jul 2024, 12:56 Eric Higgins, ***@***.***> wrote:
I'm currently traveling and unable to test this
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTBZ44JKXWDH53B6SSR3RTZLJ46BAVCNFSM6AAAAABJEZN6TKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJTHAYTCNZTGE>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Please feel free to reopen or create a new issue if there are any problems with the release (1.3.0). |
lis.setDataRate(LIS3DH_DATARATE_LOWPOWER_5KHZ);
Above code is not setting the accelerometer in 5kHz mode but in 1.344 kHz High resolution mode. I read the LIS3DH_REG_CTRL1 register and i get a value b'1001 0111. It should be b'1001 1111 for 5kHz low power mode and the HR bit in LIS3DH_REG_CTRL4 should be 0. Read Lis3dh datasheet in page 35/54.
The text was updated successfully, but these errors were encountered: