Data Structures | Typedefs | Variables
WatchdogMSP432E4.h File Reference

Detailed Description

Watchdog driver implementation for MSP432E4.


The Watchdog header file for MSP432E4 should be included in an application as follows:

Refer to Watchdog.h for a complete description of APIs.

Overview

This Watchdog driver implementation is designed to operate on a MSP432E4 device. Once opened, MSP432E4 Watchdog will count down from the reload value specified in the WatchdogMSP432E4_HWAttrs. If it times out, the Watchdog interrupt flag will be set, and a user-provided callback function will be called. If resets have been enabled in the Watchdog_Params and the Watchdog Timer is allowed to timeout again while the interrupt flag is still pending, a reset signal will be generated. To prevent a reset, Watchdog_clear() must be called to clear the interrupt flag.

The reload value from which the Watchdog Timer counts down may be changed during runtime using Watchdog_setReload().

Watchdog_close() is not supported by this driver implementation.

By default the Watchdog driver has resets turned on. However, they may be turned off in the Watchdog_Params which allows the Watchdog Timer to be used like another timer interrupt. This functionality is not supported by all platforms, refer to device specific documentation for details.

To have a user-defined function run at the warning interrupt, first define a void-type function that takes a Watchdog_Handle cast to a uintptr_t as an argument such as the one shown below.

void callback(uintptr_t handle);
...
Watchdog_Handle handle;
params.callbackFxn = callback;
handle = Watchdog_open(Board_WATCHDOG0, &params);
#include <stdbool.h>
#include <stdint.h>
#include <ti/drivers/Watchdog.h>
Include dependency graph for WatchdogMSP432E4.h:

Go to the source code of this file.

Data Structures

struct  WatchdogMSP432E4_HWAttrs
 Watchdog hardware attributes for MSP432E4. More...
 
struct  WatchdogMSP432E4_Object
 Watchdog Object for MSP432E4. More...
 

Typedefs

typedef struct WatchdogMSP432E4_HWAttrs WatchdogMSP432E4_HWAttrs
 Watchdog hardware attributes for MSP432E4. More...
 
typedef struct WatchdogMSP432E4_Object WatchdogMSP432E4_Object
 Watchdog Object for MSP432E4. More...
 

Variables

const Watchdog_FxnTable WatchdogMSP432E4_fxnTable
 Watchdog function table for MSP432E4. More...
 

Typedef Documentation

§ WatchdogMSP432E4_HWAttrs

Watchdog hardware attributes for MSP432E4.

Watchdog hardware attributes for the WatchdogMSP432E4 driver's specific hardware configurations and interrupt priority settings.

The intPriority is the Watchdog timer's interrupt priority, as defined by the underlying OS. It is passed unmodified to the underlying OS's interrupt handler creation code, so you need to refer to the OS documentation for usage. For example, for SYS/BIOS applications, refer to the ti.sysbios.family.arm.m3.Hwi documentation for SYS/BIOS usage of interrupt priorities. If the driver uses the ti.dpl interface instead of making OS calls directly, then the HwiP port handles the interrupt priority in an OS specific way. In the case of the SYS/BIOS port, intPriority is passed unmodified to Hwi_create().

The reloadValue is specified in Watchdog Timer ticks. The MSP432E4 contains two Watchdog Timer peripherals. The first one (Watchdog Timer 0) is clocked by the system clock and the second (Watchdog Timer 1) is clocked by the clock source programmed in the ALTCLK field of the Alternate Clock Configuration (ALTCLKCFG) register.

A sample structure is shown below:

const WatchdogMSP432E4_HWAttrs watchdogMSP432E4HWAttrs[] =
{
{
.baseAddr = WATCHDOG0_BASE,
.intNum = INT_WATCHDOG,
.intPriority = ~0,
.reloadValue = 80000000
},
};

§ WatchdogMSP432E4_Object

Watchdog Object for MSP432E4.

The application must not access any member variables of this structure!

Variable Documentation

§ WatchdogMSP432E4_fxnTable

const Watchdog_FxnTable WatchdogMSP432E4_fxnTable

Watchdog function table for MSP432E4.

© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale