Skip to main content
Visitor II
October 25, 2021
Solved

LIS2DS12 读 ? 传感器温度一直 ? ? ? ?

  • October 25, 2021
  • 1 reply
  • 615 views

值一直是0x80 用热风枪和制冷风扇�?�过都�?�?�​

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @1123.3​ ,

    Is this translation correct?

    LIS2DS12 reads the sensor temperature and keeps the same.

    The value is always 0x80. It will not change if you blow it through with a heat gun and cooling fan​.

    If so, did you configured the FS and the ODR, before starting the readout of the temperature sensor?

    Note that it's ODR is 12.5Hz., so if you are running the sensor with higher ODR, polling the output registers you might read several time the same temperature value.

     /* Enable Block Data Update. */
     lis2ds12_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
     /* Set full scale. */
     lis2ds12_xl_full_scale_set(&dev_ctx, LIS2DS12_2g);
     /* Set Output Data Rate. */
     lis2ds12_xl_data_rate_set(&dev_ctx, LIS2DS12_XL_ODR_100Hz_LP);

    -Eleon

    1 reply

    ST Employee
    October 25, 2021

    Hi @1123.3​ ,

    Is this translation correct?

    LIS2DS12 reads the sensor temperature and keeps the same.

    The value is always 0x80. It will not change if you blow it through with a heat gun and cooling fan​.

    If so, did you configured the FS and the ODR, before starting the readout of the temperature sensor?

    Note that it's ODR is 12.5Hz., so if you are running the sensor with higher ODR, polling the output registers you might read several time the same temperature value.

     /* Enable Block Data Update. */
     lis2ds12_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
     /* Set full scale. */
     lis2ds12_xl_full_scale_set(&dev_ctx, LIS2DS12_2g);
     /* Set Output Data Rate. */
     lis2ds12_xl_data_rate_set(&dev_ctx, LIS2DS12_XL_ODR_100Hz_LP);

    -Eleon