iLLD_TC27xC  1.0
IfxCcu6.h
Go to the documentation of this file.
1 /**
2  * \file IfxCcu6.h
3  * \brief CCU6 basic functionality
4  * \ingroup IfxLld_Ccu6
5  *
6  * \version iLLD_0_1_0_10
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  *
25  * \defgroup IfxLld_Ccu6 CCU6
26  * \ingroup IfxLld
27  * \defgroup IfxLld_Ccu6_Std Standard Driver
28  * \ingroup IfxLld_Ccu6
29  * \defgroup IfxLld_Ccu6_Std_Enum Enumerations
30  * \ingroup IfxLld_Ccu6_Std
31  * \defgroup IfxLld_Ccu6_Std_Operative Operative Functions
32  * \ingroup IfxLld_Ccu6_Std
33  * \defgroup IfxLld_Ccu6_Std_Utility Utility Functions
34  * \ingroup IfxLld_Ccu6_Std
35  * \defgroup IfxLld_Ccu6_Std_Configuration Configuration Functions
36  * \ingroup IfxLld_Ccu6_Std
37  * \defgroup IfxLld_Ccu6_Std_IO IO Pin Configuration Functions
38  * \ingroup IfxLld_Ccu6_Std
39  */
40 
41 #ifndef IFXCCU6_H
42 #define IFXCCU6_H 1
43 
44 /******************************************************************************/
45 /*----------------------------------Includes----------------------------------*/
46 /******************************************************************************/
47 
48 #include "_Impl/IfxCcu6_cfg.h"
49 #include "_PinMap/IfxCcu6_PinMap.h"
50 
51 /******************************************************************************/
52 /*--------------------------------Enumerations--------------------------------*/
53 /******************************************************************************/
54 
55 /** \addtogroup IfxLld_Ccu6_Std_Enum
56  * \{ */
57 /** \brief Input selection, ( CC6x capture input / CTRAP input / CCPOSx input / T1xHR input. )\n
58  * Definition in Ifx_CCU.PISEL0 and Ifx_CCU.PISEL2
59  */
60 typedef enum
61 {
62  IfxCcu6_CaptureCompareInput_cC60 = 0, /**< \brief CC60 capture input */
63  IfxCcu6_CaptureCompareInput_cC61 = 1, /**< \brief CC61 capture input */
64  IfxCcu6_CaptureCompareInput_cC62 = 2, /**< \brief CC62 capture input */
65  IfxCcu6_CaptureCompareInput_cTRAP = 3, /**< \brief CTRAP input */
66  IfxCcu6_CaptureCompareInput_cCPOS0 = 4, /**< \brief CCPOS0 input */
67  IfxCcu6_CaptureCompareInput_cCPOS1 = 5, /**< \brief CCPOS1 input */
68  IfxCcu6_CaptureCompareInput_cCPOS2 = 6 /**< \brief CCPOS2 input */
70 
71 /** \brief Selection of actual input signal for the capture compare inputs
72  */
73 typedef enum
74 {
75  IfxCcu6_CaptureCompareInputSignal_a = 0, /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
76  IfxCcu6_CaptureCompareInputSignal_b = 1, /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
77  IfxCcu6_CaptureCompareInputSignal_c = 2, /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
78  IfxCcu6_CaptureCompareInputSignal_d = 3 /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
80 
81 /** \brief capture/compare state to set / clear the CC6xST-bits
82  */
83 typedef enum
84 {
85  IfxCcu6_CaptureCompareState_set = 0, /**< \brief Bit CC6xST is set */
86  IfxCcu6_CaptureCompareState_clear = 1, /**< \brief Bit CC6xST is cleared */
87  IfxCcu6_CaptureCompareState_toggle = 2 /**< \brief Bit CC6xST is toggled */
89 
90 /** \brief Capture compare output pins
91  */
92 typedef enum
93 {
94  IfxCcu6_ChannelOut_cc0 = 0, /**< \brief CC60 compare output CC0 */
95  IfxCcu6_ChannelOut_cout0 = 1, /**< \brief CC60 compare output COUT0 */
96  IfxCcu6_ChannelOut_cc1 = 2, /**< \brief CC61 compare output CC1 */
97  IfxCcu6_ChannelOut_cout1 = 3, /**< \brief CC61 compare output COUT1 */
98  IfxCcu6_ChannelOut_cc2 = 4, /**< \brief CC62 compare output CC2 */
99  IfxCcu6_ChannelOut_cout2 = 5, /**< \brief CC62 compare output COUT2 */
100  IfxCcu6_ChannelOut_cout3 = 6 /**< \brief CC63 compare output COUT3 */
102 
103 /** \brief Defines the input event leading to a counting action of the timer (T12 / T13)\n
104  * Definition in Ifx_CCU.PISEL2.B.ISCNT12 / Ifx_CCU.PISEL2.B.ISCNT13
105  */
106 typedef enum
107 {
108  IfxCcu6_CountingInputMode_internal = 0, /**< \brief The T1x prescaler generates the counting events,
109  * Bit TCTR4.T1xCNT is not taken into account. */
110  IfxCcu6_CountingInputMode_manual = 1, /**< \brief Bit TCTR4.T1xCNT written with 1 is a counting
111  * event. The T1x prescaler is not taken into account */
112  IfxCcu6_CountingInputMode_externalRising = 2, /**< \brief The timer T1x is counting each rising edge
113  * detected in the selected T1xHR signal */
114  IfxCcu6_CountingInputMode_externalFalling = 3 /**< \brief The timer T1x is counting each falling edge
115  * detected in the selected T1xHR signal */
117 
118 /** \brief Controls whether the source signal for the sampling of the Hall input pattern (selected by HSYNC) is delayed by the Dead-Time Counter 0\n
119  * Definition in Ifx_CCU.T12MSEL.B.DBYP
120  */
121 typedef enum
122 {
123  IfxCcu6_DelayBypass_notActive = 0, /**< \brief Dead-Time Counter 0 is generating a delay after
124  * the source signal becomes active */
125  IfxCcu6_DelayBypass_active = 1 /**< \brief Dead-Time Counter 0 is not used for a delay */
127 
128 /** \brief Defines the event of signal T1xHR that can set the run bit T1xR by HW\n
129  * Definition in Ifx_CCU.TCTR2.B.T12RSEL / IIfx_CCU.TCTR2.B.T13RSEL
130  */
131 typedef enum
132 {
133  IfxCcu6_ExternalTriggerMode_disable = 0, /**< \brief The external setting of T1xR is disabled */
134  IfxCcu6_ExternalTriggerMode_risingEdge = 1, /**< \brief Bit T1xR is set if a rising edge of signal T1xHR is
135  * detected. */
136  IfxCcu6_ExternalTriggerMode_fallingEdge = 2, /**< \brief Bit T1xR is set if a falling edge of signal T1xHR is
137  * detected. */
138  IfxCcu6_ExternalTriggerMode_anyEdge = 3 /**< \brief Bit T1xR is set if an edge of signal T1xHR is
139  * detected */
141 
142 /** \brief Defines the source for the sampling of the Hall input pattern and the comparison to the current and the expected Hall pattern bit fields\n
143  * Definition in Ifx_CCU.T12MSEL.HSYNC
144  */
145 typedef enum
146 {
147  IfxCcu6_HallSensorTriggerMode_permanentCheck = 0, /**< \brief Any edge at any of the inputs CCPOSx, independent from any PWM
148  * signal */
149  IfxCcu6_HallSensorTriggerMode_cM63 = 1, /**< \brief A T13 Compare-Match */
150  IfxCcu6_HallSensorTriggerMode_t13PM = 2, /**< \brief A T13 Period-Match */
151  IfxCcu6_HallSensorTriggerMode_off = 3, /**< \brief Hall sampling triggered by HW sources is switched off */
152  IfxCcu6_HallSensorTriggerMode_t12PMCountingUp = 4, /**< \brief A T12 Period-Match while counting up (T12_PM and CDIR = 0) */
153  IfxCcu6_HallSensorTriggerMode_t12OMCountingDown = 5, /**< \brief A T12 One-Match while counting down (T12_PM and CDIR = 1) */
154  IfxCcu6_HallSensorTriggerMode_cM61CountingUp = 6, /**< \brief A T12 Compare-Match of compare channel CC61 while counting up (CM_61 and CDIR = 0) */
155  IfxCcu6_HallSensorTriggerMode_cM61CountingDown = 7 /**< \brief A T12 Compare-Match of compare channel CC61 while counting down (CM_61 and CDIR = 1) */
157 
158 /** \brief Interrupt source selection
159  * Description in Ifx_CCU.IEN
160  */
161 typedef enum
162 {
163  IfxCcu6_InterruptSource_cc60RisingEdge = 0, /**< \brief Capture compare match rising edge interrupt
164  * enable for channel CC60 */
165  IfxCcu6_InterruptSource_cc60FallingEdge = 1, /**< \brief Capture compare match falling edge interrupt
166  * enable for channel CC60 */
167  IfxCcu6_InterruptSource_cc61RisingEdge = 2, /**< \brief Capture compare match rising edge interrupt
168  * enable for channel CC61 */
169  IfxCcu6_InterruptSource_cc61FallingEdge = 3, /**< \brief Capture compare match falling edge interrupt
170  * enable for channel CC61 */
171  IfxCcu6_InterruptSource_cc62RisingEdge = 4, /**< \brief Capture compare match rising edge interrupt
172  * enable for channel CC62 */
173  IfxCcu6_InterruptSource_cc62FallingEdge = 5, /**< \brief Capture compare match falling edge interrupt
174  * enable for channel CC62 */
175  IfxCcu6_InterruptSource_t12OneMatch = 6, /**< \brief Interrupt enable for T12 one-match */
176  IfxCcu6_InterruptSource_t12PeriodMatch = 7, /**< \brief Interrupt enable for T12 period-match */
177  IfxCcu6_InterruptSource_t13CompareMatch = 8, /**< \brief Interrupt enable for T13 compare-match */
178  IfxCcu6_InterruptSource_t13PeriodMatch = 9, /**< \brief Interrupt enable for T13 period-match */
179  IfxCcu6_InterruptSource_trap = 10, /**< \brief Interrupt enable for trap flag */
180  IfxCcu6_InterruptSource_correctHallEvent = 12, /**< \brief Interrupt enable for correct hall event */
181  IfxCcu6_InterruptSource_wrongHallEvent = 13 /**< \brief Interrupt enable for wrong hall event */
183 
184 /** \brief Selection of the trigger request source (next multi-channel event) for the shadow transfer MCM_ST from MCMPS to MCMP\n
185  * Definition in Ifx_CCU.MCMCTR.B.SWSEL
186  */
187 typedef enum
188 {
189  IfxCcu6_MultiChannelSwitchingSelect_noEvent = 0, /**< \brief No trigger request will be generated */
190  IfxCcu6_MultiChannelSwitchingSelect_correctHallEvent = 1, /**< \brief Correct Hall pattern detected (CM_CHE) */
191  IfxCcu6_MultiChannelSwitchingSelect_t13PeriodMatch = 2, /**< \brief T13 period-match detected (while counting up) */
192  IfxCcu6_MultiChannelSwitchingSelect_t12OneMatch = 3, /**< \brief T12 one-match (while counting down) */
193  IfxCcu6_MultiChannelSwitchingSelect_t12Channel1CompareMatch = 4, /**< \brief T12 channel 1 compare-match detected (phase
194  * delay function) */
195  IfxCcu6_MultiChannelSwitchingSelect_t12PeriodMatch = 5 /**< \brief T12 period match detected (while counting up) */
197 
198 /** \brief Selection of the synchronization mechanism for the shadow transfer event MCM_ST\n
199  * Definition in Ifx_CCU.MCMCTR.B.SWSYN
200  */
201 typedef enum
202 {
203  IfxCcu6_MultiChannelSwitchingSync_direct = 0, /**< \brief Direct, the trigger event immediately leads to the
204  * shadow transfer */
205  IfxCcu6_MultiChannelSwitchingSync_t13ZeroMatch = 1, /**< \brief A T13 zero-match triggers the shadow transfer */
206  IfxCcu6_MultiChannelSwitchingSync_t12ZeroMatch = 2 /**< \brief A T12 zero-match (while counting up) triggers the
207  * shadow transfer */
209 
210 /** \brief Selection of service request outputs
211  */
212 typedef enum
213 {
214  IfxCcu6_ServiceRequest_sR0 = 0, /**< \brief Service request output SR0 */
215  IfxCcu6_ServiceRequest_sR1, /**< \brief Service request output SR1 */
216  IfxCcu6_ServiceRequest_sR2, /**< \brief Service request output SR2 */
217  IfxCcu6_ServiceRequest_sR3, /**< \brief Service request output SR3 */
219 
220 /** \brief Capture compare channel of Timer12
221  */
222 typedef enum
223 {
224  IfxCcu6_T12Channel_0 = 0, /**< \brief T12 channel CC60 */
225  IfxCcu6_T12Channel_1, /**< \brief T12 channel CC61 */
226  IfxCcu6_T12Channel_2, /**< \brief T12 channel CC62 */
228 
229 /** \brief The operating mode for the T12 channels are defined by the bit fields Ifx_CCU.T12MSEL.MSEL6x.
230  */
231 typedef enum
232 {
233  IfxCcu6_T12ChannelMode_off = 0, /**< \brief Capture/Compare modes switched off */
234  IfxCcu6_T12ChannelMode_compareMode = 1, /**< \brief Compare mode */
235  IfxCcu6_T12ChannelMode_doubleRegisterCaptureRisingAndFalling = 4, /**< \brief CC6xIN rising edge: T12 stored in CC6xR, falling edge: T12 stored in CC6xSR */
236  IfxCcu6_T12ChannelMode_doubleRegisterCaptureRising = 5, /**< \brief CC6xIN rising edge: CC6nSR stored in CC6xR, falling edge: T12 stored in CC6xSR */
237  IfxCcu6_T12ChannelMode_doubleRegisterCaptureFalling = 6, /**< \brief CC6xIN rising edge: CC6nSR stored in CC6xR, falling edge: T12 stored in CC6xSR */
238  IfxCcu6_T12ChannelMode_doubleRegisterCaptureAny = 7, /**< \brief CC6xIN any active edge: CC6nSR stored in CC6xR, any active edge: T12 stored in CC6xSR */
239  IfxCcu6_T12ChannelMode_hallSensor = 8, /**< \brief Hall Sensor Mode, In order to properly enable this mode, all three MSEL6x fields have to be
240  * programmed to Hall Sensor mode */
241  IfxCcu6_T12ChannelMode_hysteresisLikecompare = 9, /**< \brief Hysteresis-like compare mode */
242  IfxCcu6_T12ChannelMode_multiInputCaptureRisingAndFalling = 10, /**< \brief CC6xIN rising edge: T12 stored in CC6xR, CCPOSx falling edge: T12 stored in CC6xSR */
243  IfxCcu6_T12ChannelMode_multiInputCaptureFallingAndRising = 11, /**< \brief CC6xIN falling edge: T12 stored in CC6xR, CCPOSx rising edge: T12 stored in CC6xSR */
244  IfxCcu6_T12ChannelMode_multiInputCaptureBothRising = 12, /**< \brief CC6xIN rising edge: T12 stored in CC6xR, CCPOSx rising edge: T12 stored in CC6xSR */
245  IfxCcu6_T12ChannelMode_multiInputCaptureBothFalling = 13, /**< \brief CC6xIN falling edge: T12 stored in CC6xR, CCPOSx falling edge: T12 stored in CC6xSR */
246  IfxCcu6_T12ChannelMode_multiInputCaptureAny = 14 /**< \brief CC6xIN any active edge : T12 stored in CC6xR, CCPOSx any active edge: T12 stored in CC6xSR */
248 
249 /** \brief Counting direction of Timer12\n
250  * Definition in Ifx_CCU.TCTR0.B.CDIR
251  */
252 typedef enum
253 {
254  IfxCcu6_T12CountDirection_up = 0, /**< \brief Counting up */
255  IfxCcu6_T12CountDirection_down = 1 /**< \brief Counting down */
257 
258 /** \brief Operating mode of Timer 12\n
259  * Definition in Ifx_CCU.TCTR0.B.CTM
260  */
261 typedef enum
262 {
263  IfxCcu6_T12CountMode_edgeAligned = 0, /**< \brief T12 always counts up and continues counting
264  * from zero after reaching the period value. */
265  IfxCcu6_T12CountMode_centerAligned = 1 /**< \brief T12 counts down after detecting a period-match
266  * and counts up after detecting a one-match. */
268 
269 /** \brief Delivers additional information to control the automatic set of bit T13R in the case that the trigger action defined by T13 trigger event control (T13TEC) is detected.\n
270  * Definition in Ifx_CCU.TCTR2.B.T13TED
271  */
272 typedef enum
273 {
274  IfxCcu6_T13TriggerDirection_noAction = 0, /**< \brief no action */
275  IfxCcu6_T13TriggerDirection_onT12CountingUp = 1, /**< \brief while T12 is counting up */
276  IfxCcu6_T13TriggerDirection_onT12CountingDown = 2, /**< \brief while T12 is counting down */
277  IfxCcu6_T13TriggerDirection_anyT12 = 3 /**< \brief independent on the count direction of T12 */
279 
280 /** \brief Selects the trigger event to start T13 (automatic set of T13R for synchronization to T12 compare signals)\n
281  * Definition in Ifx_CCU.TCTR2.B.T13TEC
282  */
283 typedef enum
284 {
285  IfxCcu6_T13TriggerEvent_noAction = 0, /**< \brief no action */
286  IfxCcu6_T13TriggerEvent_onCC60RCompare = 1, /**< \brief set T13R on a T12 compare event on channel 0 */
287  IfxCcu6_T13TriggerEvent_onCC61RCompare = 2, /**< \brief set T13R on a T12 compare event on channel 1 */
288  IfxCcu6_T13TriggerEvent_onCC62RCompare = 3, /**< \brief set T13R on a T12 compare event on channel 2 */
289  IfxCcu6_T13TriggerEvent_onAnyT12Compare = 4, /**< \brief set T13R on any T12 compare event (ch. 0, 1, 2) */
290  IfxCcu6_T13TriggerEvent_onT12Period = 5, /**< \brief set T13R upon a period-match of T12 */
291  IfxCcu6_T13TriggerEvent_onT12Zero = 6, /**< \brief set T13R upon a zero-match of T12 (while
292  * counting up) */
293  IfxCcu6_T13TriggerEvent_onCCPOSxEdge = 7 /**< \brief set T13R on any edge of inputs CCPOSx */
295 
296 /** \brief Timer number ( T12 / T13 )
297  */
298 typedef enum
299 {
300  IfxCcu6_TimerId_t12 = 0, /**< \brief Timer 12 */
301  IfxCcu6_TimerId_t13 = 1 /**< \brief Timer 13 */
303 
304 /** \brief Selects the input clock for timers (T12 or T13) that is derived from the peripheral clock according to the equation\n
305  * Definition in Ifx_CCU.TCTR0.B.T12CLK / Ifx_CCU.TCTR0.B.T13CLK
306  */
307 typedef enum
308 {
309  IfxCcu6_TimerInputClock_fcc6 = 0, /**< \brief fcc6 */
310  IfxCcu6_TimerInputClock_fcc6By2 = 1, /**< \brief fcc6 / 2 */
311  IfxCcu6_TimerInputClock_fcc6By4 = 2, /**< \brief fcc6 / 4 */
312  IfxCcu6_TimerInputClock_fcc6By8 = 3, /**< \brief fcc6 / 8 */
313  IfxCcu6_TimerInputClock_fcc6By16 = 4, /**< \brief fcc6 / 16 */
314  IfxCcu6_TimerInputClock_fcc6By32 = 5, /**< \brief fcc6 / 32 */
315  IfxCcu6_TimerInputClock_fcc6By64 = 6, /**< \brief fcc6 / 64 */
316  IfxCcu6_TimerInputClock_fcc6By128 = 7 /**< \brief fcc6 / 128 */
318 
319 /** \brief Selection of actual input signal for the timer inputs
320  */
321 typedef enum
322 {
323  IfxCcu6_TimerInputSignal_a = 0, /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
324  IfxCcu6_TimerInputSignal_b = 1, /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
325  IfxCcu6_TimerInputSignal_c = 2, /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
326  IfxCcu6_TimerInputSignal_d = 3, /**< \brief defines the input signal used as CC6x / CTRAP / CCPOSx / T1xHR input. */
327  IfxCcu6_TimerInputSignal_e = 0, /**< \brief defines the input signal used as T1xHR input. */
328  IfxCcu6_TimerInputSignal_f = 1, /**< \brief defines the input signal used as T1xHR input. */
329  IfxCcu6_TimerInputSignal_g = 2, /**< \brief defines the input signal used as T1xHR input. */
330  IfxCcu6_TimerInputSignal_h = 3 /**< \brief defines the input signal used as T1xHR input. */
332 
333 /** \brief Timer (T12 / T13) run status\n
334  * Definition in Ifx_CCU.TCTR0.B.T12R and Ifx_CCU.TCTR0.B.T13R
335  */
336 typedef enum
337 {
338  IfxCcu6_TimerRunStatus_stopped = 0, /**< \brief Timer T1x is stopped. */
339  IfxCcu6_TimerRunStatus_running = 1 /**< \brief Timer T1x is running. */
341 
342 /** \brief Defines how the trap flag TRPF can be cleared after the trap input condition is no longer valid (either by CTRAP = 1 or by TRPPEN = 0)\n
343  * Definition in Ifx_CCU.TRPCTR.B.TRPM2
344  */
345 typedef enum
346 {
347  IfxCcu6_TrapMode_automatic = 0, /**< \brief Bit TRPF is cleared by HW */
348  IfxCcu6_TrapMode_manual = 1 /**< \brief Bit TRPF stays 0, It has to be cleared by SW by writing
349  * ISR.RTRPF = 1 */
351 
352 /** \brief Defines the behavior of the selected outputs when leaving the trap state, after the trap condition has become inactive again\n
353  * Definition in Ifx_CCU.TRPCTR.B.TRPMx (x = 0, 1)
354  */
355 typedef enum
356 {
357  IfxCcu6_TrapState_t12Sync = 0, /**< \brief The trap state is left when a zero-match
358  * of T12 (while counting up) is detected */
359  IfxCcu6_TrapState_t13Sync = 1, /**< \brief The trap state is left when a zeromatch
360  * of T13 is detected */
361  IfxCcu6_TrapState_immediate = 3 /**< \brief The trap state is left immediately without any synchronization to T12 or T13 */
363 
364 /** \} */
365 
366 /** \addtogroup IfxLld_Ccu6_Std_Operative
367  * \{ */
368 
369 /******************************************************************************/
370 /*-------------------------Inline Function Prototypes-------------------------*/
371 /******************************************************************************/
372 
373 /** \brief Clears the counters of the Timers (T12, T13 individually or together based on the selection)
374  * \param ccu6 Pointer to the base of CCU6 registers
375  * \param t12 Timer12 choice (enable / disable)
376  * \param t13 Timer13 choice (enable / disable)
377  * \return None
378  */
379 IFX_INLINE void IfxCcu6_clearCounter(Ifx_CCU6 *ccu6, boolean t12, boolean t13);
380 
381 /** \brief Clears all the three dead-time counter channels to zero.
382  * \param ccu6 Pointer to the base of CCU6 registers
383  * \return None
384  */
385 IFX_INLINE void IfxCcu6_clearDeadTimeCounters(Ifx_CCU6 *ccu6);
386 
387 /** \brief Clears the selected interrupt flag
388  * \param ccu6 Pointer to the base of CCU6 registers
389  * \param source Interrupt source selection
390  * \return None
391  */
393 
394 /** \brief Returns the status of module enabled or disabled
395  * \param ccu6 Pointer to the base of CCU6 registers
396  * \return Status (TRUE / FALSE)
397  */
398 IFX_INLINE boolean IfxCcu6_isModuleEnabled(Ifx_CCU6 *ccu6);
399 
400 /** \brief Sets the input event leading to a counting action of Timers (T12 / T13).
401  * \param ccu6 Pointer to the base of CCU6 registers
402  * \param timer Timer selection, ( Timer12 / Timer13 )
403  * \param mode Input event leading to a counting action of the timer (T12 / T13)
404  * \return None
405  */
407 
408 /** \brief Sets the current hall pattern for the multichannel mode (writes into shadow register)
409  * \param ccu6 Pointer to the base of CCU6 registers
410  * \param pattern Current hall pattern
411  * \return None
412  */
413 IFX_INLINE void IfxCcu6_setCurrentHallPattern(Ifx_CCU6 *ccu6, uint8 pattern);
414 
415 /** \brief Sets the delay between switching from the passive state to the active state of the selected outputs (dead time)
416  * \param ccu6 Pointer to the base of CCU6 registers
417  * \param value Value of the dead time to be induced
418  * \return None
419  */
420 IFX_INLINE void IfxCcu6_setDeadTimeValue(Ifx_CCU6 *ccu6, uint8 value);
421 
422 /** \brief Sets the expected hall pattern for the multichannel mode (writes into shadow register)
423  * \param ccu6 Pointer to the base of CCU6 registers
424  * \param pattern Expected hall pattern
425  * \return None
426  */
427 IFX_INLINE void IfxCcu6_setExpectedHallPattern(Ifx_CCU6 *ccu6, uint8 pattern);
428 
429 /** \brief Sets the event of signal T1xHR that can set the run bit T1xR by HW
430  * \param ccu6 Pointer to the base of CCU6 registers
431  * \param timer Timer selection, ( Timer12 / Timer13 )
432  * \param mode External trigger mode
433  * \return None
434  */
436 
437 /** \brief Sets source for the sampling of the Hall input pattern and the comparison to the current and the expected Hall pattern bit fields
438  * \param ccu6 Pointer to the base of CCU6 registers
439  * \param mode Hall sensor input trigger event
440  * \return None
441  */
443 
444 /** \brief Sets the input clock for timers (T12 or T13)
445  * \param ccu6 Pointer to the base of CCU6 registers
446  * \param timer Timer selection, ( Timer12 / Timer13 )
447  * \param frequency Input clock for timers (T12 or T13)
448  * \return None
449  */
451 
452 /** \brief Sets the selected interrupt flag
453  * \param ccu6 Pointer to the base of CCU6 registers
454  * \param source Interrupt source selection
455  * \return None
456  */
458 
459 /** \brief Sets the output pattern for the multichannel mode (writes into shadow register)
460  * \param ccu6 Pointer to the base of CCU6 registers
461  * \param pattern Output pattern for the multichannel mode.
462  * \return None
463  */
464 IFX_INLINE void IfxCcu6_setMultiChannelPwmPattern(Ifx_CCU6 *ccu6, uint8 pattern);
465 
466 /** \brief Sets the trigger request source (next multi-channel event) for the shadow transfer MCM_ST from MCMPS to MCMP
467  * \param ccu6 Pointer to the base of CCU6 registers
468  * \param mode Trigger request source (next multi-channel event) for the shadow transfer MCM_ST
469  * \return None
470  */
472 
473 /** \brief Sets the synchronization mechanism of the shadow transfer event MCM_ST\n
474  * if it has been requested before (flag R set by an event selected by SWSEL) and if MCMEN = 1
475  * \param ccu6 Pointer to the base of CCU6 registers
476  * \param sync Synchronization mechanism of the shadow transfer event MCM_ST
477  * \return None
478  */
480 
481 /** \brief Sets the state of the corresponding compare channel, that is considered to be the passive state
482  * \param ccu6 Pointer to the base of CCU6 registers
483  * \param channelOut Capture compare output selection
484  * \param state FALSE: passive state when CC6xST == 0\n
485  * TRUE : passive state when CC6xST == 1
486  * \return None
487  */
488 IFX_INLINE void IfxCcu6_setOutputPassiveState(Ifx_CCU6 *ccu6, IfxCcu6_ChannelOut channelOut, boolean state);
489 
490 /** \brief Enables / Disables the single shot mode of Timers (T12, T13 individually or together based on the selection)
491  * \param ccu6 Pointer to the base of CCU6 registers
492  * \param t12 Timer12 choice (enable / disable)
493  * \param t13 Timer13 choice (enable / disable)
494  * \return None
495  */
496 IFX_INLINE void IfxCcu6_setSingleShotModeEnable(Ifx_CCU6 *ccu6, boolean t12, boolean t13);
497 
498 /** \brief Sets the operating mode of the Timer12 capture/compare channels
499  * \param ccu6 Pointer to the base of CCU6 registers
500  * \param channel Timer12 Capture compare channel number
501  * \param mode The operating mode for the T12 channels
502  * \return None
503  */
505 
506 /**
507  * \param ccu6 Pointer to the base of CCU6 registers
508  * \param mode Operating mode of Timer 12
509  * \return None
510  */
511 IFX_INLINE void IfxCcu6_setT12CountMode(Ifx_CCU6 *ccu6, IfxCcu6_T12CountMode mode);
512 
513 /** \brief Sets the 16-bit counter value of Timer12
514  * \param ccu6 Pointer to the base of CCU6 registers
515  * \param value Counter value
516  * \return None
517  */
518 IFX_INLINE void IfxCcu6_setT12CounterValue(Ifx_CCU6 *ccu6, uint16 value);
519 
520 /** \brief Sets the period value that leads Timer12 counter value to a period-match
521  * \param ccu6 Pointer to the base of CCU6 registers
522  * \param value Period value
523  * \return None
524  */
525 IFX_INLINE void IfxCcu6_setT12PeriodValue(Ifx_CCU6 *ccu6, uint16 value);
526 
527 /** \brief Sets the 16-bit compare value of Timer13 (writes into shadow register)
528  * \param ccu6 Pointer to the base of CCU6 registers
529  * \param value Compare value
530  * \return None
531  */
532 IFX_INLINE void IfxCcu6_setT13CompareValue(Ifx_CCU6 *ccu6, uint16 value);
533 
534 /** \brief Sets the 16-bit counter value of Timer13
535  * \param ccu6 Pointer to the base of CCU6 registers
536  * \param value counter value
537  * \return None
538  */
539 IFX_INLINE void IfxCcu6_setT13CounterValue(Ifx_CCU6 *ccu6, uint16 value);
540 
541 /** \brief Sets the period value that leads Timer13 counter value to a period-match
542  * \param ccu6 Pointer to the base of CCU6 registers
543  * \param value period value
544  * \return None
545  */
546 IFX_INLINE void IfxCcu6_setT13PeriodValue(Ifx_CCU6 *ccu6, uint16 value);
547 
548 /** \brief Sets the additional information to control the automatic set of bit T13R\n
549  * in the case that the trigger action defined by T13 trigger event control (T13TEC) is detected
550  * \param ccu6 Pointer to the base of CCU6 registers
551  * \param direction The trigger event to start T13
552  * \return None
553  */
555 
556 /** \brief Sets the Timer13 trigger event direction
557  * \param ccu6 Pointer to the base of CCU6 registers
558  * \param direction T13 trigger event direction
559  * \return None
560  */
562 
563 /** \brief Sets the trigger event to start Timer13 (automatic set of T13R for synchronization to Timer12 compare signals)
564  * \param ccu6 Pointer to the base of CCU6 registers
565  * \param mode The trigger event to start T13
566  * \return None
567  */
569 
570 /** \brief Sets the mode of clearing the trap flag TRPF after the trap input condition is no longer valid
571  * \param ccu6 Pointer to the base of CCU6 registers
572  * \param mode Trap mode selection
573  * \return None
574  */
575 IFX_INLINE void IfxCcu6_setTrapMode(Ifx_CCU6 *ccu6, IfxCcu6_TrapMode mode);
576 
577 /** \brief Sets behaviour of the selected outputs when leaving the trap state after the trap condition has become inactive again.
578  * \param ccu6 Pointer to the base of CCU6 registers
579  * \param state Trap state selection
580  * \return None
581  */
582 IFX_INLINE void IfxCcu6_setTrapState(Ifx_CCU6 *ccu6, IfxCcu6_TrapState state);
583 
584 /** \brief starts the timers (T12, T13 individually or together based on the selection)
585  * \param ccu6 Pointer to the base of CCU6 registers
586  * \param t12 Timer12 start choice (enable / disable)
587  * \param t13 Timer13 start choice (enable / disable)
588  * \return None
589  */
590 IFX_INLINE void IfxCcu6_startTimer(Ifx_CCU6 *ccu6, boolean t12, boolean t13);
591 
592 /** \brief starts the timers (T12, T13 individually or together based on the selection)
593  * \param ccu6 Pointer to the base of CCU6 registers
594  * \param t12 Timer12 stop choice (enable / disable)
595  * \param t13 Timer13 stop choice (enable / disable)
596  * \return None
597  */
598 IFX_INLINE void IfxCcu6_stopTimer(Ifx_CCU6 *ccu6, boolean t12, boolean t13);
599 
600 /** \brief Updates the hall pattern (current hall, expected hall, moduleation output), in a single write
601  * \param ccu6 Pointer to the base of CCU6 registers
602  * \param currentHall Current hall pattern
603  * \param expectedHall Expected hall pattern
604  * \param output Output pattern for the multichannel mode.
605  * \return None
606  */
607 IFX_INLINE void IfxCcu6_updateHallPattern(Ifx_CCU6 *ccu6, uint8 currentHall, uint8 expectedHall, uint8 output);
608 
609 /******************************************************************************/
610 /*-------------------------Global Function Prototypes-------------------------*/
611 /******************************************************************************/
612 
613 /**
614  * \param ccu6 Specifies Ccu6 module
615  * \param outputLine Output Line
616  * \param selectedTrigger Trigger selection
617  * \return None
618  */
619 IFX_EXTERN void IfxCcu6_connectTrigger(Ifx_CCU6 *ccu6, IfxCcu6_TrigOut outputLine, IfxCcu6_TrigSel selectedTrigger);
620 
621 /** \brief Routes the interrupt node pointer to the selected service requests
622  * \param ccu6 Pointer to the base of CCU6 registers
623  * \param source Interrupt source selection
624  * \param serviceRequest Selection of service request outputs
625  * \return None
626  */
627 IFX_EXTERN void IfxCcu6_routeInterruptNode(Ifx_CCU6 *ccu6, IfxCcu6_InterruptSource source, IfxCcu6_ServiceRequest serviceRequest);
628 
629 /** \brief Sets the passive state level of the PWM outputs of the module
630  * \param ccu6 Pointer to the base of CCU6 registers
631  * \param channelOut Capture compare output selection
632  * \param state FALSE: The passive level is 0.
633  * TRUE : The passive level is 1.
634  * \return None
635  */
636 IFX_EXTERN void IfxCcu6_setOutputPassiveLevel(Ifx_CCU6 *ccu6, IfxCcu6_ChannelOut channelOut, boolean state);
637 
638 /** \brief Sets software-control (independent set and clear conditions) for the Timer12 channel state bits CC6xST (x=0,1,2)
639  * \param ccu6 Pointer to the base of CCU6 registers
640  * \param channel Timer12 Capture compare channel number
641  * \param state capture/compare state selection (set / clear / toggle)
642  * \return None
643  */
645 
646 /** \brief Sets the 16-bit compare value of Timer12 (writes into shadow registers)
647  * \param ccu6 Pointer to the base of CCU6 registers
648  * \param channel Timer12 Capture compare channel number
649  * \param value Compare value
650  * \return None
651  */
652 IFX_EXTERN void IfxCcu6_setT12CompareValue(Ifx_CCU6 *ccu6, IfxCcu6_T12Channel channel, uint16 value);
653 
654 /** \brief Sets the frequency and clock input of the Timer 12
655  * \param ccu6 Pointer to the base of CCU6 registers
656  * \param frequency Requested timer frequency in Hz
657  * \param resolution Pointer to requested minimum timer resolution in ticks
658  * \param countMode Counting mode of Timer12
659  * \return Zero, if the function failed to fulfill requested frequency and resolution\n
660  * Positive, if the function can find settings close to the requested frequency and resolution above the requested
661  */
662 IFX_EXTERN float32 IfxCcu6_setT12Frequency(Ifx_CCU6 *ccu6, float32 frequency, Ifx_TimerValue resolution, IfxCcu6_T12CountMode countMode);
663 
664 /** \brief selects the actual input signal for the timer inputs.
665  * \param ccu6 Pointer to the base of CCU6 registers
666  * \param extInput External input signal for the Timer 12
667  * \return None
668  */
669 IFX_EXTERN void IfxCcu6_setT12InputSignal(Ifx_CCU6 *ccu6, IfxCcu6_T12hr_In *extInput);
670 
671 /** \brief Sets software-control (independent set and clear conditions) for the Timer13 channel state bits CC63ST
672  * \param ccu6 Pointer to the base of CCU6 registers
673  * \param state capture/compare state selection (set / clear / toggle)
674  * \return None
675  */
677 
678 /** \brief Sets the frequency and clock input of the Timer 13
679  * \param ccu6 Pointer to the base of CCU6 registers
680  * \param frequency Requested timer frequency in Hz
681  * \param resolution Pointer to requested minimum timer resolution in ticks
682  * \return Zero, if the function failed to fulfill requested frequency and resolution\n
683  * Positive, if the function can find settings close to the requested frequency and resolution above the requested
684  */
685 IFX_EXTERN float32 IfxCcu6_setT13Frequency(Ifx_CCU6 *ccu6, float32 frequency, Ifx_TimerValue resolution);
686 
687 /** \brief selects the actual input signal for the timer inputs.
688  * \param ccu6 Pointer to the base of CCU6 registers
689  * \param extInput External input signal for the Timer 13
690  * \return None
691  */
692 IFX_EXTERN void IfxCcu6_setT13InputSignal(Ifx_CCU6 *ccu6, IfxCcu6_T13hr_In *extInput);
693 
694 /** \} */
695 
696 /** \addtogroup IfxLld_Ccu6_Std_Utility
697  * \{ */
698 
699 /******************************************************************************/
700 /*-------------------------Inline Function Prototypes-------------------------*/
701 /******************************************************************************/
702 
703 /** \brief Indicate the status of the dead time generation for each compare channel (0, 1, 2) of timer T12
704  * \param ccu6 Pointer to the base of CCU6 registers
705  * \param channel Timer12 Capture compare channel number
706  * \return Status TRUE or FALSE
707  */
708 IFX_INLINE boolean IfxCcu6_getDeadTimeStatus(Ifx_CCU6 *ccu6, IfxCcu6_T12Channel channel);
709 
710 /** \brief Returns the value of the input Hall pattern of the Timer12 capture/compare channels CC6POS6x (x = 0, 1, 2)\n
711  * that has been compared to the current and expected value
712  * \param ccu6 Pointer to the base of CCU6 registers
713  * \param channel Timer12 Capture compare channel number
714  * \return Status\n
715  * TRUE : The input CCPOSx has been sampled as 0\n
716  * FALSE : The input CCPOSx has been sampled as 1
717  */
718 IFX_INLINE boolean IfxCcu6_getHallPatternSampleState(Ifx_CCU6 *ccu6, IfxCcu6_T12Channel channel);
719 
720 /** \brief Gets the status of the selected interrupt flag
721  * \param ccu6 Pointer to the base of CCU6 registers
722  * \param source Interrupt source selection
723  * \return Status (TRUE / FALSE)
724  */
726 
727 /** \brief indicates if the multi-channel mode functionality is available
728  * \param ccu6 Pointer to the base of CCU6 registers
729  * \return Status (TRUE / FALSE)
730  */
732 
733 /** \brief Gets the status of the shadow transfer request from MCMPS to MCMP
734  * \param ccu6 Pointer to the base of CCU6 registers
735  * \return Status\n
736  * FALSE: A shadow transfer MCM_ST is not requested\n
737  * TRUE: A shadow transfer MCM_ST is requested, but has not yet been executed
738  */
740 
741 /** \brief Returns the Timer (T12 / T13) shadow transfer enable status
742  * \param ccu6 Pointer to the base of CCU6 registers
743  * \param timer Timer selection, ( Timer12 / Timer13 )
744  * \return Status (TRUE: enable / FALSE: disable)
745  */
746 IFX_INLINE boolean IfxCcu6_getShadowTransferStatus(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer);
747 
748 /** \brief Returns the state of the Timer12 capture/compare channels CC6xST (x = 0, 1, 2)
749  * \param ccu6 Pointer to the base of CCU6 registers
750  * \param channel Timer12 Capture compare channel number
751  * \return Status TRUE or FALSE
752  */
753 IFX_INLINE boolean IfxCcu6_getT12CaptureCompareState(Ifx_CCU6 *ccu6, IfxCcu6_T12Channel channel);
754 
755 /** \brief Returns the current counting direction of Timer12
756  * \param ccu6 Pointer to the base of CCU6 registers
757  * \return direction (up / down)
758  */
760 
761 /** \brief Returns the state of the Timer13 capture/compare channel CC63ST
762  * \param ccu6 Pointer to the base of CCU6 registers
763  * \return Status TRUE or FALSE
764  */
765 IFX_INLINE boolean IfxCcu6_getT13CaptureCompareState(Ifx_CCU6 *ccu6);
766 
767 /** \brief indicates the Timer blocks (T12 / T13) availability
768  * \param ccu6 Pointer to the base of CCU6 registers
769  * \param timer Timer selection, ( Timer12 / Timer13 )
770  * \return Status (TRUE / FALSE)
771  */
772 IFX_INLINE boolean IfxCcu6_getTimerAvailabilityStatus(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer);
773 
774 /** \brief Returns the Timer (T12 / T13) run status
775  * \param ccu6 Pointer to the base of CCU6 registers
776  * \param timer Timer selection, ( Timer12 / Timer13 )
777  * \return Status (stopped / running)
778  */
780 
781 /******************************************************************************/
782 /*-------------------------Global Function Prototypes-------------------------*/
783 /******************************************************************************/
784 
785 /** \brief Returns the capture register value of the selected channel
786  * \param ccu6 Pointer to the base of CCU6 registers
787  * \param channel Timer12 Capture compare channel number
788  * \return current value of the capture register of a selected channel
789  */
791 
792 /** \brief Returns the capture shadow register value of the selected channel
793  * \param ccu6 Pointer to the base of CCU6 registers
794  * \param channel Timer12 Capture compare channel number
795  * \return current value of the capture shadow register of a selected channel
796  */
798 
799 /** \brief Returns CCU6 index
800  * \param ccu6 Specifies Ccu6 module
801  * \return Returns index. returns -1 in case of unknown index
802  */
803 IFX_EXTERN sint32 IfxCcu6_getIndex(Ifx_CCU6 *ccu6);
804 
805 /** \brief Returns the service request register
806  * \param ccu6 Specifies Ccu6 module
807  * \param serviceRequest Selection of service request outputs
808  * \return The service request register
809  */
810 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxCcu6_getSrcAddress(Ifx_CCU6 *ccu6, IfxCcu6_ServiceRequest serviceRequest);
811 
812 /** \brief Returns the current value of the timer register
813  * \param ccu6 Pointer to the base of CCU6 registers
814  * \param timer Timer selection, ( Timer12 / Timer13 )
815  * \return current value of the timer register
816  */
817 IFX_EXTERN uint32 IfxCcu6_readTimer(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer);
818 
819 /** \} */
820 
821 /** \addtogroup IfxLld_Ccu6_Std_Configuration
822  * \{ */
823 
824 /******************************************************************************/
825 /*-------------------------Inline Function Prototypes-------------------------*/
826 /******************************************************************************/
827 
828 /** \brief Disables the additional prescaler of 1/256 can be enabled for the prescaler of T12 or T13 to support higher clock frequencies
829  * \param ccu6 Pointer to the base of CCU6 registers
830  * \param timer Timer selection, ( Timer12 / Timer13 )
831  * \return None
832  */
834 
835 /** \brief Disables the dead time generation for each compare channel (0, 1, 2) of Timer12
836  * \param ccu6 Pointer to the base of CCU6 registers
837  * \param channel Timer12 Capture compare channel number
838  * \return None
839  */
840 IFX_INLINE void IfxCcu6_disableDeadTime(Ifx_CCU6 *ccu6, IfxCcu6_T12Channel channel);
841 
842 /** \brief Disables the delay of the source signal for the sampling of the Hall input pattern (selected by HSYNC)
843  * \param ccu6 Pointer to the base of CCU6 registers
844  * \return None
845  */
846 IFX_INLINE void IfxCcu6_disableDelayBypass(Ifx_CCU6 *ccu6);
847 
848 /** \brief Disables the selected interrupt
849  * \param ccu6 Pointer to the base of CCU6 registers
850  * \param source Interrupt source selection
851  * \return None
852  */
853 IFX_INLINE void IfxCcu6_disableInterrupt(Ifx_CCU6 *ccu6, IfxCcu6_InterruptSource source);
854 
855 /** \brief Sets multi channel mode unavailable, A write access to MCMOUTS is ignored
856  * \param ccu6 Pointer to the base of CCU6 registers
857  * \return None
858  */
859 IFX_INLINE void IfxCcu6_disableMultiChannelMode(Ifx_CCU6 *ccu6);
860 
861 /** \brief Disables shadow transfers of the timers (T12, T13 individually or together based on the selection)
862  * \param ccu6 Pointer to the base of CCU6 registers
863  * \param t12 Timer12 choice (enable / disable)
864  * \param t13 Timer13 choice (enable / disable)
865  * \return None
866  */
867 IFX_INLINE void IfxCcu6_disableShadowTransfer(Ifx_CCU6 *ccu6, boolean t12, boolean t13);
868 
869 /** \brief Disables the single shot-mode of Timers (T12 T13).
870  * \param ccu6 Pointer to the base of CCU6 registers
871  * \param timer Timer selection, ( Timer12 / Timer13 )
872  * \return None
873  */
874 IFX_INLINE void IfxCcu6_disableSingleShotMode(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer);
875 
876 /** \brief Disables the Inversion of T13 signal for the modulation of the CC6x and COUT6x (x = 0, 1, 2) signals\n
877  * T13 output CC63_O is equal to CC63ST
878  * \param ccu6 Pointer to the base of CCU6 registers
879  * \return None
880  */
882 
883 /** \brief Sets Timer12 block unavailable, A write access to T12PR is ignored
884  * \param ccu6 Pointer to the base of CCU6 registers
885  * \param timer Timer selection, ( Timer12 / Timer13 )
886  * \return None
887  */
888 IFX_INLINE void IfxCcu6_disableTimer(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer);
889 
890 /** \brief Disables the trap functionality for the corresponding output signals
891  * \param ccu6 Pointer to the base of CCU6 registers
892  * \param channelOut Capture compare output selection
893  * \return None
894  */
895 IFX_INLINE void IfxCcu6_disableTrap(Ifx_CCU6 *ccu6, IfxCcu6_ChannelOut channelOut);
896 
897 /** \brief Disables the input (pin) function for the trap generation
898  * \param ccu6 Pointer to the base of CCU6 registers
899  * \return None
900  */
901 IFX_INLINE void IfxCcu6_disableTrapPin(Ifx_CCU6 *ccu6);
902 
903 /** \brief Enables the additional prescaler of 1/256 can be enabled for the prescaler of T12 or T13 to support higher clock frequencies
904  * \param ccu6 Pointer to the base of CCU6 registers
905  * \param timer Timer selection, ( Timer12 / Timer13 )
906  * \return None
907  */
909 
910 /** \brief Sets the single shot-mode of Timers (T12, T13).
911  * \param ccu6 Pointer to the base of CCU6 registers
912  * \param t12 Timer12 choice (enable / disable)
913  * \param t13 Timer13 choice (enable / disable)
914  * \return None
915  */
916 IFX_INLINE void IfxCcu6_enableCountEvent(Ifx_CCU6 *ccu6, boolean t12, boolean t13);
917 
918 /** \brief Enables the dead time generation for each compare channel (0, 1, 2) of Timer12
919  * \param ccu6 Pointer to the base of CCU6 registers
920  * \param channel Timer12 Capture compare channel number
921  * \return None
922  */
923 IFX_INLINE void IfxCcu6_enableDeadTime(Ifx_CCU6 *ccu6, IfxCcu6_T12Channel channel);
924 
925 /** \brief Enables the delay of the source signal for the sampling of the Hall input pattern (selected by HSYNC) by the Dead-Time Counter 0
926  * \param ccu6 Pointer to the base of CCU6 registers
927  * \return None
928  */
929 IFX_INLINE void IfxCcu6_enableDelayBypass(Ifx_CCU6 *ccu6);
930 
931 /** \brief Sets HP_ST immediately to update bit fields EXPH and CURH by EXPHS and CURHS
932  * \param ccu6 Pointer to the base of CCU6 registers
933  * \return None
934  */
936 
937 /** \brief Enables the selected interrupt
938  * \param ccu6 Pointer to the base of CCU6 registers
939  * \param source Interrupt source selection
940  * \return None
941  */
942 IFX_INLINE void IfxCcu6_enableInterrupt(Ifx_CCU6 *ccu6, IfxCcu6_InterruptSource source);
943 
944 /** \brief Sets multi channel mode available, A write access to MCMOUTS is executed
945  * \param ccu6 Pointer to the base of CCU6 registers
946  * \return None
947  */
948 IFX_INLINE void IfxCcu6_enableMultiChannelMode(Ifx_CCU6 *ccu6);
949 
950 /** \brief Sets MCM_ST immediately to update bit field MCMP by the value of MCMPS.
951  * \param ccu6 Pointer to the base of CCU6 registers
952  * \return None
953  */
955 
956 /** \brief Enables the shadow transfer T12_ST if flag MCMOUT.R is set or\n
957  * becomes set while a T12 one match is detected while counting down
958  * \param ccu6 Pointer to the base of CCU6 registers
959  * \return None
960  */
962 
963 /** \brief Enables the shadow transfer T12_ST if flag MCMOUT.R is set or\n
964  * becomes set while a T12 period match is detected while counting up
965  * \param ccu6 Pointer to the base of CCU6 registers
966  * \return None
967  */
969 
970 /** \brief Enables the shadow transfer T13_ST if flag MCMOUT.R is set or\n
971  * becomes set while a T13 period match is detected
972  * \param ccu6 Pointer to the base of CCU6 registers
973  * \return None
974  */
976 
977 /** \brief Enables shadow transfers of the timers (T12, T13 individually or together based on the selection)
978  * \param ccu6 Pointer to the base of CCU6 registers
979  * \param t12 Timer12 choice (enable / disable)
980  * \param t13 Timer13 choice (enable / disable)
981  * \return None
982  */
983 IFX_INLINE void IfxCcu6_enableShadowTransfer(Ifx_CCU6 *ccu6, boolean t12, boolean t13);
984 
985 /** \brief Enables the single shot-mode of Timers (T12 T13).
986  * \param ccu6 Pointer to the base of CCU6 registers
987  * \param timer Timer selection, ( Timer12 / Timer13 )
988  * \return None
989  */
990 IFX_INLINE void IfxCcu6_enableSingleShotMode(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer);
991 
992 /** \brief Enables the Inversion of T13 signal for the modulation of the CC6x and COUT6x (x = 0, 1, 2) signals\n
993  * T13 output CC63_O is equal to CC63ST.
994  * \param ccu6 Pointer to the base of CCU6 registers
995  * \return None
996  */
998 
999 /** \brief Sets Timer12 block available, A write access to T12PR is executed
1000  * \param ccu6 Pointer to the base of CCU6 registers
1001  * \param timer Timer selection, ( Timer12 / Timer13 )
1002  * \return None
1003  */
1004 IFX_INLINE void IfxCcu6_enableTimer(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer);
1005 
1006 /** \brief Enables the trap functionality for the corresponding output signals
1007  * \param ccu6 Pointer to the base of CCU6 registers
1008  * \param channelOut Capture compare output selection
1009  * \return None
1010  */
1011 IFX_INLINE void IfxCcu6_enableTrap(Ifx_CCU6 *ccu6, IfxCcu6_ChannelOut channelOut);
1012 
1013 /** \brief Enables the input (pin) function for the trap generation
1014  * \param ccu6 Pointer to the base of CCU6 registers
1015  * \return None
1016  */
1017 IFX_INLINE void IfxCcu6_enableTrapPin(Ifx_CCU6 *ccu6);
1018 
1019 /** \brief selects the actual input signal for the capture compare inputs.
1020  * \param ccu6 Pointer to the base of CCU6 registers
1021  * \param input Input selection, ( CC6x capture input / CTRAP input / CCPOSx input / T1xHR input. )
1022  * \param signal selection of actual input signal for the module inputs
1023  * \return None
1024  */
1026 
1027 /******************************************************************************/
1028 /*-------------------------Global Function Prototypes-------------------------*/
1029 /******************************************************************************/
1030 
1031 /** \brief Disables the modulation of the corresponding output signal by PWM pattern generated by the timers T12 and T13.
1032  * \param ccu6 Pointer to the base of CCU6 registers
1033  * \param timer Timer selection, ( Timer12 / Timer13 )
1034  * \param channelOut Capture compare output selection
1035  * \return None
1036  */
1037 IFX_EXTERN void IfxCcu6_disableModulationOutput(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer, IfxCcu6_ChannelOut channelOut);
1038 
1039 /** \brief Enables the modulation of the corresponding output signal by PWM pattern generated by the timers T12 and T13.
1040  * \param ccu6 Pointer to the base of CCU6 registers
1041  * \param timer Timer selection, ( Timer12 / Timer13 )
1042  * \param channelOut Capture compare output selection
1043  * \return None
1044  */
1045 IFX_EXTERN void IfxCcu6_enableModulationOutput(Ifx_CCU6 *ccu6, IfxCcu6_TimerId timer, IfxCcu6_ChannelOut channelOut);
1046 
1047 /** \brief Enables the selected CCU6 kernel
1048  * \param ccu6 Pointer to the base of CCU6 registers
1049  * \return None
1050  */
1051 IFX_EXTERN void IfxCcu6_enableModule(Ifx_CCU6 *ccu6);
1052 
1053 /** \} */
1054 
1055 /** \addtogroup IfxLld_Ccu6_Std_IO
1056  * \{ */
1057 
1058 /******************************************************************************/
1059 /*-------------------------Inline Function Prototypes-------------------------*/
1060 /******************************************************************************/
1061 
1062 /** \brief Initialises a CC60 input pin
1063  * \param cc60In CC60 capture input CC60IN
1064  * \param inputMode The pin input mode which should be configured
1065  * \return None
1066  */
1068 
1069 /** \brief Initialises a CC60 output pin
1070  * \param cc60Out CC60 compare output CC0
1071  * \param outputMode The pin output mode which should be configured
1072  * \param padDriver The pad driver mode which should be configured
1073  * \return None
1074  */
1075 IFX_INLINE void IfxCcu6_initCc60OutPin(const IfxCcu6_Cc60_Out *cc60Out, IfxPort_OutputMode outputMode, IfxPort_PadDriver padDriver);
1076 
1077 /** \brief Initialises a CC61 input pin
1078  * \param cc61In CC61 capture input CC61IN
1079  * \param inputMode The pin input mode which should be configured
1080  * \return None
1081  */
1083 
1084 /** \brief Initialises a CC61 output pin
1085  * \param cc61Out CC61 compare output CC1
1086  * \param outputMode The pin output mode which should be configured
1087  * \param padDriver The pad driver mode which should be configured
1088  * \return None
1089  */
1090 IFX_INLINE void IfxCcu6_initCc61OutPin(const IfxCcu6_Cc61_Out *cc61Out, IfxPort_OutputMode outputMode, IfxPort_PadDriver padDriver);
1091 
1092 /** \brief Initialises a CC62 input pin
1093  * \param cc62In CC62 capture input CC62IN
1094  * \param inputMode The pin input mode which should be configured
1095  * \return None
1096  */
1098 
1099 /** \brief Initialises a CC62 output pin
1100  * \param cc62Out CC62 compare output CC2
1101  * \param outputMode The pin output mode which should be configured
1102  * \param padDriver The pad driver mode which should be configured
1103  * \return None
1104  */
1105 IFX_INLINE void IfxCcu6_initCc62OutPin(const IfxCcu6_Cc62_Out *cc62Out, IfxPort_OutputMode outputMode, IfxPort_PadDriver padDriver);
1106 
1107 /** \brief Initialises a CCPOS0 input pin
1108  * \param ccpos0 CC60 capture input CCPOS0
1109  * \param inputMode The pin input mode which should be configured
1110  * \return None
1111  */
1113 
1114 /** \brief Initialises a CCPOS1 input pin
1115  * \param ccpos1 CC61 capture input CCPOS1
1116  * \param inputMode The pin input mode which should be configured
1117  * \return None
1118  */
1120 
1121 /** \brief Initialises a CCPOS0 input pin
1122  * \param ccpos2 CC62 capture input CCPOS2
1123  * \param inputMode The pin input mode which should be configured
1124  * \return None
1125  */
1127 
1128 /** \brief Initialises a COUT60 output pin
1129  * \param cout60 CC60 compare output COUT0
1130  * \param outputMode The pin output mode which should be configured
1131  * \param padDriver The pad driver mode which should be configured
1132  * \return None
1133  */
1135 
1136 /** \brief Initialises a COUT61 output pin
1137  * \param cout61 CC61 compare output COUT1
1138  * \param outputMode The pin output mode which should be configured
1139  * \param padDriver The pad driver mode which should be configured
1140  * \return None
1141  */
1143 
1144 /** \brief Initialises a COUT62 output pin
1145  * \param cout62 CC62 compare output COUT2
1146  * \param outputMode The pin output mode which should be configured
1147  * \param padDriver The pad driver mode which should be configured
1148  * \return None
1149  */
1151 
1152 /** \brief Initialises a COUT63 output pin
1153  * \param cout63 CC63 compare output COUT3
1154  * \param outputMode The pin output mode which should be configured
1155  * \param padDriver The pad driver mode which should be configured
1156  * \return None
1157  */
1159 
1160 /** \brief Initialises a CTRAP input pin
1161  * \param ctrap CTRAP input
1162  * \param inputMode The pin input mode which should be configured
1163  * \return None
1164  */
1166 
1167 /** \brief Initialises a T12HR input pin
1168  * \param t12hrIn Timer 12 HR input T12HR
1169  * \param inputMode The pin input mode which should be configured
1170  * \return None
1171  */
1172 IFX_INLINE void IfxCcu6_initT12hrPin(const IfxCcu6_T12hr_In *t12hrIn, IfxPort_InputMode inputMode);
1173 
1174 /** \brief Initialises a T13HR input pin
1175  * \param t13hrIn Timer 12 HR input T12HR
1176  * \param inputMode The pin input mode which should be configured
1177  * \return None
1178  */
1179 IFX_INLINE void IfxCcu6_initT13hrPin(const IfxCcu6_T13hr_In *t13hrIn, IfxPort_InputMode inputMode);
1180 
1181 /** \} */
1182 
1183 /******************************************************************************/
1184 /*---------------------Inline Function Implementations------------------------*/
1185 /******************************************************************************/
1186 
1187 IFX_INLINE void IfxCcu6_clearCounter(Ifx_CCU6 *ccu6, boolean t12, boolean t13)
1188 {
1189  Ifx_CCU6_TCTR4 tctr4;
1190  tctr4.U = 0;
1191  tctr4.B.T12RES = t12;
1192  tctr4.B.T13RES = t13;
1193  ccu6->TCTR4.U = tctr4.U;
1194 }
1195 
1196 
1198 {
1199  ccu6->TCTR4.B.DTRES = TRUE;
1200 }
1201 
1202 
1204 {
1205  uint32 mask = (1U << source);
1206  ccu6->ISR.U = ccu6->ISR.U & ~(mask);
1207 }
1208 
1209 
1210 IFX_INLINE boolean IfxCcu6_isModuleEnabled(Ifx_CCU6 *ccu6)
1211 {
1212  return ccu6->CLC.B.DISS == 0;
1213 }
1214 
1215 
1217 {
1218  uint32 shift = ((timer * 2) + 2);
1219  uint32 mask = (0x3U << shift);
1220  ccu6->PISEL2.U = (ccu6->PISEL2.U & ~mask) | ((uint32)mode << shift);
1221 }
1222 
1223 
1224 IFX_INLINE void IfxCcu6_setCurrentHallPattern(Ifx_CCU6 *ccu6, uint8 pattern)
1225 {
1226  ccu6->MCMOUTS.B.CURHS = pattern;
1227 }
1228 
1229 
1230 IFX_INLINE void IfxCcu6_setDeadTimeValue(Ifx_CCU6 *ccu6, uint8 value)
1231 {
1232  ccu6->T12DTC.B.DTM = value;
1233 }
1234 
1235 
1236 IFX_INLINE void IfxCcu6_setExpectedHallPattern(Ifx_CCU6 *ccu6, uint8 pattern)
1237 {
1238  ccu6->MCMOUTS.B.EXPHS = pattern;
1239 }
1240 
1241 
1243 {
1244  uint32 shift = ((timer * 2) + 8);
1245  uint32 mask = (0x3U << shift);
1246  ccu6->TCTR2.U = (ccu6->TCTR2.U & ~mask) | ((uint32)mode << shift);
1247 }
1248 
1249 
1251 {
1252  uint32 shift = 12;
1253  uint32 mask = (0x7U << shift);
1254  ccu6->T12MSEL.U = (ccu6->T12MSEL.U & ~mask) | ((uint32)mode << shift);
1255 }
1256 
1257 
1259 {
1260  uint32 shift = (timer * 8);
1261  uint32 mask = (0x7U << shift);
1262  ccu6->TCTR0.U = (ccu6->TCTR0.U & ~mask) | ((uint32)frequency << shift);
1263 }
1264 
1265 
1267 {
1268  uint32 mask = (1U << source);
1269  ccu6->ISS.U = ccu6->ISS.U | (mask);
1270 }
1271 
1272 
1274 {
1275  ccu6->MCMOUTS.B.MCMPS = pattern;
1276 }
1277 
1278 
1280 {
1281  ccu6->MCMCTR.B.SWSEL = mode;
1282 }
1283 
1284 
1286 {
1287  ccu6->MCMCTR.B.SWSYN = sync;
1288 }
1289 
1290 
1291 IFX_INLINE void IfxCcu6_setOutputPassiveState(Ifx_CCU6 *ccu6, IfxCcu6_ChannelOut channelOut, boolean state)
1292 {
1293  uint32 shift = (channelOut + 8); // offset at location CC60PS
1294  uint32 mask = (1U << shift);
1295  ccu6->CMPSTAT.U = (ccu6->CMPSTAT.U & ~mask) | ((uint32)state << shift);
1296 }
1297 
1298 
1299 IFX_INLINE void IfxCcu6_setSingleShotModeEnable(Ifx_CCU6 *ccu6, boolean t12, boolean t13)
1300 {
1301  Ifx_CCU6_TCTR2 tctr2;
1302  tctr2.U = ccu6->TCTR2.U;
1303  tctr2.B.T12SSC = t12;
1304  tctr2.B.T13SSC = t13;
1305  ccu6->TCTR2.U = tctr2.U;
1306 }
1307 
1308 
1310 {
1311  uint32 shift = (4 * channel);
1312  uint32 mask = (0xFU << shift);
1313  ccu6->T12MSEL.U = (ccu6->T12MSEL.U & ~mask) | ((uint32)mode << shift);
1314 }
1315 
1316 
1318 {
1319  ccu6->TCTR0.B.CTM = mode;
1320 }
1321 
1322 
1323 IFX_INLINE void IfxCcu6_setT12CounterValue(Ifx_CCU6 *ccu6, uint16 value)
1324 {
1325  ccu6->T12.B.T12CV = value;
1326 }
1327 
1328 
1329 IFX_INLINE void IfxCcu6_setT12PeriodValue(Ifx_CCU6 *ccu6, uint16 value)
1330 {
1331  ccu6->T12PR.B.T12PV = value - 1;
1332 }
1333 
1334 
1335 IFX_INLINE void IfxCcu6_setT13CompareValue(Ifx_CCU6 *ccu6, uint16 value)
1336 {
1337  ccu6->CC63SR.B.CCS = value;
1338 }
1339 
1340 
1341 IFX_INLINE void IfxCcu6_setT13CounterValue(Ifx_CCU6 *ccu6, uint16 value)
1342 {
1343  ccu6->T13.B.T13CV = value;
1344 }
1345 
1346 
1347 IFX_INLINE void IfxCcu6_setT13PeriodValue(Ifx_CCU6 *ccu6, uint16 value)
1348 {
1349  ccu6->T13PR.B.T13PV = value - 1;
1350 }
1351 
1352 
1354 {
1355  ccu6->TCTR2.B.T13TED = direction;
1356 }
1357 
1358 
1360 {
1361  ccu6->TCTR2.B.T13TED = direction;
1362 }
1363 
1364 
1366 {
1367  ccu6->TCTR2.B.T13TEC = mode;
1368 }
1369 
1370 
1372 {
1373  ccu6->TRPCTR.B.TRPM2 = mode;
1374 }
1375 
1376 
1378 {
1379  uint32 mask = 0x3U;
1380  ccu6->TRPCTR.U = (ccu6->TRPCTR.U & ~mask) | ((uint32)state);
1381 }
1382 
1383 
1384 IFX_INLINE void IfxCcu6_startTimer(Ifx_CCU6 *ccu6, boolean t12, boolean t13)
1385 {
1386  Ifx_CCU6_TCTR4 tctr4;
1387  tctr4.U = 0;
1388  tctr4.B.T12RS = t12;
1389  tctr4.B.T13RS = t13;
1390  ccu6->TCTR4.U = tctr4.U;
1391 }
1392 
1393 
1394 IFX_INLINE void IfxCcu6_stopTimer(Ifx_CCU6 *ccu6, boolean t12, boolean t13)
1395 {
1396  Ifx_CCU6_TCTR4 tctr4;
1397  tctr4.U = 0;
1398  tctr4.B.T12RR = t12;
1399  tctr4.B.T13RR = t13;
1400  ccu6->TCTR4.U = tctr4.U;
1401 }
1402 
1403 
1404 IFX_INLINE void IfxCcu6_updateHallPattern(Ifx_CCU6 *ccu6, uint8 currentHall, uint8 expectedHall, uint8 output)
1405 {
1406  Ifx_CCU6_MCMOUTS mcmouts;
1407  mcmouts.U = ccu6->MCMOUTS.U;
1408 
1409  mcmouts.B.CURHS = currentHall;
1410  mcmouts.B.EXPHS = expectedHall;
1411  mcmouts.B.MCMPS = output;
1412 
1413  ccu6->MCMOUTS.U = mcmouts.U;
1414 }
1415 
1416 
1418 {
1419  uint32 shift = (12 + channel);
1420  uint32 mask = 1 << shift;
1421  return (ccu6->T12DTC.U & mask) ? TRUE : FALSE;
1422 }
1423 
1424 
1426 {
1427  uint32 shift = (channel + 3);
1428  uint32 mask = (1U << shift);
1429  return (ccu6->CMPSTAT.U & mask) ? TRUE : FALSE;
1430 }
1431 
1432 
1434 {
1435  uint32 shift = (1U << source);
1436  return (ccu6->IS.U & shift) ? TRUE : FALSE;
1437 }
1438 
1439 
1441 {
1442  return ccu6->MCFG.B.MCM != 0;
1443 }
1444 
1445 
1447 {
1448  return ccu6->MCMOUT.B.R != 0;
1449 }
1450 
1451 
1453 {
1454  uint32 shift = ((timer * 8) + 5);
1455  uint32 mask = (1U << shift);
1456  return (ccu6->TCTR0.U & mask) ? TRUE : FALSE;
1457 }
1458 
1459 
1461 {
1462  uint32 mask = (1U << channel);
1463  return (ccu6->CMPSTAT.U & mask) ? TRUE : FALSE;
1464 }
1465 
1466 
1468 {
1469  return (IfxCcu6_T12CountDirection)((ccu6->TCTR0.B.CDIR) ? TRUE : FALSE);
1470 }
1471 
1472 
1474 {
1475  return ccu6->CMPSTAT.B.CC63ST != 0;
1476 }
1477 
1478 
1480 {
1481  uint32 mask = (1U << timer);
1482  return (ccu6->MCFG.U & mask) ? TRUE : FALSE;
1483 }
1484 
1485 
1487 {
1488  uint32 shift = ((timer * 8) + 4);
1489  uint32 mask = (1U << shift);
1490  return (IfxCcu6_TimerRunStatus)((ccu6->TCTR0.U & mask) ? TRUE : FALSE);
1491 }
1492 
1493 
1495 {
1496  uint32 shift = ((timer * 8) + 3);
1497  uint32 mask = (1U << shift);
1498  ccu6->TCTR0.U = ccu6->TCTR0.U & ~(mask);
1499 }
1500 
1501 
1503 {
1504  uint32 shift = (8 + channel);
1505  uint32 mask = (1 << shift);
1506  ccu6->T12DTC.U = ccu6->T12DTC.U & ~(mask);
1507 }
1508 
1509 
1511 {
1512  ccu6->T12MSEL.B.DBYP = FALSE;
1513 }
1514 
1515 
1517 {
1518  uint32 mask = (1U << source);
1519  ccu6->IEN.U = ccu6->IEN.U & ~(mask);
1520 }
1521 
1522 
1524 {
1525  ccu6->MODCTR.B.MCMEN = FALSE;
1526 }
1527 
1528 
1529 IFX_INLINE void IfxCcu6_disableShadowTransfer(Ifx_CCU6 *ccu6, boolean t12, boolean t13)
1530 {
1531  Ifx_CCU6_TCTR4 tctr4;
1532  tctr4.U = 0;
1533  tctr4.B.T12STD = t12;
1534  tctr4.B.T13STD = t13;
1535  ccu6->TCTR4.U = tctr4.U;
1536 }
1537 
1538 
1540 {
1541  uint32 mask = (1U << timer);
1542  ccu6->TCTR2.U = ccu6->TCTR2.U & ~(mask);
1543 }
1544 
1545 
1547 {
1548  ccu6->CMPSTAT.B.T13IM = FALSE;
1549 }
1550 
1551 
1553 {
1554  uint32 mask = (1U << timer);
1555  ccu6->MCFG.U = ccu6->MCFG.U & ~(mask);
1556 }
1557 
1558 
1559 IFX_INLINE void IfxCcu6_disableTrap(Ifx_CCU6 *ccu6, IfxCcu6_ChannelOut channelOut)
1560 {
1561  uint32 shift = (8 + channelOut); // offset at location TRPCTR.8 for output CC60
1562  uint32 mask = (1U << shift);
1563  ccu6->TRPCTR.U = ccu6->TRPCTR.U & ~(mask);
1564 }
1565 
1566 
1568 {
1569  ccu6->TRPCTR.B.TRPPEN = FALSE;
1570 }
1571 
1572 
1574 {
1575  uint32 shift = ((timer * 8) + 2);
1576  uint32 mask = (1U << shift);
1577  ccu6->TCTR0.U = ccu6->TCTR0.U | (mask);
1578 }
1579 
1580 
1581 IFX_INLINE void IfxCcu6_enableCountEvent(Ifx_CCU6 *ccu6, boolean t12, boolean t13)
1582 {
1583  Ifx_CCU6_TCTR4 tctr4;
1584  tctr4.U = 0;
1585  tctr4.B.T12CNT = t12;
1586  tctr4.B.T13CNT = t13;
1587  ccu6->TCTR4.U = tctr4.U;
1588 }
1589 
1590 
1592 {
1593  uint32 shift = (8 + channel);
1594  uint32 mask = (1 << shift);
1595  ccu6->T12DTC.U = ccu6->T12DTC.U | (mask);
1596 }
1597 
1598 
1600 {
1601  ccu6->T12MSEL.B.DBYP = TRUE;
1602 }
1603 
1604 
1606 {
1607  ccu6->MCMOUTS.B.STRHP = TRUE;
1608 }
1609 
1610 
1612 {
1613  uint32 mask = (1U << source);
1614  ccu6->IEN.U = ccu6->IEN.U | (mask);
1615 }
1616 
1617 
1619 {
1620  ccu6->MODCTR.B.MCMEN = TRUE;
1621 }
1622 
1623 
1625 {
1626  ccu6->MCMOUTS.B.STRMCM = TRUE;
1627 }
1628 
1629 
1631 {
1632  ccu6->MCMCTR.B.STE12D = TRUE;
1633 }
1634 
1635 
1637 {
1638  ccu6->MCMCTR.B.STE12U = TRUE;
1639 }
1640 
1641 
1643 {
1644  ccu6->MCMCTR.B.STE13U = TRUE;
1645 }
1646 
1647 
1648 IFX_INLINE void IfxCcu6_enableShadowTransfer(Ifx_CCU6 *ccu6, boolean t12, boolean t13)
1649 {
1650  Ifx_CCU6_TCTR4 tctr4;
1651  tctr4.U = 0;
1652  tctr4.B.T12STR = t12;
1653  tctr4.B.T13STR = t13;
1654  ccu6->TCTR4.U = tctr4.U;
1655 }
1656 
1657 
1659 {
1660  uint32 mask = (1U << timer);
1661  ccu6->TCTR2.U = ccu6->TCTR2.U | (mask);
1662 }
1663 
1664 
1666 {
1667  ccu6->CMPSTAT.B.T13IM = TRUE;
1668 }
1669 
1670 
1672 {
1673  uint32 mask = (1U << timer);
1674  ccu6->MCFG.U = ccu6->MCFG.U | (mask);
1675 }
1676 
1677 
1678 IFX_INLINE void IfxCcu6_enableTrap(Ifx_CCU6 *ccu6, IfxCcu6_ChannelOut channelOut)
1679 {
1680  uint32 shift = (8 + channelOut); // offset at location TRPCTR.8 for output CC60
1681  uint32 mask = (1U << shift);
1682  ccu6->TRPCTR.U = ccu6->TRPCTR.U | (mask);
1683 }
1684 
1685 
1686 IFX_INLINE void IfxCcu6_enableTrapPin(Ifx_CCU6 *ccu6)
1687 {
1688  ccu6->TRPCTR.B.TRPPEN = TRUE;
1689 }
1690 
1691 
1693 {
1694  uint32 shift = (2 * input);
1695  uint32 mask = (0x3U << shift);
1696  ccu6->PISEL0.U = (ccu6->PISEL0.U & ~mask) | ((uint32)signal << shift);
1697 }
1698 
1699 
1701 {
1702  IfxPort_setPinModeInput(cc60In->pin.port, cc60In->pin.pinIndex, inputMode);
1704 }
1705 
1706 
1708 {
1709  IfxPort_setPinModeOutput(cc60Out->pin.port, cc60Out->pin.pinIndex, outputMode, cc60Out->select);
1710  IfxPort_setPinPadDriver(cc60Out->pin.port, cc60Out->pin.pinIndex, padDriver);
1711 }
1712 
1713 
1715 {
1716  IfxPort_setPinModeInput(cc61In->pin.port, cc61In->pin.pinIndex, inputMode);
1718 }
1719 
1720 
1722 {
1723  IfxPort_setPinModeOutput(cc61Out->pin.port, cc61Out->pin.pinIndex, outputMode, cc61Out->select);
1724  IfxPort_setPinPadDriver(cc61Out->pin.port, cc61Out->pin.pinIndex, padDriver);
1725 }
1726 
1727 
1729 {
1730  IfxPort_setPinModeInput(cc62In->pin.port, cc62In->pin.pinIndex, inputMode);
1732 }
1733 
1734 
1736 {
1737  IfxPort_setPinModeOutput(cc62Out->pin.port, cc62Out->pin.pinIndex, outputMode, cc62Out->select);
1738  IfxPort_setPinPadDriver(cc62Out->pin.port, cc62Out->pin.pinIndex, padDriver);
1739 }
1740 
1741 
1743 {
1744  IfxPort_setPinModeInput(ccpos0->pin.port, ccpos0->pin.pinIndex, inputMode);
1746 }
1747 
1748 
1750 {
1751  IfxPort_setPinModeInput(ccpos1->pin.port, ccpos1->pin.pinIndex, inputMode);
1753 }
1754 
1755 
1757 {
1758  IfxPort_setPinModeInput(ccpos2->pin.port, ccpos2->pin.pinIndex, inputMode);
1760 }
1761 
1762 
1764 {
1765  IfxPort_setPinModeOutput(cout60->pin.port, cout60->pin.pinIndex, outputMode, cout60->select);
1766  IfxPort_setPinPadDriver(cout60->pin.port, cout60->pin.pinIndex, padDriver);
1767 }
1768 
1769 
1771 {
1772  IfxPort_setPinModeOutput(cout61->pin.port, cout61->pin.pinIndex, outputMode, cout61->select);
1773  IfxPort_setPinPadDriver(cout61->pin.port, cout61->pin.pinIndex, padDriver);
1774 }
1775 
1776 
1778 {
1779  IfxPort_setPinModeOutput(cout62->pin.port, cout62->pin.pinIndex, outputMode, cout62->select);
1780  IfxPort_setPinPadDriver(cout62->pin.port, cout62->pin.pinIndex, padDriver);
1781 }
1782 
1783 
1785 {
1786  IfxPort_setPinModeOutput(cout63->pin.port, cout63->pin.pinIndex, outputMode, cout63->select);
1787  IfxPort_setPinPadDriver(cout63->pin.port, cout63->pin.pinIndex, padDriver);
1788 }
1789 
1790 
1792 {
1793  IfxPort_setPinModeInput(ctrap->pin.port, ctrap->pin.pinIndex, inputMode);
1795 }
1796 
1797 
1799 {
1800  IfxPort_setPinModeInput(t12hrIn->pin.port, t12hrIn->pin.pinIndex, inputMode);
1801  IfxCcu6_setT12InputSignal(t12hrIn->module, t12hrIn);
1802 }
1803 
1804 
1806 {
1807  IfxPort_setPinModeInput(t13hrIn->pin.port, t13hrIn->pin.pinIndex, inputMode);
1808  IfxCcu6_setT13InputSignal(t13hrIn->module, t13hrIn);
1809 }
1810 
1811 
1812 #endif /* IFXCCU6_H */