Infineon MOTIX™ MCU TLE987x Device Family SDK
Macros | Typedefs | Enumerations | Functions
timer2x.h File Reference

Go to the source code of this file.

Detailed Description

Timer2/Timer21 low level access library.

Version
V0.2.4
Date
02. Jan 2025

Include Graph

Include dependency graph for timer2x.h:

Macros

#define MIN_TIMER_INTERVAL_US   1u
 
#define T2_REG_MAX_UPCOUNT_TICKS   0u
 
#define T2_REG_MIN_UPCOUNT_TICKS   0xFFFFu
 

Typedefs

typedef enum TIMER2_T2IN_Pxx TTIMER2_T2IN_Pxx
 
typedef enum TIMER2_T2EX_Pxx TTIMER2_T2EX_Pxx
 
typedef enum TIMER21_T2IN_Pxx TTIMER21_T2IN_Pxx
 
typedef enum TIMER21_T2EX_Pxx TTIMER21_T2EX_Pxx
 
typedef enum IMER2x_Clock_Prescaler TIMER2x_Clock_Prescaler
 

Enumerations

enum  TIMER2_T2IN_Pxx { TIMER2_T2IN_P00 = 0u , TIMER2_T2IN_P25 = 1u }
 
enum  TIMER2_T2EX_Pxx { TIMER2_T2EX_LIN = 0u , TIMER2_T2EX_P12 = 1u , TIMER2_T2EX_CCU6_CC60 = 2u }
 
enum  TIMER21_T2IN_Pxx { TIMER21_T2IN_P01 = 0u , TIMER21_T2IN_P11 = 1u , TIMER21_T2IN_P04 = 2u }
 
enum  TIMER21_T2EX_Pxx {
  TIMER21_T2EX_P02 = 0u , TIMER21_T2EX_P14 = 1u , TIMER21_T2EX_P23 = 2u , TIMER21_T2EX_P12 = 3u ,
  TIMER21_T2EX_CCU6_COUT60 = 4u
}
 
enum  IMER2x_Clock_Prescaler {
  TIMER2x_Clk_Div_1 = 0u , TIMER2x_Clk_Div_2 = 1u , TIMER2x_Clk_Div_4 = 2u , TIMER2x_Clk_Div_8 = 3u ,
  TIMER2x_Clk_Div_16 = 4u , TIMER2x_Clk_Div_32 = 5u , TIMER2x_Clk_Div_64 = 6u , TIMER2x_Clk_Div_128 = 7u
}
 

Functions

INLINE void TIMER2_Clk_Prescaler_En (void)
 enables TIMER2 clock prescaler. More...
 
INLINE void TIMER2_Clk_Prescaler_Dis (void)
 disables TIMER2 clock prescaler. More...
 
INLINE void TIMER2_Clk_Prescaler_Sel (uint8 t2pre)
 sets TIMER2 clock prescaler. More...
 
INLINE uint8 TIMER2_Clk_Prescaler_Get (void)
 reads TIMER2 clock prescaler. More...
 
INLINE uint8 TIMER2_Overflow_Sts (void)
 reads TIMER2 Overflow Status. More...
 
INLINE uint8 TIMER2_External_Sts (void)
 reads TIMER2 External Status. More...
 
INLINE void TIMER2_ExternalCtrl_En (void)
 enables TIMER2 External Control. More...
 
INLINE void TIMER2_ExternalCtrl_Dis (void)
 disables TIMER2 External Control. More...
 
INLINE void TIMER2_Reload_Capture_RisingEdge_Set (void)
 sets Rising Edge to Capture/Reload Mode for TIMER2. More...
 
INLINE void TIMER2_Reload_Capture_FallingEdge_Set (void)
 sets Falling Edge to Capture/Reload Mode for TIMER2. More...
 
INLINE void TIMER2_ExtStart_RisingEdge_Set (void)
 sets Rising Edge to External Start for TIMER2. More...
 
INLINE void TIMER2_ExtStart_FallingEdge_Set (void)
 sets Falling Edge to External Start for TIMER2. More...
 
INLINE void TIMER2_UpDownCount_En (void)
 enables Up/Down Counter for TIMER2. More...
 
INLINE void TIMER2_UpDownCount_Dis (void)
 Disables Up/Down Counter for TIMER2. More...
 
INLINE void TIMER2_Mode_Capture_Set (void)
 Selects Capture Mode for TIMER2. More...
 
INLINE void TIMER2_Mode_Reload_Set (void)
 Selects Reload Mode for TIMER2. More...
 
INLINE void TIMER2_Mode_Counter_Set (void)
 Selects Mode Counter for TIMER2. More...
 
INLINE void TIMER2_Mode_Timer_Set (void)
 Selects Mode Timer for TIMER2. More...
 
INLINE void TIMER2_Overflow_Int_Clr (void)
 Clears TIMER2 Overflow Interrupt flag. More...
 
INLINE void TIMER2_External_Int_Clr (void)
 Clears TIMER2 External Interrupt flag. More...
 
INLINE void TIMER2_Overflow_Int_En (void)
 Enables TIMER2 Overflow Interrupt. More...
 
INLINE void TIMER2_Overflow_Int_Dis (void)
 Disables TIMER2 Overflow Interrupt. More...
 
INLINE void TIMER2_External_Int_En (void)
 Enables TIMER2 External Interrupt. More...
 
INLINE void TIMER2_External_Int_Dis (void)
 Disables TIMER2 External Interrupt. More...
 
INLINE void TIMER21_Clk_Prescaler_En (void)
 enables TIMER21 clock prescaler. More...
 
INLINE void TIMER21_Clk_Prescaler_Dis (void)
 disables TIMER21 clock prescaler. More...
 
