Data Structures | Macros | Variables
WatchdogCC32XX.h File Reference

Detailed Description

Watchdog timer driver implementation for CC32XX.


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

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

This Watchdog driver implementation is designed to operate on a CC32XX device. Once opened, CC32XX Watchdog will count down from the reload value specified in the WatchdogCC32XX_HWAttrs. If it times out, the Watchdog interrupt flag will be set, and a user-provided callback function will be called. If the Watchdog Timer is allowed to time out 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.

Warning
The watchdog peripheral does not support a Non-Maskable Interrupt (NMI).

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. This feature cannot be disabled.

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 UArg as an argument. The callback and code to start the Watchdog timer are shown below.

void watchdogCallback(UArg handle);
...
Watchdog_Handle handle;
uint32_t tickValue;
params.callbackFxn = watchdogCallback;
handle = Watchdog_open(Watchdog_configIndex, &params);
// Set timeout period to 100 ms
tickValue = Watchdog_convertMsToTicks(handle, 100);
Watchdog_setReload(handle, tickValue);
...
void watchdogCallback(UArg handle)
{
// User-defined code here
...
}

Power Driver Usage

The watchdog timer driver does not set any power constraints. If the power driver is enabled, the application will continue to aggressively attempt to place the device into the lowest power state possible.

When the device enters Low Power Deep Sleep, the peripheral registers are reset. After a transition from Low Power Deep Sleep, the watchdog timer will be re-initialized automatically with the most recently set reload value. If Watchdog_setReload() was never called, the WatchdogCC32XX_HWAttrs.reloadValue is used. With each transition to and from Low Power Deep Sleep, the watchdog timer is implicitly cleared.

#include <stdint.h>
#include <stdbool.h>
#include <ti/drivers/Watchdog.h>
Include dependency graph for WatchdogCC32XX.h:

Go to the source code of this file.

Data Structures

struct  WatchdogCC32XX_HWAttrs
 Watchdog hardware attributes for CC32XX. More...
 
struct  WatchdogCC32XX_Object
 Watchdog Object for CC32XX. More...
 

Macros

#define WatchdogCC32XX_CMD_IS_TIMER_ENABLE   (Watchdog_CMD_RESERVED + 0)
 Command used by Watchdog_control to determines whether the watchdog timer is enabled. More...
 
#define WatchdogCC32XX_CMD_GET_TIMER_VALUE   (Watchdog_CMD_RESERVED + 1)
 Command used by Watchdog_control to gets the current watchdog timer value. More...
 
#define WatchdogCC32XX_CMD_IS_TIMER_LOCKED   (Watchdog_CMD_RESERVED + 2)
 Command used by Watchdog_control to determines whether the watchdog timer is locked. More...
 
#define WatchdogCC32XX_CMD_GET_TIMER_RELOAD_VALUE   (Watchdog_CMD_RESERVED + 3)
 Command used by Watchdog_control to gets the current watchdog timer reload value. More...
 

Variables

const Watchdog_FxnTable WatchdogCC32XX_fxnTable
 Watchdog function table for CC32XX. More...
 

Variable Documentation

§ WatchdogCC32XX_fxnTable

const Watchdog_FxnTable WatchdogCC32XX_fxnTable

Watchdog function table for CC32XX.

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