RTEMS 7.0-rc1
Loading...
Searching...
No Matches
watchdog-defs.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
2
11/*
12 * Copyright (c) 2014 Taller Technologies.
13 *
14 * @author Boretto Martin (martin.boretto@tallertechnologies.com)
15 * @author Diaz Marcos (marcos.diaz@tallertechnologies.com)
16 * @author Lenarduzzi Federico (federico.lenarduzzi@tallertechnologies.com)
17 * @author Daniel Chicco (daniel.chicco@tallertechnologies.com)
18 *
19 * The license and distribution terms for this file may be
20 * found in the file LICENSE in this distribution or at
21 * http://www.rtems.org/license/LICENSE.
22 */
23
24#ifndef LIBBSP_ARM_LPC176X_WATCHDOG_DEFS_H
25#define LIBBSP_ARM_LPC176X_WATCHDOG_DEFS_H
26
27#include <rtems/score/cpu.h>
28#include <bsp.h>
29#include <bspopts.h>
30#include <bsp/utility.h>
31#include <bsp/irq.h>
32#include <bsp/common-types.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
38#define LPC176X_WDMOD_BASE 0x40000000U
39#define LPC176X_WDFEED_CON 0XAAU
40#define LPC176X_WDFEED_CFG 0X55U
41#define LPC176X_WD_PRESCALER_DIVISOR 4000000U
42#define LPC176X_WWDT_MOD_WDEN BSP_BIT32( 0 )
43#define LPC176X_WWDT_MOD_WDRESET BSP_BIT32( 1 )
44#define LPC176X_WWDT_MOD_WDTOF BSP_BIT32( 2 )
45#define LPC176X_WWDT_MOD_WDINT BSP_BIT32( 3 )
46#define LPC176X_WWDT_CLKSEL_WDSEL_IRC 0x0U
47#define LPC176X_WWDT_CLKSEL_WDSEL_PCLK 0x1U
48#define LPC176X_WWDT_CLKSEL_WDSEL_RTC 0x2U
49#define LPC176X_WD_INTERRUPT_VECTOR_NUMBER 0U
50#define LPC176X_WDMOD ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + 0x00U ) )
51#define LPC176X_WDTC ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + 0x04U ) )
52#define LPC176X_WDFEED ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + \
53 0x08U ) )
54#define LPC176X_WDTV ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + 0x0CU ) )
55#define LPC176X_WDCLKSEL ( *(volatile uint32_t *) ( LPC176X_WDMOD_BASE + \
56 0x10U ) )
57
62
63#ifdef __cplusplus
64}
65#endif /* __cplusplus */
66
67#endif /* LIBBSP_ARM_LPC176X_WATCHDOG_DEFS_H */
Definitions types used by some devices in common.
void(* rtems_interrupt_handler)(void *)
Interrupt handler routines shall have this type.
Definition: intr.h:1030
This header file provides utility macros for BSPs.
rtems_interrupt_handler lpc176x_wd_isr_funct
A function that attends an interruption for a watchdog.
Definition: watchdog-defs.h:61