Hello,
it is not very frequently that my device needs both CPU cores to be running at the same time. In order to save energy, I would like to be able to turn the CPU1 on and off during my device runtime.
I checked the sleep modes documentation for esp-idf v5.0.1 but I did not find a solution to my particular situation (I checked https://docs.espressif.com/projects/esp ... modes.html).
Is this even possible? If yes, how can I do that?
Turning off CPU1 during runtime
-
- Posts: 9746
- Joined: Thu Nov 26, 2015 4:08 am
Re: Turning off CPU1 during runtime
I don't think the CPU1 core can be turned off farther than the WFI instruction that is automatically called by the FreeRTOS idle task already does. However, if power reduction is what you're looking for, I'd suggest turning on power management which will automatically make the ESP32 go into the lowest power mode that is applicable at any time.
-
- Posts: 1709
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Turning off CPU1 during runtime
Intriguing idea
Seeing the DPORT_APPCPU_CLKGATE_EN and DPORT_APPCPU_RESETTING registers, I assume that hardware-wise it should be possible to completely stop the App core. The more tricky part would be to get it back up and running, which may or may not require a reset of the core, depending on if the core's internal state/registers survive its clock getting halted...
Unfortunately I don't think that FreeRTOS supports this - which means that things will immediately go bad as soon as FreeRTOS tries to interact with the core that's not running/reacting to messages.
Seeing the DPORT_APPCPU_CLKGATE_EN and DPORT_APPCPU_RESETTING registers, I assume that hardware-wise it should be possible to completely stop the App core. The more tricky part would be to get it back up and running, which may or may not require a reset of the core, depending on if the core's internal state/registers survive its clock getting halted...
Unfortunately I don't think that FreeRTOS supports this - which means that things will immediately go bad as soon as FreeRTOS tries to interact with the core that's not running/reacting to messages.
Who is online
Users browsing this forum: Bing [Bot] and 142 guests