Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
mon.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  **********************************************************************************************************************/
39 /*******************************************************************************
40 ** Author(s) Identity **
41 ********************************************************************************
42 ** Initials Name **
43 ** ---------------------------------------------------------------------------**
44 ** DM Daniel Mysliwitz **
45 ** BG Blandine Guillot **
46 ** JO Julia Ott **
47 *******************************************************************************/
48 
49 /*******************************************************************************
50 ** Revision Control History **
51 ********************************************************************************
52 ** V0.1.0: 2019-10-28, DM: Initial version **
53 ** V0.2.0: 2020-04-28, BG: Updated revision history format **
54 ** V0.3.0: 2020-09-16, DM: MON_en/disMONx() renamed to MON_en/disMONxInt() **
55 ** V0.3.1: 2020-10-06, BG: EP-492: Removed MISRA 2012 errors **
56 ** V0.3.2: 2020-11-12, JO: EP-590: Removed \param none and \return none to **
57 ** avoid doxygen warning **
58 ** V0.3.3: 2021-07-30, BG: EP-877: Updated return type for MON_init to void **
59 ** V0.3.4: 2021-11-12, JO: EP-937: Updated copyright and branding **
60 *******************************************************************************/
61 
62 #ifndef _MON_H
63 #define _MON_H
64 
65 /*******************************************************************************
66 ** Includes **
67 *******************************************************************************/
68 
69 #include "types.h"
70 #include "tle989x.h"
71 #include "tle_variants.h"
72 #include "pmu_defines.h"
73 
74 /*******************************************************************************
75 ** Global Constant Declarations **
76 *******************************************************************************/
77 
78 /*******************************************************************************
79 ** Global Type Declarations **
80 *******************************************************************************/
81 
82 /*******************************************************************************
83 ** Global Macro Declarations **
84 *******************************************************************************/
85 
86 /*******************************************************************************
87 ** Global Function Declarations **
88 *******************************************************************************/
89 
90 void MON_init(void);
91 INLINE void MON_enMON1Int(void);
92 INLINE void MON_disMON1Int(void);
93 INLINE void MON_enMON2Int(void);
94 INLINE void MON_disMON2Int(void);
95 INLINE void MON_enMON3Int(void);
96 INLINE void MON_disMON3Int(void);
103 INLINE void MON_clrMON1RiseIntSts(void);
104 INLINE void MON_clrMON1FallIntSts(void);
105 INLINE void MON_clrMON2RiseIntSts(void);
106 INLINE void MON_clrMON2FallIntSts(void);
107 INLINE void MON_clrMON3RiseIntSts(void);
108 INLINE void MON_clrMON3FallIntSts(void);
109 
110 /*******************************************************************************
111 ** Deprecated Function Declarations **
112 *******************************************************************************/
113 
117 void MON_setMON1IntNodePtr(void) __attribute__((deprecated("Do not change this at runtime, use the ConfigWizard to configure this feature!")));
118 
122 void MON_setMON2IntNodePtr(void) __attribute__((deprecated("Do not change this at runtime, use the ConfigWizard to configure this feature!")));
123 
127 void MON_setMON3IntNodePtr(void) __attribute__((deprecated("Do not change this at runtime, use the ConfigWizard to configure this feature!")));
128 
129 /*******************************************************************************
130 ** Global Inline Function Definitions **
131 *******************************************************************************/
132 
136 {
137  SCU->MONIEN.bit.MON1EN = 1u;
138 }
139 
143 {
144  SCU->MONIEN.bit.MON1EN = 0u;
145 }
146 
150 {
151  SCU->MONIEN.bit.MON2EN = 1u;
152 }
153 
157 {
158  SCU->MONIEN.bit.MON2EN = 0u;
159 }
160 
164 {
165  SCU->MONIEN.bit.MON3EN = 1u;
166 }
167 
171 {
172  SCU->MONIEN.bit.MON3EN = 0u;
173 }
174 
180 {
181  return SCU->MONIS.bit.MON1R;
182 }
183 
189 {
190  return SCU->MONIS.bit.MON1F;
191 }
192 
198 {
199  return SCU->MONIS.bit.MON2R;
200 }
201 
207 {
208  return SCU->MONIS.bit.MON2F;
209 }
210 
216 {
217  return SCU->MONIS.bit.MON3R;
218 }
219 
225 {
226  return SCU->MONIS.bit.MON3F;
227 }
228 
232 {
233  SCU->MONISC.bit.MON1RCLR = 1u;
234 }
235 
239 {
240  SCU->MONISC.bit.MON1FCLR = 1u;
241 }
242 
246 {
247  SCU->MONISC.bit.MON2RCLR = 1u;
248 }
249 
253 {
254  SCU->MONISC.bit.MON2FCLR = 1u;
255 }
256 
260 {
261  SCU->MONISC.bit.MON3RCLR = 1u;
262 }
263 
267 {
268  SCU->MONISC.bit.MON3FCLR = 1u;
269 }
270 
271 #endif /* _MON_H */
#define SCU
Definition: tle989x.h:24075
void MON_setMON3IntNodePtr(void) __attribute__((deprecated("Do not change this at runtime
Set MON3 Interrupt Node Pointer.
INLINE void MON_clrMON1FallIntSts(void)
Clear MON1 Falling Edge Interrupt Status.
Definition: mon.h:238
INLINE void MON_enMON2Int(void)
Enable MON2 Interrupt.
Definition: mon.h:149
void MON_init(void)
Initialize all CW registers of the MON module.
Definition: mon.c:58
INLINE void MON_disMON2Int(void)
Disable MON2 Interrupt.
Definition: mon.h:156
INLINE void MON_clrMON3RiseIntSts(void)
Clear MON3 Rising Edge Interrupt Status.
Definition: mon.h:259
INLINE uint8 MON_getMON2RiseIntSts(void)
Get MON2 Rising Edge Interrupt Status.
Definition: mon.h:197
INLINE uint8 MON_getMON3RiseIntSts(void)
Get MON3 Rising Edge Interrupt Status.
Definition: mon.h:215
INLINE void MON_clrMON2RiseIntSts(void)
Clear MON2 Rising Edge Interrupt Status.
Definition: mon.h:245
INLINE void MON_disMON1Int(void)
Disable MON1 Interrupt.
Definition: mon.h:142
INLINE uint8 MON_getMON3FallIntSts(void)
Get MON3 Falling Edge Interrupt Status.
Definition: mon.h:224
INLINE uint8 MON_getMON2FallIntSts(void)
Get MON2 Falling Edge Interrupt Status.
Definition: mon.h:206
void MON_setMON1IntNodePtr(void) __attribute__((deprecated("Do not change this at runtime
Set MON1 Interrupt Node Pointer.
INLINE uint8 MON_getMON1RiseIntSts(void)
Get MON1 Rising Edge Interrupt Status.
Definition: mon.h:179
INLINE void MON_clrMON1RiseIntSts(void)
Clear MON1 Rising Edge Interrupt Status.
Definition: mon.h:231
INLINE void MON_clrMON2FallIntSts(void)
Clear MON2 Falling Edge Interrupt Status.
Definition: mon.h:252
INLINE void MON_enMON1Int(void)
Enable MON1 Interrupt.
Definition: mon.h:135
INLINE uint8 MON_getMON1FallIntSts(void)
Get MON1 Falling Edge Interrupt Status.
Definition: mon.h:188
void MON_setMON2IntNodePtr(void) __attribute__((deprecated("Do not change this at runtime
Set MON2 Interrupt Node Pointer.
INLINE void MON_disMON3Int(void)
Disable MON3 Interrupt.
Definition: mon.h:170
INLINE void MON_enMON3Int(void)
Enable MON3 Interrupt.
Definition: mon.h:163
INLINE void MON_clrMON3FallIntSts(void)
Clear MON3 Falling Edge Interrupt Status.
Definition: mon.h:266
__attribute__((noreturn))
Definition: startup_tle989x.c:208
Device specific memory layout defines and features.
General type declarations.
#define INLINE
Definition: types.h:167
uint8_t uint8
8 bit unsigned value
Definition: types.h:220