2019-04-10 05:05 PM
Hi,
I am using the LIS3MDL in a battery powered data logging application. I would like to be able to "reset" the part, but I do not understand the difference between the REBOOT and SOFT_RST bits in CNTRL_REG2 (21h).
Page 25 of the LIS3MDL data sheet (Rev 6) states that REBOOT "Reboot memory content." What memory content? Specifically, which registers? or is these memory locations that are not accessible? How is this different from power-cycling the part?
On the same page, the data sheet states that SOFT_RST "Configuration registers and user register reset function." This is more self explanatory, but how is it different from REBOOT? Is SOFT_RST a subset of REBOOT?
How is the reset/soft-reset used? I assume the process is to write to CRTL_REG2 with either REBOOT or SOFT_RST set, delay, write with bits cleared? Or do the bits clear themselves after the reboot/soft-reset is complete?
Thank you,
Nick
2019-04-11 03:43 AM
HI Nick, the BOOT procedure (REBOOT bit in CNTRL_REG2 (21h) reg) allows you to reload the calibration parameters in the LIS3MDL registers; it is not like a power off, and so for example the device operating mode doesn’t change after boot (if before was e.g high performance mode, it will remain hp mode). The SOFT_RST is a software reset, so it is more like a power toggle: you reset (an not only reboot the calibration values, but also resetting e.g. the operating mode and the other registers) your device even if Vdd is still on. Regards
2019-04-11 05:33 AM
Thank you for the explanation. That is very helpful.
Two follow up questions:
I suspect that the calibration parameters are getting changed in my device. But it is not obvious to me how/when this occurs.
Thanks again,
Nick
2019-04-11 07:59 AM
Hi Nick,
>> I suspect that the calibration parameters are getting changed in my device
which is the symptom of the issue you are facing?
Regards
2019-04-11 08:16 AM
The symptoms are that we calibrate the magnetometer and verify that we have a good calibration. Then, after a period of time and limited use, we re-check and the magnetometer calibration is no longer accurate. The binary values have shifted by approximately 0-300 bits (8 Gauss range) with the X and Y channels usually worse than the Z. Issuing the REBOOT command restores the values to original. That indicates that there is not a strong magnetic field (over 50 G) that is changing the zero offset or some other physical explanation. The more likely scenario is that the reserved registers are being corrupted and then restored with the REBOOT.
We are using I2C for communication and the lines are shared with another part. I will take a close look at them for problems. Thank you very much for the help.
2019-04-12 07:04 AM
You're welcome Nick
btw are you sure the magnetometer is not influenced by the surrounding emc, e.g. when the electrical circuit is on and running (e.g. putting the LIS3MDL away from the test board)?
2019-04-12 08:03 AM
I am sure it is not being influenced by the surrounding emc etc.. With the LIS3MDL locked in place, REBOOT restores the values to what they were on power-up. Nothing else is changing, so it must be the REBOOT is fixing the errors.
You can resolve this issue. I am all set .
Thanks,
Nick