Microchip® Advanced Software Framework

classb_wdt_test.h File Reference

Settings for the watchdog timer test.

Application note:
AVR1610: Guide to IEC60730 Class B compliance with XMEGA

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

#include <asf.h>
#include "classb_rtc_common.h"

Macros

#define NO_INIT   __attribute__ ((section (".noinit")))
 Macro for telling the compiler not to initialize a variable on restart. More...
 
Configuration settings
#define CLASSB_WDT_PER   WDT_PER_512CLK_gc
 Open period, during which WDT has to be reset. More...
 
#define CLASSB_WDT_WPER   WDT_WPER_1KCLK_gc
 Closed period, during which WDT cannot be reset. More...
 
Constants for internal use
Attention
These should not be modified by user!
#define CLASSB_WDT_PER_CYCLES   (8 * (1 << (CLASSB_WDT_PER >> 2)))
 WDT period in cycles. More...
 
#define CLASSB_WDT_MAX   (CLASSB_WDT_PER_CYCLES + (CLASSB_WDT_PER_CYCLES >> 1))
 Maximum number of WDT cycles to wait for a timeout. More...
 
#define CLASSB_WDT_MIN   (CLASSB_WDT_PER_CYCLES - (CLASSB_WDT_PER_CYCLES >> 1))
 Minimum number of WDT cycles to wait for a timeout. More...
 
#define CLASSB_WDT_RTC_PER   2
 RTC period in cycles. More...
 

Typedefs

typedef enum
classb_preinit_teststate 
classb_preinit_teststate_t
 Enum of valid test states for the WDT test. More...
 

Enumerations

enum  classb_preinit_teststate {
  FAULT_WDT,
  TEST_WDT_1,
  TEST_WDT_2,
  TEST_WDT_3,
  TEST_WDT_OK
}
 Enum of valid test states for the WDT test. More...
 

Functions

Class B Test
void classb_wdt_test (void)
 Perform self-diagnostic test of watchdog timer (WDT). More...