-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32C6 incorrect temp_sensor reading after disable and re-enable (IDFGH-11766) #12864
Comments
@AxelLin Thanks for reporting. It looks like we need to add some delay after |
I add the temperature sensor reading code to examples/bluetooth/nimble/bleprph. Below is the log, I also attached the modified code:
|
Just remind v5.1 and v5.2 need this fix. |
A follow up fix: bc1478f |
@mythbuster5 v5.1.3 does not include this fix. |
Answers checklist.
IDF version.
v5.1.2-496-g3629f070b6
Espressif SoC revision.
ESP32C6
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
Custom Board
Power Supply used.
USB
What is the expected behavior?
temperature_sensor_get_celsius() should get correct temperature reading.
What is the actual behavior?
If calling temperature_sensor_disable() and temperature_sensor_enable() again, the reading becomes wrong.
Steps to reproduce.
A modified code of examples/peripherals/temperature_sensor as below shows the symptom.
Only the first reading shows correct tsens_value.
If calling temperature_sensor_disable() and temperature_sensor_enable() again, the reading becomes wrong.
Seems only the first reading after disable/enable is incorrect, the second reading looks correct.
Change #if 0 to 1 in above code will show that the second reading is correct.
Debug Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: