disable core 1 for saving power?
-
- Posts: 27
- Joined: Sun Jan 14, 2018 7:47 pm
disable core 1 for saving power?
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?
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.
-
- Posts: 27
- Joined: Sun Jan 14, 2018 7:47 pm
Re: disable core 1 for saving power?
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?
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?
-
- Posts: 27
- Joined: Sun Jan 14, 2018 7:47 pm
Re: disable core 1 for saving power?
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:
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?
Code: Select all
build_flags = -D CONFIG_FREERTOS_UNICORE
How can i check this?
Re: disable core 1 for saving power?
Arduino and platformio are using precompiled libs so adding that compiler option won't do anything since libesp32.a is already compiled.
-
- Posts: 27
- Joined: Sun Jan 14, 2018 7:47 pm
Re: disable core 1 for saving power?
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?
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?
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.
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.
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
-
- Posts: 826
- Joined: Mon Jul 22, 2019 3:20 pm
Re: disable core 1 for saving power?
The Tasmota group regularly releases framework sets for the solo chips on platformio.
https://github.com/tasmota/platform-espressif32
https://github.com/tasmota/platform-espressif32
Who is online
Users browsing this forum: No registered users and 72 guests