AVR MEGARF WDT driver example.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Enumerations | |
enum | wdt_example_state { START_OF_PROG = (0x01), WDT_MCU_RESET = (0x02), REFRESH_WDT = (0x03), WDT_RST = (0x04), WDT_INTERRUPT = (0x05), WDT_RST_INTERRUPT = (0x06), END_OF_PROG = (0x07), ERROR_STATE = (0x0F) } |
Functions | |
int | main (void) |
Main function. More... | |
static void | wdt_timer_callback (void) |
Interrupt callback for wdt timer overflow interrupt Change the state when the interrupt is triggered. More... | |
Variables | |
enum wdt_example_state | state_flag |
Global variables not initialized. More... | |
enum wdt_example_state |
int main | ( | void | ) |
Main function.
References board_init(), CHIP_RESET_CAUSE_BOD_CPU, CHIP_RESET_CAUSE_EXTRST, CHIP_RESET_CAUSE_POR, CHIP_RESET_CAUSE_WDT, cpu_irq_enable, delay_ms, END_OF_PROG, ERROR_STATE, INTERRUPT_MODE, INTERRUPT_SYSTEM_RESET_MODE, LED_Off, LED_On, LED_PIN, REFRESH_WDT, reset_cause_clear_causes(), reset_cause_get_causes(), START_OF_PROG, sysclk_init(), SYSTEM_RESET_MODE, wdt_disable(), wdt_enable(), wdt_get_timeout_period(), WDT_INTERRUPT, WDT_MCU_RESET, wdt_reset, wdt_reset_mcu(), WDT_RST, WDT_RST_INTERRUPT, wdt_set_interrupt_callback(), wdt_set_timeout_period(), WDT_TIMEOUT_PERIOD_1024KCLK, WDT_TIMEOUT_PERIOD_16KCLK, WDT_TIMEOUT_PERIOD_256KCLK, WDT_TIMEOUT_PERIOD_2KCLK, WDT_TIMEOUT_PERIOD_32KCLK, WDT_TIMEOUT_PERIOD_64KCLK, and wdt_timer_callback().
|
static |
Interrupt callback for wdt timer overflow interrupt Change the state when the interrupt is triggered.
none |
References END_OF_PROG, and WDT_RST_INTERRUPT.
Referenced by main().
enum wdt_example_state state_flag |
Global variables not initialized.