source: rtems/bsps/powerpc/mpc55xxevb/start/start-watchdog.c @ c991eeec

5
Last change on this file since c991eeec was c991eeec, checked in by Sebastian Huber <sebastian.huber@…>, on 03/04/19 at 14:32:15

bsps: Adjust bsp.h Doxygen groups

Update #3706.

  • Property mode set to 100644
File size: 839 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSBSPsPowerPCMPC55XX
5 *
6 * @brief Watchdog initialization code.
7 */
8
9/*
10 * Copyright (c) 2011 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 <bsp.h>
24#include <bsp/start.h>
25#include <bsp/mpc55xx-config.h>
26
27BSP_START_TEXT_SECTION void mpc55xx_start_watchdog(void)
28{
29  #ifdef MPC55XX_NEEDS_LOW_LEVEL_INIT
30    #ifdef MPC55XX_HAS_SWT
31      /* Write keys to clear soft lock bit */
32      SWT.SR.R = 0x0000c520;
33      SWT.SR.R = 0x0000d928;
34
35      /* Clear watchdog enable (WEN) */
36      SWT.CR.R = 0x8000010A;
37    #endif
38  #endif
39}
Note: See TracBrowser for help on using the repository browser.