[rtems commit] bsp/lpc24xx: Request system reset for LPC17XX
Sebastian Huber
sebh at rtems.org
Mon Jan 7 14:05:04 UTC 2013
Module: rtems
Branch: master
Commit: 2460cc7848985ee84fbe18a4b7f14dfd78eea4ee
Changeset: http://git.rtems.org/rtems/commit/?id=2460cc7848985ee84fbe18a4b7f14dfd78eea4ee
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Jan 7 14:56:18 2013 +0100
bsp/lpc24xx: Request system reset for LPC17XX
---
c/src/lib/libbsp/arm/lpc24xx/startup/bspreset.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/bspreset.c b/c/src/lib/libbsp/arm/lpc24xx/startup/bspreset.c
index d7bbc89..ca84e94 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/bspreset.c
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/bspreset.c
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2008-2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
@@ -21,6 +21,7 @@
*/
#include <rtems.h>
+#include <rtems/score/armv7m.h>
#include <bsp/bootcard.h>
#include <bsp/lpc24xx.h>
@@ -32,15 +33,16 @@ BSP_START_TEXT_SECTION __attribute__((flatten)) void bsp_reset(void)
rtems_interrupt_disable(level);
- #ifdef ARM_MULTILIB_ARCH_V4
+ #if defined(ARM_MULTILIB_ARCH_V4)
/* Trigger watchdog reset */
WDCLKSEL = 0;
WDTC = 0xff;
WDMOD = 0x3;
WDFEED = 0xaa;
WDFEED = 0x55;
- #else
- printk("reset\n");
+ #elif defined(ARM_MULTILIB_ARCH_V7M)
+ _ARMV7M_SCB->aircr = ARMV7M_SCB_AIRCR_VECTKEY
+ | ARMV7M_SCB_AIRCR_SYSRESETREQ;
#endif
while (true) {
More information about the vc
mailing list