Infineon MOTIX™ MCU TLE987x Device Family SDK
Macros | Functions | Variables
wdt1.h File Reference

Go to the source code of this file.

Detailed Description

Window Watchdog 1 low level access library.

Version
V0.3.4
Date
02. Jan 2025

Include Graph

Include dependency graph for wdt1.h:

Include Graph

This graph shows which files directly or indirectly include this file:

Macros

#define One_us   ((uint32)SCU_FSYS / 1000000u)
 
#define SysTickRL   ((uint32)SCU_FSYS / (uint32)SysTickFreq)
 
#define SysTickFreq   1000u
 SysTick 1kHz. More...
 

Functions

void WDT1_Init (void)
 Performs the initial service of the WDT1 (closes the long open window) based on the Config Wizard for MOTIX MCU configuration. More...
 
void SysTick_Init (void)
 Initializes the SysTick timer to 1ms interval. More...
 
void WDT1_Stop (void)
 Stops the service of WDT1 by stopping the SysTick timer. More...
 
bool WDT1_Service (void)
 Services the WDT1 in the open window. More...
 
void WDT1_SOW_Service (uint32 NoOfSOW)
 Triggers a short-window (~30ms) of the WDT1. More...
 
void Delay_us (uint32 delay_time_us)
 Delays the regular program execution by a given number of Microseconds. More...
 
INLINE void WDT1_Window_Count (void)
 increments the WDT1 Window Counter More...
 
INLINE uint32 SysTick_Value_Get (void)
 returns the current SysTick timer count value More...
 
INLINE void SysTick_ReloadValue_Set (uint32 val)
 sets the SysTick Reload value More...
 
INLINE uint32 SysTick_ReloadValue_Get (void)
 returns the current SysTick reload value More...
 

Variables

uint32 WD_Counter
 

Macro Definition Documentation

◆ One_us

#define One_us   ((uint32)SCU_FSYS / 1000000u)

◆ SysTickFreq

#define SysTickFreq   1000u

SysTick 1kHz.

◆ SysTickRL

#define SysTickRL   ((uint32)SCU_FSYS / (uint32)SysTickFreq)

Function Documentation

◆ Delay_us()

void Delay_us ( uint32  delay_time_us)

Delays the regular program execution by a given number of Microseconds.

the function returns if the given time has elapsed

smaller Microsecond delay times are getting falsen by the execution time

of the function itself

Warning
Handle this function with care, as WDT1/WDT will not be serviced during the delay time.
The user has to take care of WDT1/WDT service by himself.
Parameters
delay_time_usDelay time in Microseconds

Example

This example sets a delay of 100 us.

void Example_Function(void)
{
Delay_us(100);
}
void Delay_us(uint32 delay_time_us)
Delays the regular program execution by a given number of Microseconds.

◆ SysTick_Init()

void SysTick_Init ( void  )

Initializes the SysTick timer to 1ms interval.

and enables the SysTick interrupt.

◆ SysTick_ReloadValue_Get()

INLINE uint32 SysTick_ReloadValue_Get ( void  )

returns the current SysTick reload value

Returns
current SysTick reload value

Example

This example reads the current SysTick reload value

void Example_Function(void)
{
uint32 val;
}
uint32_t uint32
32 bit unsigned value
Definition: types.h:139
INLINE uint32 SysTick_ReloadValue_Get(void)
returns the current SysTick reload value
Definition: wdt1.h:251

◆ SysTick_ReloadValue_Set()

INLINE void SysTick_ReloadValue_Set ( uint32  val)

sets the SysTick Reload value

Parameters
valreload value for SysTick timer

Example

This example sets the current SysTick reload to Max value.

void Example_Function(void)
{
}
INLINE void SysTick_ReloadValue_Set(uint32 val)
sets the SysTick Reload value
Definition: wdt1.h:270

◆ SysTick_Value_Get()

INLINE uint32 SysTick_Value_Get ( void  )

returns the current SysTick timer count value

Returns
current SysTick timer count value

Example

This example reads the current SysTick timer count value

void Example_Function(void)
{
uint32 val;
}
INLINE uint32 SysTick_Value_Get(void)
returns the current SysTick timer count value
Definition: wdt1.h:230

◆ WDT1_Init()

void WDT1_Init ( void  )

Performs the initial service of the WDT1 (closes the long open window) based on the Config Wizard for MOTIX MCU configuration.

Resets the WD_Counter to '0'.

◆ WDT1_Service()

bool WDT1_Service ( void  )

Services the WDT1 in the open window.

Return values
falseWDT1 not serviced (not in open window)
trueWDT1 serviced

Example

This example services the WDT1.

void Example_Function(void)
{
(void)WDT1_Service();
}
bool WDT1_Service(void)
Services the WDT1 in the open window.

◆ WDT1_SOW_Service()

void WDT1_SOW_Service ( uint32  NoOfSOW)

Triggers a short-window (~30ms) of the WDT1.

Parameters
NoOfSOWnumber of consecutive Short open windows allowed

Example

This example sets one successive Short Open Window to be allowed and triggers a SOW.

void Example_Function(void)
{
}
void WDT1_SOW_Service(uint32 NoOfSOW)
Triggers a short-window (~30ms) of the WDT1.

◆ WDT1_Stop()

void WDT1_Stop ( void  )

Stops the service of WDT1 by stopping the SysTick timer.

Warning
Handle this function with care, as a WDT1 itself will not be stopped,
just the service of it is stopped. This might lead to device resets.

Example

This example Stops the WDT1.

void Example_Function(void)
{
}
void WDT1_Stop(void)
Stops the service of WDT1 by stopping the SysTick timer.

◆ WDT1_Window_Count()

INLINE void WDT1_Window_Count ( void  )

increments the WDT1 Window Counter

Example

This example increments the WDT1 Window Counter.

void Example_Function(void)
{
}
INLINE void WDT1_Window_Count(void)
increments the WDT1 Window Counter
Definition: wdt1.h:208

Variable Documentation

◆ WD_Counter

uint32 WD_Counter
extern