aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src/bin/overclock_manual.rs
diff options
context:
space:
mode:
author1-rafael-1 <[email protected]>2025-05-11 17:26:36 +0200
committer1-rafael-1 <[email protected]>2025-05-11 17:26:36 +0200
commit4567beda7b7773c8cb11f19f0f4f146c1243508d (patch)
treea01a9fe7649508c846dd772a47650bb271430acb /examples/rp/src/bin/overclock_manual.rs
parent4621c8aa7a1ee1b55f2f0bf80fc48eddf76af320 (diff)
rp235x overclocking
Diffstat (limited to 'examples/rp/src/bin/overclock_manual.rs')
-rw-r--r--examples/rp/src/bin/overclock_manual.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/rp/src/bin/overclock_manual.rs b/examples/rp/src/bin/overclock_manual.rs
index 35160b250..88ef26a7a 100644
--- a/examples/rp/src/bin/overclock_manual.rs
+++ b/examples/rp/src/bin/overclock_manual.rs
@@ -7,8 +7,7 @@
7 7
8use defmt::*; 8use defmt::*;
9use embassy_executor::Spawner; 9use embassy_executor::Spawner;
10use embassy_rp::clocks; 10use embassy_rp::clocks::{clk_sys_freq, core_voltage, ClockConfig, CoreVoltage, PllConfig};
11use embassy_rp::clocks::{ClockConfig, CoreVoltage, PllConfig};
12use embassy_rp::config::Config; 11use embassy_rp::config::Config;
13use embassy_rp::gpio::{Level, Output}; 12use embassy_rp::gpio::{Level, Output};
14use embassy_time::{Duration, Instant, Timer}; 13use embassy_time::{Duration, Instant, Timer};
@@ -41,9 +40,12 @@ async fn main(_spawner: Spawner) -> ! {
41 // Initialize with our manual overclock configuration 40 // Initialize with our manual overclock configuration
42 let p = embassy_rp::init(configure_manual_overclock()); 41 let p = embassy_rp::init(configure_manual_overclock());
43 42
44 // Verify the actual system clock frequency 43 // Show CPU frequency for verification
45 let sys_freq = clocks::clk_sys_freq(); 44 let sys_freq = clk_sys_freq();
46 info!("System clock frequency: {} MHz", sys_freq / 1_000_000); 45 info!("System clock frequency: {} MHz", sys_freq / 1_000_000);
46 // Show core voltage for verification
47 let core_voltage = core_voltage().unwrap();
48 info!("Core voltage: {}", Debug2Format(&core_voltage));
47 49
48 // LED to indicate the system is running 50 // LED to indicate the system is running
49 let mut led = Output::new(p.PIN_25, Level::Low); 51 let mut led = Output::new(p.PIN_25, Level::Low);