diff --git a/examples/bare7.rs b/examples/bare7.rs index d451c85f393e904411f5ce96ad8f2e3bb187d7af..0d21b94193ed89fc1fae09b4a0eae893102ad117 100644 --- a/examples/bare7.rs +++ b/examples/bare7.rs @@ -33,7 +33,9 @@ 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()).hclk(84.mhz()).pclk1(42.mhz()).pclk2(64.mhz()).freeze(); + let gpioa = p.GPIOA.split(); @@ -49,6 +51,9 @@ fn main() -> ! { ) .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 +150,15 @@ fn main() -> ! { // // What is the frequency of MCO2 read by the oscilloscope. // -// ** your answer here ** +// 85 MHz // // Compute the value of SYSCLK based on the oscilloscope reading. // -// ** your answer here ** +// Sysclk was set to 84 MHz // // What is the peak to peak reading of the signal. // -// ** your answer here ** +// 7.8 V // // 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