159 #define MIN_TIMER_INTERVAL_US 1u
160 #define T2_REG_MAX_UPCOUNT_TICKS 0u
161 #define T2_REG_MIN_UPCOUNT_TICKS 0xFFFFu
#define TIMER21
Definition: tle987x.h:6102
#define TIMER2
Definition: tle987x.h:6101
#define SCU
Definition: tle987x.h:6097
#define TIMER2_T2H_T2H_Pos
Definition: tle987x.h:9963
#define TIMER21_T2CON1_EXF2EN_Msk
Definition: tle987x.h:10013
#define SCU_MODPISEL2_T21EXIS_Msk
Definition: tle987x.h:9186
#define SCU_MODPISEL2_T2IS_Pos
Definition: tle987x.h:9191
#define TIMER21_T2L_T2L_Msk
Definition: tle987x.h:10026
#define TIMER21_T2CON_TF2_Msk
Definition: tle987x.h:10010
#define TIMER2_T2MOD_PREN_Pos
Definition: tle987x.h:9978
#define TIMER2_T2ICLR_EXF2CLR_Pos
Definition: tle987x.h:9966
#define TIMER21_T2MOD_T2RHEN_Pos
Definition: tle987x.h:10036
#define TIMER2_RC2L_RC2_Pos
Definition: tle987x.h:9942
#define TIMER21_T2MOD_PREN_Msk
Definition: tle987x.h:10033
#define TIMER21_RC2L_RC2_Msk
Definition: tle987x.h:9997
#define TIMER2_RC2L_RC2_Msk
Definition: tle987x.h:9943
#define TIMER2_T2CON_TF2_Msk
Definition: tle987x.h:9956
#define TIMER21_T2CON_EXF2_Msk
Definition: tle987x.h:10008
#define TIMER2_RC2H_RC2_Pos
Definition: tle987x.h:9939
#define TIMER21_T2ICLR_TF2CLR_Pos
Definition: tle987x.h:10022
#define TIMER2_T2CON1_EXF2EN_Pos
Definition: tle987x.h:9958
#define TIMER2_T2MOD_T2PRE_Pos
Definition: tle987x.h:9976
#define TIMER21_T2CON_EXEN2_Pos
Definition: tle987x.h:10005
#define TIMER2_T2MOD_EDGESEL_Pos
Definition: tle987x.h:9980
#define TIMER2_T2MOD_DCEN_Msk
Definition: tle987x.h:9975
#define TIMER2_RC2H_RC2_Msk
Definition: tle987x.h:9940
#define SCU_MODPISEL1_T21EXCON_Pos
Definition: tle987x.h:9178
#define TIMER2_T2CON_EXF2_Pos
Definition: tle987x.h:9953
#define TIMER21_T2ICLR_EXF2CLR_Pos
Definition: tle987x.h:10020
#define TIMER2_T2MOD_T2REGS_Msk
Definition: tle987x.h:9985
#define TIMER21_T2CON_TR2_Pos
Definition: tle987x.h:10003
#define TIMER21_T2CON1_TF2EN_Msk
Definition: tle987x.h:10015
#define TIMER21_T2MOD_EDGESEL_Pos
Definition: tle987x.h:10034
#define TIMER21_T2MOD_DCEN_Pos
Definition: tle987x.h:10028
#define TIMER2_T2CON1_TF2EN_Msk
Definition: tle987x.h:9961
#define TIMER2_T2CON_CP_RL2_Msk
Definition: tle987x.h:9946
#define TIMER2_T2CON_C_T2_Pos
Definition: tle987x.h:9947
#define TIMER2_T2H_T2H_Msk
Definition: tle987x.h:9964
#define TIMER2_T2CON_EXF2_Msk
Definition: tle987x.h:9954
#define TIMER2_T2ICLR_EXF2CLR_Msk
Definition: tle987x.h:9967
#define SCU_MODPISEL1_T2EXCON_Msk
Definition: tle987x.h:9181
#define TIMER21_T2CON_EXF2_Pos
Definition: tle987x.h:10007
#define TIMER21_T2MOD_DCEN_Msk
Definition: tle987x.h:10029
#define SCU_MODPISEL1_T2EXCON_Pos
Definition: tle987x.h:9180
#define TIMER2_T2CON_TF2_Pos
Definition: tle987x.h:9955
#define TIMER2_T2ICLR_TF2CLR_Msk
Definition: tle987x.h:9969
#define TIMER2_T2MOD_DCEN_Pos
Definition: tle987x.h:9974
#define TIMER21_T2CON_C_T2_Pos
Definition: tle987x.h:10001
#define TIMER2_T2MOD_T2RHEN_Pos
Definition: tle987x.h:9982
#define TIMER2_T2CON1_EXF2EN_Msk
Definition: tle987x.h:9959
#define SCU_MODPISEL1_T21EXCON_Msk
Definition: tle987x.h:9179
#define TIMER2_T2ICLR_TF2CLR_Pos
Definition: tle987x.h:9968
#define TIMER21_T2MOD_PREN_Pos
Definition: tle987x.h:10032
#define SCU_MODPISEL2_T2IS_Msk
Definition: tle987x.h:9192
#define TIMER21_T2H_T2H_Pos
Definition: tle987x.h:10017
#define TIMER2_T2MOD_T2RHEN_Msk
Definition: tle987x.h:9983
#define TIMER21_T2L_T2L_Pos
Definition: tle987x.h:10025
#define TIMER21_T2MOD_T2REGS_Pos
Definition: tle987x.h:10038
#define TIMER21_T2CON_C_T2_Msk
Definition: tle987x.h:10002
#define TIMER21_T2CON1_TF2EN_Pos
Definition: tle987x.h:10014
#define SCU_MODPISEL2_T2EXIS_Msk
Definition: tle987x.h:9188
#define SCU_MODPISEL2_T21IS_Pos
Definition: tle987x.h:9189
#define TIMER2_T2MOD_PREN_Msk
Definition: tle987x.h:9979
#define TIMER21_T2MOD_T2PRE_Pos
Definition: tle987x.h:10030
#define TIMER21_T2MOD_T2PRE_Msk
Definition: tle987x.h:10031
#define TIMER21_RC2H_RC2_Msk
Definition: tle987x.h:9994
#define TIMER21_T2MOD_T2RHEN_Msk
Definition: tle987x.h:10037
#define TIMER21_RC2L_RC2_Pos
Definition: tle987x.h:9996
#define TIMER21_T2CON_CP_RL2_Pos
Definition: tle987x.h:9999
#define TIMER21_T2MOD_EDGESEL_Msk
Definition: tle987x.h:10035
#define TIMER21_T2MOD_T2REGS_Msk
Definition: tle987x.h:10039
#define TIMER21_T2CON1_EXF2EN_Pos
Definition: tle987x.h:10012
#define TIMER2_T2MOD_EDGESEL_Msk
Definition: tle987x.h:9981
#define TIMER2_T2CON_EXEN2_Msk
Definition: tle987x.h:9952
#define TIMER2_T2CON_TR2_Pos
Definition: tle987x.h:9949
#define TIMER21_T2ICLR_EXF2CLR_Msk
Definition: tle987x.h:10021
#define SCU_MODPISEL2_T21EXIS_Pos
Definition: tle987x.h:9185
#define TIMER21_T2CON_TR2_Msk
Definition: tle987x.h:10004
#define TIMER2_T2L_T2L_Pos
Definition: tle987x.h:9971
#define TIMER2_T2CON1_TF2EN_Pos
Definition: tle987x.h:9960
#define TIMER21_T2CON_TF2_Pos
Definition: tle987x.h:10009
#define TIMER2_T2MOD_T2PRE_Msk
Definition: tle987x.h:9977
#define TIMER2_T2CON_EXEN2_Pos
Definition: tle987x.h:9951
#define TIMER21_T2ICLR_TF2CLR_Msk
Definition: tle987x.h:10023
#define SCU_MODPISEL2_T2EXIS_Pos
Definition: tle987x.h:9187
#define TIMER2_T2MOD_T2REGS_Pos
Definition: tle987x.h:9984
#define SCU_MODPISEL2_T21IS_Msk
Definition: tle987x.h:9190
#define TIMER2_T2CON_C_T2_Msk
Definition: tle987x.h:9948
#define TIMER21_T2CON_EXEN2_Msk
Definition: tle987x.h:10006
#define TIMER21_RC2H_RC2_Pos
Definition: tle987x.h:9993
#define TIMER21_T2CON_CP_RL2_Msk
Definition: tle987x.h:10000
#define TIMER21_T2H_T2H_Msk
Definition: tle987x.h:10018
#define TIMER2_T2L_T2L_Msk
Definition: tle987x.h:9972
#define TIMER2_T2CON_TR2_Msk
Definition: tle987x.h:9950
#define TIMER2_T2CON_CP_RL2_Pos
Definition: tle987x.h:9945
SFR low level access library.
INLINE void Field_Wrt8(volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
This function writes a bit field in a 8-bit register.
Definition: sfr_access.h:337
INLINE uint8 u8_Field_Rd8(const volatile uint8 *reg, uint8 pos, uint8 msk)
This function reads a 8-bit field of a 8-bit register.
Definition: sfr_access.h:412
INLINE uint8 u1_Field_Rd8(const volatile uint8 *reg, uint8 pos, uint8 msk)
This function reads a 1-bit field of a 8-bit register.
Definition: sfr_access.h:397
INLINE void Field_Mod8(volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
This function writes a bit field in a 8-bit register.
Definition: sfr_access.h:352
INLINE void TIMER21_External_Int_Dis(void)
Disables TIMER21 External Interrupt.
Definition: timer2x.h:1130
INLINE void TIMER2_Clear_Count(void)
clears the TIMER2 count value
Definition: timer2x.h:1398
enum TIMER2_T2IN_Pxx TTIMER2_T2IN_Pxx
enum TIMER21_T2IN_Pxx TTIMER21_T2IN_Pxx
INLINE void TIMER21_Value_Set(uint16 t21)
Sets TIMER21 Value.
Definition: timer2x.h:1781
INLINE void TIMER21_ExtStart_FallingEdge_Set(void)
sets Falling Edge to External Start for TIMER21.
Definition: timer2x.h:886
INLINE void TIMER2_Mode_Timer_Set(void)
Selects Mode Timer for TIMER2.
Definition: timer2x.h:509
TIMER2_T2EX_Pxx
Definition: timer2x.h:113
@ TIMER2_T2EX_LIN
Definition: timer2x.h:114
@ TIMER2_T2EX_P12
Definition: timer2x.h:115
@ TIMER2_T2EX_CCU6_CC60
Definition: timer2x.h:116
void TIMER2_Init(void)
Initializes the Timer2 module based on the Config Wizard for MOTIX MCU configuration.
enum TIMER21_T2EX_Pxx TTIMER21_T2EX_Pxx
INLINE void TIMER21_Mode_Capture_Set(void)
Selects Capture Mode for TIMER21.
Definition: timer2x.h:940
INLINE void TIMER21_Clk_Prescaler_En(void)
enables TIMER21 clock prescaler.
Definition: timer2x.h:664
INLINE void TIMER21_External_Int_Clr(void)
Clears TIMER21 External Interrupt status.
Definition: timer2x.h:1037
INLINE void TIMER2_Clk_Prescaler_En(void)
enables TIMER2 clock prescaler.
Definition: timer2x.h:180
INLINE void TIMER2_ExtStart_FallingEdge_Set(void)
sets Falling Edge to External Start for TIMER2.
Definition: timer2x.h:404
INLINE uint16 TIMER21_Capture_Value_Get(void)
reads the TIMER21 capture value
Definition: timer2x.h:1632
IMER2x_Clock_Prescaler
Definition: timer2x.h:145
@ TIMER2x_Clk_Div_2
Definition: timer2x.h:147
@ TIMER2x_Clk_Div_64
Definition: timer2x.h:152
@ TIMER2x_Clk_Div_32
Definition: timer2x.h:151
@ TIMER2x_Clk_Div_128
Definition: timer2x.h:153
@ TIMER2x_Clk_Div_16
Definition: timer2x.h:150
@ TIMER2x_Clk_Div_8
Definition: timer2x.h:149
@ TIMER2x_Clk_Div_4
Definition: timer2x.h:148
@ TIMER2x_Clk_Div_1
Definition: timer2x.h:146
INLINE void TIMER21_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER21.
Definition: timer2x.h:922
INLINE void TIMER2_Overflow_Int_Dis(void)
Disables TIMER2 Overflow Interrupt.
Definition: timer2x.h:601
INLINE void TIMER2_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER2.
Definition: timer2x.h:440
INLINE uint16 TIMER2_Capture_Value_Get(void)
reads the TIMER2 capture value
Definition: timer2x.h:1377
enum TIMER2_T2EX_Pxx TTIMER2_T2EX_Pxx
INLINE void TIMER21_External_Int_En(void)
Enables TIMER21 External Interrupt.
Definition: timer2x.h:1106
INLINE void TIMER2_Clk_Prescaler_Sel(uint8 t2pre)
sets TIMER2 clock prescaler.
Definition: timer2x.h:215
INLINE uint8 TIMER21_Clk_Prescaler_Get(void)
reads TIMER21 clock prescaler.
Definition: timer2x.h:723
INLINE void TIMER2_Stop(void)
stops the TIMER2 by software
Definition: timer2x.h:1247
INLINE void TIMER2_Reload_Capture_RisingEdge_Set(void)
sets Rising Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:349
INLINE void TIMER21_Clear_Count(void)
clears the TIMER21 count value
Definition: timer2x.h:1653
INLINE void TIMER2_Reload_Value_Set(uint16 t2)
Sets TIMER2 Reload Value.
Definition: timer2x.h:1761
INLINE void TIMER21_Start(void)
starts the TIMER21 by software
Definition: timer2x.h:1483
INLINE void TIMER2_ExternalCtrl_Dis(void)
disables TIMER2 External Control.
Definition: timer2x.h:332
INLINE uint16 TIMER21_Get_Count(void)
reads the TIMER21 count value
Definition: timer2x.h:1560
INLINE void TIMER2_ExtStart_RisingEdge_Set(void)
sets Rising Edge to External Start for TIMER2.
Definition: timer2x.h:385
INLINE void TIMER2_Set_Reload(uint16 value)
sets TIMER2 reload value
Definition: timer2x.h:1419
INLINE void TIMER2_ExternalCtrl_En(void)
enables TIMER2 External Control.
Definition: timer2x.h:311
INLINE uint8 TIMER2_External_Sts(void)
reads TIMER2 External Status.
Definition: timer2x.h:286
TIMER2_T2IN_Pxx
Definition: timer2x.h:104
@ TIMER2_T2IN_P00
Definition: timer2x.h:105
@ TIMER2_T2IN_P25
Definition: timer2x.h:106
bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER21 in Reload Mode.
INLINE uint16 TIMER2_Value_Get(void)
reads the TIMER2 count value
Definition: timer2x.h:1329
INLINE uint8 TIMER21_Overflow_Sts(void)
reads TIMER21 Overflow Status.
Definition: timer2x.h:748
INLINE void TIMER21_Reload_Capture_RisingEdge_Set(void)
sets Rising Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:835
INLINE void TIMER21_Select_T2EX(TTIMER21_T2EX_Pxx pinsel)
sets TIMER21 T2EX Pin
Definition: timer2x.h:1713
INLINE void TIMER21_ExtStop(void)
disable TIMER21 to be started externally
Definition: timer2x.h:1539
void TIMER21_Init(void)
Initializes the Timer21 module based on the Config Wizard for MOTIX MCU configuration.
INLINE void TIMER2_External_Int_En(void)
Enables TIMER2 External Interrupt.
Definition: timer2x.h:624
INLINE uint16 TIMER21_Get_Capture(void)
reads the TIMER21 capture value
Definition: timer2x.h:1608
INLINE void TIMER2_Clk_Prescaler_Dis(void)
disables TIMER2 clock prescaler.
Definition: timer2x.h:197
INLINE void TIMER2_ExtStop(void)
disable TIMER2 to be started externally
Definition: timer2x.h:1285
INLINE uint16 TIMER2_Get_Capture(void)
reads the TIMER2 capture value
Definition: timer2x.h:1353
INLINE void TIMER2_External_Int_Clr(void)
Clears TIMER2 External Interrupt flag.
Definition: timer2x.h:555
INLINE void TIMER21_ExternalCtrl_En(void)
enables TIMER21 External Control.
Definition: timer2x.h:797
INLINE uint8 TIMER2_Clk_Prescaler_Get(void)
reads TIMER2 clock prescaler.
Definition: timer2x.h:237
INLINE uint16 TIMER2_Get_Count(void)
reads the TIMER2 count value
Definition: timer2x.h:1305
INLINE void TIMER2_Value_Set(uint16 t2)
Sets TIMER2 Value.
Definition: timer2x.h:1740
INLINE void TIMER2_Start(void)
starts the TIMER2 by software
Definition: timer2x.h:1229
INLINE void TIMER2_Select_T2EX(TTIMER2_T2EX_Pxx pinsel)
sets TIMER2 T2EX Pin
Definition: timer2x.h:1458
bool TIMER2_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER2 in Reload Mode.
INLINE void TIMER2_Select_T2IN(TTIMER2_T2IN_Pxx pinsel)
sets TIMER2 T2IN Pin
Definition: timer2x.h:1439
INLINE void TIMER21_ExternalCtrl_Dis(void)
disables TIMER21 External Control.
Definition: timer2x.h:818
INLINE void TIMER21_Mode_Counter_Set(void)
Selects Mode Counter for TIMER21.
Definition: timer2x.h:974
INLINE void TIMER2_Mode_Counter_Set(void)
Selects Mode Counter for TIMER2.
Definition: timer2x.h:492
INLINE void TIMER2_Mode_Capture_Set(void)
Selects Capture Mode for TIMER2.
Definition: timer2x.h:458
INLINE void TIMER21_UpDownCount_En(void)
enables Up/Down Counter for TIMER21.
Definition: timer2x.h:903
INLINE uint8 TIMER21_External_Sts(void)
reads TIMER21 External Status.
Definition: timer2x.h:772
INLINE void TIMER2_Overflow_Int_Clr(void)
Clears TIMER2 Overflow Interrupt flag.
Definition: timer2x.h:532
INLINE void TIMER21_ExtStart_RisingEdge_Set(void)
sets Rising Edge to External Start for TIMER21.
Definition: timer2x.h:869
INLINE void TIMER21_Select_T2IN(TTIMER21_T2IN_Pxx pinsel)
sets TIMER21 T2IN Pin
Definition: timer2x.h:1694
INLINE void TIMER2_Overflow_Int_En(void)
Enables TIMER2 Overflow Interrupt.
Definition: timer2x.h:578
INLINE void TIMER21_Clk_Prescaler_Dis(void)
disables TIMER21 clock prescaler.
Definition: timer2x.h:681
INLINE void TIMER21_Clk_Prescaler_Sel(uint8 t2pre)
sets TIMER21 clock prescaler.
Definition: timer2x.h:701
INLINE void TIMER21_Set_Reload(uint16 value)
sets TIMER21 reload value
Definition: timer2x.h:1674
INLINE void TIMER21_Overflow_Int_Clr(void)
Clears TIMER21 Overflow Interrupt status.
Definition: timer2x.h:1014
INLINE void TIMER21_Overflow_Int_En(void)
Enables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1060
INLINE uint16 TIMER21_Value_Get(void)
reads the TIMER21 count value
Definition: timer2x.h:1584
INLINE void TIMER2_ExtStart(void)
prepares TIMER2 to be started externally
Definition: timer2x.h:1266
INLINE void TIMER21_ExtStart(void)
prepares TIMER21 to be started externally
Definition: timer2x.h:1520
INLINE void TIMER2_Mode_Reload_Set(void)
Selects Reload Mode for TIMER2.
Definition: timer2x.h:475
INLINE void TIMER2_External_Int_Dis(void)
Disables TIMER2 External Interrupt.
Definition: timer2x.h:647
TIMER21_T2IN_Pxx
Definition: timer2x.h:123
@ TIMER21_T2IN_P04
Definition: timer2x.h:126
@ TIMER21_T2IN_P11
Definition: timer2x.h:125
@ TIMER21_T2IN_P01
Definition: timer2x.h:124
enum IMER2x_Clock_Prescaler TIMER2x_Clock_Prescaler
INLINE void TIMER21_Mode_Timer_Set(void)
Selects Mode Timer for TIMER21.
Definition: timer2x.h:991
INLINE uint8 TIMER2_Overflow_Sts(void)
reads TIMER2 Overflow Status.
Definition: timer2x.h:262
INLINE void TIMER21_Reload_Value_Set(uint16 t21)
Sets TIMER21 Reload Value.
Definition: timer2x.h:1802
INLINE void TIMER21_Overflow_Int_Dis(void)
Disables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1083
INLINE void TIMER2_UpDownCount_En(void)
enables Up/Down Counter for TIMER2.
Definition: timer2x.h:421
INLINE void TIMER21_Mode_Reload_Set(void)
Selects Reload Mode for TIMER21.
Definition: timer2x.h:957
INLINE void TIMER21_Reload_Capture_FallingEdge_Set(void)
sets Falling Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:852
TIMER21_T2EX_Pxx
Definition: timer2x.h:133
@ TIMER21_T2EX_P02
Definition: timer2x.h:134
@ TIMER21_T2EX_P14
Definition: timer2x.h:135
@ TIMER21_T2EX_CCU6_COUT60
Definition: timer2x.h:138
@ TIMER21_T2EX_P12
Definition: timer2x.h:137
@ TIMER21_T2EX_P23
Definition: timer2x.h:136
INLINE void TIMER2_Reload_Capture_FallingEdge_Set(void)
sets Falling Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:366
INLINE void TIMER21_Stop(void)
stops the TIMER21 by software
Definition: timer2x.h:1501
CMSIS register HeaderFile.
General type declarations.
#define INLINE
Definition: types.h:148
uint8_t uint8
8 bit unsigned value
Definition: types.h:153
uint16_t uint16
16 bit unsigned value
Definition: types.h:154
uint32_t uint32
32 bit unsigned value
Definition: types.h:155