How to lower CPU frequency
Posted: Thu Feb 22, 2018 10:46 pm
I have to continuously monitor and process ADC samples. But in order to meet power consumption requirements, the supply current of the ESP32 needs to stay below 1mA.
It seems to be infeasible to achieve this specification with a CPU frequency of 80 MHz. Can I perhaps meet the power requirements and still have a ADC sampling rate of at least 10kHz when running the CPU at 2 MHz?
I tried to change the CPU frequency with
#include "soc/rtc.h" [...] rtc_clk_cpu_freq_set(RTC_CPU_FREQ_2M)
.. but had no luck: Right after "cpu_start: Starting scheduler on APP CPU", I neither receive debugging- nor custom massages anymore over UART. I suppose that the peripheral clocks have to be reconfigured, but I have no idea how to accomplish this.
It seems to be infeasible to achieve this specification with a CPU frequency of 80 MHz. Can I perhaps meet the power requirements and still have a ADC sampling rate of at least 10kHz when running the CPU at 2 MHz?
I tried to change the CPU frequency with
#include "soc/rtc.h" [...] rtc_clk_cpu_freq_set(RTC_CPU_FREQ_2M)
.. but had no luck: Right after "cpu_start: Starting scheduler on APP CPU", I neither receive debugging- nor custom massages anymore over UART. I suppose that the peripheral clocks have to be reconfigured, but I have no idea how to accomplish this.