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 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 160in 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?
-
@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
-
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.
-
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
-
@mcook
I think the configuration changed, try removing the#define CONFIG_ESP32_DEFAULT_CPU_FREQ_160 1line and replace it with
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_80 1 -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login