CPU Frequency
-
Hi All,
On the LoPy, I'd like to set the CPU frequency to 8 Mhz to see if it has an effect on power consumption. I am building and deploying the firmware, using the source code here: https://github.com/pycom/pycom-micropython. I can't easily find the place in the code where the 16 Mhz clock speed is currently being set.
Does anyone know what to change to bring the clock down to 8 Mhz.
Are there any other optimizations folks know that I can do to bring the power consumption down? Currently, with WiFi and BT off, the power consumption is ~50 mA. When awake, this adds up, and I'd like to get it down to about 20 mA.
Mike
-
-
@mcook
I think the configuration changed, try removing the#define CONFIG_ESP32_DEFAULT_CPU_FREQ_160 1
line and replace it with
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_80 1
-
Sorry. Yes. I am using the https://github.com/pycom/pycom-micropython-sigfox source. I was incorrect in my previous post.
Still attempting to figure out what else I need to change.
Mike
-
Are you building the source from https://github.com/pycom/pycom-micropython-sigfox ?
Just noticed you wrote https://github.com/pycom/pycom-micropython which is a very old version, don't use it.
-
@jmarcelino said in CPU Frequency:
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ
Hi,
I am powering it via USB, using the expansion board.
After updating sdkconfig.h to #define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 80, machine.freq() still reports 160000000.
Wondering what else needs to change.
Mike
-
@mcook said in CPU Frequency:
The clock speed is actually 160Mhz (down from maximum 240Mhz it can operate at)
You could try changing
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 160
in sdkconfig.h but I'm not sure what else that might impact or if reduces power consumption in any significant way. Let us know :-)50mA does seem a bit high with WiFi+BT off, is that on 3.3V? How are you powering it?