Skip to content
Snippets Groups Projects
Commit f6b1713c authored by Anton's avatar Anton
Browse files

bare6_3

parent 44534184
Branches
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ use stm32f4xx_hal::{ ...@@ -18,7 +18,7 @@ use stm32f4xx_hal::{
stm32::{self, GPIOC, RCC}, 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)] #[rtic::app(device = stm32f4xx_hal::stm32, monotonic = rtic::cyccnt::CYCCNT, peripherals = true)]
const APP: () = { const APP: () = {
...@@ -55,14 +55,14 @@ const APP: () = { ...@@ -55,14 +55,14 @@ const APP: () = {
let rcc = device.RCC.constrain(); let rcc = device.RCC.constrain();
let _clocks = rcc.cfgr.freeze(); // let _clocks = rcc.cfgr.freeze();
// Set up the system clock. 48 MHz? // Set up the system clock. 48 MHz?
// let _clocks = rcc let _clocks = rcc
// .cfgr .cfgr
// .sysclk(48.mhz()) .sysclk(48.mhz())
// .pclk1(24.mhz()) .pclk1(24.mhz())
// .freeze(); .freeze();
// let _clocks = rcc // let _clocks = rcc
// .cfgr // .cfgr
...@@ -237,7 +237,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { ...@@ -237,7 +237,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) {
// //
// What is the (default) MCU (SYSCLK) frequency? // What is the (default) MCU (SYSCLK) frequency?
// //
// 8 Mhz // 16 Mhz
// //
// What is the (default) DWT CYCCNT frequency? // What is the (default) DWT CYCCNT frequency?
// //
...@@ -271,7 +271,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { ...@@ -271,7 +271,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) {
//` //`
// What is the frequency of blinking? // 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. // Now change the constant `OFFSET` so you get the same blinking frequency as in 1.
// Test and validate that you got the desired behavior. // Test and validate that you got the desired behavior.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment