| M480 BSP V3.05.001 The Board Support Package for M480 Series

Macros | Functions
WWDT Exported Functions
Standard Driver » WWDT Driver

## Macros
#define | WWDT_CLEAR_RESET_FLAG()
| Clear WWDT Reset System Flag. More...
#define | WWDT_CLEAR_INT_FLAG()
| Clear WWDT Compared Match Interrupt Flag. More...
#define | WWDT_GET_RESET_FLAG()
| Get WWDT Reset System Flag. More...
#define | WWDT_GET_INT_FLAG()
| Get WWDT Compared Match Interrupt Flag. More...
#define | WWDT_GET_COUNTER()
| Get WWDT Counter. More...
#define | WWDT_RELOAD_COUNTER()
| Reload WWDT Counter. More...

## Functions
void | WWDT_Open (uint32_t u32PreScale, uint32_t u32CmpValue, uint32_t u32EnableInt)
| Open WWDT and start counting. More...

## Detailed Description

## Macro Definition Documentation

## ◆ WWDT_CLEAR_INT_FLAG

#define WWDT_CLEAR_INT_FLAG | ( |  | ) |

Clear WWDT Compared Match Interrupt Flag.

Parameters

  None |

Returns
  None

This macro is used to clear WWDT compared match interrupt flag.

Definition at line 83 of file wwdt.h.

## ◆ WWDT_CLEAR_RESET_FLAG

#define WWDT_CLEAR_RESET_FLAG | ( |  | ) |

Clear WWDT Reset System Flag.

Parameters

  None |

Returns
  None

This macro is used to clear WWDT time-out reset system flag.

Definition at line 71 of file wwdt.h.

## ◆ WWDT_GET_COUNTER

#define WWDT_GET_COUNTER | ( |  | ) |

Get WWDT Counter.

Parameters

  None |

Returns
  WWDT Counter Value

This macro reflects the current WWDT counter value.

Definition at line 121 of file wwdt.h.

## ◆ WWDT_GET_INT_FLAG

#define WWDT_GET_INT_FLAG | ( |  | ) |

Get WWDT Compared Match Interrupt Flag.

Parameters

  None |

Return values

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

This macro is used to indicate WWDT counter value matches CMPDAT value or not.

Definition at line 109 of file wwdt.h.

## ◆ WWDT_GET_RESET_FLAG

#define WWDT_GET_RESET_FLAG | ( |  | ) |

Get WWDT Reset System Flag.

Parameters

  None |

Return values

  0 | WWDT time-out reset system did not occur
  1 | WWDT time-out reset system occurred

This macro is used to indicate system has been reset by WWDT time-out reset or not.

Definition at line 96 of file wwdt.h.

## ◆ WWDT_RELOAD_COUNTER

#define WWDT_RELOAD_COUNTER | ( |  | ) |

Reload WWDT Counter.

Parameters

  None |

Returns
  None

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

Note
  User can only write WWDT_RLDCNT register to reload WWDT counter value when current WWDT counter value
  between 0 and CMPDAT value. If user writes WWDT_RLDCNT when current WWDT counter value is larger than CMPDAT,
  WWDT reset signal will generate immediately to reset system.

Definition at line 136 of file wwdt.h.

## Function Documentation

## ◆ WWDT_Open()

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

Open WWDT and start counting.

Parameters

  [in] | u32PreScale | Pre-scale setting of WWDT counter. 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 | Setting the window compared value. Valid values are between 0x0 to 0x3F.
  [in] | u32EnableInt | Enable WWDT time-out interrupt function. Valid values are TRUE and FALSE.

Returns
  None

This function makes WWDT module start counting with different counter period by pre-scale setting and compared window value.

Note
  This WWDT_CTL register can be write only one time after chip is powered on or reset.

Definition at line 52 of file wwdt.c.