INLINE void TIMER21_Clk_Prescaler_Sel (uint8 t2pre)
 sets TIMER21 clock prescaler. More...
 
INLINE uint8 TIMER21_Clk_Prescaler_Get (void)
 reads TIMER21 clock prescaler. More...
 
INLINE uint8 TIMER21_Overflow_Sts (void)
 reads TIMER21 Overflow Status. More...
 
INLINE uint8 TIMER21_External_Sts (void)
 reads TIMER21 External Status. More...
 
INLINE void TIMER21_ExternalCtrl_En (void)
 enables TIMER21 External Control. More...
 
INLINE void TIMER21_ExternalCtrl_Dis (void)
 disables TIMER21 External Control. More...
 
INLINE void TIMER21_Reload_Capture_RisingEdge_Set (void)
 sets Rising Edge to Capture/Reload Mode for TIMER21. More...
 
INLINE void TIMER21_Reload_Capture_FallingEdge_Set (void)
 sets Falling Edge to Capture/Reload Mode for TIMER21. More...
 
INLINE void TIMER21_ExtStart_RisingEdge_Set (void)
 sets Rising Edge to External Start for TIMER21. More...
 
INLINE void TIMER21_ExtStart_FallingEdge_Set (void)
 sets Falling Edge to External Start for TIMER21. More...
 
INLINE void TIMER21_UpDownCount_En (void)
 enables Up/Down Counter for TIMER21. More...
 
INLINE void TIMER21_UpDownCount_Dis (void)
 Disables Up/Down Counter for TIMER21. More...
 
INLINE void TIMER21_Mode_Capture_Set (void)
 Selects Capture Mode for TIMER21. More...
 
INLINE void TIMER21_Mode_Reload_Set (void)
 Selects Reload Mode for TIMER21. More...
 
INLINE void TIMER21_Mode_Counter_Set (void)
 Selects Mode Counter for TIMER21. More...
 
INLINE void TIMER21_Mode_Timer_Set (void)
 Selects Mode Timer for TIMER21. More...
 
INLINE void TIMER21_Overflow_Int_Clr (void)
 Clears TIMER21 Overflow Interrupt status. More...
 
INLINE void TIMER21_External_Int_Clr (void)
 Clears TIMER21 External Interrupt status. More...
 
INLINE void TIMER21_Overflow_Int_En (void)
 Enables TIMER21 Overflow Interrupt. More...
 
INLINE void TIMER21_Overflow_Int_Dis (void)
 Disables TIMER21 Overflow Interrupt. More...
 
INLINE void TIMER21_External_Int_En (void)
 Enables TIMER21 External Interrupt. More...
 
INLINE void TIMER21_External_Int_Dis (void)
 Disables TIMER21 External Interrupt. More...
 
void TIMER2_Init (void)
 Initializes the Timer2 module based on the Config Wizard for MOTIX MCU configuration. More...
 
void TIMER21_Init (void)
 Initializes the Timer21 module based on the Config Wizard for MOTIX MCU configuration. More...
 
bool TIMER2_Interval_Timer_Setup (uint32 timer_interval_us)
 Initializes the TIMER2 in Reload Mode. More...
 
bool TIMER21_Interval_Timer_Setup (uint32 timer_interval_us)
 Initializes the TIMER21 in Reload Mode. More...
 
INLINE void TIMER2_Start (void)
 starts the TIMER2 by software More...
 
INLINE void TIMER2_Stop (void)
 stops the TIMER2 by software More...
 
INLINE void TIMER2_ExtStart (void)
 prepares TIMER2 to be started externally More...
 
INLINE void TIMER2_ExtStop (void)
 disable TIMER2 to be started externally More...
 
INLINE uint16 TIMER2_Value_Get (void)
 reads the TIMER2 count value More...
 
INLINE uint16 TIMER2_Get_Count (void)
 reads the TIMER2 count value More...
 
INLINE uint16 TIMER2_Capture_Value_Get (void)
 reads the TIMER2 capture value More...
 
INLINE uint16 TIMER2_Get_Capture (void)
 reads the TIMER2 capture value More...
 
INLINE void TIMER2_Clear_Count (void)
 clears the TIMER2 count value More...
 
INLINE void TIMER2_Set_Reload (uint16 value)
 sets TIMER2 reload value More...
 
INLINE void TIMER2_Select_T2IN (TTIMER2_T2IN_Pxx pinsel)
 sets TIMER2 T2IN Pin More...
 
INLINE void TIMER2_Select_T2EX (TTIMER2_T2EX_Pxx pinsel)
 sets TIMER2 T2EX Pin More...
 
INLINE void TIMER21_Start (void)
 starts the TIMER21 by software More...
 
INLINE void TIMER21_Stop (void)
 stops the TIMER21 by software More...
 
INLINE void TIMER21_ExtStart (void)
 prepares TIMER21 to be started externally More...
 
INLINE void TIMER21_ExtStop (void)
 disable TIMER21 to be started externally More...
 
INLINE uint16 TIMER21_Value_Get (void)
 reads the TIMER21 count value More...
 
INLINE uint16 TIMER21_Get_Count (void)
 reads the TIMER21 count value More...
 
INLINE uint16 TIMER21_Capture_Value_Get (void)
 reads the TIMER21 capture value More...
 
INLINE uint16 TIMER21_Get_Capture (void)
 reads the TIMER21 capture value More...
 
INLINE void TIMER21_Clear_Count (void)
 clears the TIMER21 count value More...
 
INLINE void TIMER21_Set_Reload (uint16 value)
 sets TIMER21 reload value More...
 
