projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
150881f
)
altos: Add STM ao_arch_reboot implementation
author
Keith Packard
<keithp@keithp.com>
Thu, 12 Apr 2012 06:26:30 +0000
(23:26 -0700)
committer
Keith Packard
<keithp@keithp.com>
Sat, 14 Apr 2012 20:22:02 +0000
(13:22 -0700)
Uses the AIRCR register to force a reset
Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/ao_arch.h
patch
|
blob
|
history
diff --git
a/src/stm/ao_arch.h
b/src/stm/ao_arch.h
index dd9579f1093252b303cfff84506ebb68d5734b6b..adb6eb947a30daec3e4c6ff02c051ff3f5e69fc8 100644
(file)
--- a/
src/stm/ao_arch.h
+++ b/
src/stm/ao_arch.h
@@
-42,7
+42,9
@@
#define __interrupt(n)
#define __at(n)
-#define ao_arch_reboot() /* XXX */
+#define CORTEX_M3_AIRCR ((uint32_t *) 0xe000ed0c)
+
+#define ao_arch_reboot() (*((uint32_t *) 0xe000ed0c) = 0x05fa0004)
#define ao_arch_nop() asm("nop")