46 #include "sw/modules/types/src/types.h"
69 #define WDOG_BASE_ADDR (0x00007022)
74 #define WDOG_SCSR_WDOVERRIDE_BITS (1 << 0)
78 #define WDOG_SCSR_WDENINT_BITS (1 << 1)
82 #define WDOG_SCSR_WDINTS_BITS (1 << 2)
87 #define WDOG_WDCNTR_BITS (255 << 0)
92 #define WDOG_WDKEY_BITS (255 << 0)
97 #define WDOG_WDCR_WDPS_BITS (7 << 0)
101 #define WDOG_WDCR_WDCHK_BITS (7 << 3)
105 #define WDOG_WDCR_WDDIS_BITS (1 << 6)
109 #define WDOG_WDCR_WDFLAG_BITS (1 << 7)
114 #define WDOG_WDCR_WRITE_ENABLE (5 << 3)
214 extern WDOG_Handle
WDOG_init(
void *pMemory,
const size_t numBytes);
220 extern void WDOG_setCount(WDOG_Handle wdogHandle,
const uint_least8_t count);
234 #endif // end of _WDOG_H_ definition
WDOG_Handle WDOG_init(void *pMemory, const size_t numBytes)
Initializes the watchdog (WDOG) object handle.
Denotes WDCLK = OSCCLK/512/16.
Defines the watchdog (WDOG) object.
void WDOG_enable(WDOG_Handle wdogHandle)
Enables the watchdog (WDOG) timer.
Denotes WDCLK = OSCCLK/512/64.
struct _WDOG_Obj_ * WDOG_Handle
Defines the watchdog (WDOG) handle.
void WDOG_setCount(WDOG_Handle wdogHandle, const uint_least8_t count)
Sets the watchdog (WDOG) counter.
volatile uint16_t rsvd_2[3]
Reserved.
Denotes WDCLK = OSCCLK/512/32.
void WDOG_disableInt(WDOG_Handle wdogHandle)
Disables the watchdog (WDOG) timer interrupt.
volatile uint16_t rsvd_1
Reserved.
volatile uint16_t WDCR
Watchdog Control Register.
Denotes WDCLK = OSCCLK/512/4.
void WDOG_setPreScaler(WDOG_Handle wdogHandle, const WDOG_PreScaler_e preScaler)
Sets the watchdog (WDOG) timer clock prescaler.
void WDOG_enableInt(WDOG_Handle wdogHandle)
Enables the watchdog (WDOG) timer interrupt.
volatile uint16_t WDCNTR
Watchdog Counter Register.
struct _WDOG_Obj_ WDOG_Obj
Defines the watchdog (WDOG) object.
volatile uint16_t SCSR
System Control & Status Register.
Contains public interface to various functions related to the central processing unit (CPU) object...
void WDOG_clearCounter(WDOG_Handle wdogHandle)
Clears the watchdog (WDOG) counter.
WDOG_IntStatus_e WDOG_getIntStatus(WDOG_Handle wdogHandle)
Gets the watchdog (WDOG) interrupt status.
void WDOG_enableOverRide(WDOG_Handle wdogHandle)
Enables the watchdog (WDOG) timer override.
void WDOG_disable(WDOG_Handle wdogHandle)
Disables the watchdog (WDOG) timer.
volatile uint16_t WDKEY
Watchdog Reset Key Register.
WDOG_PreScaler_e
Enumeration to define the watchdog (WDOG) timer clock prescaler, which sets the clock frequency...
void WDOG_disableOverRide(WDOG_Handle wdogHandle)
Disables the timer override.
Denotes WDCLK = OSCCLK/512/1.
WDOG_IntStatus_e
Enumeration to define the watchdog (WDOG) interrupt status.
Denotes WDCLK = OSCCLK/512/8.
Denotes WDCLK = OSCCLK/512/2.