Skip to content
Snippets Groups Projects
Commit 1daf87a6 authored by Per Lindgren's avatar Per Lindgren
Browse files

bare7

parent 958553cc
Branches
No related tags found
No related merge requests found
...@@ -408,6 +408,99 @@ ...@@ -408,6 +408,99 @@
}, },
"cwd": "${workspaceRoot}" "cwd": "${workspaceRoot}"
}, },
{
"type": "cortex-debug",
"request": "launch",
"servertype": "openocd",
"name": "bare7 (debug)",
"preLaunchTask": "cargo build --example bare7 --features stm32f4",
"executable": "./target/thumbv7em-none-eabihf/debug/examples/bare7",
// uses local config files
"configFiles": [
"./stlink.cfg",
"./stm32f4x.cfg"
],
"postLaunchCommands": [
"monitor arm semihosting enable"
],
"swoConfig": {
"enabled": true,
"cpuFrequency": 16000000,
"swoFrequency": 2000000,
"source": "probe",
"decoders": [
{
"type": "console",
"label": "ITM",
"port": 0
}
]
},
"svdFile": "STM32F413.svd",
"cwd": "${workspaceRoot}"
},
{
"type": "cortex-debug",
"request": "launch",
"servertype": "openocd",
"name": "bare7 (debug) 64MHz",
"preLaunchTask": "cargo build --example bare7 --features stm32f4",
"executable": "./target/thumbv7em-none-eabihf/debug/examples/bare7",
// uses local config files
"configFiles": [
"interface/stlink.cfg",
"target/stm32f4x.cfg"
],
"postLaunchCommands": [
"monitor reset halt"
],
"swoConfig": {
"enabled": true,
"cpuFrequency": 64000000,
"swoFrequency": 2000000,
"source": "probe",
"decoders": [
{
"type": "console",
"label": "ITM",
"port": 0
}
]
},
"svdFile": "STM32F413.svd",
"cwd": "${workspaceRoot}"
},
{
"type": "cortex-debug",
"request": "launch",
"servertype": "openocd",
"name": "bare7 (debug) 84MHz",
"preLaunchTask": "cargo build --example bare7 --features stm32f4",
"executable": "./target/thumbv7em-none-eabihf/debug/examples/bare7",
// uses local config files
"configFiles": [
"interface/stlink.cfg",
"target/stm32f4x.cfg"
],
"postLaunchCommands": [
"monitor reset halt"
],
"swoConfig": {
"enabled": true,
"cpuFrequency": 84000000,
"swoFrequency": 2000000,
"source": "probe",
"decoders": [
{
"type": "console",
"label": "ITM",
"port": 0
}
]
},
"svdFile": "STM32F413.svd",
"cwd": "${workspaceRoot}"
},
{ {
"type": "cortex-debug", "type": "cortex-debug",
"request": "launch", "request": "launch",
......
...@@ -207,5 +207,17 @@ ...@@ -207,5 +207,17 @@
"isDefault": true "isDefault": true
} }
}, },
{
"type": "shell",
"label": "cargo build --example bare7 --features stm32f4",
"command": "cargo build --example bare7 --features stm32f4",
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
] ]
} }
\ No newline at end of file
...@@ -149,7 +149,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { ...@@ -149,7 +149,7 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) {
// 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_16mhz_high_speed". // Save the the picture as "bare_6_16mhz_high_speed".
// //
// commit your answaaasers (bare6_2) // commit your answers (bare6_2)
// //
// 3. Now run the example in 64Mz // 3. Now run the example in 64Mz
// You can do that by issuing a `monitor reset init` // You can do that by issuing a `monitor reset init`
...@@ -186,45 +186,3 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) { ...@@ -186,45 +186,3 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) {
// //
// commit your answers (bare6_4) // commit your answers (bare6_4)
// //
// 5. Now we will put the MCU in 84MHz using the function
// clock::set_84_mhz(rcc, flash);
//
// This function is part of the `f4` support crate (by Johonnes Sjölund)
// besides `rcc` (for clocking) it takes `flash` as a parameter to set
// up correct latency (wait states) for the flash memory (where our
// program typically resides). This is required since the flash cannot
// operate at the full 84MHz, so the MCU has to wait for the memory.
//
// Repeat the experiment 2.
//
// What is the frequency of MCO2 read by the oscilloscope.
//
// ** your answer here **
//
// Compute the value of SYSCLK based on the oscilloscope reading.
//
// ** your answer here **
//
// What is the peak to peak reading of the signal.
//
// ** your answer here **
//
// Make a screen dump or photo of the oscilloscope output.
// Save the the picture as "bare_6_84mhz_high_speed"
//
// commit your answers (bare6_5)
//
// 6. Now reprogram the PC9 to be "Low Speed", and re-run at 84Mz.
//
// Did the frequency change in comparison to assignment 5?
//
// ** your answer here **
//
// What is the peak to peak reading of the signal (and why did it change)?
//
// ** your answer here **
//
// Make a screen dump or photo of the oscilloscope output.
// Save the the picture as "bare_6_84mhz_low_speed".
//
// commit your answers (bare6_6)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment