diff options
author | Keith Packard <keithp@keithp.com> | 2012-04-11 23:26:30 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-04-14 13:22:02 -0700 |
commit | afd52a8b54fe31577d939a161ea9cf5ad48e3a43 (patch) | |
tree | 6b4374491e6a6de4f2cce720e72017c34ae46a34 | |
parent | 150881f86f8d90b5867507889441990d18223e62 (diff) |
altos: Add STM ao_arch_reboot implementation
Uses the AIRCR register to force a reset
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/stm/ao_arch.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stm/ao_arch.h b/src/stm/ao_arch.h index dd9579f1..adb6eb94 100644 --- 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") |