Access to RTC fast memory from core 1
Posted: Sun Apr 04, 2021 5:30 pm
Hi All!
Here is the scenario:
I am using ESp32 wroom 32E with platformio and arduino framework.
In my code the most of the time the CPU is in deep sleep state.
When the wake up is triggered , it executes a customized wakeup stub that i wrote and that works perfectly. All the code and the variables used within the wakeup stub are placed in the RTC fast memory using "RTC_IRAM_ATTR".
When the processor is awake i would like to reuse all the function used in the wakeup stub but i get 'panic - illegal instruction crash.
The reason is that Arduino loop runs on core 1 and core 1 has no access to RTC fast memory but only through PRO cpu (core 0).
Is there a way to use a stub function also in the main loop?
Thanks to all for your help
Here is the scenario:
I am using ESp32 wroom 32E with platformio and arduino framework.
In my code the most of the time the CPU is in deep sleep state.
When the wake up is triggered , it executes a customized wakeup stub that i wrote and that works perfectly. All the code and the variables used within the wakeup stub are placed in the RTC fast memory using "RTC_IRAM_ATTR".
When the processor is awake i would like to reuse all the function used in the wakeup stub but i get 'panic - illegal instruction crash.
The reason is that Arduino loop runs on core 1 and core 1 has no access to RTC fast memory but only through PRO cpu (core 0).
Is there a way to use a stub function also in the main loop?
Thanks to all for your help