INLINE void TIMER21_Select_T2IN (TTIMER21_T2IN_Pxx pinsel)
 sets TIMER21 T2IN Pin More...
 
INLINE void TIMER21_Select_T2EX (TTIMER21_T2EX_Pxx pinsel)
 sets TIMER21 T2EX Pin More...
 
INLINE void TIMER2_Value_Set (uint16 t2)
 Sets TIMER2 Value. More...
 
INLINE void TIMER2_Reload_Value_Set (uint16 t2)
 Sets TIMER2 Reload Value. More...
 
INLINE void TIMER21_Value_Set (uint16 t21)
 Sets TIMER21 Value. More...
 
INLINE void TIMER21_Reload_Value_Set (uint16 t21)
 Sets TIMER21 Reload Value. More...
 

Macro Definition Documentation

◆ MIN_TIMER_INTERVAL_US

#define MIN_TIMER_INTERVAL_US   1u

◆ T2_REG_MAX_UPCOUNT_TICKS

#define T2_REG_MAX_UPCOUNT_TICKS   0u

◆ T2_REG_MIN_UPCOUNT_TICKS

#define T2_REG_MIN_UPCOUNT_TICKS   0xFFFFu

Typedef Documentation

◆ TIMER2x_Clock_Prescaler

◆ TTIMER21_T2EX_Pxx

◆ TTIMER21_T2IN_Pxx

◆ TTIMER2_T2EX_Pxx

◆ TTIMER2_T2IN_Pxx

Enumeration Type Documentation

◆ IMER2x_Clock_Prescaler

Enumerator
TIMER2x_Clk_Div_1 

Timer2x Input Clock Select: fsys

TIMER2x_Clk_Div_2 

Timer2x Input Clock Select: fsys/2

TIMER2x_Clk_Div_4 

Timer2x Input Clock Select: fsys/4

TIMER2x_Clk_Div_8 

Timer2x Input Clock Select: fsys/8

TIMER2x_Clk_Div_16 

Timer2x Input Clock Select: fsys/16

TIMER2x_Clk_Div_32 

Timer2x Input Clock Select: fsys/32

TIMER2x_Clk_Div_64 

Timer2x Input Clock Select: fsys/64

TIMER2x_Clk_Div_128 

Timer2x Input Clock Select: fsys/128

◆ TIMER21_T2EX_Pxx

Enumerator
TIMER21_T2EX_P02 

The input pin for T21EX_0

TIMER21_T2EX_P14 

The input pin for T21EX_1

TIMER21_T2EX_P23 

The input pin for T21EX_2

TIMER21_T2EX_P12 

The input pin for T21EX_3

TIMER21_T2EX_CCU6_COUT60 

The input pin for t21_ext_trigger

◆ TIMER21_T2IN_Pxx

Enumerator
TIMER21_T2IN_P01 

The input pin for T21_0

TIMER21_T2IN_P11 

The input pin for T21_1

TIMER21_T2IN_P04 

The input pin for T21_2

◆ TIMER2_T2EX_Pxx

Enumerator
TIMER2_T2EX_LIN 

The input pin for T2EX_0

TIMER2_T2EX_P12 

The input pin for T2EX_1

TIMER2_T2EX_CCU6_CC60 

The input pin for t2_ext_trigger

◆ TIMER2_T2IN_Pxx

Enumerator
TIMER2_T2IN_P00 

The input pin for T2_0

TIMER2_T2IN_P25 

The input pin for T2_1

Function Documentation

◆ TIMER21_Capture_Value_Get()

INLINE uint16 TIMER21_Capture_Value_Get ( void  )

reads the TIMER21 capture value

Returns
TIMER21 capture value

Example

This example reads the TIMER21 capture value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER21_Capture_Value_Get();
}
INLINE uint16 TIMER21_Capture_Value_Get(void)
reads the TIMER21 capture value
Definition: timer2x.h:1616
uint16_t uint16
16 bit unsigned value
Definition: types.h:138

◆ TIMER21_Clear_Count()

INLINE void TIMER21_Clear_Count ( void  )

clears the TIMER21 count value

Example

This example stops and reset TIMER21 by software.

void Example_Function(void)
{
}
INLINE void TIMER21_Clear_Count(void)
clears the TIMER21 count value
Definition: timer2x.h:1637
INLINE void TIMER21_Stop(void)
stops the TIMER21 by software
Definition: timer2x.h:1485

◆ TIMER21_Clk_Prescaler_Dis()

INLINE void TIMER21_Clk_Prescaler_Dis ( void  )

disables TIMER21 clock prescaler.

Example

This example disables TIMER21 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER21_Clk_Prescaler_Dis(void)
disables TIMER21 clock prescaler.
Definition: timer2x.h:665

◆ TIMER21_Clk_Prescaler_En()

INLINE void TIMER21_Clk_Prescaler_En ( void  )

enables TIMER21 clock prescaler.

Example

This example enables TIMER21 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER21_Clk_Prescaler_En(void)
enables TIMER21 clock prescaler.
Definition: timer2x.h:648

◆ TIMER21_Clk_Prescaler_Get()

INLINE uint8 TIMER21_Clk_Prescaler_Get ( void  )

reads TIMER21 clock prescaler.

Returns
TIMER21 clock prescaler

Example

This example reads TIMER21 clock prescaler.

void Example_Function(void)
{
uint8 pre;
}
INLINE uint8 TIMER21_Clk_Prescaler_Get(void)
reads TIMER21 clock prescaler.
Definition: timer2x.h:707
uint8_t uint8
8 bit unsigned value
Definition: types.h:137

◆ TIMER21_Clk_Prescaler_Sel()

INLINE void TIMER21_Clk_Prescaler_Sel ( uint8  t2pre)

