mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-26 00:14:03 +08:00
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
|
* embedded brains GmbH
|
||||||
* Obere Lagerstr. 30
|
* Obere Lagerstr. 30
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
#include <rtems/score/armv7m.h>
|
||||||
|
|
||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/lpc24xx.h>
|
#include <bsp/lpc24xx.h>
|
||||||
@@ -32,15 +33,16 @@ BSP_START_TEXT_SECTION __attribute__((flatten)) void bsp_reset(void)
|
|||||||
|
|
||||||
rtems_interrupt_disable(level);
|
rtems_interrupt_disable(level);
|
||||||
|
|
||||||
#ifdef ARM_MULTILIB_ARCH_V4
|
#if defined(ARM_MULTILIB_ARCH_V4)
|
||||||
/* Trigger watchdog reset */
|
/* Trigger watchdog reset */
|
||||||
WDCLKSEL = 0;
|
WDCLKSEL = 0;
|
||||||
WDTC = 0xff;
|
WDTC = 0xff;
|
||||||
WDMOD = 0x3;
|
WDMOD = 0x3;
|
||||||
WDFEED = 0xaa;
|
WDFEED = 0xaa;
|
||||||
WDFEED = 0x55;
|
WDFEED = 0x55;
|
||||||
#else
|
#elif defined(ARM_MULTILIB_ARCH_V7M)
|
||||||
printk("reset\n");
|
_ARMV7M_SCB->aircr = ARMV7M_SCB_AIRCR_VECTKEY
|
||||||
|
| ARMV7M_SCB_AIRCR_SYSRESETREQ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user