diff --git a/cpu/cortex-m0_common/reboot_arch.c b/cpu/cortex-m0_common/reboot_arch.c index 8702ed9250..4774572398 100644 --- a/cpu/cortex-m0_common/reboot_arch.c +++ b/cpu/cortex-m0_common/reboot_arch.c @@ -22,13 +22,13 @@ #include "arch/reboot_arch.h" #include "cpu.h" - +#include "hwtimer.h" int reboot_arch(int mode) { printf("Going into reboot, mode %i\n", mode); - + /* wait 1 ms to make sure the printf is finished */ + hwtimer_wait(HWTIMER_TICKS(1000)); NVIC_SystemReset(); - return -1; } diff --git a/cpu/cortex-m3_common/reboot_arch.c b/cpu/cortex-m3_common/reboot_arch.c index d4456efaa4..fc6046c855 100644 --- a/cpu/cortex-m3_common/reboot_arch.c +++ b/cpu/cortex-m3_common/reboot_arch.c @@ -22,13 +22,13 @@ #include "arch/reboot_arch.h" #include "cpu.h" - +#include "hwtimer.h" int reboot_arch(int mode) { printf("Going into reboot, mode %i\n", mode); - + /* wait 1 ms to make sure the printf is finished */ + hwtimer_wait(HWTIMER_TICKS(1000)); NVIC_SystemReset(); - return -1; } diff --git a/cpu/cortex-m4_common/reboot_arch.c b/cpu/cortex-m4_common/reboot_arch.c index 6e8efdbd30..174a6a5cce 100644 --- a/cpu/cortex-m4_common/reboot_arch.c +++ b/cpu/cortex-m4_common/reboot_arch.c @@ -22,13 +22,13 @@ #include "arch/reboot_arch.h" #include "cpu.h" - +#include "hwtimer.h" int reboot_arch(int mode) { printf("Going into reboot, mode %i\n", mode); - + /* wait 1 ms to make sure the printf is finished */ + hwtimer_wait(HWTIMER_TICKS(1000)); NVIC_SystemReset(); - return -1; }