Open ser-plu opened 4 weeks ago
When using LIS3MDL with Lis3TransportSpi, the data addressing does not automatically increment. Therefore one value is read to all registers.
Lis3TransportSpi
To fix this, this line needs to be corrected: https://github.com/modm-io/modm/blob/7a8c57dd587de1348255425e8f863f1339f5a765/src/modm/driver/inertial/lis3_transport_impl.hpp#L106 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: https://github.com/modm-io/modm/blob/7a8c57dd587de1348255425e8f863f1339f5a765/src/modm/driver/inertial/lis3_transport_impl.hpp#L106 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.