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.
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:
modm/src/modm/driver/inertial/lis3_transport_impl.hpp
Line 106 in 7a8c57d
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.