Infineon MOTIX™ MCU TLE985x Device Family SDK
timer2x.h
Go to the documentation of this file.
1 /*
2  ***********************************************************************************************************************
3  *
4  * Copyright (c) 2018-2022, 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  **********************************************************************************************************************/
39 /*******************************************************************************
40 ** Author(s) Identity **
41 ********************************************************************************
42 ** Initials Name **
43 ** ---------------------------------------------------------------------------**
44 ** TS T&S **
45 ** BG Blandine Guillot **
46 ** JO Julia Ott **
47 *******************************************************************************/
48 
49 /*******************************************************************************
50 ** Revision Control History **
51 ********************************************************************************
52 ** V0.2.0: 2018-02-13, TS: Initial version of revision history **
53 ** V0.2.1: 2019-01-28, TS: __STATIC_INLINE changed to INLINE **
54 ** Doxygen update **
55 ** Revision history moved from timer2x.c to **
56 ** timer2x.h **
57 ** Added handling in case of timer_interval_us **
58 ** value in invalid range **
59 ** TIMER21_Select_T21EX function updated **
60 ** V0.2.2: 2020-03-02, BG: Updated revision history format **
61 ** V0.2.3: 2020-03-02, JO: EP-435: Removed ARMCC v6 compiler warnings **
62 ** V0.2.4: 2022-01-21, JO: EP-934: Updated copyright and branding **
63 *******************************************************************************/
64 
65 #ifndef TIMER2X_H
66 #define TIMER2X_H
67 
68 /*******************************************************************************
69 ** Includes **
70 *******************************************************************************/
71 #include "tle985x.h"
72 #include "types.h"
73 #include "sfr_access.h"
74 
75 /*******************************************************************************
76 ** Global Type Definitions **
77 *******************************************************************************/
81 typedef enum
82 {
85  TIMER2_T2IN_P23 = 2u
87 
91 typedef enum
92 {
107  TIMER2_T2EX_CC6_CH3 = 15u
109 
113 typedef enum
114 {
117  TIMER21_T21IN_P04 = 2u
119 
123 typedef enum
124 {
141 
145 typedef enum
146 {
154  TIMER2x_Clk_Div_128 = 7u
156 
157 /*******************************************************************************
158 ** Global Macro Definitions **
159 *******************************************************************************/
160 #define MIN_TIMER_INTERVAL_US 1u
161 
162 /*******************************************************************************
163 ** Global Function Declarations **
164 *******************************************************************************/
169 void TIMER2_Init(void);
170 
175 void TIMER21_Init(void);
176 
194 bool TIMER2_Interval_Timer_Setup(uint32 timer_interval_us);
195 
213 bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us);
214 
215 /*******************************************************************************
216 ** Inline Function Declarations **
217 *******************************************************************************/
231 
245 
262 
281 
303 
324 
345 INLINE void TIMER2_ExternalCtrl_En(void);
346 
362 
376 
390 
406 
422 
439 INLINE void TIMER2_UpDownCount_En(void);
440 
455 INLINE void TIMER2_UpDownCount_Dis(void);
456 
471 
484 INLINE void TIMER2_Mode_Reload_Set(void);
485 
499 
512 INLINE void TIMER2_Mode_Timer_Set(void);
513 
529 
546 
566 
586 
605 INLINE void TIMER2_Overflow_Int_En(void);
606 
626 
645 INLINE void TIMER2_External_Int_En(void);
646 
666 
680 
694 
711 
730 
752 
773 
795 
811 
825 
839 
853 
867 
884 INLINE void TIMER21_UpDownCount_En(void);
885 
901 
916 
930 
944 
957 INLINE void TIMER21_Mode_Timer_Set(void);
958 
974 
991 
1010 INLINE void TIMER21_Overflow_Int_Clr(void);
1011 
1030 INLINE void TIMER21_External_Int_Clr(void);
1031 
1050 INLINE void TIMER21_Overflow_Int_En(void);
1051 
1070 INLINE void TIMER21_Overflow_Int_Dis(void);
1071 
1090 INLINE void TIMER21_External_Int_En(void);
1091 
1110 INLINE void TIMER21_External_Int_Dis(void);
1111 
1124 INLINE void TIMER2_Start(void);
1125 
1139 INLINE void TIMER2_Stop(void);
1140 
1155 INLINE void TIMER2_ExtStart(void);
1156 
1171 INLINE void TIMER2_ExtStop(void);
1172 
1190 
1208 
1222 INLINE void TIMER2_Clear_Count(void);
1223 
1239 INLINE void TIMER2_Set_Reload(uint16 value);
1240 
1256 
1272 
1285 INLINE void TIMER21_Start(void);
1286 
1300 INLINE void TIMER21_Stop(void);
1301 
1316 INLINE void TIMER21_ExtStart(void);
1317 
1332 INLINE void TIMER21_ExtStop(void);
1333 
1351 
1369 
1383 INLINE void TIMER21_Clear_Count(void);
1384 
1400 INLINE void TIMER21_Set_Reload(uint16 value);
1401 
1417 
1433 
1434 /*******************************************************************************
1435 ** Inline Function Definitions **
1436 *******************************************************************************/
1438 {
1440 }
1441 
1443 {
1445 }
1446 
1448 {
1450 }
1451 
1453 {
1455 }
1456 
1458 {
1460 }
1461 
1463 {
1465 }
1466 
1468 {
1470 }
1471 
1473 {
1475 }
1476 
1478 {
1480 }
1481 
1483 {
1485 }
1486 
1488 {
1490 }
1491 
1493 {
1495 }
1496 
1498 {
1500 }
1501 
1503 {
1505 }
1506 
1508 {
1510 }
1511 
1513 {
1515 }
1516 
1518 {
1520 }
1521 
1523 {
1525 }
1526 
1528 {
1530 }
1531 
1533 {
1535 }
1536 
1538 {
1540 }
1541 
1543 {
1545 }
1546 
1548 {
1550 }
1551 
1553 {
1555 }
1556 
1558 {
1560 }
1561 
1563 {
1565 }
1566 
1568 {
1570 }
1571 
1573 {
1575 }
1576 
1578 {
1580 }
1581 
1583 {
1585 }
1586 
1588 {
1590 }
1591 
1593 {
1595 }
1596 
1598 {
1600 }
1601 
1603 {
1605 }
1606 
1608 {
1610 }
1611 
1613 {
1615 }
1616 
1618 {
1620 }
1621 
1623 {
1625 }
1626 
1628 {
1630 }
1631 
1633 {
1635 }
1636 
1638 {
1640 }
1641 
1643 {
1645 }
1646 
1648 {
1650 }
1651 
1653 {
1655 }
1656 
1658 {
1660 }
1661 
1663 {
1665 }
1666 
1668 {
1670 }
1671 
1673 {
1675 }
1676 
1678 {
1680 }
1681 
1683 {
1685 }
1686 
1688 {
1690 }
1691 
1693 {
1695 }
1696 
1698 {
1700 }
1701 
1703 {
1705 }
1706 
1708 {
1710 }
1711 
1713 {
1715 }
1716 
1718 {
1719  return(u16_Field_Rd32(&TIMER2->CNT.reg, (uint8)0x00, 0xFFFF));
1720 }
1721 
1723 {
1724  return(u16_Field_Rd32(&TIMER2->RC.reg, (uint8)0x00, 0xFFFF));
1725 }
1726 
1728 {
1729  Field_Clr32(&TIMER2->CNT.reg, (uint32)0xFFFF);
1730 }
1731 
1733 {
1734  Field_Wrt32(&TIMER2->RC.reg, (uint8)0x00, 0xFFFF, (uint16)value);
1735 }
1736 
1738 {
1740 }
1741 
1743 {
1744  Field_Mod32(&SCU->MODPISEL2.reg, (uint8)SCU_MODPISEL2_T2EXIS_Pos, SCU_MODPISEL2_T2EXIS_Msk, ((uint32)pinsel & 0x3u));
1745  Field_Mod32(&SCU->MODPISEL2.reg, (uint8)SCU_MODPISEL2_T2EXISCNF_Pos, SCU_MODPISEL2_T2EXISCNF_Msk, (((uint32)pinsel & 0xCu) >> 2u));
1746 }
1747 
1749 {
1751 }
1752 
1754 {
1756 }
1757 
1759 {
1761 }
1762 
1764 {
1766 }
1767 
1769 {
1770  return(u16_Field_Rd32(&TIMER21->CNT.reg, (uint8)0x00, 0xFFFF));
1771 }
1772 
1774 {
1775  return(u16_Field_Rd32(&TIMER21->RC.reg, (uint8)0x00, 0xFFFF));
1776 }
1777 
1779 {
1780  Field_Clr32(&TIMER21->CNT.reg, (uint32)0xFFFF);
1781 }
1782 
1784 {
1785  Field_Wrt32(&TIMER21->RC.reg, (uint8)0x00, 0xFFFF, (uint16)value);
1786 }
1787 
1789 {
1791 }
1792 
1794 {
1795  Field_Mod32(&SCU->MODPISEL2.reg, (uint8)SCU_MODPISEL2_T21EXIS_Pos, SCU_MODPISEL2_T21EXIS_Msk, ((uint32)pinsel & 0x3u));
1796  Field_Mod32(&SCU->MODPISEL2.reg, (uint8)SCU_MODPISEL2_T21EXISCNF_Pos, SCU_MODPISEL2_T21EXISCNF_Msk, (((uint32)pinsel & 0xCu) >> 2u));
1797 }
1798 
1799 #endif
#define TIMER21
Definition: tle985x.h:6282
#define TIMER2
Definition: tle985x.h:6281
#define SCU
Definition: tle985x.h:6277
#define TIMER2_CON1_EXF2EN_Msk
Definition: tle985x.h:10785
#define TIMER2_CON_C_T2_Msk
Definition: tle985x.h:10778
#define SCU_MODPISEL2_T21EXIS_Msk
Definition: tle985x.h:10177
#define TIMER2_CON_CP_RL2_Pos
Definition: tle985x.h:10779
#define TIMER21_ICLR_TF2CLR_Pos
Definition: tle985x.h:10839
#define SCU_MODPISEL2_T2IS_Pos
Definition: tle985x.h:10182
#define TIMER21_ICLR_TF2CLR_Msk
Definition: tle985x.h:10840
#define TIMER21_CON_CP_RL2_Pos
Definition: tle985x.h:10831
#define TIMER2_RC_RCL2_Pos
Definition: tle985x.h:10807
#define TIMER21_CON_EXEN2_Pos
Definition: tle985x.h:10825
#define TIMER21_MOD_T2PRE_Msk
Definition: tle985x.h:10853
#define TIMER21_CNT_T2L_Msk
Definition: tle985x.h:10819
#define TIMER2_MOD_T2PRE_Msk
Definition: tle985x.h:10801
#define TIMER21_MOD_PREN_Pos
Definition: tle985x.h:10850
#define TIMER2_MOD_T2PRE_Pos
Definition: tle985x.h:10800
#define TIMER21_ICLR_EXF2CLR_Msk
Definition: tle985x.h:10842
#define TIMER2_CON_EXF2_Msk
Definition: tle985x.h:10772
#define TIMER21_CON_EXEN2_Msk
Definition: tle985x.h:10826
#define TIMER21_CON_EXF2_Msk
Definition: tle985x.h:10824
#define TIMER2_MOD_EDGESEL_Msk
Definition: tle985x.h:10797
#define TIMER2_MOD_EDGESEL_Pos
Definition: tle985x.h:10796
#define TIMER2_MOD_PREN_Pos
Definition: tle985x.h:10798
#define TIMER2_CON_TR2_Pos
Definition: tle985x.h:10775
#define TIMER21_CON1_TF2EN_Msk
Definition: tle985x.h:10835
#define TIMER21_MOD_T2REGS_Pos
Definition: tle985x.h:10844
#define SCU_MODPISEL2_T21EXISCNF_Pos
Definition: tle985x.h:10172
#define TIMER2_CON_CP_RL2_Msk
Definition: tle985x.h:10780
#define TIMER2_CON_EXEN2_Pos
Definition: tle985x.h:10773
#define TIMER2_ICLR_TF2CLR_Pos
Definition: tle985x.h:10787
#define TIMER2_RC_RCL2_Msk
Definition: tle985x.h:10808
#define TIMER21_CON_TR2_Pos
Definition: tle985x.h:10827
#define TIMER21_CNT_T2L_Pos
Definition: tle985x.h:10818
#define TIMER21_MOD_T2RHEN_Msk
Definition: tle985x.h:10847
#define TIMER21_MOD_T2PRE_Pos
Definition: tle985x.h:10852
#define TIMER2_ICLR_TF2CLR_Msk
Definition: tle985x.h:10788
#define SCU_MODPISEL2_T2EXISCNF_Msk
Definition: tle985x.h:10175
#define TIMER21_RC_RCL2_Msk
Definition: tle985x.h:10860
#define TIMER21_RC_RCL2_Pos
Definition: tle985x.h:10859
#define TIMER21_CON_TF2_Msk
Definition: tle985x.h:10822
#define TIMER21_CNT_T2H_Msk
Definition: tle985x.h:10817
#define TIMER21_MOD_EDGESEL_Pos
Definition: tle985x.h:10848
#define TIMER21_MOD_DCEN_Pos
Definition: tle985x.h:10854
#define TIMER21_CON_TF2_Pos
Definition: tle985x.h:10821
#define TIMER21_MOD_T2RHEN_Pos
Definition: tle985x.h:10846
#define TIMER21_CON_EXF2_Pos
Definition: tle985x.h:10823
#define TIMER21_CON1_TF2EN_Pos
Definition: tle985x.h:10834
#define TIMER21_CON_C_T2_Msk
Definition: tle985x.h:10830
#define TIMER2_CON_TF2_Msk
Definition: tle985x.h:10770
#define TIMER2_CNT_T2L_Pos
Definition: tle985x.h:10766
#define TIMER2_MOD_PREN_Msk
Definition: tle985x.h:10799
#define SCU_MODPISEL2_T2IS_Msk
Definition: tle985x.h:10183
#define TIMER2_MOD_DCEN_Pos
Definition: tle985x.h:10802
#define TIMER21_CON_C_T2_Pos
Definition: tle985x.h:10829
#define TIMER2_MOD_T2REGS_Msk
Definition: tle985x.h:10793
#define SCU_MODPISEL2_T2EXIS_Msk
Definition: tle985x.h:10179
#define TIMER21_CON_TR2_Msk
Definition: tle985x.h:10828
#define SCU_MODPISEL2_T21IS_Pos
Definition: tle985x.h:10180
#define TIMER21_RC_RCH2_Msk
Definition: tle985x.h:10858
#define TIMER2_CON_EXEN2_Msk
Definition: tle985x.h:10774
#define TIMER2_CON1_TF2EN_Pos
Definition: tle985x.h:10782
#define TIMER2_CON_TF2_Pos
Definition: tle985x.h:10769
#define TIMER21_CON_CP_RL2_Msk
Definition: tle985x.h:10832
#define TIMER2_MOD_DCEN_Msk
Definition: tle985x.h:10803
#define SCU_MODPISEL2_T2EXISCNF_Pos
Definition: tle985x.h:10174
#define TIMER21_MOD_PREN_Msk
Definition: tle985x.h:10851
#define TIMER2_CON_C_T2_Pos
Definition: tle985x.h:10777
#define TIMER2_CON1_TF2EN_Msk
Definition: tle985x.h:10783
#define TIMER2_CON_TR2_Msk
Definition: tle985x.h:10776
#define TIMER2_MOD_T2RHEN_Msk
Definition: tle985x.h:10795
#define TIMER21_ICLR_EXF2CLR_Pos
Definition: tle985x.h:10841
#define TIMER2_MOD_T2RHEN_Pos
Definition: tle985x.h:10794
#define SCU_MODPISEL2_T21EXISCNF_Msk
Definition: tle985x.h:10173
#define SCU_MODPISEL2_T21EXIS_Pos
Definition: tle985x.h:10176
#define TIMER21_CON1_EXF2EN_Msk
Definition: tle985x.h:10837
#define SCU_MODPISEL2_T2EXIS_Pos
Definition: tle985x.h:10178
#define TIMER21_MOD_T2REGS_Msk
Definition: tle985x.h:10845
#define TIMER2_ICLR_EXF2CLR_Msk
Definition: tle985x.h:10790
#define TIMER21_MOD_EDGESEL_Msk
Definition: tle985x.h:10849
#define TIMER2_CNT_T2H_Msk
Definition: tle985x.h:10765
#define TIMER2_MOD_T2REGS_Pos
Definition: tle985x.h:10792
#define TIMER2_CON1_EXF2EN_Pos
Definition: tle985x.h:10784
#define TIMER2_CON_EXF2_Pos
Definition: tle985x.h:10771
#define SCU_MODPISEL2_T21IS_Msk
Definition: tle985x.h:10181
#define TIMER21_CON1_EXF2EN_Pos
Definition: tle985x.h:10836
#define TIMER21_MOD_DCEN_Msk
Definition: tle985x.h:10855
#define TIMER2_CNT_T2L_Msk
Definition: tle985x.h:10767
#define TIMER2_ICLR_EXF2CLR_Pos
Definition: tle985x.h:10789
#define TIMER2_RC_RCH2_Msk
Definition: tle985x.h:10806
SFR low level access library.
INLINE uint16 u16_Field_Rd32(const volatile uint32 *reg, uint8 pos, uint32 msk)
This function reads a 16-bit field of a 32-bit register.
Definition: sfr_access.h:448
INLINE uint8 u1_Field_Rd32(const volatile uint32 *reg, uint8 pos, uint32 msk)
This function reads a 1-bit field of a 32-bit register.
Definition: sfr_access.h:423
INLINE void Field_Clr32(volatile uint32 *reg, uint32 msk)
This function clears a bit field in a 32-bit register.
Definition: sfr_access.h:408
INLINE void Field_Wrt32(volatile uint32 *reg, uint8 pos, uint32 msk, uint32 val)
This function writes a bit field in a 32-bit register.
Definition: sfr_access.h:358
INLINE uint8 u8_Field_Rd32(const volatile uint32 *reg, uint8 pos, uint32 msk)
This function reads a 8-bit field of a 32-bit register.
Definition: sfr_access.h:438
INLINE void Field_Mod32(volatile uint32 *reg, uint8 pos, uint32 msk, uint32 val)
This function writes a bit field in a 32-bit register.
Definition: sfr_access.h:378
INLINE void TIMER21_External_Int_Dis(void)
Disables TIMER21 External Interrupt.
Definition: timer2x.h:1692
INLINE void TIMER2_Clear_Count(void)
Clears the TIMER2 count value.
Definition: timer2x.h:1727
INLINE void TIMER21_Value_Set(uint16 t21)
Sets TIMER21 Value.
Definition: timer2x.h:1657
INLINE void TIMER21_ExtStart_FallingEdge_Set(void)
Sets Falling Edge to External Start for TIMER21.
Definition: timer2x.h:1622
INLINE void TIMER2_Mode_Timer_Set(void)
Selects Mode Timer for TIMER2.
Definition: timer2x.h:1522
void TIMER2_Init(void)
Initializes the Timer2 module.
INLINE void TIMER21_Mode_Capture_Set(void)
Selects Capture Mode for TIMER21.
Definition: timer2x.h:1637
INLINE void TIMER21_Clk_Prescaler_En(void)
Enables TIMER21 clock prescaler.
Definition: timer2x.h:1567
INLINE void TIMER21_External_Int_Clr(void)
Clears TIMER21 External Interrupt.
Definition: timer2x.h:1672
INLINE void TIMER2_Clk_Prescaler_En(void)
Enables TIMER2 clock prescaler.
Definition: timer2x.h:1437
INLINE void TIMER2_ExtStart_FallingEdge_Set(void)
Sets Falling Edge to External Start for TIMER2.
Definition: timer2x.h:1492
INLINE void TIMER21_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER21.
Definition: timer2x.h:1632
INLINE void TIMER2_Overflow_Int_Dis(void)
Disables TIMER2 Overflow Interrupt.
Definition: timer2x.h:1552
TTIMER2_T2IN_Pxx
This enum lists the T2IN Inputs.
Definition: timer2x.h:82
@ TIMER2_T2IN_P23
Definition: timer2x.h:85
@ TIMER2_T2IN_P00
Definition: timer2x.h:83
@ TIMER2_T2IN_P27
Definition: timer2x.h:84
INLINE void TIMER2_UpDownCount_Dis(void)
Disables Up/Down Counter for TIMER2.
Definition: timer2x.h:1502
INLINE void TIMER21_Select_T21IN(TTIMER21_T21IN_Pxx pinsel)
Sets TIMER21 T21IN Pin.
Definition: timer2x.h:1788
INLINE void TIMER21_External_Int_En(void)
Enables TIMER21 External Interrupt.
Definition: timer2x.h:1687
INLINE void TIMER2_Clk_Prescaler_Sel(uint8 t2pre)
Sets TIMER2 clock prescaler.
Definition: timer2x.h:1447
INLINE uint8 TIMER21_Clk_Prescaler_Get(void)
Reads TIMER21 clock prescaler.
Definition: timer2x.h:1582
INLINE void TIMER2_Stop(void)
Stops the TIMER2 by software.
Definition: timer2x.h:1702
INLINE void TIMER2_Reload_Capture_RisingEdge_Set(void)
Sets Rising Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:1477
INLINE void TIMER21_Clear_Count(void)
Clears the TIMER21 count value.
Definition: timer2x.h:1778
INLINE void TIMER2_Reload_Value_Set(uint16 t2)
Sets TIMER2 Reload Value.
Definition: timer2x.h:1532
INLINE void TIMER21_Start(void)
Starts the TIMER21 by software.
Definition: timer2x.h:1748
INLINE void TIMER2_ExternalCtrl_Dis(void)
Disables TIMER2 External Control.
Definition: timer2x.h:1472
INLINE uint16 TIMER21_Get_Count(void)
Reads the TIMER21 count value.
Definition: timer2x.h:1768
INLINE void TIMER2_ExtStart_RisingEdge_Set(void)
Sets Rising Edge to External Start for TIMER2.
Definition: timer2x.h:1487
INLINE void TIMER2_Set_Reload(uint16 value)
Sets TIMER2 reload value.
Definition: timer2x.h:1732
INLINE void TIMER2_ExternalCtrl_En(void)
Enables TIMER2 External Control.
Definition: timer2x.h:1467
INLINE uint8 TIMER2_External_Sts(void)
Reads TIMER2 External Status.
Definition: timer2x.h:1462
bool TIMER21_Interval_Timer_Setup(uint32 timer_interval_us)
Initializes the TIMER21 in Reload Mode.
INLINE uint8 TIMER21_Overflow_Sts(void)
Reads TIMER21 Overflow Status.
Definition: timer2x.h:1587
INLINE void TIMER21_Reload_Capture_RisingEdge_Set(void)
Sets Rising Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:1607
INLINE void TIMER21_ExtStop(void)
Disables TIMER21 to be started externally.
Definition: timer2x.h:1763
void TIMER21_Init(void)
Initializes the Timer21 module.
INLINE void TIMER2_External_Int_En(void)
Enables TIMER2 External Interrupt.
Definition: timer2x.h:1557
INLINE uint16 TIMER21_Get_Capture(void)
Reads the TIMER21 capture value.
Definition: timer2x.h:1773
INLINE void TIMER21_Clk_Prescaler_Sel(uint8 t21pre)
Sets TIMER21 clock prescaler.
Definition: timer2x.h:1577
INLINE void TIMER2_Clk_Prescaler_Dis(void)
Disables TIMER2 clock prescaler.
Definition: timer2x.h:1442
INLINE void TIMER2_ExtStop(void)
Disables TIMER2 to be started externally.
Definition: timer2x.h:1712
INLINE void TIMER21_Select_T21EX(TTIMER21_T21EX_Pxx pinsel)
Sets TIMER21 T21EX Pin.
Definition: timer2x.h:1793
INLINE uint16 TIMER2_Get_Capture(void)
Reads the TIMER2 capture value.
Definition: timer2x.h:1722
INLINE void TIMER2_External_Int_Clr(void)
Clears TIMER2 External Interrupt flag.
Definition: timer2x.h:1542
INLINE void TIMER21_ExternalCtrl_En(void)
Enables TIMER21 External Control.
Definition: timer2x.h:1597
INLINE uint8 TIMER2_Clk_Prescaler_Get(void)
Reads TIMER2 clock prescaler.
Definition: timer2x.h:1452
INLINE uint16 TIMER2_Get_Count(void)
Reads the TIMER2 count value.
Definition: timer2x.h:1717
INLINE void TIMER2_Value_Set(uint16 t2)
Sets TIMER2 Value.
Definition: timer2x.h:1527
INLINE void TIMER2_Start(void)
Starts the TIMER2 by software.
Definition: timer2x.h:1697
INLINE void TIMER2_Select_T2EX(TTIMER2_T2EX_Pxx pinsel)
Sets TIMER2 T2EX Pin.
Definition: timer2x.h:1742
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:1737
INLINE void TIMER21_ExternalCtrl_Dis(void)
Disables TIMER21 External Control.
Definition: timer2x.h:1602
INLINE void TIMER21_Mode_Counter_Set(void)
Selects Mode Counter for TIMER21.
Definition: timer2x.h:1647
INLINE void TIMER2_Mode_Counter_Set(void)
Selects Mode Counter for TIMER2.
Definition: timer2x.h:1517
INLINE void TIMER2_Mode_Capture_Set(void)
Selects Capture Mode for TIMER2.
Definition: timer2x.h:1507
TTIMER21_T21EX_Pxx
This enum lists the T21EX Inputs.
Definition: timer2x.h:124
@ TIMER21_T21EX_MON2
Definition: timer2x.h:130
@ TIMER21_T21EX_P11
Definition: timer2x.h:128
@ TIMER21_T21EX_CC6_COUT63
Definition: timer2x.h:139
@ TIMER21_T21EX_CC6_COUT60
Definition: timer2x.h:136
@ TIMER21_T21EX_P05
Definition: timer2x.h:127
@ TIMER21_T21EX_MON1
Definition: timer2x.h:129
@ TIMER21_T21EX_P02
Definition: timer2x.h:125
@ TIMER21_T21EX_CC6_COUT62
Definition: timer2x.h:138
@ TIMER21_T21EX_P14
Definition: timer2x.h:126
@ TIMER21_T21EX_CC6_COUT61
Definition: timer2x.h:137
@ TIMER21_T21EX_lin_rxd
Definition: timer2x.h:133
@ TIMER21_T21EX_CC6_CH1
Definition: timer2x.h:135
@ TIMER21_T21EX_CC6_CH0
Definition: timer2x.h:134
@ TIMER21_T21EX_MON4
Definition: timer2x.h:132
@ TIMER21_T21EX_MON3
Definition: timer2x.h:131
TTIMER2_T2EX_Pxx
This enum lists the T2EX Inputs.
Definition: timer2x.h:92
@ TIMER2_T2EX_MON1
Definition: timer2x.h:97
@ TIMER2_T2EX_CC6_COUT61
Definition: timer2x.h:103
@ TIMER2_T2EX_MON4
Definition: timer2x.h:100
@ TIMER2_T2EX_CC6_CH2
Definition: timer2x.h:106
@ TIMER2_T2EX_P21
Definition: timer2x.h:96
@ TIMER2_T2EX_CC6_CH0
Definition: timer2x.h:104
@ TIMER2_T2EX_P22
Definition: timer2x.h:93
@ TIMER2_T2EX_CC6_CH1
Definition: timer2x.h:105
@ TIMER2_T2EX_lin_rxd
Definition: timer2x.h:101
@ TIMER2_T2EX_P01
Definition: timer2x.h:94
@ TIMER2_T2EX_CC6_CH3
Definition: timer2x.h:107
@ TIMER2_T2EX_MON2
Definition: timer2x.h:98
@ TIMER2_T2EX_MON3
Definition: timer2x.h:99
@ TIMER2_T2EX_CC6_COUT60
Definition: timer2x.h:102
@ TIMER2_T2EX_P23
Definition: timer2x.h:95
INLINE void TIMER21_UpDownCount_En(void)
Enables Up/Down Counter for TIMER21.
Definition: timer2x.h:1627
INLINE uint8 TIMER21_External_Sts(void)
Reads TIMER21 External Status.
Definition: timer2x.h:1592
INLINE void TIMER2_Overflow_Int_Clr(void)
Clears TIMER2 Overflow Interrupt flag.
Definition: timer2x.h:1537
INLINE void TIMER21_ExtStart_RisingEdge_Set(void)
Sets Rising Edge to External Start for TIMER21.
Definition: timer2x.h:1617
INLINE void TIMER2_Overflow_Int_En(void)
Enables TIMER2 Overflow Interrupt.
Definition: timer2x.h:1547
INLINE void TIMER21_Clk_Prescaler_Dis(void)
Disables TIMER21 clock prescaler.
Definition: timer2x.h:1572
INLINE void TIMER21_Set_Reload(uint16 value)
Sets TIMER21 reload value.
Definition: timer2x.h:1783
TIMER2x_Clock_Prescaler
This enum lists TIMER2x Clock Prescaler Configuration.
Definition: timer2x.h:146
@ TIMER2x_Clk_Div_2
Definition: timer2x.h:148
@ TIMER2x_Clk_Div_64
Definition: timer2x.h:153
@ TIMER2x_Clk_Div_32
Definition: timer2x.h:152
@ TIMER2x_Clk_Div_128
Definition: timer2x.h:154
@ TIMER2x_Clk_Div_16
Definition: timer2x.h:151
@ TIMER2x_Clk_Div_8
Definition: timer2x.h:150
@ TIMER2x_Clk_Div_4
Definition: timer2x.h:149
@ TIMER2x_Clk_Div_1
Definition: timer2x.h:147
INLINE void TIMER21_Overflow_Int_Clr(void)
Clears TIMER21 Overflow Interrupt.
Definition: timer2x.h:1667
TTIMER21_T21IN_Pxx
This enum lists the T21IN Inputs.
Definition: timer2x.h:114
@ TIMER21_T21IN_P04
Definition: timer2x.h:117
@ TIMER21_T21IN_P01
Definition: timer2x.h:115
@ TIMER21_T21IN_P12
Definition: timer2x.h:116
INLINE void TIMER21_Overflow_Int_En(void)
Enables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1677
INLINE void TIMER2_ExtStart(void)
Prepares TIMER2 to be started externally.
Definition: timer2x.h:1707
INLINE void TIMER21_ExtStart(void)
Prepares TIMER21 to be started externally.
Definition: timer2x.h:1758
INLINE void TIMER2_Mode_Reload_Set(void)
Selects Reload Mode for TIMER2.
Definition: timer2x.h:1512
INLINE void TIMER2_External_Int_Dis(void)
Disables TIMER2 External Interrupt.
Definition: timer2x.h:1562
INLINE void TIMER21_Mode_Timer_Set(void)
Selects Mode Timer for TIMER21.
Definition: timer2x.h:1652
INLINE uint8 TIMER2_Overflow_Sts(void)
Reads TIMER2 Overflow Status.
Definition: timer2x.h:1457
INLINE void TIMER21_Reload_Value_Set(uint16 t21)
Sets TIMER21 Reload Value.
Definition: timer2x.h:1662
INLINE void TIMER21_Overflow_Int_Dis(void)
Disables TIMER21 Overflow Interrupt.
Definition: timer2x.h:1682
INLINE void TIMER2_UpDownCount_En(void)
Enables Up/Down Counter for TIMER2.
Definition: timer2x.h:1497
INLINE void TIMER21_Mode_Reload_Set(void)
Selects Reload Mode for TIMER21.
Definition: timer2x.h:1642
INLINE void TIMER21_Reload_Capture_FallingEdge_Set(void)
Sets Falling Edge to Capture/Reload Mode for TIMER21.
Definition: timer2x.h:1612
INLINE void TIMER2_Reload_Capture_FallingEdge_Set(void)
Sets Falling Edge to Capture/Reload Mode for TIMER2.
Definition: timer2x.h:1482
INLINE void TIMER21_Stop(void)
Stops the TIMER21 by software.
Definition: timer2x.h:1753
CMSIS register HeaderFile.
General type declarations.
#define INLINE
Definition: types.h:145
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