AnsweredAssumed Answered

LSM303D: Possible to change the register for controlling the sensitivity in real time

Question asked by zhang.james.004 on Sep 21, 2016
I have a quick question about LSM303D. I would appreciate it if you would provide me some suggestions.

I am using SPI communication to exact all the magnetic sensor data in 100Hz. ( I configure the SPI baud rate to be 230400bps.) In order to increase dynamic range/signal to noise ratio, I am trying to change the sensitivity based on the received magnetic sensor data value. For example, if the sensor value is getting smaller, I will want to change the scale smaller. If the sensor value is getting close to the threshold, I want to change the scale larger to avoid overflow. Specifically, I am modifying the LSM303D_CTRL6 register value in real time to achieve this objective. What I observe is that there is a period of oscillation of data (or garbage data) almost every time that I changed the sensitivity. Currently, I am simply writing to the register without any wait or acknowledgement. After careful review of the datasheet, I could not find the exact wait time or an acknowledgement method. 

My question is: 
How long does it take for the LSM303D to modify the Register value (LSM303D_CTRL6)? Also, how long does it take for the change of scale take effect? What is the best way to communicate with the chip and know that the change of scale has already been applied?