sets TIMER21 clock prescaler.

Parameters
t2preTIMER21 clock prescaler

Example

This example sets TIMER21 clock prescaler to DIV2.

void Example_Function(void)
{
}
INLINE void TIMER21_Clk_Prescaler_Sel(uint8 t2pre)
sets TIMER21 clock prescaler.
Definition: timer2x.h:685

◆ TIMER21_External_Int_Clr()

INLINE void TIMER21_External_Int_Clr ( void  )

Clears TIMER21 External Interrupt status.

Example

This example treats the TIMER21 External Interrupt.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}
INLINE void TIMER21_External_Int_Dis(void)
Disables TIMER21 External Interrupt.
Definition: timer2x.h:1114
INLINE void TIMER21_External_Int_Clr(void)
Clears TIMER21 External Interrupt status.
Definition: timer2x.h:1021
INLINE void TIMER21_External_Int_En(void)
Enables TIMER21 External Interrupt.
Definition: timer2x.h:1090
INLINE uint8 TIMER21_External_Sts(void)
reads TIMER21 External Status.
Definition: timer2x.h:756

◆ TIMER21_External_Int_Dis()

INLINE void TIMER21_External_Int_Dis ( void  )

Disables TIMER21 External Interrupt.

Example

This example treats the TIMER21 External Interrupt.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}

◆ TIMER21_External_Int_En()

INLINE void TIMER21_External_Int_En ( void  )

Enables TIMER21 External Interrupt.

Example

This example treats the TIMER21 External Interrupt.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}

◆ TIMER21_External_Sts()

INLINE uint8 TIMER21_External_Sts ( void  )

reads TIMER21 External Status.

Returns
TIMER21 External Status

Example

This example checks the TIMER21 External Status.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}
INLINE void TIMER21_ExternalCtrl_En(void)
enables TIMER21 External Control.
Definition: timer2x.h:781
INLINE void TIMER21_ExternalCtrl_Dis(void)
disables TIMER21 External Control.
Definition: timer2x.h:802

◆ TIMER21_ExternalCtrl_Dis()

INLINE void TIMER21_ExternalCtrl_Dis ( void  )

disables TIMER21 External Control.

Example

This example reads TIMER21 External Status while External control is disabled.

void Example_Function(void)
{
uint8 sts;
}

◆ TIMER21_ExternalCtrl_En()

INLINE void TIMER21_ExternalCtrl_En ( void  )

enables TIMER21 External Control.

Example

This example checks the TIMER21 External Status.

void Example_Function(void)
{
{
TIMER21_EXF2_CALLBACK();
}
}

◆ TIMER21_ExtStart()

INLINE void TIMER21_ExtStart ( void  )

prepares TIMER21 to be started externally

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER21_ExtStop(void)
disable TIMER21 to be started externally
Definition: timer2x.h:1523
INLINE void TIMER21_ExtStart_RisingEdge_Set(void)
sets Rising Edge to External Start for TIMER21.
Definition: timer2x.h:853
INLINE void TIMER21_ExtStart(void)
prepares TIMER21 to be started externally
Definition: timer2x.h:1504

◆ TIMER21_ExtStart_FallingEdge_Set()

INLINE void TIMER21_ExtStart_FallingEdge_Set ( void  )

sets Falling Edge to External Start for TIMER21.

Example

This example sets Falling Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER21_ExtStart_FallingEdge_Set(void)
sets Falling Edge to External Start for TIMER21.
Definition: timer2x.h:870

◆ TIMER21_ExtStart_RisingEdge_Set()

INLINE void TIMER21_ExtStart_RisingEdge_Set ( void  )

sets Rising Edge to External Start for TIMER21.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER21_ExtStop()

INLINE void TIMER21_ExtStop ( void  )

disable TIMER21 to be started externally

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER21_Get_Capture()

INLINE uint16 TIMER21_Get_Capture ( void  )

reads the TIMER21 capture value

Returns
TIMER21 capture value

Example

This example reads the TIMER21 capture value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER21_Get_Capture();
}
INLINE uint16 TIMER21_Get_Capture(void)
reads the TIMER21 capture value
Definition: timer2x.h:1592

◆ TIMER21_Get_Count()

INLINE uint16 TIMER21_Get_Count ( void  )

reads the TIMER21 count value

Returns
TIMER21 count value

Example

This example reads the TIMER21 count value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER21_Get_Count();
}
INLINE uint16 TIMER21_Get_Count(void)
reads the TIMER21 count value
Definition: timer2x.h:1544

◆ TIMER21_Init()

void TIMER21_Init ( void  )

Initializes the Timer21 module based on the Config Wizard for MOTIX MCU configuration.

◆ TIMER21_Interval_Timer_Setup()

bool TIMER21_Interval_Timer_Setup ( uint32  timer_interval_us)

Initializes the TIMER21 in Reload Mode.

Parameters
timer_interval_ustimer interval in microseconds
Return values
TRUEsetup done
FALSEsetup failed

Example

This example Initializes the TIMER21 in Reload Mode with timer equals to 5000 us.

void Example_Function(void)
{
}
bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER21 in Reload Mode.

◆ TIMER21_Mode_Capture_Set()

INLINE void TIMER21_Mode_Capture_Set ( void  )

Selects Capture Mode for TIMER21.

Example

This example enters 16-bit Capture Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Capture_Set(void)
Selects Capture Mode for TIMER21.
Definition: timer2x.h:924

◆ TIMER21_Mode_Counter_Set()

INLINE void TIMER21_Mode_Counter_Set ( void  )

Selects Mode Counter for TIMER21.

Example

