cancel
Showing results for 
Search instead for 
Did you mean: 

LIS3MDL calibration issues

bu
Associate

I'm using a LIS3MDL magnetometer on my board, and I figured out how to calibrate it to account for distortions  caused by the board, and the procedure works. However, it seems that every time the same magnetometer is turned off and re-powered, the measurements received are different. I saw somewhere that the LIS3MDL will self calibrate at startup and I think this might be what causes the differences. Is there any way to disable this process, and if that isn't the issue, do you know what it might be?

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @bu ,

The LIS3MDL does not perform an automatic hard‑iron “self‑calibration” at startup, so there’s nothing of that kind to disable. Any change you see after power‑cycling is usually due to:

  • Different register configuration after each boot (FS range, ODR, operating mode, performance mode).
  • Your own calibration not being re‑applied exactly the same way (or done at a different FS).

Ensure you always write the same configuration registers on startup, read them back to verify, then apply the same stored calibration parameters to the raw data each time.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Federica Bossi
ST Employee

Hi @bu ,

The LIS3MDL does not perform an automatic hard‑iron “self‑calibration” at startup, so there’s nothing of that kind to disable. Any change you see after power‑cycling is usually due to:

  • Different register configuration after each boot (FS range, ODR, operating mode, performance mode).
  • Your own calibration not being re‑applied exactly the same way (or done at a different FS).

Ensure you always write the same configuration registers on startup, read them back to verify, then apply the same stored calibration parameters to the raw data each time.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.