-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
lis2de12 sensor driver giving 0 values #83794
Comments
Hi @narangmayank! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
Update 1: When I try to read XYZ registers manually (i.e 6 bytes from FIFO_READ_START register) it gives me value. Code Snippet Added
Serial Logs
|
@teburd @MaureenHelm Found out the issue. The issue was with SPI multi byte read even if application calls to read out more than 1 bytes the addr auto increment bit was not setting up. PFA Git diff
Getting IMU values after changing above 2 files. |
Describe the bug
Lis2de12 sensor is connected to nRF52840 DK via SPI interface. Chip ID is being read successfully verifies SPI bus is okay and config setting (odr, g-value) is also set successfully i.e (see below I read the register manually to cross check) but after that when you call sensor_sample_fetch() api it will give 0 values always.
To Reproduce
Connect the LIS2DE12 sensor to the nRF52840 kit via SPI_1 and build the sample attached below and run or alternatively change the host and SPI setting and build for that.
Expected behavior
IMU values should print on the console
Impact
showstopper
Logs and console output
DTS
Code
Serial Log
Environment (please complete the following information):
Additional context
I tried reading CNTR_REG_1 and CNTR_REG_4 for checking ODR & g-value respectively that is getting set correctly as you can see in the logs. The next was to just read IMU values which is not working.
The text was updated successfully, but these errors were encountered: