Synopsis
CTL_STATUS_t mag3110_read_die_temperature(CTL_MAGNETOMETER_t *self,
                                          float *temp);
Description

mag3110_read_die_temperature reads the die temperature of the MAG3110 self.

The die temperature is not returned correctly by the MAG3110. We raised a service request with Freescale regarding this and their response is as follows:

"Yes, sorry, the die temperature is not being trimmed for MAG3110. This should have been in the errata. What you are seeing is correct. You can get around this by trimming the output in software since the sensitivity of the sensor is OK."

Return Value

mag3110_read_die_temperature returns a standard status code. If the status indicates an error, the returned sample data is undefined.

Thread Safety

mag3110_read_die_temperature is thread-safe if the transport member in self is thread-safe. Typically, for SPI and I2C transports, you ensure thread safety by associating a mutex with the bus used by the transport.