Page 1 of 1

disable core 1 for saving power?

Posted: Sun Jan 14, 2018 7:49 pm
by cyberman54
Is it possible to pin all tasks to core 0 and switch off core 1 to save power?

Re: disable core 1 for saving power?

Posted: Mon Jan 15, 2018 2:48 am
by ESP_igrr
Yes, you can choose "Run FreeRTOS on first core only" option in menuconfig, Component config > FreeRTOS menu and build the application again. That will disable 2nd CPU and all the tasks will run on the 1st.

Re: disable core 1 for saving power?

Posted: Mon Jan 15, 2018 9:05 pm
by cyberman54
Thank you for your reply!
So it is possible, good to know.

But i am not using the ESP-IDF, i am using PlatformIO extension with MS Visual Studio Code. And i'm using framework Arduino for ESP32, because i need a library which has not been ported for ESP32.

Does anyone know where i can find / set the UNICORE compile option on PlatformIO IDE?

Re: disable core 1 for saving power?

Posted: Wed Jan 17, 2018 7:18 am
by cyberman54
I found out how to set the single core option from platformIO IDE, someone gave me the hint that this can be done with a build option:

Code: Select all

build_flags = -D  CONFIG_FREERTOS_UNICORE
I tried it and compiled my code with this build option. It has no impact on the power consumption, not 1 mA. So i think the CPU is still running both cores.

How can i check this?

Re: disable core 1 for saving power?

Posted: Wed Jan 17, 2018 8:45 am
by WiFive
Arduino and platformio are using precompiled libs so adding that compiler option won't do anything since libesp32.a is already compiled.

Re: disable core 1 for saving power?

Posted: Wed Jan 17, 2018 12:42 pm
by cyberman54
Thanks for this explanation, now i understand why my change has no impact.

Which Arduino libraries fpr ESP32 should i recompile with the UNICORE build-option to get a single core cpu?

Re: disable core 1 for saving power?

Posted: Mon Dec 05, 2022 9:29 pm
by dizcza
Is it possible to disable the second core at runtime?

I have a flag in a header file that, if set, uses ULP instead of the second core.

Code: Select all

#define ULP_ENABLE 1

#if ULP_ENABLE
// start ULP and disable core APP_CPU_NUM
#else
// use APP_CPU_NUM to perform the same task
#endif
I could perhaps issue a deep sleep on the second core (can I?) and never wake up if this flag is set, I'm not sure. Either way, deep sleep != power down, not even hibernation.

Re: disable core 1 for saving power?

Posted: Mon Dec 05, 2022 10:39 pm
by lbernstone
The Tasmota group regularly releases framework sets for the solo chips on platformio.
https://github.com/tasmota/platform-espressif32