| NANO100_BSP V3.05.000 The Board Support Package for Nano100BN Series

Macros | Functions
WDT Exported Functions
NANO100 Device Driver » WDT Driver » WDT Exported Constants
Collaboration diagram for WDT Exported Functions:

## Macros
#define | WDT_CLEAR_RESET_FLAG()
| This macro clear WDT time-out reset system flag. More...
#define | WDT_CLEAR_TIMEOUT_INT_FLAG()
| This macro clear WDT time-out interrupt flag. More...
#define | WDT_CLEAR_TIMEOUT_WAKEUP_FLAG()
| This macro clear WDT time-out wake-up system flag. More...
#define | WDT_GET_RESET_FLAG()
| This macro indicate WDT time-out to reset system or not. More...
#define | WDT_GET_TIMEOUT_INT_FLAG()
| This macro indicate WDT time-out interrupt occurred or not. More...
#define | WDT_GET_TIMEOUT_WAKEUP_FLAG()
| This macro indicate WDT time-out waked system up or not. More...
#define | WDT_RESET_COUNTER()
| This macro is used to reset 18-bit WDT counter. More...

## Functions
__STATIC_INLINE void | WDT_Close (void)
| This function stops WDT counting and disable WDT module. More...
__STATIC_INLINE void | WDT_EnableInt (void)
| This function enables the WDT time-out interrupt. More...
__STATIC_INLINE void | WDT_DisableInt (void)
| This function disables the WDT time-out interrupt. More...
void | WDT_Open (uint32_t u32TimeoutInterval, uint32_t u32ResetDelay, uint32_t u32EnableReset, uint32_t u32EnableWakeup)
| This function make WDT module start counting with different time-out interval. More...

## Detailed Description

## Macro Definition Documentation

## ◆ WDT_CLEAR_RESET_FLAG

#define WDT_CLEAR_RESET_FLAG | ( |  | ) |

This macro clear WDT time-out reset system flag.

Parameters

  None |

Returns
  None

Definition at line 59 of file wdt.h.

## ◆ WDT_CLEAR_TIMEOUT_INT_FLAG

#define WDT_CLEAR_TIMEOUT_INT_FLAG | ( |  | ) |

This macro clear WDT time-out interrupt flag.

Parameters

  None |

Returns
  None

Definition at line 67 of file wdt.h.

## ◆ WDT_CLEAR_TIMEOUT_WAKEUP_FLAG

#define WDT_CLEAR_TIMEOUT_WAKEUP_FLAG | ( |  | ) |

This macro clear WDT time-out wake-up system flag.

Parameters

  None |

Returns
  None

Definition at line 75 of file wdt.h.

## ◆ WDT_GET_RESET_FLAG

#define WDT_GET_RESET_FLAG | ( |  | ) |

This macro indicate WDT time-out to reset system or not.

Returns
  WDT reset system or not

Return values

  0 | WDT did not cause system reset
  1 | WDT caused system reset

Definition at line 84 of file wdt.h.

## ◆ WDT_GET_TIMEOUT_INT_FLAG

#define WDT_GET_TIMEOUT_INT_FLAG | ( |  | ) |

This macro indicate WDT time-out interrupt occurred or not.

Returns
  WDT time-out interrupt occurred or not

Return values

  0 | WDT time-out interrupt did not occur
  1 | WDT time-out interrupt occurred

Definition at line 93 of file wdt.h.

## ◆ WDT_GET_TIMEOUT_WAKEUP_FLAG

#define WDT_GET_TIMEOUT_WAKEUP_FLAG | ( |  | ) |

This macro indicate WDT time-out waked system up or not.

Returns
  WDT time-out waked system up or not

Return values

  0 | WDT did not wake up system
  1 | WDT waked up system

Definition at line 102 of file wdt.h.

## ◆ WDT_RESET_COUNTER

#define WDT_RESET_COUNTER | ( |  | ) |

This macro is used to reset 18-bit WDT counter.

If WDT is activated and enabled to reset system, software must reset WDT counter before WDT time-out plus reset delay reached. Or WDT generate a reset signal.

Definition at line 110 of file wdt.h.

## Function Documentation

## ◆ WDT_Close()

__STATIC_INLINE void WDT_Close | ( | void |  | ) |

This function stops WDT counting and disable WDT module.

Parameters

  None |

Returns
  None

Definition at line 117 of file wdt.h.

## ◆ WDT_DisableInt()

__STATIC_INLINE void WDT_DisableInt | ( | void |  | ) |

This function disables the WDT time-out interrupt.

Parameters

  None |

Returns
  None

Definition at line 139 of file wdt.h.

## ◆ WDT_EnableInt()

__STATIC_INLINE void WDT_EnableInt | ( | void |  | ) |

This function enables the WDT time-out interrupt.

Parameters

  None |

Returns
  None

Definition at line 128 of file wdt.h.

## ◆ WDT_Open()

void WDT_Open | ( | uint32_t | u32TimeoutInterval,
|  | uint32_t | u32ResetDelay,
|  | uint32_t | u32EnableReset,
|  | uint32_t | u32EnableWakeup
| ) |  |

This function make WDT module start counting with different time-out interval.

Parameters

  [in] | u32TimeoutInterval | Time-out interval period of WDT module. Valid values are: WDT_TIMEOUT_2POW4 WDT_TIMEOUT_2POW6 WDT_TIMEOUT_2POW8 WDT_TIMEOUT_2POW10 WDT_TIMEOUT_2POW12 WDT_TIMEOUT_2POW14 WDT_TIMEOUT_2POW16 WDT_TIMEOUT_2POW18
  [in] | u32ResetDelay | Reset delay period while WDT time-out happened. Valid values are: WDT_RESET_DELAY_3CLK WDT_RESET_DELAY_18CLK WDT_RESET_DELAY_130CLK WDT_RESET_DELAY_1026CLK
  [in] | u32EnableReset | Enable WDT reset system function. Valid values are TRUE and FALSE
  [in] | u32EnableWakeup | Enable WDT wake-up system function. Valid values are TRUE and FALSE

Returns
  None

Definition at line 47 of file wdt.c.