2018-01-16 12:24 PM
Here is their initialization code:
i2c_LIS2MDL_Read_8Bit(LIS2MDL_WHO_AM_I, &b);
i2c_LIS2MDL_Write_8Bit(LIS2MDL_OFFSET_X_REG_L,0x00);
i2c_LIS2MDL_Write_8Bit(LIS2MDL_OFFSET_X_REG_H,0x00);
i2c_LIS2MDL_Write_8Bit(LIS2MDL_OFFSET_Y_REG_L,0x00);
i2c_LIS2MDL_Write_8Bit(LIS2MDL_OFFSET_Y_REG_H,0x00);
i2c_LIS2MDL_Write_8Bit(LIS2MDL_OFFSET_Z_REG_L,0x00);
i2c_LIS2MDL_Write_8Bit(LIS2MDL_OFFSET_Z_REG_H,0x00);
i2c_LIS2MDL_Write_8Bit(LIS2MDL_CFG_REG_A,0b10001100);// temp comp, continuous 100hz data rate
i2c_LIS2MDL_Write_8Bit(LIS2MDL_CFG_REG_B,0b00000010);// offset cancellation enabled
i2c_LIS2MDL_Write_8Bit(LIS2MDL_CFG_REG_C,0b00010000);// block data
Does anything need to be modified or added? Thank you.
2018-01-17 03:01 AM
You configuration is correct.
What kind of issue do you have? Can you please be more specific.
2018-01-17 12:16 PM
Customer is not able to get the auto offset cancelation working.
2018-01-18 06:40 AM
It is very vague statement.
Please provide register dump and datalog of X,Y,Z data with and without offset cancellation.