Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
e7020e_2019
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
Henrik Theolin
e7020e_2019
Commits
9ea71683
Commit
9ea71683
authored
6 years ago
by
Henrik Theolin
Browse files
Options
Downloads
Patches
Plain Diff
bare7_2
parent
d4e09f74
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/bare7.rs
+11
-5
11 additions, 5 deletions
examples/bare7.rs
pictures/bare_6_84mhz_high_speed.jpg
+0
-0
0 additions, 0 deletions
pictures/bare_6_84mhz_high_speed.jpg
with
11 additions
and
5 deletions
examples/bare7.rs
+
11
−
5
View file @
9ea71683
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
pictures/bare_6_84mhz_high_speed.jpg
0 → 100755
+
0
−
0
View file @
9ea71683
216 KiB
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