From 1e863a322dc1d88e285e9c5877ee38679738c66d Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 20 Nov 2014 13:37:36 +0100 Subject: [PATCH] cpu/cortex-mX_common: added delay to reboot_arch --- cpu/cortex-m0_common/reboot_arch.c | 6 +++--- cpu/cortex-m3_common/reboot_arch.c | 6 +++--- cpu/cortex-m4_common/reboot_arch.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) 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; }