cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2MDL does not work in single-shot mode with offset cancellation

JanRusnak
Visitor

Hello,

I am testing the LIS2MDL magnetometer in single-shot mode with offset cancellation enabled, according to the datasheet (DS12144 - Rev 6, page 22). The documentation states that in single-shot mode both bits OFF_CANC and OFF_CANC_ONE_SHOT in register CFG_REG_B must be set to 1.

However, when these bits are both set (CFG_REG_B) and a single measurement is triggered by writing md = 01b in CFG_REG_A the measurement never completes — the ZYXDA flag in STATUS_REG remains 0 permanently.

If only OFF_CANC_ONE_SHOT=1 is set, the measurement finishes normally and ZYXDA is asserted, but the output values look identical to normal single-shot measurements (no visible offset compensation effect).

Test conditions:

  • 4WSPI
  • BDU=1

  • verified data readout sequence (reading all 6 output bytes resets ZYXDA properly)

  • communication via SPI verified by WHO_AM_I = 0x40

It appears that combining OFF_CANC=1 and OFF_CANC_ONE_SHOT=1 prevents the internal FSM from completing a single measurement.

Questions:

  1. Is this a known limitation or silicon bug of the LIS2MDL?

  2. Is there any confirmed working configuration for single-shot with offset cancellation?

  3. Should the offset cancellation be used only in continuous mode?

0 REPLIES 0