This example sets the Mode Counter.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Counter_Set(void)
Selects Mode Counter for TIMER21.
Definition: timer2x.h:958

◆ TIMER21_Mode_Reload_Set()

INLINE void TIMER21_Mode_Reload_Set ( void  )

Selects Reload Mode for TIMER21.

Example

This example enters Auto-Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Reload_Set(void)
Selects Reload Mode for TIMER21.
Definition: timer2x.h:941

◆ TIMER21_Mode_Timer_Set()

INLINE void TIMER21_Mode_Timer_Set ( void  )

Selects Mode Timer for TIMER21.

Example

This example sets the Mode Timer.

void Example_Function(void)
{
}
INLINE void TIMER21_Mode_Timer_Set(void)
Selects Mode Timer for TIMER21.
Definition: timer2x.h:975

◆ TIMER21_Overflow_Int_Clr()

INLINE void TIMER21_Overflow_Int_Clr ( void  )

Clears TIMER21 Overflow Interrupt status.

Example

This example treats the TIMER21 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}
INLINE uint8 TIMER21_Overflow_Sts(void)
reads TIMER21 Overflow Status.
Definition: timer2x.h:732
INLINE void TIMER21_Overflow_Int_Clr(void)
Clears TIMER21 Overflow Interrupt status.
Definition: timer2x.h:998
INLINE void TIMER21_Overflow_Int_En(void)
Enables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1044
INLINE void TIMER21_Overflow_Int_Dis(void)
Disables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1067

◆ TIMER21_Overflow_Int_Dis()

INLINE void TIMER21_Overflow_Int_Dis ( void  )

Disables TIMER21 Overflow Interrupt.

Example

This example treats the TIMER21 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}

◆ TIMER21_Overflow_Int_En()

INLINE void TIMER21_Overflow_Int_En ( void  )

Enables TIMER21 Overflow Interrupt.

Example

This example treats the TIMER21 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}

◆ TIMER21_Overflow_Sts()

INLINE uint8 TIMER21_Overflow_Sts ( void  )

reads TIMER21 Overflow Status.

Returns
TIMER21 Overflow Status

Example

This example checks the TIMER21 Overflow Status.

void Example_Function(void)
{
{
TIMER21_TF2_CALLBACK();
}
}

◆ TIMER21_Reload_Capture_FallingEdge_Set()

INLINE void TIMER21_Reload_Capture_FallingEdge_Set ( void  )

sets Falling Edge to Capture/Reload Mode for TIMER21.

Example

This example sets Falling Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Reload_Capture_FallingEdge_Set(void)
sets Falling Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:836

◆ TIMER21_Reload_Capture_RisingEdge_Set()

INLINE void TIMER21_Reload_Capture_RisingEdge_Set ( void  )

sets Rising Edge to Capture/Reload Mode for TIMER21.

Example

This example sets Rising Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER21_Reload_Capture_RisingEdge_Set(void)
sets Rising Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:819

◆ TIMER21_Reload_Value_Set()

INLINE void TIMER21_Reload_Value_Set ( uint16  t21)

Sets TIMER21 Reload Value.

Parameters
t21TIMER21 Reload Value

Example

This example sets TIMER21 Reload Value to 5000.

void Example_Function(void)
{
}
INLINE void TIMER21_Reload_Value_Set(uint16 t21)
Sets TIMER21 Reload Value.
Definition: timer2x.h:1786

◆ TIMER21_Select_T2EX()

INLINE void TIMER21_Select_T2EX ( TTIMER21_T2EX_Pxx  pinsel)

sets TIMER21 T2EX Pin

Parameters
pinselPin select, (uint8)TIMER21_T2EX_Pxy

Example

This example sets TIMER2 External Input to T21EX_0(P0.2).

void Example_Function(void)
{
}
INLINE void TIMER21_Select_T2EX(TTIMER21_T2EX_Pxx pinsel)
sets TIMER21 T2EX Pin
Definition: timer2x.h:1697
@ TIMER21_T2EX_P02
Definition: timer2x.h:118

◆ TIMER21_Select_T2IN()

INLINE void TIMER21_Select_T2IN ( TTIMER21_T2IN_Pxx  pinsel)

sets TIMER21 T2IN Pin

Parameters
pinselPin select, (uint8)TIMER21_T2IN_Pxy

Example

This example sets TIMER2 Input to T21_1(P1.1).

void Example_Function(void)
{
}
INLINE void TIMER21_Select_T2IN(TTIMER21_T2IN_Pxx pinsel)
sets TIMER21 T2IN Pin
Definition: timer2x.h:1678
@ TIMER21_T2IN_P11
Definition: timer2x.h:109

◆ TIMER21_Set_Reload()

INLINE void TIMER21_Set_Reload ( uint16  value)

sets TIMER21 reload value

Parameters
valuereload value in ticks

Example

This example sets TIMER21 Reload Value to 5000 ticks.

void Example_Function(void)
{
}
INLINE void TIMER21_Set_Reload(uint16 value)
sets TIMER21 reload value
Definition: timer2x.h:1658

◆ TIMER21_Start()

INLINE void TIMER21_Start ( void  )

starts the TIMER21 by software

Example

This example starts the TIMER21 by software.

void Example_Function(void)
{
}
INLINE void TIMER21_Start(void)
starts the TIMER21 by software
Definition: timer2x.h:1467

◆ TIMER21_Stop()

INLINE void TIMER21_Stop ( void  )

stops the TIMER21 by software

Example

This example stops and reset TIMER21 by software.

void Example_Function(void)
{
}

◆ TIMER21_UpDownCount_Dis()

INLINE void TIMER21_UpDownCount_Dis ( void  )

Disables Up/Down Counter for TIMER21.

Example

