Reading LIS2DE12 temperature always reads 0
Hi all,
I'm currently not able to read the temperature of my lis2de12.
It always returns zero.
lis2de12_temperature_meas_set(&dev_ctx, LIS2DE12_TEMP_ENABLE);
lis2de12_data_rate_set(&dev_ctx, LIS2DE12_ODR_400Hz );
lis2de12_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
What could be the issue here?
I'm only reading temp, not X Y Z values yet.
UPDATE:
After playing around reading OUT_TEMP_L (0Ch), OUT_TEMP_H (0Dh) separately, my code now reads twice 0x80.
I think my platform functions are not incrementing the register address?
static int32_t platform_read(void *handle, uint8_t reg, uint8_t *bufp, uint16_t len)
{
HAL_I2C_Mem_Read(handle, LIS2DE12_I2C_ADD_H, reg, 1, (uint8_t*)bufp, len, 1000);
return 0;
}
Otherwise I would assume seeing 0x0D in the scope image.
