-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Temperature sensor crashes RISC-V (IDFGH-8723) #10164
Comments
Hi @NoNullptr, Your basic steps seem correct to me. I have an internal test branch for adding support that does the same, but unfortunately we discovered that the results seems to be incorrect after entering deep sleep. The current theory is that we might need to adjust some sleep parameters to be able to correctly use the temp sensor during sleep, so right now the support for ulp temp sensor is blocked on that. The team responsible for the RTC part of the SW is looking at it, so as soon as this is resolved on their end we will be able to add support for it in IDF. |
Thank you for your response and looking into it, I am looking forward to having it resolved. |
This has been stale for quite some time now – is there any progress on this issue? |
@ESP-Marius So how is the status now? Any update? |
Answers checklist.
IDF version.
v5.1-dev-1626-g4b6d9c8ad3
Operating System used.
macOS
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
No response
Development Kit.
ESP32-S3-MINI-1U
Power Supply used.
USB
What is the expected behavior?
The Technical Reference Manual, chapter 39.4, states how to configure and read out the temperature sensor, namely:
This translate roughly to this:
This code, however, is an infinite loop at
while
which effectively crashes the coprocessor. From the ESP-IDF driver one can see that alsoSENS_TSENS_CLK_EN
andSENS_TSENS_XPD_FORCE
need to be enabled, that is,need to be set, too. The documentation also misses that
SENS_TSENS_DUMP_OUT
should be reset after making a readout.While this fixes the infinite loop, the read out values are wrong in deep sleep, always returning the value 1 or 127. I tried various register settings and compared various register values when running during deep sleep and during normal operation, but cannot find what needs to be set to read out the correct temperature during deep sleep; the technical reference manual is too lacking to be of much help.
What is the actual behavior?
An infinite loop when following the documentation. Wrong values after making the required fixes to not have an infinite loop.
Steps to reproduce.
Here's a minimal code that reads the temperature and pauses for about 1s in total ten times and then wakes up the main cpu:
Debug Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: