Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
e7020e_2021
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Carl Österberg
e7020e_2021
Commits
82f0a9f7
Commit
82f0a9f7
authored
4 years ago
by
Carl Österberg
Browse files
Options
Downloads
Patches
Plain Diff
bare6_1
parent
6ebcbf6b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/rtic_bare6.rs
+12
-8
12 additions, 8 deletions
examples/rtic_bare6.rs
with
12 additions
and
8 deletions
examples/rtic_bare6.rs
+
12
−
8
View file @
82f0a9f7
...
@@ -55,7 +55,8 @@ const APP: () = {
...
@@ -55,7 +55,8 @@ const APP: () = {
let
rcc
=
device
.RCC
.constrain
();
let
rcc
=
device
.RCC
.constrain
();
//let _clocks = rcc.cfgr.freeze();
let
_clocks
=
rcc
.cfgr
.freeze
();
//rprintln!("mhz: {:?}", _clocks.sysclk());
//Set up the system clock. 48 MHz?
//Set up the system clock. 48 MHz?
// let _clocks = rcc
// let _clocks = rcc
...
@@ -64,12 +65,12 @@ const APP: () = {
...
@@ -64,12 +65,12 @@ const APP: () = {
// .pclk1(24.mhz())
// .pclk1(24.mhz())
// .freeze();
// .freeze();
let
_clocks
=
rcc
//
let _clocks = rcc
.cfgr
//
.cfgr
.sysclk
(
64
.mhz
())
//
.sysclk(64.mhz())
.pclk1
(
64
.mhz
())
//
.pclk1(64.mhz())
.pclk2
(
64
.mhz
())
//
.pclk2(64.mhz())
.freeze
();
//
.freeze();
//
//
// let _clocks = rcc
// let _clocks = rcc
// .cfgr
// .cfgr
...
@@ -243,14 +244,17 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) {
...
@@ -243,14 +244,17 @@ fn clock_out(rcc: &RCC, gpioc: &GPIOC) {
// What is the (default) MCU (SYSCLK) frequency?
// What is the (default) MCU (SYSCLK) frequency?
//
//
// ** your answer here **
// ** your answer here **
// 16 MHz
//
//
// What is the (default) DWT CYCCNT frequency?
// What is the (default) DWT CYCCNT frequency?
//
//
// ** your answer here **
// ** your answer here **
// 16 MHz
//
//
// What is the frequency of blinking?
// What is the frequency of blinking?
//
//
// ** your answer here **
// ** your answer here **
// 8/16 = 0.5 which means we do one turn off and on per second
//
//
// Commit your answers (bare6_1)
// Commit your answers (bare6_1)
//
//
...
...
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