AnsweredAssumed Answered

LSM9DS0 Temperature Sensor

Question asked by hostetler.brian on Mar 4, 2014
Latest reply on May 30, 2014 by winer.kris
I am using the LSM9DS0 as a 9DOF IMU for a motion sensing application.  I need the temperature sensor to compensate for temperature-induced gyro drift.  I can get everything to work, but the temperature always reads 0x00 on both the high and low byte.  I set the TEMP_EN bit high and read both high and low OUT_TEMP_XM registers.  I have everything enabled and the mag/acc/gyro all update properly.  I have tried many combinations of settings and still read 0x0000 for temperature.  I have also tried multiple physical parts, so that's not the problem.  Anyone know if there's a known issue with the temperature sensor?  Thanks.

Here's the code for my control register settings:

LDD_TError set_XM_control_regs() {
    LDD_TError I2C_Error;
    
    I2C_Error = Hand_SelectSlaveDevice(MAGNETOMETER_ADDR);
    if (I2C_Error != ERR_OK) {
        return I2C_Error;
    }
    I2C_OutBuffer[0] = LSM9_CTRL_REG0_XM | 0x80;
    I2C_OutBuffer[1] = 0x00; // no FIFO or filter
    I2C_OutBuffer[2] = 0x3F; // 12.5Hz accelerometer
    I2C_OutBuffer[3] = 0x00; // +/- 2 g
    I2C_OutBuffer[4] = 0x00; // no interrupts
    I2C_OutBuffer[5] = 0x00; // no interrupts
    I2C_OutBuffer[6] = 0xE8; // temperature, high res, 12.5Hz magnetometer
    I2C_OutBuffer[7] = 0x60; // +/- 12 gauss
    I2C_OutBuffer[8] = 0x80; // magnetometer continuous conversion
    return Hand_MasterSendBlock(9);
}

Also, the FIFO in the mag/accel portion is disabled. FIFO_CTRL_REG is set to 0x00.

Outcomes