2017-03-28 11:03 AM
LSM303AGR how to enable high resolution mode on the accelerometer? I have done exactly as described in the data sheet/manual setting the LPen bit to 0 and the HR bit to 1. I can play around with these bits but it does not look like I get a change in the resolution. The data written out by my program matches exactly the data bytes shown on my oscilloscope (with serial SPI decoding). The 6 least significant bits are always 0. Setting the BLE bit does not swap the order of the bytes which indicates that I am not able to activate the high resolution mode (BLE only works in high res mode). Anyone who can help here, what is the trick to get 12-bit resolution on the accelerometer?
My register settings:
- CTRL_REG1_A set to 0x67 ( ODR 200 Hz, LPen = 0, all 3 axis enabled)
- CTRL_REG2_A set to 0x00 (high pass stuff disabled)
- CTRL_REG3_A set to 0x02 (FIFO overrun int on int1)
- CTRL_REG4_A set to 0x89 (BDU=1, LSB at lower adr, HR=1 high res, SPI enabled, normal mode)
- CTRL_REG5_A set to 0x40 (FIFO enabled)
- CTRL_REG6_A set to 0x02 (int active low)
- FIFO_CTRL_REG_A set to 0x40 (FIFO mode)
Anyone who have a sequence of register settings which gives 12-bit resolution?
2017-03-29 01:53 AM
The reason why you see only 10-bits value is usage of FIFO. The FIFO buffer is able to store up to 32 acceleration samples of 10 bits for each channel. Please check chapter 4.8 in application note
http://www.st.com/resource/en/application_note/dm00265383.pdf
.To get 12-bit resolution output you have to disable the FIFO.
2017-03-29 04:21 AM
Thank you! I had that idea yesterday but I did not try it out. I am probably not going to use the LSM303AGR, only for a while until I have a better e-compass for my application. The resolution from the magnetometer does not impress me either.
I liked the LSM303DLHC (but no SPI) which is the best ST e-compass I have tried so far (which has had a NRND for a while). I have also tried out LSM303C and are going to test it some more to see if I have done everything correct. My first temperature test on the LSM303C was insane, had about 10 degree drift on the heading when running a test from approx 0 deg.C to room temp. I read somewhere in here that LSM303C is based on LIS3MDL which also has a insane temperature drift.
I am thinking about trying out the LSM303D. The status is still active on this one, I hope it is as good as the DLHC. It looks like some of the warehouses indicates that it is not available anymore.