65 #ifdef DEV_ERROR_DETECT
114 #ifdef DEV_ERROR_DETECT
115 uint32_t prevClockHz, crtClockHz;
119 prevClockHz = WDOG_DRV_GetClockSourceFreq(
WDOG_HAL_GetConfig(g_wdogBase[instance]).clkSource);
120 crtClockHz = WDOG_DRV_GetClockSourceFreq(userConfigPtr->
clkSource);
122 DEV_ASSERT((prevClockHz != 0U) && (crtClockHz != 0U));
152 baseAddr = g_wdogBase[instance];
179 baseAddr = g_wdogBase[instance];
215 baseAddr = g_wdogBase[instance];
235 baseAddr = g_wdogBase[instance];
237 if (enable && (handler != NULL))
275 baseAddr = g_wdogBase[instance];
status_t WDOG_DRV_Init(uint32_t instance, const wdog_user_config_t *userConfigPtr)
Initializes the WDOG driver.
void WDOG_HAL_Config(WDOG_Type *base, const wdog_user_config_t *config)
Configures all WDOG registers.
wdog_user_config_t WDOG_HAL_GetConfig(const WDOG_Type *base)
Gets the current WDOG configuration.
void WDOG_DRV_GetConfig(uint32_t instance, wdog_user_config_t *config)
Gets the current configuration of the WDOG.
static void WDOG_HAL_Disable(WDOG_Type *base)
Disables the WDOG.
IRQn_Type
Defines the Interrupt Numbers definitions.
static bool WDOG_HAL_IsUnlocked(const WDOG_Type *base)
Checks if the WDOG is unlocked.
void INT_SYS_DisableIRQ(IRQn_Type irqNumber)
Disables an interrupt for a given IRQ number.
void INT_SYS_DisableIRQGlobal(void)
Disable system interrupt.
WDOG configuration structure Implements : wdog_user_config_t_Class.
status_t CLOCK_SYS_GetFreq(clock_names_t clockName, uint32_t *frequency)
Gets the clock frequency for a specific clock name.
wdog_clk_source_t clkSource
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
WDOG_Type *const g_wdogBase[]
Table of base addresses for WDOG instances.
wdog_clk_source_t
Clock sources for the WDOG. Implements : wdog_clk_source_t_Class.
status_t WDOG_DRV_SetInt(uint32_t instance, bool enable, void(*handler)(void))
Enables/Disables the WDOG timeout interrupt and sets a function to be called when a timeout interrupt...
void INT_SYS_EnableIRQGlobal(void)
Enables system interrupt.
void WDOG_DRV_Deinit(uint32_t instance)
De-initializes the WDOG driver.
#define WDOG_INSTANCE_COUNT
void INT_SYS_EnableIRQ(IRQn_Type irqNumber)
Enables an interrupt for a given IRQ number.
static void WDOG_HAL_SetInt(WDOG_Type *base, bool enable)
Enables/Disables WDOG interrupt.
static void WDOG_HAL_Trigger(WDOG_Type *base)
Refreshes the WDOG counter.
void WDOG_DRV_Trigger(uint32_t instance)
Refreshes the WDOG counter.
const IRQn_Type g_wdogIrqId[]
Table to save WDOG IRQ enum numbers defined in CMSIS header file.
void(* isr_t)(void)
Interrupt handler type.
static status_t WDOG_DRV_Config(uint32_t instance, wdog_user_config_t wdogUserConfig)
static bool WDOG_HAL_IsUpdateEnabled(const WDOG_Type *base)
Verifies if the WDOG updates are allowed.
void INT_SYS_InstallHandler(IRQn_Type irqNumber, const isr_t newHandler, isr_t *const oldHandler)
Installs an interrupt handler routine for a given IRQ number.