There's a Start example for using a SAM D21 Xplained Pro to measure temperature, from the AT30TSE758 sensor on an I/O1 Xplained Pro extension board. The code appears to define the wrong value for selecting the type of register when configuring the sensor.
If you export the example, the problem file is temperature_sensor/at30tse75x/at30tse75x.c The culprit is:
/** Register types of at30tse75x */ #define AT30TSE_NON_VOLATILE_REG_TYPE 0
Before temperatures are read from the sensor chip, it's configured in at30tse75x_construct() which sends it the following via I2C:
data = AT30TSE_CONFIGURATION_REG | AT30TSE_NON_VOLATILE_REG_TYPE;
However, the chip's datasheet states that 0 is the value for selecting the volatile registers, not the non-volatile ones. From the datasheet, the correct value for AT30TSE_NON_VOLATILE_REG_TYPE would be:
The example will work - using the volatile copy of the register still configures the chip - but the configured resolution will be lost once the sensor's reset. That may even have been the developer's intention, but in that case the symbol should at least be AT30TSE_VOLATILE_REG_TYPE.