S32 SDK
wdog_hal.h File Reference
#include "device_registers.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  wdog_op_mode_t
 WDOG configuration structure Implements : wdog_op_mode_t_Class. More...
 
struct  wdog_user_config_t
 WDOG configuration structure Implements : wdog_user_config_t_Class. More...
 

Macros

#define WDOG_UNLOCK32(base)
 
#define WDOG_UNLOCK16(base)
 
#define WDOG_UNLOCK(base)
 

Enumerations

enum  wdog_clk_source_t { WDOG_BUS_CLOCK = 0x00U, WDOG_LPO_CLOCK = 0x01U, WDOG_SOSC_CLOCK = 0x02U, WDOG_SIRC_CLOCK = 0x03U }
 Clock sources for the WDOG. Implements : wdog_clk_source_t_Class. More...
 
enum  wdog_test_mode_t { WDOG_TST_DISABLED = 0x00U, WDOG_TST_USER = 0x01U, WDOG_TST_LOW = 0x02U, WDOG_TST_HIGH = 0x03U }
 Test modes for the WDOG. Implements : wdog_test_mode_t_Class. More...
 

Functions

WDOG Common Configurations
void WDOG_HAL_Init (WDOG_Type *base)
 Initializes the WDOG. More...
 
static bool WDOG_HAL_IsEnabled (const WDOG_Type *base)
 Verifies if the WDOG is enabled. More...
 
static void WDOG_HAL_Enable (WDOG_Type *base)
 Enables the WDOG. More...
 
static void WDOG_HAL_Disable (WDOG_Type *base)
 Disables the WDOG. More...
 
static void WDOG_HAL_Trigger (WDOG_Type *base)
 Refreshes the WDOG counter. More...
 
void WDOG_HAL_Config (WDOG_Type *base, const wdog_user_config_t *config)
 Configures all WDOG registers. More...
 
wdog_user_config_t WDOG_HAL_GetConfig (const WDOG_Type *base)
 Gets the current WDOG configuration. More...
 
static void WDOG_HAL_SetWindow (WDOG_Type *base, bool enable)
 Enables/Disables window mode. More...
 
static bool WDOG_HAL_GetInt (const WDOG_Type *base)
 Gets Interrupt Flag (FLG) status. More...
 
static void WDOG_HAL_ClearInt (WDOG_Type *base)
 Clears the Interrupt Flag. More...
 
static void WDOG_HAL_SetPrescaler (WDOG_Type *base, bool enable)
 Enables/Disables prescaler. More...
 
static void WDOG_HAL_SetClockSource (WDOG_Type *base, wdog_clk_source_t clkSource)
 Selects the clock source used by the WDOG. More...
 
static void WDOG_HAL_SetInt (WDOG_Type *base, bool enable)
 Enables/Disables WDOG interrupt. More...
 
static bool WDOG_HAL_IsUpdateEnabled (const WDOG_Type *base)
 Verifies if the WDOG updates are allowed. More...
 
static void WDOG_HAL_SetUpdate (WDOG_Type *base, bool enable)
 Enables/Disables WDOG updates. More...
 
static wdog_test_mode_t WDOG_HAL_GetTestMode (const WDOG_Type *base)
 Gets the WDOG test mode. More...
 
static void WDOG_HAL_SetTestMode (WDOG_Type *base, wdog_test_mode_t testMode)
 Changes the WDOG test mode. More...
 
static void WDOG_HAL_SetDebug (WDOG_Type *base, bool enable)
 Enables/Disables WDOG in debug mode. More...
 
static void WDOG_HAL_SetWait (WDOG_Type *base, bool enable)
 Enables/Disables WDOG in wait mode. More...
 
static void WDOG_HAL_SetStop (WDOG_Type *base, bool enable)
 Enables/Disables WDOG in stop mode. More...
 
static uint16_t WDOG_HAL_GetCounter (const WDOG_Type *base)
 Gets the value of the WDOG counter. More...
 
static void WDOG_HAL_SetCounter (WDOG_Type *base, uint32_t counter)
 Sets the value of the WDOG counter. More...
 
static uint16_t WDOG_HAL_GetTimeout (const WDOG_Type *base)
 Gets the value of the WDOG timeout. More...
 
static void WDOG_HAL_SetTimeout (WDOG_Type *base, uint16_t timeout)
 Sets the value of the WDOG timeout. More...
 
static void WDOG_HAL_SetWindowValue (WDOG_Type *base, uint16_t window)
 Sets the value of the WDOG window. More...
 
static bool WDOG_HAL_IsUnlocked (const WDOG_Type *base)
 Checks if the WDOG is unlocked. More...
 
static bool WDOG_HAL_IsReconfigurationComplete (const WDOG_Type *base)
 Checks if the last configuration of the WDOG was successful. More...
 
static void WDOG_HAL_SetCmd32 (WDOG_Type *base, bool enable)
 Enables/Disables support for 32-bit refresh/unlock command write words. More...