CC26xx Driver Library |

- Main Page
- Related Pages
- CC26xx APIs
- Register Descriptions
- Online Resources

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
[wdt] Watch Dog Timer

## Functions
__STATIC_INLINE bool | WatchdogRunning (void)
| Determines if the watchdog timer is enabled. More...
__STATIC_INLINE void | WatchdogEnable (void)
| Enables the watchdog timer. More...
__STATIC_INLINE void | WatchdogResetEnable (void)
| Enables the watchdog timer reset. More...
__STATIC_INLINE void | WatchdogResetDisable (void)
| Disables the watchdog timer reset. More...
__STATIC_INLINE void | WatchdogLock (void)
| Enables the watchdog timer lock mechanism. More...
__STATIC_INLINE void | WatchdogUnlock (void)
| Disables the watchdog timer lock mechanism. More...
__STATIC_INLINE bool | WatchdogLockState (void)
| Gets the state of the watchdog timer lock mechanism. More...
__STATIC_INLINE void | WatchdogReloadSet (uint32_t ui32LoadVal)
| Sets the watchdog timer reload value. More...
__STATIC_INLINE uint32_t | WatchdogReloadGet (void)
| Gets the watchdog timer reload value. More...
__STATIC_INLINE uint32_t | WatchdogValueGet (void)
| Gets the current watchdog timer value. More...
__STATIC_INLINE void | WatchdogIntRegister (void(*pfnHandler)(void))
| Registers an interrupt handler for the watchdog timer interrupt. More...
__STATIC_INLINE void | WatchdogIntUnregister (void)
| Unregisters an interrupt handler for the watchdog timer interrupt. More...
__STATIC_INLINE void | WatchdogIntEnable (void)
| Enables the watchdog timer interrupt. More...
__STATIC_INLINE uint32_t | WatchdogIntStatus (void)
| Gets the current watchdog timer interrupt status. More...
__STATIC_INLINE void | WatchdogIntClear (void)
| Clears the watchdog timer interrupt. More...
__STATIC_INLINE void | WatchdogIntTypeSet (uint32_t ui32Type)
| Sets the type of interrupt generated by the watchdog. More...
__STATIC_INLINE void | WatchdogStallEnable (void)
| Enables stalling of the watchdog timer during debug events. More...
__STATIC_INLINE void | WatchdogStallDisable (void)
| Disables stalling of the watchdog timer during debug events. More...

## Detailed Description

## Function Documentation

__STATIC_INLINE void WatchdogEnable | ( | void |  | ) |

Enables the watchdog timer.

This function enables the watchdog timer counter and interrupt.

Note
  This function has no effect if the watchdog timer has been locked.

Returns
  None

See also
  WatchdogLock(), WatchdogUnlock()

Definition at line 134 of file watchdog.h.

__STATIC_INLINE void WatchdogIntClear | ( | void |  | ) |

Clears the watchdog timer interrupt.

The watchdog timer interrupt source is cleared, so that it no longer asserts.

Note
  Because there is a write buffer in the Cortex-M processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (because the interrupt controller still sees the interrupt source asserted).

Returns
  None

Definition at line 448 of file watchdog.h.

__STATIC_INLINE void WatchdogIntEnable | ( | void |  | ) |

Enables the watchdog timer interrupt.

This function enables the watchdog timer interrupt.

Note
  This function has no effect if the watchdog timer has been locked.

Returns
  None

See also
  WatchdogLock(), WatchdogUnlock(), WatchdogEnable()

Definition at line 399 of file watchdog.h.

__STATIC_INLINE void WatchdogIntRegister | ( | void(*)(void) | pfnHandler | ) |

Registers an interrupt handler for the watchdog timer interrupt.

This function does the actual registering of the interrupt handler. This function also enables the global interrupt in the interrupt controller; the watchdog timer interrupt must be enabled via WatchdogIntEnable(). It is the interrupt handler's responsibility to clear the interrupt source via WatchdogIntClear().

Note
  This function registers the standard watchdog interrupt handler. To register the NMI watchdog handler, use IntRegister() to register the handler for the FAULT_NMI interrupt.

Parameters

  pfnHandler | is a pointer to the function to be called when the watchdog timer interrupt occurs.

Returns
  None

See also
  IntRegister() for important information about registering interrupt handlers.

Definition at line 339 of file watchdog.h.

__STATIC_INLINE uint32_t WatchdogIntStatus | ( | void |  | ) |

Gets the current watchdog timer interrupt status.

This function returns the interrupt status for the watchdog timer module.

Returns
  Returns the interrupt status.
  - 1 : Watchdog interrupt is active.
  - 0 : Watchdog interrupt is not active.

Definition at line 419 of file watchdog.h.

__STATIC_INLINE void WatchdogIntTypeSet | ( | uint32_t | ui32Type | ) |

Sets the type of interrupt generated by the watchdog.

This function sets the type of interrupt that is generated if the watchdog timer expires.

When configured to generate an NMI, the watchdog interrupt must still be enabled with WatchdogIntEnable(), and it must still be cleared inside the NMI handler with WatchdogIntClear().

Parameters

  ui32Type | is the type of interrupt to generate. WATCHDOG_INT_TYPE_INT : Generate a standard interrupt (default). WATCHDOG_INT_TYPE_NMI : Generate a non-maskable interrupt (NMI).

Returns
  None

Definition at line 475 of file watchdog.h.

__STATIC_INLINE void WatchdogIntUnregister | ( | void |  | ) |

Unregisters an interrupt handler for the watchdog timer interrupt.

