Replies: 3 comments 18 replies
-
the problem is that you are trying to reset from an interrupt. You should instead set a flag (which you can check in a loop with some delay) or use semaphore for which you can wait in a loop and trigger reset from the task |
Beta Was this translation helpful? Give feedback.
-
This is how i create the task:
This is my task
And then i get the following error in my log:
I am wondering how to define the correct stack size value. But at least the speed issues are gone. |
Beta Was this translation helpful? Give feedback.
-
Task stack size: For esp32: FreeRTOSConfig.h:
sdkconfig.h #define CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK 1
Confirmed. |
Beta Was this translation helpful? Give feedback.
-
Hello all!
Summary
I am working on a e-paper device. The device is using an ESP32 to connect to the Internet over wi-fi. It offers also some buttons for the user to reset the device, to turn it off or to start in BLE mode for device provisioning.
First approach
Since I have a quite long setup routine (up to 30 seconds, before the device is going into deep-sleep) i was attaching interrupts. So for example if the user is clicking the reset button it will trigger ESP.restart().
This will result in a Guru Medidation Error:
I figured it out that i only get this error, when i start a wi-fi connection during setup. I have read that there can be conflicts with interrupts.
Second approach
Then i have read about the topic of tasks running on the second core. I have tried to implement this by having a loop-routine on the second core that constantly checks for button input. And if there is a button press i can trigger ESP.restart().
This is working. This time also without Guru meditation error. But then i recognized that the ESP is very slow in computation. My setup routine takes much more time and often it crashes with some memory issues when try to do https requests.
So i am looking for advice:
Thank you in advance for your help.
Here is my platform.ini
Beta Was this translation helpful? Give feedback.
All reactions