SDK4.0 This document shows Ameba SDK 4.0 APIs

- Main Page
- Modules
- Data Structures
- Files

WDT
Ameba SDK » HAL

wdt functions More...

## Ameba Common
typedef void(* | wdt_irq_handler) (uint32_t id)
void | watchdog_init (uint32_t timeout_ms)
| Initializes the watch dog, include time setting, mode register. More...
void | watchdog_start (void)
| Start the watchdog counting. More...
void | watchdog_stop (void)
| Stop the watchdog counting. More...
void | watchdog_refresh (void)
| Refresh the watchdog counting to prevent WDT timeout. More...
void | watchdog_irq_init (wdt_irq_handler handler, uint32_t id)
| Switch the watchdog timer to interrupt mode and register a watchdog timer timeout interrupt handler. The interrupt handler will be called when the watch-dog timer is timeout. More...

## Detailed Description

wdt functions

## Function Documentation

void watchdog_init | ( | uint32_t | timeout_ms | ) |

Initializes the watch dog, include time setting, mode register.

Parameters

  timeout_ms | the watch-dog timer timeout value, in ms. default action of timeout is to reset the whole system.

Return values

  none |

void watchdog_irq_init | ( | wdt_irq_handler | handler,
|  | uint32_t | id
| ) |  |

Switch the watchdog timer to interrupt mode and register a watchdog timer timeout interrupt handler. The interrupt handler will be called when the watch-dog timer is timeout.

Parameters

  handler | the callback function for WDT timeout interrupt.
  id | the parameter for the callback function

Return values

  none |

void watchdog_refresh | ( | void |  | ) |

Refresh the watchdog counting to prevent WDT timeout.

Parameters

  None |

Return values

  none |

void watchdog_start | ( | void |  | ) |

Start the watchdog counting.

Parameters

  None |

Return values

  none |

void watchdog_stop | ( | void |  | ) |

Stop the watchdog counting.

Parameters

  None |

Return values

  none |