TI-RTOS Drivers  tidrivers_full_2_20_00_08
Data Structures | Typedefs | Variables
WatchdogCC3200.h File Reference

Detailed Description

Watchdog driver implementation for CC3200.

============================================================================

The Watchdog header file for CC3200 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 CC3200 device. Once opened, CC3200 Watchdog will count down from the reload value specified in the WatchdogCC3200_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 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.

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 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
...
}

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

Go to the source code of this file.

Data Structures

struct  WatchdogCC3200_HWAttrs
 Watchdog hardware attributes for CC3200. More...
 
struct  WatchdogCC3200_Object
 Watchdog Object for CC3200. More...
 

Typedefs

typedef struct WatchdogCC3200_HWAttrs WatchdogCC3200_HWAttrs
 Watchdog hardware attributes for CC3200. More...
 
typedef struct WatchdogCC3200_Object WatchdogCC3200_Object
 Watchdog Object for CC3200. More...
 

Variables

const Watchdog_FxnTable WatchdogCC3200_fxnTable
 Watchdog function table for CC3200. More...
 

Typedef Documentation

Watchdog hardware attributes for CC3200.

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.drivers.ports 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().

Watchdog Object for CC3200.

Not to be accessed by the user.

Variable Documentation

const Watchdog_FxnTable WatchdogCC3200_fxnTable

Watchdog function table for CC3200.

Copyright 2016, Texas Instruments Incorporated