Infineon MOTIX™ MCU TLE987x Device Family SDK
timer2x.h
Go to the documentation of this file.
1 /*
2  ***********************************************************************************************************************
3  *
4  * Copyright (c) Infineon Technologies AG
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without modification,are permitted provided that the
8  * following conditions are met:
9  *
10  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
11  * disclaimer.
12  *
13  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
14  * following disclaimer in the documentation and/or other materials provided with the distribution.
15  *
16  * Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote
17  * products derived from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
25  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  **********************************************************************************************************************/
37 /*******************************************************************************
38 ** Author(s) Identity **
39 ********************************************************************************
40 ** Initials Name **
41 ** ---------------------------------------------------------------------------**
42 ** DM Daniel Mysliwitz **
43 ** DCM Dragos C. Molocea **
44 ** BG Blandine Guillot **
45 ** JO Julia Ott **
46 ** TA Thomas Albersinger **
47 ** VO Vanessa Ongaro **
48 *******************************************************************************/
49 
50 /*******************************************************************************
51 ** Revision Control History **
52 ********************************************************************************
53 ** V0.1.0: 2014-05-13, TA: Initial version **
54 ** V0.1.1: 2014-11-02, DM: Timer values init added **
55 ** V0.1.2: 2015-02-10, DM: Individual header file added **
56 ** V0.1.3: 2017-02-16, DM: Timer2/Timer21 prefix changed to capital letters **
57 ** Macros for Timer2x bit accesses added **
58 ** Set_Reload function added **
59 ** V0.1.4: 2017-05-26, DM: API extended **
60 ** V0.1.5: 2017-10-19, DM: MISRA 2012 compliance, the following PC-Lint **
61 ** rules are globally deactivated: **
62 ** - Info 793: ANSI/ISO limit of 6 'significant **
63 ** characters in an external identifier **
64 ** - Info 835: A zero has been given as right **
65 ** argument to operator **
66 ** - Info 845: The left argument to operator '&' **
67 ** is certain to be 0 **
68 ** Replaced macros by INLINE functions **
69 ** Replaced register accesses within functions by **
70 ** function calls **
71 ** Replaced __STATIC_INLINE by INLINE **
72 ** V0.1.6: 2018-06-27, DCM: Added handling in case of timer_interval_us value**
73 ** in invalid range **
74 ** V0.1.7: 2018-12-03, JO: Doxygen update **
75 ** Move revision history from timer2x.c to timer2x.h**
76 ** Replaced __STATIC_INLINE by INLINE **
77 ** V0.1.8: 2020-04-15, BG: Updated revision history format **
78 ** V0.1.9: 2020-07-13, JO: EP-431: remove ARMCC v6 Compiler warnings **
79 ** - Added typecasts to remove 'implicit typecast' **
80 ** warning **
81 ** V0.2.0: 2020-07-21, BG: EP-439: Formatted .h/.c files **
82 ** V0.2.1: 2021-04-23, BG: EP-726: Corrected MISRA 2012 violations **
83 ** V0.2.2: 2022-02-28, JO: EP-936: Updated copyright and branding **
84 ** V0.2.3: 2022-10-18, VO: EP-1252: Removed ARMCC V6.18 warnings **
85 *******************************************************************************/
86 
87 #ifndef TIMER2X_H
88 #define TIMER2X_H
89 
90 /*******************************************************************************
91 ** Includes **
92 *******************************************************************************/
93 #include "tle987x.h"
94 #include "types.h"
95 #include "sfr_access.h"
96 
97 /*******************************************************************************
98 ** Global Type Definitions **
99 *******************************************************************************/
103 typedef enum TIMER2_T2IN_Pxx
104 {
106  TIMER2_T2IN_P25 = 1u
108 
112 typedef enum TIMER2_T2EX_Pxx
113 {
118 
122 typedef enum TIMER21_T2IN_Pxx
123 {
126  TIMER21_T2IN_P04 = 2u
128 
132 typedef enum TIMER21_T2EX_Pxx
133 {
140 
145 {
153  TIMER2x_Clk_Div_128 = 7u
155 
156 /*******************************************************************************
157 ** Global Macro Definitions **
158 *******************************************************************************/
159 #define MIN_TIMER_INTERVAL_US 1u
160 #define T2_REG_MAX_UPCOUNT_TICKS 0u
161 #define T2_REG_MIN_UPCOUNT_TICKS 0xFFFFu
162 
163 
164 /*******************************************************************************
165 ** Global Inline Function Definitions **
166 *******************************************************************************/
167 /* TIMER2 */
181 {
183 }
184 
198 {
200 }
201 
216 {
218 }
219 
238 {
240 }
241 
263 {
265 }
266 
287 {
289 }
290 
312 {
314 }
315 
333 {
335 }
336 
350 {
352 }
353 
367 {
369 }
370 
386 {
388 }
389 
405 {
407 }
408 
422 {
424 }
425 
441 {
443 }
444 
459 {
461 }
462 
476 {
478 }
479 
493 {
495 }
496 
510 {
512 }
513 
533 {
535 }
536 
556 {
558 }
559 
579 {
581 }
582 
602 {
604 }
605 
625 {
627 }
628 
648 {
650 }
651 
665 {
667 }
668 
682 {
684 }
685 
702 {
704 }
705 
724 {
726 }
727 
749 {
751 }
752 
773 {
775 }
776 
798 {
800 }
801 
819 {
821 }
822 
836 {
838 }
839 
853 {
855 }
856 
870 {
872 }
873 
887 {
889 }
890 
904 {
906 }
907 
923 {
925 }
926 
941 {
943 }
944 
958 {
960 }
961 
975 {
977 }
978 
992 {
994 }
995 
1015 {
1017 }
1018 
1038 {
1040 }
1041 
1061 {
1063 }
1064 
1084 {
1086 }
1087 
1107 {
1109 }
1110 
1111 
1131 {
1133 }
1134 
1135 /*******************************************************************************
1136 ** Global Function Declarations **
1137 *******************************************************************************/
1142 void TIMER2_Init(void);
1143 
1148 void TIMER21_Init(void);
1149 
1166 bool TIMER2_Interval_Timer_Setup(uint32 timer_interval_us);
1167 
1184 bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us);
1185 
1186 /*******************************************************************************
1187 ** Global Inline Function Declarations **
1188 *******************************************************************************/
1189 INLINE void TIMER2_Start(void);
1190 INLINE void TIMER2_Stop(void);
1191 INLINE void TIMER2_ExtStart(void);
1192 INLINE void TIMER2_ExtStop(void);
1197 INLINE void TIMER2_Clear_Count(void);
1198 INLINE void TIMER2_Set_Reload(uint16 value);
1201 INLINE void TIMER21_Start(void);
1202 INLINE void TIMER21_Stop(void);
1203 INLINE void TIMER21_ExtStart(void);
1204 INLINE void TIMER21_ExtStop(void);
1209 INLINE void TIMER21_Clear_Count(void);
1210 INLINE void TIMER21_Set_Reload(uint16 value);
1213 
1214 /*******************************************************************************
1215 ** Global Inline Function Definitions **
1216 *******************************************************************************/
1230 {
1232 }
1233 
1248 {
1250 }
1251 
1267 {
1269 }
1270 
1286 {
1288 }
1289 
1306 {
1307  uint16 res;
1310  return (res);
1311 }
1312 
1330 {
1331  uint16 res;
1334  return (res);
1335 }
1336 
1354 {
1355  uint16 res;
1358  return (res);
1359 }
1360 
1378 {
1379  uint16 res;
1382  return (res);
1383 }
1384 
1399 {
1402 }
1403 
1420 {
1421  Field_Wrt8(&TIMER2->RC2H.reg, (uint8)TIMER2_RC2H_RC2_Pos, (uint8)TIMER2_RC2H_RC2_Msk, (uint8)(value >> 8u));
1422  Field_Wrt8(&TIMER2->RC2L.reg, (uint8)TIMER2_RC2L_RC2_Pos, (uint8)TIMER2_RC2L_RC2_Msk, (uint8)(value & (uint16)0xFFu));
1423 }
1424 
1440 {
1442 }
1443 
1459 {
1460  if (pinsel < TIMER2_T2EX_CCU6_CC60)
1461  {
1464  }
1465  else
1466  {
1468  }
1469 }
1470 
1484 {
1486 }
1487 
1502 {
1504 }
1505 
1521 {
1523 }
1524 
1540 {
1542 }
1543 
1561 {
1562  uint16 res;
1565  return (res);
1566 }
1567 
1585 {
1586  uint16 res;
1589  return (res);
1590 }
1591 
1609 {
1610  uint16 res;
1613  return (res);
1614 }
1615 
1633 {
1634  uint16 res;
1637  return (res);
1638 }
1639 
1654 {
1657 }
1658 
1675 {
1678 }
1679 
1695 {
1697 }
1698 
1714 {
1715  if (pinsel < TIMER21_T2EX_CCU6_COUT60)
1716  {
1719  }
1720  else
1721  {
1723  }
1724 }
1725 
1741 {
1744 }
1745 
1762 {
1765 }
1766 
1782 {
1785 }
1786 
1803 {
1806 }
1807 
1808 #endif
#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