diff --git a/examples/rtic_bare6.rs b/examples/rtic_bare6.rs index 48cd99647727f4d9c76e03578a99967f13d2d877..d6eab5a03cb33e7500764241fa27f9b72efcc4eb 100644 --- a/examples/rtic_bare6.rs +++ b/examples/rtic_bare6.rs @@ -223,7 +223,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { // What happens? // // I get the error "Frequency searched for is out of range for this VOS range -// when changing PCLK1 from 32 to 64 +// when changing PCLK1 from 32 to 64. This is due PCLK1 is not speccified to run faster than 42 Mhz. // // Try to setup the clock according to: // @@ -231,7 +231,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { // // `rcc.cfgr.sysclk(84.mhz()).pclk1(42.mhz()).pclk2(64.mhz()).freeze();` // -// When I chnage pclk2 to 64 the other sysclk chnages to 64 and pclk1 changes to 32. +// When I changee pclk2 to 64 the other sysclk changes to 64 and pclk1 changes to 32. This is due that the // PCLK2 does not have a prescalar that can scale it from 84 MHz to 64 Mhz and therefore changes the clock. // // Commit your answers (bare6_0) // @@ -251,7 +251,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { // // What is the frequency of blinking? // -// 1 Hz +// 1 Hz, 16/8 = 2 since it toggles between on or off the led will blink at 1Hz. // // Commit your answers (bare6_1) // @@ -277,7 +277,8 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { //` // What is the frequency of blinking? // -// 3 Hz (ociloscope: 11.9 MHz or 12 MHz) +// 3 Hz (ociloscope: 11.9 MHz or 12 MHz) 48/8 = 6, since it toggles between on and of the led will blink at 3Hz +// or (12*4)/8 = 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. @@ -370,7 +371,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { // // Is that a correct? // -// Yes, I suppose? +// No, since PCLK2 does not use a prescalar that can scale from 84 Mhz to 64 Mhz. // // Optional: If you find it incorrect, file an issue to `stm32f4xx-hal` describing the problem. // (Remember always check already open issues, and add to existing if related.)