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

LIS3MDL SPI driver: address reading is not advanced #1176

Open
ser-plu opened this issue Jul 1, 2024 · 0 comments
Open

LIS3MDL SPI driver: address reading is not advanced #1176

ser-plu opened this issue Jul 1, 2024 · 0 comments

Comments

@ser-plu
Copy link

ser-plu commented Jul 1, 2024

When using LIS3MDL with Lis3TransportSpi, the data addressing does not automatically increment. Therefore one value is read to all registers.

To fix this, this line needs to be corrected:

RF_CALL(SpiMaster::transfer(reg | Read));
to

RF_CALL(SpiMaster::transfer(reg | Read | AddressIncrement ));

However, this should be applied not to all sensors. I have checked another LIS3 sensor, and it does not have the autoincrement bit.

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

No branches or pull requests

2 participants