LSM9DS1, the received Data from the accelerometer are swapped. Expected sequence MSB-LSB but I receive LSB-MSB
Hello,
I am working on a project with nRF52832 MCU and LSM9DS1TR IMU sensor with I2C connectivity.
The code is written on Keil
The driver is according to the datasheet but was observed that the data from IMU received exchanged LSB with MSB.
Regarding Datasheet "the value is expressed as a
16-bit word", the 1st 8 bits are the LSB and the 2nd 8bits are the MSB.
The driver is built according to the datasheet but was observed that the data from IMU received exchanged LSB with MSB.
The Datasheet mentions "the value is expressed as a
16-bit word", the 1st 8 bits are the LSB and the 2nd 8bits are the MSB.
e.g. OUT_X_XL (28h - 29h).
The data from the register 28h are the LSB and from 29h are the MSB, right??
As you can see in the attached files, the address of the registers and the reading from I2C is correct, but my data looks like they are swapped.
The correct order of data is MSB and LSB.
So first we are reading the MSB byte (29h) and then the LSB byte (28h). As we expected the order of the data should be MSB - LSB but when we are printing and sending the data the order is LSB - MSB.
i.e. the MSB changed continuously and the LSB stay constant.
Can you explain the above unusual behavior?
Thank you,
BR,
Konstantinos
