Microchip® Advanced Software Framework

wdt_sam4l.c File Reference

Watchdog Timer (WDT) driver for SAM4L.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "wdt_sam4l.h"
#include "sysclk.h"
#define WDT_FIRST_KEY   0x55ul
 Watchdog control register first write keys. More...
 
#define WDT_SECOND_KEY   0xAAul
 Watchdog control register second write keys. More...
 
static void wdt_set_ctrl (uint32_t ctrl)
 Sets the WatchDog Timer Control register to the ctrl value thanks to the WatchDog Timer key. More...
 
void wdt_get_config_defaults (struct wdt_config *const cfg)
 Initializes a Watchdog Timer configuration structure to defaults. More...
 
bool wdt_init (struct wdt_dev_inst *const dev_inst, Wdt *const wdt, struct wdt_config *const cfg)
 Initialize the WDT module. More...
 
void wdt_enable (struct wdt_dev_inst *const dev_inst)
 Enable the WDT module. More...
 
void wdt_disable (struct wdt_dev_inst *const dev_inst)
 Disable the WDT module. More...
 
void wdt_clear (struct wdt_dev_inst *const dev_inst)
 Restart the watchdog timer. More...
 
bool wdt_reset_mcu (void)
 Reset MCU by generating a WDT reset as soon as possible. More...