This example starts Up Counter once TR2 is set and External Control was disabled.

void Example_Function(void)
{
}
INLINE void TIMER21_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER21.
Definition: timer2x.h:906

◆ TIMER21_UpDownCount_En()

INLINE void TIMER21_UpDownCount_En ( void  )

enables Up/Down Counter for TIMER21.

Example

This example enables Up/Down Counter for TIMER21.

void Example_Function(void)
{
}
INLINE void TIMER21_UpDownCount_En(void)
enables Up/Down Counter for TIMER21.
Definition: timer2x.h:887

◆ TIMER21_Value_Get()

INLINE uint16 TIMER21_Value_Get ( void  )

reads the TIMER21 count value

Returns
TIMER21 count value

Example

This example reads the TIMER21 count value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER21_Value_Get();
}
INLINE uint16 TIMER21_Value_Get(void)
reads the TIMER21 count value
Definition: timer2x.h:1568

◆ TIMER21_Value_Set()

INLINE void TIMER21_Value_Set ( uint16  t21)

Sets TIMER21 Value.

Parameters
t21TIMER21 Value

Example

This example sets TIMER21 Value to 5000.

void Example_Function(void)
{
}
INLINE void TIMER21_Value_Set(uint16 t21)
Sets TIMER21 Value.
Definition: timer2x.h:1765

◆ TIMER2_Capture_Value_Get()

INLINE uint16 TIMER2_Capture_Value_Get ( void  )

reads the TIMER2 capture value

Returns
TIMER2 capture value

Example

This example reads the TIMER2 capture value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER2_Capture_Value_Get();
}
INLINE uint16 TIMER2_Capture_Value_Get(void)
reads the TIMER2 capture value
Definition: timer2x.h:1361

◆ TIMER2_Clear_Count()

INLINE void TIMER2_Clear_Count ( void  )

clears the TIMER2 count value

Example

This example stops and reset TIMER2 by software.

void Example_Function(void)
{
}
INLINE void TIMER2_Clear_Count(void)
clears the TIMER2 count value
Definition: timer2x.h:1382
INLINE void TIMER2_Stop(void)
stops the TIMER2 by software
Definition: timer2x.h:1231

◆ TIMER2_Clk_Prescaler_Dis()

INLINE void TIMER2_Clk_Prescaler_Dis ( void  )

disables TIMER2 clock prescaler.

Example

This example disables TIMER2 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER2_Clk_Prescaler_Dis(void)
disables TIMER2 clock prescaler.
Definition: timer2x.h:181

◆ TIMER2_Clk_Prescaler_En()

INLINE void TIMER2_Clk_Prescaler_En ( void  )

enables TIMER2 clock prescaler.

Example

This example enables TIMER2 clock prescaler.

void Example_Function(void)
{
}
INLINE void TIMER2_Clk_Prescaler_En(void)
enables TIMER2 clock prescaler.
Definition: timer2x.h:164

◆ TIMER2_Clk_Prescaler_Get()

INLINE uint8 TIMER2_Clk_Prescaler_Get ( void  )

reads TIMER2 clock prescaler.

Returns
TIMER2 clock prescaler

Example

This example reads TIMER2 clock prescaler.

void Example_Function(void)
{
uint8 pre;
}
INLINE uint8 TIMER2_Clk_Prescaler_Get(void)
reads TIMER2 clock prescaler.
Definition: timer2x.h:221

◆ TIMER2_Clk_Prescaler_Sel()

INLINE void TIMER2_Clk_Prescaler_Sel ( uint8  t2pre)

sets TIMER2 clock prescaler.

Example

This example sets TIMER2 clock prescaler to DIV2.

void Example_Function(void)
{
}
INLINE void TIMER2_Clk_Prescaler_Sel(uint8 t2pre)
sets TIMER2 clock prescaler.
Definition: timer2x.h:199

◆ TIMER2_External_Int_Clr()

INLINE void TIMER2_External_Int_Clr ( void  )

Clears TIMER2 External Interrupt flag.

Example

This example treats the TIMER2 External Interrupt.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}
INLINE uint8 TIMER2_External_Sts(void)
reads TIMER2 External Status.
Definition: timer2x.h:270
INLINE void TIMER2_External_Int_En(void)
Enables TIMER2 External Interrupt.
Definition: timer2x.h:608
INLINE void TIMER2_External_Int_Clr(void)
Clears TIMER2 External Interrupt flag.
Definition: timer2x.h:539
INLINE void TIMER2_External_Int_Dis(void)
Disables TIMER2 External Interrupt.
Definition: timer2x.h:631

◆ TIMER2_External_Int_Dis()

INLINE void TIMER2_External_Int_Dis ( void  )

Disables TIMER2 External Interrupt.

Example

This example treats the TIMER2 External Interrupt.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}

◆ TIMER2_External_Int_En()

INLINE void TIMER2_External_Int_En ( void  )

Enables TIMER2 External Interrupt.

Example

This example treats the TIMER2 External Interrupt.

void Example_Function(void)
{
if (TIMER2_External_Sts() == 1)
{
TIMER2_EXF2_CALLBACK();
}
}

◆ TIMER2_External_Sts()

INLINE uint8 TIMER2_External_Sts ( void  )

reads TIMER2 External Status.

Returns
TIMER2 External Status

Example

This example checks the TIMER2 External Status.

void Example_Function(void)
{
{
TIMER2_EXF2_CALLBACK();
}
}
INLINE void TIMER2_ExternalCtrl_Dis(void)
disables TIMER2 External Control.
Definition: timer2x.h:316
INLINE void TIMER2_ExternalCtrl_En(void)
enables TIMER2 External Control.
Definition: timer2x.h:295

