source: rtems/c/src/lib/libbsp/arm/lpc24xx/startup/bspreset-armv4.c @ 76a51c68

5
Last change on this file since 76a51c68 was b32a9cd, checked in by Sebastian Huber <sebastian.huber@…>, on 01/12/16 at 13:44:10

bsps/arm: Use common ARMv7-M bsp_reset()

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