Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rtic_f4xx_nucleo
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Edvin Åkerfeldt
rtic_f4xx_nucleo
Commits
8f7b9457
Commit
8f7b9457
authored
Dec 3, 2020
by
Edvin Åkerfeldt
Browse files
Options
Downloads
Patches
Plain Diff
timing_resources, Q6-Q13 done
parent
d7a327d2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/timing_resources.rs
+26
-2
26 additions, 2 deletions
examples/timing_resources.rs
with
26 additions
and
2 deletions
examples/timing_resources.rs
+
26
−
2
View file @
8f7b9457
...
...
@@ -40,9 +40,9 @@ const APP: () = {
rtic
::
pend
(
stm32f411
::
Interrupt
::
EXTI0
);
asm
::
bkpt
();
cx
.resources.shared
.lock
(|
shared
|
{
//
asm::bkpt();
asm
::
bkpt
();
*
shared
+=
1
;
//
asm::bkpt();
asm
::
bkpt
();
});
asm
::
bkpt
();
}
...
...
@@ -168,6 +168,9 @@ Yes, but very minimal. The only thing that needs to be infered is the changing o
// (gdb) x 0xe0001004
//
// [Your answer here]
/*
37 cycles
*/
//
// You should have a total execution time in the range of 30-40 cycles.
//
...
...
@@ -175,6 +178,9 @@ Yes, but very minimal. The only thing that needs to be infered is the changing o
// `exti0` was safe without locking the resource.
//
// [Your answer here]
/*
It was safe because exti0 had the highest priority of the tasks accessing the resource.
*/
//
// In `exti1` we also access `shared` but this time through a lock.
//
...
...
@@ -204,10 +210,16 @@ Yes, but very minimal. The only thing that needs to be infered is the changing o
// (gdb) x 0xe0001004
//
// [Your answer here]
/*
52 cycles
*/
//
// Calculate the total time (in cycles), for this section of code.
//
// [Your answer here]
/*
52 - 37 = 15 cycles
*/
//
// You should get a value around 15 cycles.
//
...
...
@@ -248,6 +260,9 @@ Yes, but very minimal. The only thing that needs to be infered is the changing o
// (gdb) x 0xe0001004
//
// [Your answer here]
/*
40 cycles
*/
//
// (gdb) c
//
...
...
@@ -258,6 +273,9 @@ Yes, but very minimal. The only thing that needs to be infered is the changing o
// (gdb) x 0xe0001004
//
// [Your answer here]
/*
50 cycles
*/
//
// From a real-time perspective the critical section infers
// blocking (of higher priority tasks).
...
...
@@ -265,6 +283,9 @@ Yes, but very minimal. The only thing that needs to be infered is the changing o
// How many clock cycles is the blocking?
//
// [Your answer here]
/*
10 cycles
*/
//
// Finally continue out of the closure.
//
...
...
@@ -275,6 +296,9 @@ Yes, but very minimal. The only thing that needs to be infered is the changing o
// (gdb) x 0xe0001004
//
// [Your answer here]
/*
52 cycles
*/
//
// This is the total execution time of:
//
...
...
...
...
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