fix(temperature_sensor): Fix the value is incorrect if disable and enable again

Closes https://github.com/espressif/esp-idf/issues/12864
This commit is contained in:
Cao Sen Miao
2023-12-25 12:23:18 +08:00
parent bbb7c4c756
commit c205bbf90f
2 changed files with 11 additions and 6 deletions

View File

@@ -44,6 +44,10 @@ void temperature_sensor_power_acquire(void)
temperature_sensor_ll_enable(true);
}
portEXIT_CRITICAL(&rtc_spinlock);
// After enabling/reseting the temperature sensor,
// the output value gradually approaches the true temperature
// value as the measurement time increases. 300us is recommended.
esp_rom_delay_us(300);
}
void temperature_sensor_power_release(void)