AnsweredAssumed Answered

LIS3DSH question and documentation request

Question asked by Andrei Chichak on Mar 31, 2017
Latest reply on May 30, 2017 by Miroslav B

I've been able to get the LIS3DSH working for single values by doing this:

 transmitData[0] = (uint8_t) (LIS3DSH_READ | LIS3DSH_X_L);
SPISend( transmitData, receiveData, 2);
xl = receiveData[1];

But if I wanted to read out multiple values in one transaction, I'd expect that I could do something like:

 transmitData[0] = (uint8_t) (LIS3DSH_READ | LIS3DSH_MULTIPLE | LIS3DSH_X_L);
transmitData[1] = (uint8_t) (LIS3DSH_READ | LIS3DSH_X_L);
SPISend( transmitData, receiveData, 3);
xl = receiveData[1];
xh = receiveData[2];

Or have byte 2 just be 0xFF because the auto-increment would do what I expected.


But alas, it doesn't work. (yes address increment is turned on in register 6)


Can this be done? What am I missing?



Now for documentation, the temperature register just isn't documented in the data sheet. It took a while to figure out that it is Celcius and biased by -25C. Also, the M/S bit isn't documented either. I found AN3393 to be very useful, the data sheet, not so much.



Andrei from The Great White North.