Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Lindgren
app
Commits
1daf87a6
Commit
1daf87a6
authored
6 years ago
by
Per Lindgren
Browse files
Options
Downloads
Patches
Plain Diff
bare7
parent
958553cc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.vscode/launch.json
+93
-0
93 additions, 0 deletions
.vscode/launch.json
.vscode/tasks.json
+12
-0
12 additions, 0 deletions
.vscode/tasks.json
examples/bare6.rs
+1
-43
1 addition, 43 deletions
examples/bare6.rs
with
106 additions
and
43 deletions
.vscode/launch.json
+
93
−
0
View file @
1daf87a6
...
@@ -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"
,
...
...
This diff is collapsed.
Click to expand it.
.vscode/tasks.json
+
12
−
0
View file @
1daf87a6
...
@@ -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
This diff is collapsed.
Click to expand it.
examples/bare6.rs
+
1
−
43
View file @
1daf87a6
...
@@ -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 answ
aaas
ers (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)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment