diff --git a/examples/rtic_bare6.rs b/examples/rtic_bare6.rs index 5458a9157fa4f3449f8960d5698233a010152072..e1fb2cb248173c51186a9eb27cde2a5fa02b6f20 100644 --- a/examples/rtic_bare6.rs +++ b/examples/rtic_bare6.rs @@ -18,7 +18,7 @@ use stm32f4xx_hal::{ stm32::{self, GPIOC, RCC}, }; -const OFFSET: u32 = 8_000_000; +const OFFSET: u32 = 24_000_000; #[rtic::app(device = stm32f4xx_hal::stm32, monotonic = rtic::cyccnt::CYCCNT, peripherals = true)] const APP: () = { @@ -55,14 +55,14 @@ const APP: () = { let rcc = device.RCC.constrain(); - let _clocks = rcc.cfgr.freeze(); + // let _clocks = rcc.cfgr.freeze(); // Set up the system clock. 48 MHz? - // let _clocks = rcc - // .cfgr - // .sysclk(48.mhz()) - // .pclk1(24.mhz()) - // .freeze(); + let _clocks = rcc + .cfgr + .sysclk(48.mhz()) + .pclk1(24.mhz()) + .freeze(); // let _clocks = rcc // .cfgr @@ -237,7 +237,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { // // What is the (default) MCU (SYSCLK) frequency? // -// 8 Mhz +// 16 Mhz // // What is the (default) DWT CYCCNT frequency? // @@ -271,7 +271,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { //` // What is the frequency of blinking? // -// ** your answer here ** +// about 3 Hz // // Now change the constant `OFFSET` so you get the same blinking frequency as in 1. // Test and validate that you got the desired behavior.