◆ TIMER2_ExternalCtrl_Dis()

INLINE void TIMER2_ExternalCtrl_Dis ( void  )

disables TIMER2 External Control.

Example

This example reads TIMER2 External Status while External control is disabled.

void Example_Function(void)
{
uint8 sts;
}

◆ TIMER2_ExternalCtrl_En()

INLINE void TIMER2_ExternalCtrl_En ( void  )

enables TIMER2 External Control.

Example

This example checks the TIMER2 External Status.

void Example_Function(void)
{
{
TIMER2_EXF2_CALLBACK();
}
}

◆ TIMER2_ExtStart()

INLINE void TIMER2_ExtStart ( void  )

prepares TIMER2 to be started externally

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER2_ExtStart_RisingEdge_Set(void)
sets Rising Edge to External Start for TIMER2.
Definition: timer2x.h:369
INLINE void TIMER2_ExtStop(void)
disable TIMER2 to be started externally
Definition: timer2x.h:1269
INLINE void TIMER2_ExtStart(void)
prepares TIMER2 to be started externally
Definition: timer2x.h:1250

◆ TIMER2_ExtStart_FallingEdge_Set()

INLINE void TIMER2_ExtStart_FallingEdge_Set ( void  )

sets Falling Edge to External Start for TIMER2.

Example

This example sets Falling Edge to External Start.

void Example_Function(void)
{
}
INLINE void TIMER2_ExtStart_FallingEdge_Set(void)
sets Falling Edge to External Start for TIMER2.
Definition: timer2x.h:388

◆ TIMER2_ExtStart_RisingEdge_Set()

INLINE void TIMER2_ExtStart_RisingEdge_Set ( void  )

sets Rising Edge to External Start for TIMER2.

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER2_ExtStop()

INLINE void TIMER2_ExtStop ( void  )

disable TIMER2 to be started externally

Example

This example sets Rising Edge to External Start.

void Example_Function(void)
{
}

◆ TIMER2_Get_Capture()

INLINE uint16 TIMER2_Get_Capture ( void  )

reads the TIMER2 capture value

Returns
TIMER2 capture value

Example

This example reads the TIMER2 capture value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER2_Get_Capture();
}
INLINE uint16 TIMER2_Get_Capture(void)
reads the TIMER2 capture value
Definition: timer2x.h:1337

◆ TIMER2_Get_Count()

INLINE uint16 TIMER2_Get_Count ( void  )

reads the TIMER2 count value

Returns
TIMER2 count value

Example

This example reads the TIMER2 count value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER2_Get_Count();
}
INLINE uint16 TIMER2_Get_Count(void)
reads the TIMER2 count value
Definition: timer2x.h:1289

◆ TIMER2_Init()

void TIMER2_Init ( void  )

Initializes the Timer2 module based on the Config Wizard for MOTIX MCU configuration.

◆ TIMER2_Interval_Timer_Setup()

bool TIMER2_Interval_Timer_Setup ( uint32  timer_interval_us)

Initializes the TIMER2 in Reload Mode.

Parameters
timer_interval_ustimer interval in microseconds
Return values
TRUEsetup done
FALSEsetup failed

Example

This example Initializes the TIMER2 in Reload Mode with timer equals to 5000 us.

void Example_Function(void)
{
}
bool TIMER2_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER2 in Reload Mode.

◆ TIMER2_Mode_Capture_Set()

INLINE void TIMER2_Mode_Capture_Set ( void  )

Selects Capture Mode for TIMER2.

Example

This example enters 16-bit Capture Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Capture_Set(void)
Selects Capture Mode for TIMER2.
Definition: timer2x.h:442

◆ TIMER2_Mode_Counter_Set()

INLINE void TIMER2_Mode_Counter_Set ( void  )

Selects Mode Counter for TIMER2.

Example

This example sets the Mode Counter.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Counter_Set(void)
Selects Mode Counter for TIMER2.
Definition: timer2x.h:476

◆ TIMER2_Mode_Reload_Set()

INLINE void TIMER2_Mode_Reload_Set ( void  )

Selects Reload Mode for TIMER2.

Example

This example enters Auto-Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Reload_Set(void)
Selects Reload Mode for TIMER2.
Definition: timer2x.h:459

◆ TIMER2_Mode_Timer_Set()

INLINE void TIMER2_Mode_Timer_Set ( void  )

Selects Mode Timer for TIMER2.

Example

This example sets the Mode Timer.

void Example_Function(void)
{
}
INLINE void TIMER2_Mode_Timer_Set(void)
Selects Mode Timer for TIMER2.
Definition: timer2x.h:493

◆ TIMER2_Overflow_Int_Clr()

INLINE void TIMER2_Overflow_Int_Clr ( void  )

Clears TIMER2 Overflow Interrupt flag.

Example

This example treats the TIMER2 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER2_TF2_CALLBACK();
}
}
INLINE void TIMER2_Overflow_Int_Dis(void)
Disables TIMER2 Overflow Interrupt.
Definition: timer2x.h:585
INLINE void TIMER2_Overflow_Int_Clr(void)
Clears TIMER2 Overflow Interrupt flag.
Definition: timer2x.h:516
INLINE void TIMER2_Overflow_Int_En(void)
Enables TIMER2 Overflow Interrupt.
Definition: timer2x.h:562
INLINE uint8 TIMER2_Overflow_Sts(void)
reads TIMER2 Overflow Status.
Definition: timer2x.h:246

◆ TIMER2_Overflow_Int_Dis()

INLINE void TIMER2_Overflow_Int_Dis ( void  )

Disables TIMER2 Overflow Interrupt.

Example

This example treats the TIMER2 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER2_TF2_CALLBACK();
}
}

