Skip to content
Snippets Groups Projects
Commit 9ea71683 authored by Henrik Theolin's avatar Henrik Theolin
Browse files

bare7_2

parent d4e09f74
No related branches found
No related tags found
No related merge requests found
...@@ -33,8 +33,8 @@ fn main() -> ! { ...@@ -33,8 +33,8 @@ fn main() -> ! {
let rcc = p.RCC.constrain(); let rcc = p.RCC.constrain();
// 16 MHz (default, all clocks) // 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(84.mhz()).freeze();
let gpioa = p.GPIOA.split(); let gpioa = p.GPIOA.split();
let tx = gpioa.pa2.into_alternate_af7(); let tx = gpioa.pa2.into_alternate_af7();
...@@ -49,6 +49,12 @@ fn main() -> ! { ...@@ -49,6 +49,12 @@ fn main() -> ! {
) )
.unwrap(); .unwrap();
let gpioc = p.GPIOC.split();
gpioc.pc9.into_alternate_af0().set_speed(hal::gpio::Speed::VeryHigh);
// MCO_2 alternate function AF0, STM32F401xD STM32F401xE data sheet
// table 9
// AF0, gpioc reset value = AF0
// Separate out the sender and receiver of the serial port // Separate out the sender and receiver of the serial port
let (mut tx, mut rx) = serial.split(); let (mut tx, mut rx) = serial.split();
...@@ -144,15 +150,15 @@ fn main() -> ! { ...@@ -144,15 +150,15 @@ fn main() -> ! {
// //
// What is the frequency of MCO2 read by the oscilloscope. // What is the frequency of MCO2 read by the oscilloscope.
// //
// ** your answer here ** // ** 84MHz **
// //
// Compute the value of SYSCLK based on the oscilloscope reading. // Compute the value of SYSCLK based on the oscilloscope reading.
// //
// ** your answer here ** // ** 84MHz **
// //
// What is the peak to peak reading of the signal. // What is the peak to peak reading of the signal.
// //
// ** your answer here ** // ** 9.8V **
// //
// Make a screen dump or photo of the oscilloscope output. // Make a screen dump or photo of the oscilloscope output.
// Save the the picture as "bare_6_84mhz_high_speed" // Save the the picture as "bare_6_84mhz_high_speed"
......
pictures/bare_6_84mhz_high_speed.jpg

216 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment