source: rtems/c/src/lib/libbsp/arm/lpc24xx/startup/bspreset.c @ dd853a3

4.115
Last change on this file since dd853a3 was c468f18b, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 12/15/09 at 15:20:47

add support for LPC32xx

  • Property mode set to 100644
File size: 675 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup lpc24xx
5 *
6 * @brief Reset code.
7 */
8
9/*
10 * Copyright (c) 2008
11 * Embedded Brains GmbH
12 * Obere Lagerstr. 30
13 * D-82178 Puchheim
14 * Germany
15 * rtems@embedded-brains.de
16 *
17 * The license and distribution terms for this file may be found in the file
18 * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
19 */
20
21#include <rtems.h>
22
23#include <bsp/bootcard.h>
24#include <bsp/lpc24xx.h>
25
26void bsp_reset(void)
27{
28  rtems_interrupt_level level;
29
30  rtems_interrupt_disable(level);
31
32  /* Trigger watchdog reset */
33  WDCLKSEL = 0;
34  WDTC = 0xff;
35  WDMOD = 0x3;
36  WDFEED = 0xaa;
37  WDFEED = 0x55;
38
39  while (true) {
40    /* Do nothing */
41  }
42}
Note: See TracBrowser for help on using the repository browser.