◆ TIMER2_Overflow_Int_En()

INLINE void TIMER2_Overflow_Int_En ( void  )

Enables TIMER2 Overflow Interrupt.

Example

This example treats the TIMER2 Overflow Interrupt.

void Example_Function(void)
{
{
TIMER2_TF2_CALLBACK();
}
}

◆ TIMER2_Overflow_Sts()

INLINE uint8 TIMER2_Overflow_Sts ( void  )

reads TIMER2 Overflow Status.

Returns
TIMER2 Overflow Status

Example

This example checks the TIMER2 Overflow Status.

void Example_Function(void)
{
{
TIMER2_TF2_CALLBACK();
}
}

◆ TIMER2_Reload_Capture_FallingEdge_Set()

INLINE void TIMER2_Reload_Capture_FallingEdge_Set ( void  )

sets Falling Edge to Capture/Reload Mode for TIMER2.

Example

This example sets Falling Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Reload_Capture_FallingEdge_Set(void)
sets Falling Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:350

◆ TIMER2_Reload_Capture_RisingEdge_Set()

INLINE void TIMER2_Reload_Capture_RisingEdge_Set ( void  )

sets Rising Edge to Capture/Reload Mode for TIMER2.

Example

This example sets Rising Edge to Capture/Reload Mode.

void Example_Function(void)
{
}
INLINE void TIMER2_Reload_Capture_RisingEdge_Set(void)
sets Rising Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:333

◆ TIMER2_Reload_Value_Set()

INLINE void TIMER2_Reload_Value_Set ( uint16  t2)

Sets TIMER2 Reload Value.

Parameters
t2TIMER2 Reload Value

Example

This example sets TIMER2 Reload Value to 5000.

void Example_Function(void)
{
}
INLINE void TIMER2_Reload_Value_Set(uint16 t2)
Sets TIMER2 Reload Value.
Definition: timer2x.h:1745

◆ TIMER2_Select_T2EX()

INLINE void TIMER2_Select_T2EX ( TTIMER2_T2EX_Pxx  pinsel)

sets TIMER2 T2EX Pin

Parameters
pinselPin select, (uint8)TIMER2_T2EX_Pxy

Example

This example sets TIMER2 External Input to T2EX_1(P1.2).

void Example_Function(void)
{
}
@ TIMER2_T2EX_P12
Definition: timer2x.h:99
INLINE void TIMER2_Select_T2EX(TTIMER2_T2EX_Pxx pinsel)
sets TIMER2 T2EX Pin
Definition: timer2x.h:1442

◆ TIMER2_Select_T2IN()

INLINE void TIMER2_Select_T2IN ( TTIMER2_T2IN_Pxx  pinsel)

sets TIMER2 T2IN Pin

Parameters
pinselPin select, (uint8)TIMER2_T2IN_Pxy

Example

This example sets TIMER2 Input to T2_1(P2.5).

void Example_Function(void)
{
}
@ TIMER2_T2IN_P25
Definition: timer2x.h:90
INLINE void TIMER2_Select_T2IN(TTIMER2_T2IN_Pxx pinsel)
sets TIMER2 T2IN Pin
Definition: timer2x.h:1423

◆ TIMER2_Set_Reload()

INLINE void TIMER2_Set_Reload ( uint16  value)

sets TIMER2 reload value

Parameters
valuereload value in ticks

Example

This example sets TIMER2 Reload Value to 5000 ticks.

void Example_Function(void)
{
}
INLINE void TIMER2_Set_Reload(uint16 value)
sets TIMER2 reload value
Definition: timer2x.h:1403

◆ TIMER2_Start()

INLINE void TIMER2_Start ( void  )

starts the TIMER2 by software

Example

This example starts the TIMER2 by software.

void Example_Function(void)
{
}
INLINE void TIMER2_Start(void)
starts the TIMER2 by software
Definition: timer2x.h:1213

◆ TIMER2_Stop()

INLINE void TIMER2_Stop ( void  )

stops the TIMER2 by software

Example

This example stops and reset TIMER2 by software.

void Example_Function(void)
{
}

◆ TIMER2_UpDownCount_Dis()

INLINE void TIMER2_UpDownCount_Dis ( void  )

Disables Up/Down Counter for TIMER2.

Example

This example starts Up Counter once TR2 is set and External Control was disabled.

void Example_Function(void)
{
}
INLINE void TIMER2_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER2.
Definition: timer2x.h:424

◆ TIMER2_UpDownCount_En()

INLINE void TIMER2_UpDownCount_En ( void  )

enables Up/Down Counter for TIMER2.

Example

This example enables Up/Down Counter for TIMER2.

void Example_Function(void)
{
}
INLINE void TIMER2_UpDownCount_En(void)
enables Up/Down Counter for TIMER2.
Definition: timer2x.h:405

◆ TIMER2_Value_Get()

INLINE uint16 TIMER2_Value_Get ( void  )

reads the TIMER2 count value

Returns
TIMER2 count value

Example

This example reads the TIMER2 count value.

void Example_Function(void)
{
uint16 timer_ticks;
timer_ticks = TIMER2_Value_Get();
}
INLINE uint16 TIMER2_Value_Get(void)
reads the TIMER2 count value
Definition: timer2x.h:1313

◆ TIMER2_Value_Set()

INLINE void TIMER2_Value_Set ( uint16  t2)

Sets TIMER2 Value.

Parameters
t2TIMER2 Value

Example

This example sets TIMER2 Value to 5000 ticks.

void Example_Function(void)
{
}
INLINE void TIMER2_Value_Set(uint16 t2)
Sets TIMER2 Value.
Definition: timer2x.h:1724