RP2040 set clock speed

Hi everyone,

I'm playing around the Arduino Nano RP2040 and I'am really concerned about the power consumption.
I've seen that the code to change the clock frequency under "hardware/pll.h" "hardware/clocks.h" set_sys_clock_pll() is not supported by default.

I was wondering about the impact of changing the frequency by simply moving the needed function from the Pico SDK to a reachable file.

Could other feature be impacted by this operation?

If I change the clock frequency only when I want to reduce the power consumption, can other perypheral be impacted (SPI, I2C) when I reset the clock to the original value?

Will the Arduino core be impacted?

I really appreciate every answer about this topic, I'm new to embedded programming.
Thanks.

What is that power consumption? Do you know if what you see is normal for RP2040? What power consumption would you be happy with?

I'm no expert in RP2040, but with most other MCU I have used, it's often better to keep the default clock speed and use sleep modes to reduce power consumption.

just test it
set_sys_clock_pll() is supported by Earle Philhower core "from the box" (at least code compiles)

I've tried but i don't understand if the functionalities are completely recovered or I need to set up something, so I would to understand the risks of changing the clock frequency.

I know how much is the consumptio at the maximum frequency, and I 've used sleep mode, but I want to reduce power consumption also during the normal functionalities. Also I've tested the consumption at different frequencies. I havent a desired threshold

Could be a false economy. Some "Normal functionalities" may take longer at lower clock speed, delaying sleep mode for a longer time.

But I will stop criticising your attempts, they do not appear to be very serious, just a casual learning exercise. Enjoy!

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.