forked from Imagelibrary/rtems
bsp/lpc24xx: Request system reset for LPC17XX
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user