ESP32 CPU clock dynamic change

Valerii
Posts: 16
Joined: Wed Dec 27, 2017 4:20 pm

ESP32 CPU clock dynamic change

Postby Valerii » Tue Jan 30, 2018 10:34 am

Hello, I working with ESP32 for battery powered application. I managed with deep sleep mode and WiFi. However, I want to make possible the code sections in project that can be processed in lower frequencies to drain less current.
My assumption is:
(Currently WiFi and UART not operating but could be configured from menuconfig )

Code: Select all

//Here CPU operating at 80MHz 
//---Start low freq section 
rtc_clk_cpu_freq_set(RTC_CPU_FREQ_2M);

/**do some job**/

rtc_clk_cpu_freq_set(RTC_CPU_FREQ_80M);
//---End low freq section 
//Here CPU operating at 80MHz 
However it appeared to be the top of the iceberg.
1) I have to block the peripherals that can't work during this mode (wifi, uart api). This IPI can be called from different tasks.
2) What to do with FreeRTOS clock, task switching?
3) How to reconfigure timers to make correct timing
4) How to restore all changes back on exiting from low freq section.

How to implement these properly?
Brest regards,

pajo007
Posts: 1
Joined: Mon Jan 20, 2020 4:53 pm

Re: ESP32 CPU clock dynamic change

Postby pajo007 » Mon Jan 31, 2022 6:41 pm

HI
I have the same question
Robert Pajek

Who is online

Users browsing this forum: No registered users and 132 guests