diff --git a/examples/bare7.rs b/examples/bare7.rs index 5c3ece8d7bbb9478ac11031344c4ec0c2520d7b5..c4f7231dc438118e3e25d9f27126ece5c9231a1c 100644 --- a/examples/bare7.rs +++ b/examples/bare7.rs @@ -33,7 +33,8 @@ fn main() -> ! { let rcc = p.RCC.constrain(); // 16 MHz (default, all clocks) - let clocks = rcc.cfgr.freeze(); + //let clocks = rcc.cfgr.freeze(); + let clocks = rcc.cfgr.sysclk(84.mhz()).pclk1(42.mhz()).pclk2(64.mhz()).freeze(); let gpioa = p.GPIOA.split(); @@ -48,6 +49,9 @@ fn main() -> ! { clocks, ) .unwrap(); + + let gpioc = p.GPIOC.split(); + gpioc.pc9.into_alternate_af0().set_speed(hal::gpio::Speed::VeryHigh); // Separate out the sender and receiver of the serial port let (mut tx, mut rx) = serial.split(); @@ -145,15 +149,15 @@ fn main() -> ! { // // What is the frequency of MCO2 read by the oscilloscope. // -// ** your answer here ** +// 84Mhz // // Compute the value of SYSCLK based on the oscilloscope reading. // -// ** your answer here ** +// 84Mhz // // What is the peak to peak reading of the signal. // -// ** your answer here ** +// 7.8V // // Make a screen dump or photo of the oscilloscope output. // Save the the picture as "bare_6_84mhz_high_speed" diff --git a/pictures/bare_7_84mhz_high_speed.png b/pictures/bare_7_84mhz_high_speed.png new file mode 100644 index 0000000000000000000000000000000000000000..7adb68b26a22c5a8969828753c40450e5acc9bf9 Binary files /dev/null and b/pictures/bare_7_84mhz_high_speed.png differ