This function does the actual unregistering of the interrupt handler. This function clears the handler to be called when a watchdog timer interrupt occurs. This function also masks off the interrupt in the interrupt controller so that the interrupt handler no longer is called.

Note
  This function registers the standard watchdog interrupt handler. To register the NMI watchdog handler, use IntRegister() to register the handler for the FAULT_NMI interrupt.

Returns
  None

See also
  IntRegister() for important information about registering interrupt handlers.

Definition at line 372 of file watchdog.h.

__STATIC_INLINE void WatchdogLock | ( | void |  | ) |

Enables the watchdog timer lock mechanism.

This function locks out write access to the watchdog timer configuration registers.

Returns
  None

Definition at line 199 of file watchdog.h.

__STATIC_INLINE bool WatchdogLockState | ( | void |  | ) |

Gets the state of the watchdog timer lock mechanism.

This function returns the lock state of the watchdog timer registers.

Returns
  Returns state of lock mechanism.
  - `true` : Watchdog timer registers are locked.
  - `false` : Registers are not locked.

Definition at line 239 of file watchdog.h.

__STATIC_INLINE uint32_t WatchdogReloadGet | ( | void |  | ) |

Gets the watchdog timer reload value.

This function gets the value that is loaded into the watchdog timer when the count reaches zero for the first time.

Returns
  None

See also
  WatchdogReloadSet()

Definition at line 289 of file watchdog.h.

__STATIC_INLINE void WatchdogReloadSet | ( | uint32_t | ui32LoadVal | ) |

Sets the watchdog timer reload value.

This function configures the value to load into the watchdog timer when the count reaches zero for the first time; if the watchdog timer is running when this function is called, then the value is immediately loaded into the watchdog timer counter. If the `ui32LoadVal` parameter is 0, then an interrupt is immediately generated.

Note
  This function has no effect if the watchdog timer has been locked.

Parameters

  ui32LoadVal | is the load value for the watchdog timer.

Returns
  None

See also
  WatchdogLock(), WatchdogUnlock(), WatchdogReloadGet()

Definition at line 268 of file watchdog.h.

__STATIC_INLINE void WatchdogResetDisable | ( | void |  | ) |

Disables the watchdog timer reset.

This function disables the capability of the watchdog timer to issue a reset to the processor after a second timeout condition.

Note
  This function has no effect if the watchdog timer has been locked.

Returns
  None

See also
  WatchdogLock(), WatchdogUnlock()

Definition at line 180 of file watchdog.h.

__STATIC_INLINE void WatchdogResetEnable | ( | void |  | ) |

Enables the watchdog timer reset.

This function enables the capability of the watchdog timer to issue a reset to the processor after a second timeout condition.

Note
  This function has no effect if the watchdog timer has been locked.

Returns
  None

See also
  WatchdogLock(), WatchdogUnlock()

Definition at line 157 of file watchdog.h.

__STATIC_INLINE bool WatchdogRunning | ( | void |  | ) |

Determines if the watchdog timer is enabled.

This function checks to see if the watchdog timer is enabled.

Returns
  Returns status of Watchdog Timer:
  - `true` : Watchdog timer is enabled.
  - `false` : Watchdog timer is disabled.

Definition at line 112 of file watchdog.h.

__STATIC_INLINE void WatchdogStallDisable | ( | void |  | ) |

Disables stalling of the watchdog timer during debug events.

This function disables the debug mode stall of the watchdog timer. By doing so, the watchdog timer continues to count regardless of the processor debug state.

Returns
  None

Definition at line 528 of file watchdog.h.

__STATIC_INLINE void WatchdogStallEnable | ( | void |  | ) |

Enables stalling of the watchdog timer during debug events.

This function allows the watchdog timer to stop counting when the processor is stopped by the debugger. By doing so, the watchdog is prevented from expiring and resetting the system (if reset is enabled). The watchdog instead expires after the appropriate number of processor cycles have been executed while debugging (or at the appropriate time after the processor has been restarted).

Returns
  None

Definition at line 508 of file watchdog.h.

__STATIC_INLINE void WatchdogUnlock | ( | void |  | ) |

Disables the watchdog timer lock mechanism.

This function enables write access to the watchdog timer configuration registers.

Returns
  None

Definition at line 219 of file watchdog.h.

__STATIC_INLINE uint32_t WatchdogValueGet | ( | void |  | ) |

Gets the current watchdog timer value.

This function reads the current value of the watchdog timer.

Returns
  Returns the current value of the watchdog timer.

Definition at line 307 of file watchdog.h.

## Macro Definition Documentation

#define WATCHDOG_INT_TIMEOUT 0x00000001

Definition at line 84 of file watchdog.h.

Referenced by WatchdogIntClear().

#define WATCHDOG_INT_TYPE_INT 0x00000000

Definition at line 91 of file watchdog.h.

Referenced by WatchdogIntTypeSet().

#define WATCHDOG_INT_TYPE_NMI 0x00000004

Definition at line 92 of file watchdog.h.

Referenced by WatchdogIntTypeSet().

#define WATCHDOG_LOCK_LOCKED 0x00000001

Definition at line 75 of file watchdog.h.

Referenced by WatchdogLock(), and WatchdogLockState().

#define WATCHDOG_LOCK_UNLOCK 0x1ACCE551

Definition at line 76 of file watchdog.h.

Referenced by WatchdogUnlock().

#define WATCHDOG_LOCK_UNLOCKED 0x00000000

Definition at line 74 of file watchdog.h.