projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dcdbf0
)
common: Implement nvic::system_reset().
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Wed, 18 Dec 2019 07:46:46 +0000
(08:46 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 5 Jan 2020 19:38:11 +0000
(20:38 +0100)
Performs a system reset.
src/common/nvic.rs
patch
|
blob
|
history
diff --git
a/src/common/nvic.rs
b/src/common/nvic.rs
index 38aece3fb449a1b57c2d7a13e40738d773ad81c4..1519f47b431dd6b1f00246cb3d70390bd77f64e8 100644
(file)
--- a/
src/common/nvic.rs
+++ b/
src/common/nvic.rs
@@
-62,3
+62,12
@@
pub fn set_priority(irq_number: u32, priority: u32) {
m
});
}
+
+pub fn system_reset() {
+ let mut scb_aircr = Reg32::new(0xe000ed0c);
+
+ scb_aircr.write(0x5fa0004);
+
+ loop {
+ }
+}