| NUC472_NUC442_BSP V3.04.000 The Board Support Package for NUC472/NUC442

Macros | Functions
WWDT Exported Functions
NUC472/NUC442 Device Driver » WWDT Driver » WWDT Exported Constants
Collaboration diagram for WWDT Exported Functions:

## Macros
#define | WWDT_CLEAR_RESET_FLAG()
| This macro clear WWDT time-out reset system flag. More...
#define | WWDT_CLEAR_INT_FLAG()
| This macro clear WWDT compare match interrupt flag. More...
#define | WWDT_GET_RESET_FLAG()
| This macro is use to get WWDT time-out reset system flag. More...
#define | WWDT_GET_INT_FLAG()
| This macro is used to indicate WWDT compare match interrupt flag. More...
#define | WWDT_GET_COUNTER()
| This macro to reflects current WWDT counter value. More...
#define | WWDT_RELOAD_COUNTER()
| This macro is used to reload the WWDT counter value to 0x3F. More...

## Functions
void | WWDT_Open (uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt)
| This function make WWDT module start counting with different counter period and compared window value. More...

## Detailed Description

## Macro Definition Documentation

## ◆ WWDT_CLEAR_INT_FLAG

#define WWDT_CLEAR_INT_FLAG | ( |  | ) |

This macro clear WWDT compare match interrupt flag.

Parameters

  None |

Returns
  None

Definition at line 71 of file wwdt.h.

## ◆ WWDT_CLEAR_RESET_FLAG

#define WWDT_CLEAR_RESET_FLAG | ( |  | ) |

This macro clear WWDT time-out reset system flag.

Parameters

  None |

Returns
  None

Definition at line 63 of file wwdt.h.

## ◆ WWDT_GET_COUNTER

#define WWDT_GET_COUNTER | ( |  | ) |

This macro to reflects current WWDT counter value.

Parameters

  None |

Returns
  Return current WWDT counter value

Definition at line 97 of file wwdt.h.

## ◆ WWDT_GET_INT_FLAG

#define WWDT_GET_INT_FLAG | ( |  | ) |

This macro is used to indicate WWDT compare match interrupt flag.

Returns
  WWDT compare match interrupt occurred or not

Return values

  0 | WWDT compare match interrupt did not occur
  1 | WWDT compare match interrupt occurred

Definition at line 89 of file wwdt.h.

## ◆ WWDT_GET_RESET_FLAG

#define WWDT_GET_RESET_FLAG | ( |  | ) |

This macro is use to get WWDT time-out reset system flag.

Returns
  WWDT reset system or not

Return values

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

Definition at line 80 of file wwdt.h.

## ◆ WWDT_RELOAD_COUNTER

#define WWDT_RELOAD_COUNTER | ( |  | ) |

This macro is used to reload the WWDT counter value to 0x3F.

Parameters

  None |

Returns
  None

After WWDT enabled, application must reload WWDT counter while current counter is less than compare value and larger than 0, otherwise WWDT will cause system reset.

Definition at line 108 of file wwdt.h.

## Function Documentation

## ◆ WWDT_Open()

void WWDT_Open | ( | uint32_t | u32PreScale,
|  | uint32_t | u32CmpValue,
|  | uint32_t | u32EnableInt
| ) |  |

This function make WWDT module start counting with different counter period and compared window value.

Parameters

  [in] | u32PreScale | Prescale period for the WWDT counter period. Valid values are: WWDT_PRESCALER_1 WWDT_PRESCALER_2 WWDT_PRESCALER_4 WWDT_PRESCALER_8 WWDT_PRESCALER_16 WWDT_PRESCALER_32 WWDT_PRESCALER_64 WWDT_PRESCALER_128 WWDT_PRESCALER_192 WWDT_PRESCALER_256 WWDT_PRESCALER_384 WWDT_PRESCALER_512 WWDT_PRESCALER_768 WWDT_PRESCALER_1024 WWDT_PRESCALER_1536 WWDT_PRESCALER_2048
  [in] | u32CmpValue | Window compared value. Valid values are between 0x0 to 0x3F
  [in] | u32EnableInt | Enable WWDT interrupt or not. Valid values are TRUE and FALSE

Returns
  None

Note
  Application can call this function can only once after boot up

Definition at line 51 of file wwdt.c.