4.115
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 | |
---|
26 | void 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.