Fundamental questions about ULP and wake up
Posted: Wed Jul 18, 2018 2:14 pm
Hi,
Lately i have been busy with integrating some ULP code and making that code wake up the main processor.
Until now it appears to be relatively straightforward but there are some things I am not 100% sure about.
First: a brief description of what my application needs to do:
According to the documentation "ulp_run" starts the timer and after the specified time it will run the ULP code again.
That leads me to the following questions:
Any help much appreciated.
Lately i have been busy with integrating some ULP code and making that code wake up the main processor.
Until now it appears to be relatively straightforward but there are some things I am not 100% sure about.
First: a brief description of what my application needs to do:
- On initial start up: transfer the ULP binary to RTC memory: that works 100%.
use "ulp_run" to start the ULP code after having set it up to re-run every 15 seconds.
Once it has run 20 times, and gathered 20 data samples, it wakes up the main processor and performs a ULP HALT operation.
The main processor copies the 20 samples and stores it in a dedicated NVS partition.
According to the documentation "ulp_run" starts the timer and after the specified time it will run the ULP code again.
That leads me to the following questions:
- As the ULP coprocessor's 15 second action always uses "halt" to make it sleep for the best part of 15 seconds and uses "wake" and "halt" once every 5 minutes to wake up the main processor and stop its own operation. Won't the ULP code automatically execute again after 15 seconds with or without the use of "ulp_run" by the main processor by that time?
is it possible that the ULP code is halted for as long as the main processor runs?
If it does happen again after 15 seconds while the main processor is performing some lengthy task which takes more than 5 minutes ( e.g.: an OTA update ) will it try to wake up the main processor?
If it does try and wakeup the main processor while it is still running what will happen then?
Will the main processor simply ignore the wake up attempt?
Any help much appreciated.