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.