2 ******************************************************************************
3 * @file stm32h7xx_ll_hrtim.h
4 * @author MCD Application Team
5 * @brief Header file of HRTIM LL module.
6 ******************************************************************************
9 * <h2><center>© Copyright (c) 2017 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
17 ******************************************************************************
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32H7xx_LL_HRTIM_H
22 #define STM32H7xx_LL_HRTIM_H
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32h7xx.h"
31 /** @addtogroup STM32H7xx_LL_Driver
37 /** @defgroup HRTIM_LL HRTIM
41 /* Private types -------------------------------------------------------------*/
42 /* Private variables ---------------------------------------------------------*/
43 /** @defgroup HRTIM_LL_Private_Variables HRTIM Private Variables
46 static const uint16_t REG_OFFSET_TAB_TIMER
[] =
48 0x00U
, /* 0: MASTER */
49 0x80U
, /* 1: TIMER A */
50 0x100U
, /* 2: TIMER B */
51 0x180U
, /* 3: TIMER C */
52 0x200U
, /* 4: TIMER D */
53 0x280U
/* 5: TIMER E */
56 static const uint8_t REG_OFFSET_TAB_ADCxR
[] =
58 0x00U
, /* 0: HRTIM_ADC1R */
59 0x04U
, /* 1: HRTIM_ADC2R */
60 0x08U
, /* 2: HRTIM_ADC3R */
61 0x0CU
, /* 3: HRTIM_ADC4R */
64 static const uint16_t REG_OFFSET_TAB_SETxR
[] =
78 static const uint16_t REG_OFFSET_TAB_OUTxR
[] =
92 static const uint8_t REG_OFFSET_TAB_EECR
[] =
94 0x00U
, /* LL_HRTIM_EVENT_1 */
95 0x00U
, /* LL_HRTIM_EVENT_2 */
96 0x00U
, /* LL_HRTIM_EVENT_3 */
97 0x00U
, /* LL_HRTIM_EVENT_4 */
98 0x00U
, /* LL_HRTIM_EVENT_5 */
99 0x04U
, /* LL_HRTIM_EVENT_6 */
100 0x04U
, /* LL_HRTIM_EVENT_7 */
101 0x04U
, /* LL_HRTIM_EVENT_8 */
102 0x04U
, /* LL_HRTIM_EVENT_9 */
103 0x04U
/* LL_HRTIM_EVENT_10 */
106 static const uint8_t REG_OFFSET_TAB_FLTINR
[] =
108 0x00U
, /* LL_HRTIM_FAULT_1 */
109 0x00U
, /* LL_HRTIM_FAULT_2 */
110 0x00U
, /* LL_HRTIM_FAULT_3 */
111 0x00U
, /* LL_HRTIM_FAULT_4 */
112 0x04U
/* LL_HRTIM_FAULT_5 */
115 static const uint32_t REG_MASK_TAB_UPDATETRIG
[] =
117 0x20000000U
, /* 0: MASTER */
118 0x01FE0000U
, /* 1: TIMER A */
119 0x01FE0000U
, /* 2: TIMER B */
120 0x01FE0000U
, /* 3: TIMER C */
121 0x01FE0000U
, /* 4: TIMER D */
122 0x01FE0000U
/* 5: TIMER E */
125 static const uint8_t REG_SHIFT_TAB_UPDATETRIG
[] =
135 static const uint8_t REG_SHIFT_TAB_EExSRC
[] =
137 0U, /* LL_HRTIM_EVENT_1 */
138 6U, /* LL_HRTIM_EVENT_2 */
139 12U, /* LL_HRTIM_EVENT_3 */
140 18U, /* LL_HRTIM_EVENT_4 */
141 24U, /* LL_HRTIM_EVENT_5 */
142 0U, /* LL_HRTIM_EVENT_6 */
143 6U, /* LL_HRTIM_EVENT_7 */
144 12U, /* LL_HRTIM_EVENT_8 */
145 18U, /* LL_HRTIM_EVENT_9 */
146 24U /* LL_HRTIM_EVENT_10 */
149 static const uint32_t REG_MASK_TAB_UPDATEGATING
[] =
151 HRTIM_MCR_BRSTDMA
, /* 0: MASTER */
152 HRTIM_TIMCR_UPDGAT
, /* 1: TIMER A */
153 HRTIM_TIMCR_UPDGAT
, /* 2: TIMER B */
154 HRTIM_TIMCR_UPDGAT
, /* 3: TIMER C */
155 HRTIM_TIMCR_UPDGAT
, /* 4: TIMER D */
156 HRTIM_TIMCR_UPDGAT
/* 5: TIMER E */
159 static const uint8_t REG_SHIFT_TAB_UPDATEGATING
[] =
169 static const uint8_t REG_SHIFT_TAB_OUTxR
[] =
183 static const uint8_t REG_SHIFT_TAB_OxSTAT
[] =
197 static const uint8_t REG_SHIFT_TAB_FLTxE
[] =
199 0U, /* LL_HRTIM_FAULT_1 */
200 8U, /* LL_HRTIM_FAULT_2 */
201 16U, /* LL_HRTIM_FAULT_3 */
202 24U, /* LL_HRTIM_FAULT_4 */
203 0U /* LL_HRTIM_FAULT_5 */
211 /* Private constants ---------------------------------------------------------*/
212 /** @defgroup HRTIM_LL_Private_Constants HRTIM Private Constants
215 #define HRTIM_CR1_UDIS_MASK ((uint32_t)(HRTIM_CR1_MUDIS |\
222 #define HRTIM_CR2_SWUPD_MASK ((uint32_t)(HRTIM_CR2_MSWU |\
229 #define HRTIM_CR2_SWRST_MASK ((uint32_t)(HRTIM_CR2_MRST |\
236 #define HRTIM_OENR_OEN_MASK ((uint32_t)(HRTIM_OENR_TA1OEN |\
247 #define HRTIM_OENR_ODIS_MASK ((uint32_t)(HRTIM_ODISR_TA1ODIS |\
248 HRTIM_ODISR_TA2ODIS |\
249 HRTIM_ODISR_TB1ODIS |\
250 HRTIM_ODISR_TB2ODIS |\
251 HRTIM_ODISR_TC1ODIS |\
252 HRTIM_ODISR_TC2ODIS |\
253 HRTIM_ODISR_TD1ODIS |\
254 HRTIM_ODISR_TD2ODIS |\
255 HRTIM_ODISR_TE1ODIS |\
256 HRTIM_ODISR_TE2ODIS))
258 #define HRTIM_OUT_CONFIG_MASK ((uint32_t)(HRTIM_OUTR_POL1 |\
265 #define HRTIM_EE_CONFIG_MASK ((uint32_t)(HRTIM_EECR1_EE1SRC |\
266 HRTIM_EECR1_EE1POL |\
267 HRTIM_EECR1_EE1SNS |\
268 HRTIM_EECR1_EE1FAST))
270 #define HRTIM_FLT_CONFIG_MASK ((uint32_t)(HRTIM_FLTINR1_FLT1P |\
271 HRTIM_FLTINR1_FLT1SRC))
273 #define HRTIM_BM_CONFIG_MASK ((uint32_t)( HRTIM_BMCR_BMPRSC |\
282 /* Private macros ------------------------------------------------------------*/
283 /* Exported types ------------------------------------------------------------*/
284 /* Exported constants --------------------------------------------------------*/
285 /** @defgroup HRTIM_LL_Exported_Constants HRTIM Exported Constants
289 /** @defgroup HRTIM_LL_EC_GET_FLAG Get Flags Defines
290 * @brief Flags defines which can be used with LL_HRTIM_ReadReg function
293 #define LL_HRTIM_ISR_FLT1 HRTIM_ISR_FLT1
294 #define LL_HRTIM_ISR_FLT2 HRTIM_ISR_FLT2
295 #define LL_HRTIM_ISR_FLT3 HRTIM_ISR_FLT3
296 #define LL_HRTIM_ISR_FLT4 HRTIM_ISR_FLT4
297 #define LL_HRTIM_ISR_FLT5 HRTIM_ISR_FLT5
298 #define LL_HRTIM_ISR_SYSFLT HRTIM_ISR_SYSFLT
299 #define LL_HRTIM_ISR_BMPER HRTIM_ISR_BMPER
301 #define LL_HRTIM_MISR_MCMP1 HRTIM_MISR_MCMP1
302 #define LL_HRTIM_MISR_MCMP2 HRTIM_MISR_MCMP2
303 #define LL_HRTIM_MISR_MCMP3 HRTIM_MISR_MCMP3
304 #define LL_HRTIM_MISR_MCMP4 HRTIM_MISR_MCMP4
305 #define LL_HRTIM_MISR_MREP HRTIM_MISR_MREP
306 #define LL_HRTIM_MISR_SYNC HRTIM_MISR_SYNC
307 #define LL_HRTIM_MISR_MUPD HRTIM_MISR_MUPD
309 #define LL_HRTIM_TIMISR_CMP1 HRTIM_TIMISR_CMP1
310 #define LL_HRTIM_TIMISR_CMP2 HRTIM_TIMISR_CMP2
311 #define LL_HRTIM_TIMISR_CMP3 HRTIM_TIMISR_CMP3
312 #define LL_HRTIM_TIMISR_CMP4 HRTIM_TIMISR_CMP4
313 #define LL_HRTIM_TIMISR_REP HRTIM_TIMISR_REP
314 #define LL_HRTIM_TIMISR_UPD HRTIM_TIMISR_UPD
315 #define LL_HRTIM_TIMISR_CPT1 HRTIM_TIMISR_CPT1
316 #define LL_HRTIM_TIMISR_CPT2 HRTIM_TIMISR_CPT2
317 #define LL_HRTIM_TIMISR_SET1 HRTIM_TIMISR_SET1
318 #define LL_HRTIM_TIMISR_RST1 HRTIM_TIMISR_RST1
319 #define LL_HRTIM_TIMISR_SET2 HRTIM_TIMISR_SET2
320 #define LL_HRTIM_TIMISR_RST2 HRTIM_TIMISR_RST2
321 #define LL_HRTIM_TIMISR_RST HRTIM_TIMISR_RST
322 #define LL_HRTIM_TIMISR_DLYPRT HRTIM_TIMISR_DLYPRT
327 /** @defgroup HRTIM_LL_EC_IT IT Defines
328 * @brief IT defines which can be used with LL_HRTIM_ReadReg and LL_HRTIM_WriteReg functions
331 #define LL_HRTIM_IER_FLT1IE HRTIM_IER_FLT1IE
332 #define LL_HRTIM_IER_FLT2IE HRTIM_IER_FLT2IE
333 #define LL_HRTIM_IER_FLT3IE HRTIM_IER_FLT3IE
334 #define LL_HRTIM_IER_FLT4IE HRTIM_IER_FLT4IE
335 #define LL_HRTIM_IER_FLT5IE HRTIM_IER_FLT5IE
336 #define LL_HRTIM_IER_SYSFLTIE HRTIM_IER_SYSFLTIE
337 #define LL_HRTIM_IER_BMPERIE HRTIM_IER_BMPERIE
339 #define LL_HRTIM_MDIER_MCMP1IE HRTIM_MDIER_MCMP1IE
340 #define LL_HRTIM_MDIER_MCMP2IE HRTIM_MDIER_MCMP2IE
341 #define LL_HRTIM_MDIER_MCMP3IE HRTIM_MDIER_MCMP3IE
342 #define LL_HRTIM_MDIER_MCMP4IE HRTIM_MDIER_MCMP4IE
343 #define LL_HRTIM_MDIER_MREPIE HRTIM_MDIER_MREPIE
344 #define LL_HRTIM_MDIER_SYNCIE HRTIM_MDIER_SYNCIE
345 #define LL_HRTIM_MDIER_MUPDIE HRTIM_MDIER_MUPDIE
347 #define LL_HRTIM_TIMDIER_CMP1IE HRTIM_TIMDIER_CMP1IE
348 #define LL_HRTIM_TIMDIER_CMP2IE HRTIM_TIMDIER_CMP2IE
349 #define LL_HRTIM_TIMDIER_CMP3IE HRTIM_TIMDIER_CMP3IE
350 #define LL_HRTIM_TIMDIER_CMP4IE HRTIM_TIMDIER_CMP4IE
351 #define LL_HRTIM_TIMDIER_REPIE HRTIM_TIMDIER_REPIE
352 #define LL_HRTIM_TIMDIER_UPDIE HRTIM_TIMDIER_UPDIE
353 #define LL_HRTIM_TIMDIER_CPT1IE HRTIM_TIMDIER_CPT1IE
354 #define LL_HRTIM_TIMDIER_CPT2IE HRTIM_TIMDIER_CPT2IE
355 #define LL_HRTIM_TIMDIER_SET1IE HRTIM_TIMDIER_SET1IE
356 #define LL_HRTIM_TIMDIER_RST1IE HRTIM_TIMDIER_RST1IE
357 #define LL_HRTIM_TIMDIER_SET2IE HRTIM_TIMDIER_SET2IE
358 #define LL_HRTIM_TIMDIER_RST2IE HRTIM_TIMDIER_RST2IE
359 #define LL_HRTIM_TIMDIER_RSTIE HRTIM_TIMDIER_RSTIE
360 #define LL_HRTIM_TIMDIER_DLYPRTIE HRTIM_TIMDIER_DLYPRTIE
365 /** @defgroup HRTIM_LL_EC_SYNCIN_SRC SYNCHRONIZATION INPUT SOURCE
367 * @brief Constants defining defining the synchronization input source.
369 #define LL_HRTIM_SYNCIN_SRC_NONE 0x00000000U /*!< HRTIM is not synchronized and runs in standalone mode */
370 #define LL_HRTIM_SYNCIN_SRC_TIM_EVENT (HRTIM_MCR_SYNC_IN_1) /*!< The HRTIM is synchronized with the on-chip timer */
371 #define LL_HRTIM_SYNCIN_SRC_EXTERNAL_EVENT (HRTIM_MCR_SYNC_IN_1 | HRTIM_MCR_SYNC_IN_0) /*!< A positive pulse on SYNCIN input triggers the HRTIM */
376 /** @defgroup HRTIM_LL_EC_SYNCOUT_SRC SYNCHRONIZATION OUTPUT SOURCE
378 * @brief Constants defining the source and event to be sent on the synchronization output.
380 #define LL_HRTIM_SYNCOUT_SRC_MASTER_START 0x00000000U /*!< A pulse is sent on the SYNCOUT output upon master timer start event */
381 #define LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1 (HRTIM_MCR_SYNC_SRC_0) /*!< A pulse is sent on the SYNCOUT output upon master timer compare 1 event*/
382 #define LL_HRTIM_SYNCOUT_SRC_TIMA_START (HRTIM_MCR_SYNC_SRC_1) /*!< A pulse is sent on the SYNCOUT output upon timer A start or reset events */
383 #define LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1 (HRTIM_MCR_SYNC_SRC_1 | HRTIM_MCR_SYNC_SRC_0) /*!< A pulse is sent on the SYNCOUT output upon timer A compare 1 event */
388 /** @defgroup HRTIM_LL_EC_SYNCOUT_POLARITY SYNCHRONIZATION OUTPUT POLARITY
390 * @brief Constants defining the routing and conditioning of the synchronization output event.
392 #define LL_HRTIM_SYNCOUT_DISABLED 0x00000000U /*!< Synchronization output event is disabled */
393 #define LL_HRTIM_SYNCOUT_POSITIVE_PULSE (HRTIM_MCR_SYNC_OUT_1) /*!< SCOUT pin has a low idle level and issues a positive pulse of 16 fHRTIM clock cycles length for the synchronization */
394 #define LL_HRTIM_SYNCOUT_NEGATIVE_PULSE (HRTIM_MCR_SYNC_OUT_1 | HRTIM_MCR_SYNC_OUT_0) /*!< SCOUT pin has a high idle level and issues a negative pulse of 16 fHRTIM clock cycles length for the synchronization */
399 /** @defgroup HRTIM_LL_EC_TIMER TIMER ID
401 * @brief Constants identifying a timing unit.
403 #define LL_HRTIM_TIMER_NONE 0U /*!< Master timer identifier */
404 #define LL_HRTIM_TIMER_MASTER HRTIM_MCR_MCEN /*!< Master timer identifier */
405 #define LL_HRTIM_TIMER_A HRTIM_MCR_TACEN /*!< Timer A identifier */
406 #define LL_HRTIM_TIMER_B HRTIM_MCR_TBCEN /*!< Timer B identifier */
407 #define LL_HRTIM_TIMER_C HRTIM_MCR_TCCEN /*!< Timer C identifier */
408 #define LL_HRTIM_TIMER_D HRTIM_MCR_TDCEN /*!< Timer D identifier */
409 #define LL_HRTIM_TIMER_E HRTIM_MCR_TECEN /*!< Timer E identifier */
410 #define LL_HRTIM_TIMER_X (HRTIM_MCR_TACEN |\
411 HRTIM_MCR_TBCEN | HRTIM_MCR_TCCEN |\
412 HRTIM_MCR_TDCEN | HRTIM_MCR_TECEN )
413 #define LL_HRTIM_TIMER_ALL (LL_HRTIM_TIMER_MASTER | LL_HRTIM_TIMER_X)
419 /** @defgroup HRTIM_LL_EC_OUTPUT OUTPUT ID
421 * @brief Constants identifying an HRTIM output.
423 #define LL_HRTIM_OUTPUT_TA1 HRTIM_OENR_TA1OEN /*!< Timer A - Output 1 identifier */
424 #define LL_HRTIM_OUTPUT_TA2 HRTIM_OENR_TA2OEN /*!< Timer A - Output 2 identifier */
425 #define LL_HRTIM_OUTPUT_TB1 HRTIM_OENR_TB1OEN /*!< Timer B - Output 1 identifier */
426 #define LL_HRTIM_OUTPUT_TB2 HRTIM_OENR_TB2OEN /*!< Timer B - Output 2 identifier */
427 #define LL_HRTIM_OUTPUT_TC1 HRTIM_OENR_TC1OEN /*!< Timer C - Output 1 identifier */
428 #define LL_HRTIM_OUTPUT_TC2 HRTIM_OENR_TC2OEN /*!< Timer C - Output 2 identifier */
429 #define LL_HRTIM_OUTPUT_TD1 HRTIM_OENR_TD1OEN /*!< Timer D - Output 1 identifier */
430 #define LL_HRTIM_OUTPUT_TD2 HRTIM_OENR_TD2OEN /*!< Timer D - Output 2 identifier */
431 #define LL_HRTIM_OUTPUT_TE1 HRTIM_OENR_TE1OEN /*!< Timer E - Output 1 identifier */
432 #define LL_HRTIM_OUTPUT_TE2 HRTIM_OENR_TE2OEN /*!< Timer E - Output 2 identifier */
437 /** @defgroup HRTIM_LL_EC_COMPAREUNIT COMPARE UNIT ID
439 * @brief Constants identifying a compare unit.
441 #define LL_HRTIM_COMPAREUNIT_2 HRTIM_TIMCR_DELCMP2 /*!< Compare unit 2 identifier */
442 #define LL_HRTIM_COMPAREUNIT_4 HRTIM_TIMCR_DELCMP4 /*!< Compare unit 4 identifier */
447 /** @defgroup HRTIM_LL_EC_CAPTUREUNIT CAPTURE UNIT ID
449 * @brief Constants identifying a capture unit.
451 #define LL_HRTIM_CAPTUREUNIT_1 0 /*!< Capture unit 1 identifier */
452 #define LL_HRTIM_CAPTUREUNIT_2 1 /*!< Capture unit 2 identifier */
457 /** @defgroup HRTIM_LL_EC_FAULT FAULT ID
459 * @brief Constants identifying a fault channel.
461 #define LL_HRTIM_FAULT_1 HRTIM_FLTR_FLT1EN /*!< Fault channel 1 identifier */
462 #define LL_HRTIM_FAULT_2 HRTIM_FLTR_FLT2EN /*!< Fault channel 2 identifier */
463 #define LL_HRTIM_FAULT_3 HRTIM_FLTR_FLT3EN /*!< Fault channel 3 identifier */
464 #define LL_HRTIM_FAULT_4 HRTIM_FLTR_FLT4EN /*!< Fault channel 4 identifier */
465 #define LL_HRTIM_FAULT_5 HRTIM_FLTR_FLT5EN /*!< Fault channel 5 identifier */
470 /** @defgroup HRTIM_LL_EC_EVENT EXTERNAL EVENT ID
472 * @brief Constants identifying an external event channel.
474 #define LL_HRTIM_EVENT_1 ((uint32_t)0x00000001U) /*!< External event channel 1 identifier */
475 #define LL_HRTIM_EVENT_2 ((uint32_t)0x00000002U) /*!< External event channel 2 identifier */
476 #define LL_HRTIM_EVENT_3 ((uint32_t)0x00000004U) /*!< External event channel 3 identifier */
477 #define LL_HRTIM_EVENT_4 ((uint32_t)0x00000008U) /*!< External event channel 4 identifier */
478 #define LL_HRTIM_EVENT_5 ((uint32_t)0x00000010U) /*!< External event channel 5 identifier */
479 #define LL_HRTIM_EVENT_6 ((uint32_t)0x00000020U) /*!< External event channel 6 identifier */
480 #define LL_HRTIM_EVENT_7 ((uint32_t)0x00000040U) /*!< External event channel 7 identifier */
481 #define LL_HRTIM_EVENT_8 ((uint32_t)0x00000080U) /*!< External event channel 8 identifier */
482 #define LL_HRTIM_EVENT_9 ((uint32_t)0x00000100U) /*!< External event channel 9 identifier */
483 #define LL_HRTIM_EVENT_10 ((uint32_t)0x00000200U) /*!< External event channel 10 identifier */
488 /** @defgroup HRTIM_LL_EC_OUTPUTSTATE OUTPUT STATE
490 * @brief Constants defining the state of an HRTIM output.
492 #define LL_HRTIM_OUTPUTSTATE_IDLE ((uint32_t)0x00000001U) /*!< Main operating mode, where the output can take the active or inactive level as programmed in the crossbar unit */
493 #define LL_HRTIM_OUTPUTSTATE_RUN ((uint32_t)0x00000002U) /*!< Default operating state (e.g. after an HRTIM reset, when the outputs are disabled by software or during a burst mode operation) */
494 #define LL_HRTIM_OUTPUTSTATE_FAULT ((uint32_t)0x00000003U) /*!< Safety state, entered in case of a shut-down request on FAULTx inputs */
499 /** @defgroup HRTIM_LL_EC_ADCTRIG ADC TRIGGER
501 * @brief Constants identifying an ADC trigger.
503 #define LL_HRTIM_ADCTRIG_1 ((uint32_t)0x00000000U) /*!< ADC trigger 1 identifier */
504 #define LL_HRTIM_ADCTRIG_2 ((uint32_t)0x00000001U) /*!< ADC trigger 2 identifier */
505 #define LL_HRTIM_ADCTRIG_3 ((uint32_t)0x00000002U) /*!< ADC trigger 3 identifier */
506 #define LL_HRTIM_ADCTRIG_4 ((uint32_t)0x00000003U) /*!< ADC trigger 4 identifier */
511 /** @defgroup HRTIM_LL_EC_ADCTRIG_UPDATE ADC TRIGGER UPDATE
513 * @brief constants defining the source triggering the update of the HRTIM_ADCxR register (transfer from preload to active register).
515 #define LL_HRTIM_ADCTRIG_UPDATE_MASTER 0x00000000U /*!< HRTIM_ADCxR register update is triggered by the Master timer */
516 #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_A (HRTIM_CR1_ADC1USRC_0) /*!< HRTIM_ADCxR register update is triggered by the Timer A */
517 #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_B (HRTIM_CR1_ADC1USRC_1) /*!< HRTIM_ADCxR register update is triggered by the Timer B */
518 #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_C (HRTIM_CR1_ADC1USRC_1 | HRTIM_CR1_ADC1USRC_0) /*!< HRTIM_ADCxR register update is triggered by the Timer C */
519 #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_D (HRTIM_CR1_ADC1USRC_2) /*!< HRTIM_ADCxR register update is triggered by the Timer D */
520 #define LL_HRTIM_ADCTRIG_UPDATE_TIMER_E (HRTIM_CR1_ADC1USRC_2 | HRTIM_CR1_ADC1USRC_0) /*!< HRTIM_ADCxR register update is triggered by the Timer E */
525 /** @defgroup HRTIM_LL_EC_ADCTRIG_SRC13 ADC TRIGGER 1/3 SOURCE
527 * @brief constants defining the events triggering ADC conversion for ADC Triggers 1 and 3.
529 #define LL_HRTIM_ADCTRIG_SRC13_NONE 0x00000000U /*!< No ADC trigger event */
530 #define LL_HRTIM_ADCTRIG_SRC13_MCMP1 HRTIM_ADC1R_AD1MC1 /*!< ADC Trigger on master compare 1 */
531 #define LL_HRTIM_ADCTRIG_SRC13_MCMP2 HRTIM_ADC1R_AD1MC2 /*!< ADC Trigger on master compare 2 */
532 #define LL_HRTIM_ADCTRIG_SRC13_MCMP3 HRTIM_ADC1R_AD1MC3 /*!< ADC Trigger on master compare 3 */
533 #define LL_HRTIM_ADCTRIG_SRC13_MCMP4 HRTIM_ADC1R_AD1MC4 /*!< ADC Trigger on master compare 4 */
534 #define LL_HRTIM_ADCTRIG_SRC13_MPER HRTIM_ADC1R_AD1MPER /*!< ADC Trigger on master period */
535 #define LL_HRTIM_ADCTRIG_SRC13_EEV1 HRTIM_ADC1R_AD1EEV1 /*!< ADC Trigger on external event 1 */
536 #define LL_HRTIM_ADCTRIG_SRC13_EEV2 HRTIM_ADC1R_AD1EEV2 /*!< ADC Trigger on external event 2 */
537 #define LL_HRTIM_ADCTRIG_SRC13_EEV3 HRTIM_ADC1R_AD1EEV3 /*!< ADC Trigger on external event 3 */
538 #define LL_HRTIM_ADCTRIG_SRC13_EEV4 HRTIM_ADC1R_AD1EEV4 /*!< ADC Trigger on external event 4 */
539 #define LL_HRTIM_ADCTRIG_SRC13_EEV5 HRTIM_ADC1R_AD1EEV5 /*!< ADC Trigger on external event 5 */
540 #define LL_HRTIM_ADCTRIG_SRC13_TIMACMP2 HRTIM_ADC1R_AD1TAC2 /*!< ADC Trigger on Timer A compare 2 */
541 #define LL_HRTIM_ADCTRIG_SRC13_TIMACMP3 HRTIM_ADC1R_AD1TAC3 /*!< ADC Trigger on Timer A compare 3 */
542 #define LL_HRTIM_ADCTRIG_SRC13_TIMACMP4 HRTIM_ADC1R_AD1TAC4 /*!< ADC Trigger on Timer A compare 4 */
543 #define LL_HRTIM_ADCTRIG_SRC13_TIMAPER HRTIM_ADC1R_AD1TAPER /*!< ADC Trigger on Timer A period */
544 #define LL_HRTIM_ADCTRIG_SRC13_TIMARST HRTIM_ADC1R_AD1TARST /*!< ADC Trigger on Timer A reset */
545 #define LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2 HRTIM_ADC1R_AD1TBC2 /*!< ADC Trigger on Timer B compare 2 */
546 #define LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3 HRTIM_ADC1R_AD1TBC3 /*!< ADC Trigger on Timer B compare 3 */
547 #define LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4 HRTIM_ADC1R_AD1TBC4 /*!< ADC Trigger on Timer B compare 4 */
548 #define LL_HRTIM_ADCTRIG_SRC13_TIMBPER HRTIM_ADC1R_AD1TBPER /*!< ADC Trigger on Timer B period */
549 #define LL_HRTIM_ADCTRIG_SRC13_TIMBRST HRTIM_ADC1R_AD1TBRST /*!< ADC Trigger on Timer B reset */
550 #define LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2 HRTIM_ADC1R_AD1TCC2 /*!< ADC Trigger on Timer C compare 2 */
551 #define LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3 HRTIM_ADC1R_AD1TCC3 /*!< ADC Trigger on Timer C compare 3 */
552 #define LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4 HRTIM_ADC1R_AD1TCC4 /*!< ADC Trigger on Timer C compare 4 */
553 #define LL_HRTIM_ADCTRIG_SRC13_TIMCPER HRTIM_ADC1R_AD1TCPER /*!< ADC Trigger on Timer C period */
554 #define LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2 HRTIM_ADC1R_AD1TDC2 /*!< ADC Trigger on Timer D compare 2 */
555 #define LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3 HRTIM_ADC1R_AD1TDC3 /*!< ADC Trigger on Timer D compare 3 */
556 #define LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4 HRTIM_ADC1R_AD1TDC4 /*!< ADC Trigger on Timer D compare 4 */
557 #define LL_HRTIM_ADCTRIG_SRC13_TIMDPER HRTIM_ADC1R_AD1TDPER /*!< ADC Trigger on Timer D period */
558 #define LL_HRTIM_ADCTRIG_SRC13_TIMECMP2 HRTIM_ADC1R_AD1TEC2 /*!< ADC Trigger on Timer E compare 2 */
559 #define LL_HRTIM_ADCTRIG_SRC13_TIMECMP3 HRTIM_ADC1R_AD1TEC3 /*!< ADC Trigger on Timer E compare 3 */
560 #define LL_HRTIM_ADCTRIG_SRC13_TIMECMP4 HRTIM_ADC1R_AD1TEC4 /*!< ADC Trigger on Timer E compare 4 */
561 #define LL_HRTIM_ADCTRIG_SRC13_TIMEPER HRTIM_ADC1R_AD1TEPER /*!< ADC Trigger on Timer E period */
566 /** @defgroup HRTIM_LL_EC_ADCTRIG_SRC24 ADC TRIGGER 2/4 SOURCE
568 * @brief constants defining the events triggering ADC conversion for ADC Triggers 2 and 4.
570 #define LL_HRTIM_ADCTRIG_SRC24_NONE 0x00000000U /*!< No ADC trigger event */
571 #define LL_HRTIM_ADCTRIG_SRC24_MCMP1 HRTIM_ADC2R_AD2MC1 /*!< ADC Trigger on master compare 1 */
572 #define LL_HRTIM_ADCTRIG_SRC24_MCMP2 HRTIM_ADC2R_AD2MC2 /*!< ADC Trigger on master compare 2 */
573 #define LL_HRTIM_ADCTRIG_SRC24_MCMP3 HRTIM_ADC2R_AD2MC3 /*!< ADC Trigger on master compare 3 */
574 #define LL_HRTIM_ADCTRIG_SRC24_MCMP4 HRTIM_ADC2R_AD2MC4 /*!< ADC Trigger on master compare 4 */
575 #define LL_HRTIM_ADCTRIG_SRC24_MPER HRTIM_ADC2R_AD2MPER /*!< ADC Trigger on master period */
576 #define LL_HRTIM_ADCTRIG_SRC24_EEV6 HRTIM_ADC2R_AD2EEV6 /*!< ADC Trigger on external event 6 */
577 #define LL_HRTIM_ADCTRIG_SRC24_EEV7 HRTIM_ADC2R_AD2EEV7 /*!< ADC Trigger on external event 7 */
578 #define LL_HRTIM_ADCTRIG_SRC24_EEV8 HRTIM_ADC2R_AD2EEV8 /*!< ADC Trigger on external event 8 */
579 #define LL_HRTIM_ADCTRIG_SRC24_EEV9 HRTIM_ADC2R_AD2EEV9 /*!< ADC Trigger on external event 9 */
580 #define LL_HRTIM_ADCTRIG_SRC24_EEV10 HRTIM_ADC2R_AD2EEV10 /*!< ADC Trigger on external event 10 */
581 #define LL_HRTIM_ADCTRIG_SRC24_TIMACMP2 HRTIM_ADC2R_AD2TAC2 /*!< ADC Trigger on Timer A compare 2 */
582 #define LL_HRTIM_ADCTRIG_SRC24_TIMACMP3 HRTIM_ADC2R_AD2TAC3 /*!< ADC Trigger on Timer A compare 3 */
583 #define LL_HRTIM_ADCTRIG_SRC24_TIMACMP4 HRTIM_ADC2R_AD2TAC4 /*!< ADC Trigger on Timer A compare 4 */
584 #define LL_HRTIM_ADCTRIG_SRC24_TIMAPER HRTIM_ADC2R_AD2TAPER /*!< ADC Trigger on Timer A period */
585 #define LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2 HRTIM_ADC2R_AD2TBC2 /*!< ADC Trigger on Timer B compare 2 */
586 #define LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3 HRTIM_ADC2R_AD2TBC3 /*!< ADC Trigger on Timer B compare 3 */
587 #define LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4 HRTIM_ADC2R_AD2TBC4 /*!< ADC Trigger on Timer B compare 4 */
588 #define LL_HRTIM_ADCTRIG_SRC24_TIMBPER HRTIM_ADC2R_AD2TBPER /*!< ADC Trigger on Timer B period */
589 #define LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2 HRTIM_ADC2R_AD2TCC2 /*!< ADC Trigger on Timer C compare 2 */
590 #define LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3 HRTIM_ADC2R_AD2TCC3 /*!< ADC Trigger on Timer C compare 3 */
591 #define LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4 HRTIM_ADC2R_AD2TCC4 /*!< ADC Trigger on Timer C compare 4 */
592 #define LL_HRTIM_ADCTRIG_SRC24_TIMCPER HRTIM_ADC2R_AD2TCPER /*!< ADC Trigger on Timer C period */
593 #define LL_HRTIM_ADCTRIG_SRC24_TIMCRST HRTIM_ADC2R_AD2TCRST /*!< ADC Trigger on Timer C reset */
594 #define LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2 HRTIM_ADC2R_AD2TDC2 /*!< ADC Trigger on Timer D compare 2 */
595 #define LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3 HRTIM_ADC2R_AD2TDC3 /*!< ADC Trigger on Timer D compare 3 */
596 #define LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4 HRTIM_ADC2R_AD2TDC4 /*!< ADC Trigger on Timer D compare 4 */
597 #define LL_HRTIM_ADCTRIG_SRC24_TIMDPER HRTIM_ADC2R_AD2TDPER /*!< ADC Trigger on Timer D period */
598 #define LL_HRTIM_ADCTRIG_SRC24_TIMDRST HRTIM_ADC2R_AD2TDRST /*!< ADC Trigger on Timer D reset */
599 #define LL_HRTIM_ADCTRIG_SRC24_TIMECMP2 HRTIM_ADC2R_AD2TEC2 /*!< ADC Trigger on Timer E compare 2 */
600 #define LL_HRTIM_ADCTRIG_SRC24_TIMECMP3 HRTIM_ADC2R_AD2TEC3 /*!< ADC Trigger on Timer E compare 3 */
601 #define LL_HRTIM_ADCTRIG_SRC24_TIMECMP4 HRTIM_ADC2R_AD2TEC4 /*!< ADC Trigger on Timer E compare 4 */
602 #define LL_HRTIM_ADCTRIG_SRC24_TIMERST HRTIM_ADC2R_AD2TERST /*!< ADC Trigger on Timer E reset */
607 /** @defgroup HRTIM_LL_EC_PRESCALERRATIO PRESCALER RATIO
609 * @brief Constants defining timer high-resolution clock prescaler ratio.
611 #define LL_HRTIM_PRESCALERRATIO_MUL32 0x00000000U /*!< fHRCK: fHRTIM x 32 = 4.608 GHz - Resolution: 217 ps - Min PWM frequency: 70.3 kHz (fHRTIM=144MHz) */
612 #define LL_HRTIM_PRESCALERRATIO_MUL16 ((uint32_t)0x00000001U) /*!< fHRCK: fHRTIM x 16 = 2.304 GHz - Resolution: 434 ps - Min PWM frequency: 35.1 KHz (fHRTIM=144MHz) */
613 #define LL_HRTIM_PRESCALERRATIO_MUL8 ((uint32_t)0x00000002U) /*!< fHRCK: fHRTIM x 8 = 1.152 GHz - Resolution: 868 ps - Min PWM frequency: 17.6 kHz (fHRTIM=144MHz) */
614 #define LL_HRTIM_PRESCALERRATIO_MUL4 ((uint32_t)0x00000003U) /*!< fHRCK: fHRTIM x 4 = 576 MHz - Resolution: 1.73 ns - Min PWM frequency: 8.8 kHz (fHRTIM=144MHz) */
615 #define LL_HRTIM_PRESCALERRATIO_MUL2 ((uint32_t)0x00000004U) /*!< fHRCK: fHRTIM x 2 = 288 MHz - Resolution: 3.47 ns - Min PWM frequency: 4.4 kHz (fHRTIM=144MHz) */
616 #define LL_HRTIM_PRESCALERRATIO_DIV1 ((uint32_t)0x00000005U) /*!< fHRCK: fHRTIM = 144 MHz - Resolution: 6.95 ns - Min PWM frequency: 2.2 kHz (fHRTIM=144MHz) */
617 #define LL_HRTIM_PRESCALERRATIO_DIV2 ((uint32_t)0x00000006U) /*!< fHRCK: fHRTIM / 2 = 72 MHz - Resolution: 13.88 ns- Min PWM frequency: 1.1 kHz (fHRTIM=144MHz) */
618 #define LL_HRTIM_PRESCALERRATIO_DIV4 ((uint32_t)0x00000007U) /*!< fHRCK: fHRTIM / 4 = 36 MHz - Resolution: 27.7 ns- Min PWM frequency: 550Hz (fHRTIM=144MHz) */
623 /** @defgroup HRTIM_LL_EC_MODE COUNTER MODE
625 * @brief Constants defining timer counter operating mode.
627 #define LL_HRTIM_MODE_CONTINUOUS ((uint32_t)0x00000008U) /*!< The timer operates in continuous (free-running) mode */
628 #define LL_HRTIM_MODE_SINGLESHOT 0x00000000U /*!< The timer operates in non retriggerable single-shot mode */
629 #define LL_HRTIM_MODE_RETRIGGERABLE ((uint32_t)0x00000010U) /*!< The timer operates in retriggerable single-shot mode */
634 /** @defgroup HRTIM_LL_EC_DACTRIG DAC TRIGGER
636 * @brief Constants defining on which output the DAC synchronization event is sent.
638 #define LL_HRTIM_DACTRIG_NONE 0x00000000U /*!< No DAC synchronization event generated */
639 #define LL_HRTIM_DACTRIG_DACTRIGOUT_1 (HRTIM_MCR_DACSYNC_0) /*!< DAC synchronization event generated on DACTrigOut1 output upon timer update */
640 #define LL_HRTIM_DACTRIG_DACTRIGOUT_2 (HRTIM_MCR_DACSYNC_1) /*!< DAC synchronization event generated on DACTrigOut2 output upon timer update */
641 #define LL_HRTIM_DACTRIG_DACTRIGOUT_3 (HRTIM_MCR_DACSYNC_1 | HRTIM_MCR_DACSYNC_0) /*!< DAC synchronization event generated on DACTrigOut3 output upon timer update */
646 /** @defgroup HRTIM_LL_EC_UPDATETRIG UPDATE TRIGGER
648 * @brief Constants defining whether the registers update is done synchronously with any other timer or master update.
650 #define LL_HRTIM_UPDATETRIG_NONE 0x00000000U /*!< Register update is disabled */
651 #define LL_HRTIM_UPDATETRIG_MASTER HRTIM_TIMCR_MSTU /*!< Register update is triggered by the master timer update */
652 #define LL_HRTIM_UPDATETRIG_TIMER_A HRTIM_TIMCR_TAU /*!< Register update is triggered by the timer A update */
653 #define LL_HRTIM_UPDATETRIG_TIMER_B HRTIM_TIMCR_TBU /*!< Register update is triggered by the timer B update */
654 #define LL_HRTIM_UPDATETRIG_TIMER_C HRTIM_TIMCR_TCU /*!< Register update is triggered by the timer C update*/
655 #define LL_HRTIM_UPDATETRIG_TIMER_D HRTIM_TIMCR_TDU /*!< Register update is triggered by the timer D update */
656 #define LL_HRTIM_UPDATETRIG_TIMER_E HRTIM_TIMCR_TEU /*!< Register update is triggered by the timer E update */
657 #define LL_HRTIM_UPDATETRIG_REPETITION HRTIM_TIMCR_TREPU /*!< Register update is triggered when the counter rolls over and HRTIM_REPx = 0*/
658 #define LL_HRTIM_UPDATETRIG_RESET HRTIM_TIMCR_TRSTU /*!< Register update is triggered by counter reset or roll-over to 0 after reaching the period value in continuous mode */
663 /** @defgroup HRTIM_LL_EC_UPDATEGATING UPDATE GATING
665 * @brief Constants defining how the update occurs relatively to the burst DMA transaction and the external update request on update enable inputs 1 to 3.
667 #define LL_HRTIM_UPDATEGATING_INDEPENDENT 0x00000000U /*!< Update done independently from the DMA burst transfer completion */
668 #define LL_HRTIM_UPDATEGATING_DMABURST (HRTIM_TIMCR_UPDGAT_0) /*!< Update done when the DMA burst transfer is completed */
669 #define LL_HRTIM_UPDATEGATING_DMABURST_UPDATE (HRTIM_TIMCR_UPDGAT_1) /*!< Update done on timer roll-over following a DMA burst transfer completion*/
670 #define LL_HRTIM_UPDATEGATING_UPDEN1 (HRTIM_TIMCR_UPDGAT_1 | HRTIM_TIMCR_UPDGAT_0) /*!< Slave timer only - Update done on a rising edge of HRTIM update enable input 1 */
671 #define LL_HRTIM_UPDATEGATING_UPDEN2 (HRTIM_TIMCR_UPDGAT_2) /*!< Slave timer only - Update done on a rising edge of HRTIM update enable input 2 */
672 #define LL_HRTIM_UPDATEGATING_UPDEN3 (HRTIM_TIMCR_UPDGAT_2 | HRTIM_TIMCR_UPDGAT_0) /*!< Slave timer only - Update done on a rising edge of HRTIM update enable input 3 */
673 #define LL_HRTIM_UPDATEGATING_UPDEN1_UPDATE (HRTIM_TIMCR_UPDGAT_2 | HRTIM_TIMCR_UPDGAT_1) /*!< Slave timer only - Update done on the update event following a rising edge of HRTIM update enable input 1 */
674 #define LL_HRTIM_UPDATEGATING_UPDEN2_UPDATE (HRTIM_TIMCR_UPDGAT_2 | HRTIM_TIMCR_UPDGAT_1 | HRTIM_TIMCR_UPDGAT_0) /*!< Slave timer only - Update done on the update event following a rising edge of HRTIM update enable input 2 */
675 #define LL_HRTIM_UPDATEGATING_UPDEN3_UPDATE (HRTIM_TIMCR_UPDGAT_3) /*!< Slave timer only - Update done on the update event following a rising edge of HRTIM update enable input 3 */
680 /** @defgroup HRTIM_LL_EC_COMPAREMODE COMPARE MODE
682 * @brief Constants defining whether the compare register is behaving in regular mode (compare match issued as soon as counter equal compare) or in auto-delayed mode.
684 #define LL_HRTIM_COMPAREMODE_REGULAR 0x00000000U /*!< standard compare mode */
685 #define LL_HRTIM_COMPAREMODE_DELAY_NOTIMEOUT (HRTIM_TIMCR_DELCMP2_0) /*!< Compare event generated only if a capture has occurred */
686 #define LL_HRTIM_COMPAREMODE_DELAY_CMP1 (HRTIM_TIMCR_DELCMP2_1) /*!< Compare event generated if a capture has occurred or after a Compare 1 match (timeout if capture event is missing) */
687 #define LL_HRTIM_COMPAREMODE_DELAY_CMP3 (HRTIM_TIMCR_DELCMP2_1 | HRTIM_TIMCR_DELCMP2_0) /*!< Compare event generated if a capture has occurred or after a Compare 3 match (timeout if capture event is missing) */
692 /** @defgroup HRTIM_LL_EC_RESETTRIG RESET TRIGGER
694 * @brief Constants defining the events that can be selected to trigger the reset of the timer counter.
696 #define LL_HRTIM_RESETTRIG_NONE 0x00000000U /*!< No counter reset trigger */
697 #define LL_HRTIM_RESETTRIG_UPDATE HRTIM_RSTR_UPDATE /*!< The timer counter is reset upon update event */
698 #define LL_HRTIM_RESETTRIG_CMP2 HRTIM_RSTR_CMP2 /*!< The timer counter is reset upon Timer Compare 2 event */
699 #define LL_HRTIM_RESETTRIG_CMP4 HRTIM_RSTR_CMP4 /*!< The timer counter is reset upon Timer Compare 4 event */
700 #define LL_HRTIM_RESETTRIG_MASTER_PER HRTIM_RSTR_MSTPER /*!< The timer counter is reset upon master timer period event */
701 #define LL_HRTIM_RESETTRIG_MASTER_CMP1 HRTIM_RSTR_MSTCMP1 /*!< The timer counter is reset upon master timer Compare 1 event */
702 #define LL_HRTIM_RESETTRIG_MASTER_CMP2 HRTIM_RSTR_MSTCMP2 /*!< The timer counter is reset upon master timer Compare 2 event */
703 #define LL_HRTIM_RESETTRIG_MASTER_CMP3 HRTIM_RSTR_MSTCMP3 /*!< The timer counter is reset upon master timer Compare 3 event */
704 #define LL_HRTIM_RESETTRIG_MASTER_CMP4 HRTIM_RSTR_MSTCMP4 /*!< The timer counter is reset upon master timer Compare 4 event */
705 #define LL_HRTIM_RESETTRIG_EEV_1 HRTIM_RSTR_EXTEVNT1 /*!< The timer counter is reset upon external event 1 */
706 #define LL_HRTIM_RESETTRIG_EEV_2 HRTIM_RSTR_EXTEVNT2 /*!< The timer counter is reset upon external event 2 */
707 #define LL_HRTIM_RESETTRIG_EEV_3 HRTIM_RSTR_EXTEVNT3 /*!< The timer counter is reset upon external event 3 */
708 #define LL_HRTIM_RESETTRIG_EEV_4 HRTIM_RSTR_EXTEVNT4 /*!< The timer counter is reset upon external event 4 */
709 #define LL_HRTIM_RESETTRIG_EEV_5 HRTIM_RSTR_EXTEVNT5 /*!< The timer counter is reset upon external event 5 */
710 #define LL_HRTIM_RESETTRIG_EEV_6 HRTIM_RSTR_EXTEVNT6 /*!< The timer counter is reset upon external event 6 */
711 #define LL_HRTIM_RESETTRIG_EEV_7 HRTIM_RSTR_EXTEVNT7 /*!< The timer counter is reset upon external event 7 */
712 #define LL_HRTIM_RESETTRIG_EEV_8 HRTIM_RSTR_EXTEVNT8 /*!< The timer counter is reset upon external event 8 */
713 #define LL_HRTIM_RESETTRIG_EEV_9 HRTIM_RSTR_EXTEVNT9 /*!< The timer counter is reset upon external event 9 */
714 #define LL_HRTIM_RESETTRIG_EEV_10 HRTIM_RSTR_EXTEVNT10 /*!< The timer counter is reset upon external event 10 */
715 #define LL_HRTIM_RESETTRIG_OTHER1_CMP1 HRTIM_RSTR_TIMBCMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
716 #define LL_HRTIM_RESETTRIG_OTHER1_CMP2 HRTIM_RSTR_TIMBCMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
717 #define LL_HRTIM_RESETTRIG_OTHER1_CMP4 HRTIM_RSTR_TIMBCMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
718 #define LL_HRTIM_RESETTRIG_OTHER2_CMP1 HRTIM_RSTR_TIMCCMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
719 #define LL_HRTIM_RESETTRIG_OTHER2_CMP2 HRTIM_RSTR_TIMCCMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
720 #define LL_HRTIM_RESETTRIG_OTHER2_CMP4 HRTIM_RSTR_TIMCCMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
721 #define LL_HRTIM_RESETTRIG_OTHER3_CMP1 HRTIM_RSTR_TIMDCMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
722 #define LL_HRTIM_RESETTRIG_OTHER3_CMP2 HRTIM_RSTR_TIMDCMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
723 #define LL_HRTIM_RESETTRIG_OTHER3_CMP4 HRTIM_RSTR_TIMDCMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
724 #define LL_HRTIM_RESETTRIG_OTHER4_CMP1 HRTIM_RSTR_TIMECMP1 /*!< The timer counter is reset upon other timer Compare 1 event */
725 #define LL_HRTIM_RESETTRIG_OTHER4_CMP2 HRTIM_RSTR_TIMECMP2 /*!< The timer counter is reset upon other timer Compare 2 event */
726 #define LL_HRTIM_RESETTRIG_OTHER4_CMP4 HRTIM_RSTR_TIMECMP4 /*!< The timer counter is reset upon other timer Compare 4 event */
731 /** @defgroup HRTIM_LL_EC_CAPTURETRIG CAPTURE TRIGGER
733 * @brief Constants defining the events that can be selected to trigger the capture of the timing unit counter.
735 #define LL_HRTIM_CAPTURETRIG_NONE ((uint32_t)0x00000000U)/*!< Capture trigger is disabled */
736 #define LL_HRTIM_CAPTURETRIG_UPDATE HRTIM_CPT1CR_UPDCPT /*!< The update event triggers the Capture */
737 #define LL_HRTIM_CAPTURETRIG_EEV_1 HRTIM_CPT1CR_EXEV1CPT /*!< The External event 1 triggers the Capture */
738 #define LL_HRTIM_CAPTURETRIG_EEV_2 HRTIM_CPT1CR_EXEV2CPT /*!< The External event 2 triggers the Capture */
739 #define LL_HRTIM_CAPTURETRIG_EEV_3 HRTIM_CPT1CR_EXEV3CPT /*!< The External event 3 triggers the Capture */
740 #define LL_HRTIM_CAPTURETRIG_EEV_4 HRTIM_CPT1CR_EXEV4CPT /*!< The External event 4 triggers the Capture */
741 #define LL_HRTIM_CAPTURETRIG_EEV_5 HRTIM_CPT1CR_EXEV5CPT /*!< The External event 5 triggers the Capture */
742 #define LL_HRTIM_CAPTURETRIG_EEV_6 HRTIM_CPT1CR_EXEV6CPT /*!< The External event 6 triggers the Capture */
743 #define LL_HRTIM_CAPTURETRIG_EEV_7 HRTIM_CPT1CR_EXEV7CPT /*!< The External event 7 triggers the Capture */
744 #define LL_HRTIM_CAPTURETRIG_EEV_8 HRTIM_CPT1CR_EXEV8CPT /*!< The External event 8 triggers the Capture */
745 #define LL_HRTIM_CAPTURETRIG_EEV_9 HRTIM_CPT1CR_EXEV9CPT /*!< The External event 9 triggers the Capture */
746 #define LL_HRTIM_CAPTURETRIG_EEV_10 HRTIM_CPT1CR_EXEV10CPT /*!< The External event 10 triggers the Capture */
747 #define LL_HRTIM_CAPTURETRIG_TA1_SET HRTIM_CPT1CR_TA1SET /*!< Capture is triggered by TA1 output inactive to active transition */
748 #define LL_HRTIM_CAPTURETRIG_TA1_RESET HRTIM_CPT1CR_TA1RST /*!< Capture is triggered by TA1 output active to inactive transition */
749 #define LL_HRTIM_CAPTURETRIG_TIMA_CMP1 HRTIM_CPT1CR_TIMACMP1 /*!< Timer A Compare 1 triggers Capture */
750 #define LL_HRTIM_CAPTURETRIG_TIMA_CMP2 HRTIM_CPT1CR_TIMACMP2 /*!< Timer A Compare 2 triggers Capture */
751 #define LL_HRTIM_CAPTURETRIG_TB1_SET HRTIM_CPT1CR_TB1SET /*!< Capture is triggered by TB1 output inactive to active transition */
752 #define LL_HRTIM_CAPTURETRIG_TB1_RESET HRTIM_CPT1CR_TB1RST /*!< Capture is triggered by TB1 output active to inactive transition */
753 #define LL_HRTIM_CAPTURETRIG_TIMB_CMP1 HRTIM_CPT1CR_TIMBCMP1 /*!< Timer B Compare 1 triggers Capture */
754 #define LL_HRTIM_CAPTURETRIG_TIMB_CMP2 HRTIM_CPT1CR_TIMBCMP2 /*!< Timer B Compare 2 triggers Capture */
755 #define LL_HRTIM_CAPTURETRIG_TC1_SET HRTIM_CPT1CR_TC1SET /*!< Capture is triggered by TC1 output inactive to active transition */
756 #define LL_HRTIM_CAPTURETRIG_TC1_RESET HRTIM_CPT1CR_TC1RST /*!< Capture is triggered by TC1 output active to inactive transition */
757 #define LL_HRTIM_CAPTURETRIG_TIMC_CMP1 HRTIM_CPT1CR_TIMCCMP1 /*!< Timer C Compare 1 triggers Capture */
758 #define LL_HRTIM_CAPTURETRIG_TIMC_CMP2 HRTIM_CPT1CR_TIMCCMP2 /*!< Timer C Compare 2 triggers Capture */
759 #define LL_HRTIM_CAPTURETRIG_TD1_SET HRTIM_CPT1CR_TD1SET /*!< Capture is triggered by TD1 output inactive to active transition */
760 #define LL_HRTIM_CAPTURETRIG_TD1_RESET HRTIM_CPT1CR_TD1RST /*!< Capture is triggered by TD1 output active to inactive transition */
761 #define LL_HRTIM_CAPTURETRIG_TIMD_CMP1 HRTIM_CPT1CR_TIMDCMP1 /*!< Timer D Compare 1 triggers Capture */
762 #define LL_HRTIM_CAPTURETRIG_TIMD_CMP2 HRTIM_CPT1CR_TIMDCMP2 /*!< Timer D Compare 2 triggers Capture */
763 #define LL_HRTIM_CAPTURETRIG_TE1_SET HRTIM_CPT1CR_TE1SET /*!< Capture is triggered by TE1 output inactive to active transition */
764 #define LL_HRTIM_CAPTURETRIG_TE1_RESET HRTIM_CPT1CR_TE1RST /*!< Capture is triggered by TE1 output active to inactive transition */
765 #define LL_HRTIM_CAPTURETRIG_TIME_CMP1 HRTIM_CPT1CR_TIMECMP1 /*!< Timer E Compare 1 triggers Capture */
766 #define LL_HRTIM_CAPTURETRIG_TIME_CMP2 HRTIM_CPT1CR_TIMECMP2 /*!< Timer E Compare 2 triggers Capture */
771 /** @defgroup HRTIM_LL_EC_DLYPRT DELAYED PROTECTION (DLYPRT) MODE
773 * @brief Constants defining all possible delayed protection modes for a timer (also define the source and outputs on which the delayed protection schemes are applied).
775 #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV6 0x00000000U /*!< Timers A, B, C: Output 1 delayed Idle on external Event 6 */
776 #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV6 (HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Output 2 delayed Idle on external Event 6 */
777 #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV6 (HRTIM_OUTR_DLYPRT_1) /*!< Timers A, B, C: Output 1 and output 2 delayed Idle on external Event 6 */
778 #define LL_HRTIM_DLYPRT_BALANCED_EEV6 (HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Balanced Idle on external Event 6 */
779 #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV7 (HRTIM_OUTR_DLYPRT_2) /*!< Timers A, B, C: Output 1 delayed Idle on external Event 7 */
780 #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV7 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Output 2 delayed Idle on external Event 7 */
781 #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV7 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1) /*!< Timers A, B, C: Output 1 and output2 delayed Idle on external Event 7 */
782 #define LL_HRTIM_DLYPRT_BALANCED_EEV7 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers A, B, C: Balanced Idle on external Event 7 */
784 #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV8 0x00000000U /*!< Timers D, E: Output 1 delayed Idle on external Event 8 */
785 #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV8 (HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Output 2 delayed Idle on external Event 8 */
786 #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV8 (HRTIM_OUTR_DLYPRT_1) /*!< Timers D, E: Output 1 and output 2 delayed Idle on external Event 8 */
787 #define LL_HRTIM_DLYPRT_BALANCED_EEV8 (HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Balanced Idle on external Event 8 */
788 #define LL_HRTIM_DLYPRT_DELAYOUT1_EEV9 (HRTIM_OUTR_DLYPRT_2) /*!< Timers D, E: Output 1 delayed Idle on external Event 9 */
789 #define LL_HRTIM_DLYPRT_DELAYOUT2_EEV9 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Output 2 delayed Idle on external Event 9 */
790 #define LL_HRTIM_DLYPRT_DELAYBOTH_EEV9 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1) /*!< Timers D, E: Output 1 and output2 delayed Idle on external Event 9 */
791 #define LL_HRTIM_DLYPRT_BALANCED_EEV9 (HRTIM_OUTR_DLYPRT_2 | HRTIM_OUTR_DLYPRT_1 | HRTIM_OUTR_DLYPRT_0) /*!< Timers D, E: Balanced Idle on external Event 9 */
796 /** @defgroup HRTIM_LL_EC_BURSTMODE BURST MODE
798 * @brief Constants defining how the timer behaves during a burst mode operation.
800 #define LL_HRTIM_BURSTMODE_MAINTAINCLOCK (uint32_t)0x000000 /*!< Timer counter clock is maintained and the timer operates normally */
801 #define LL_HRTIM_BURSTMODE_RESETCOUNTER (HRTIM_BMCR_MTBM) /*!< Timer counter clock is stopped and the counter is reset */
806 /** @defgroup HRTIM_LL_EC_BURSTDMA BURST DMA
808 * @brief Constants defining the registers that can be written during a burst DMA operation.
810 #define LL_HRTIM_BURSTDMA_NONE 0x00000000U /*!< No register is updated by Burst DMA accesses */
811 #define LL_HRTIM_BURSTDMA_MCR (HRTIM_BDMUPR_MCR) /*!< MCR register is updated by Burst DMA accesses */
812 #define LL_HRTIM_BURSTDMA_MICR (HRTIM_BDMUPR_MICR) /*!< MICR register is updated by Burst DMA accesses */
813 #define LL_HRTIM_BURSTDMA_MDIER (HRTIM_BDMUPR_MDIER) /*!< MDIER register is updated by Burst DMA accesses */
814 #define LL_HRTIM_BURSTDMA_MCNT (HRTIM_BDMUPR_MCNT) /*!< MCNTR register is updated by Burst DMA accesses */
815 #define LL_HRTIM_BURSTDMA_MPER (HRTIM_BDMUPR_MPER) /*!< MPER register is updated by Burst DMA accesses */
816 #define LL_HRTIM_BURSTDMA_MREP (HRTIM_BDMUPR_MREP) /*!< MREPR register is updated by Burst DMA accesses */
817 #define LL_HRTIM_BURSTDMA_MCMP1 (HRTIM_BDMUPR_MCMP1) /*!< MCMP1R register is updated by Burst DMA accesses */
818 #define LL_HRTIM_BURSTDMA_MCMP2 (HRTIM_BDMUPR_MCMP2) /*!< MCMP2R register is updated by Burst DMA accesses */
819 #define LL_HRTIM_BURSTDMA_MCMP3 (HRTIM_BDMUPR_MCMP3) /*!< MCMP3R register is updated by Burst DMA accesses */
820 #define LL_HRTIM_BURSTDMA_MCMP4 (HRTIM_BDMUPR_MCMP4) /*!< MCMP4R register is updated by Burst DMA accesses */
821 #define LL_HRTIM_BURSTDMA_TIMMCR (HRTIM_BDTUPR_TIMCR) /*!< TIMxCR register is updated by Burst DMA accesses */
822 #define LL_HRTIM_BURSTDMA_TIMICR (HRTIM_BDTUPR_TIMICR) /*!< TIMxICR register is updated by Burst DMA accesses */
823 #define LL_HRTIM_BURSTDMA_TIMDIER (HRTIM_BDTUPR_TIMDIER) /*!< TIMxDIER register is updated by Burst DMA accesses */
824 #define LL_HRTIM_BURSTDMA_TIMCNT (HRTIM_BDTUPR_TIMCNT) /*!< CNTxCR register is updated by Burst DMA accesses */
825 #define LL_HRTIM_BURSTDMA_TIMPER (HRTIM_BDTUPR_TIMPER) /*!< PERxR register is updated by Burst DMA accesses */
826 #define LL_HRTIM_BURSTDMA_TIMREP (HRTIM_BDTUPR_TIMREP) /*!< REPxR register is updated by Burst DMA accesses */
827 #define LL_HRTIM_BURSTDMA_TIMCMP1 (HRTIM_BDTUPR_TIMCMP1) /*!< CMP1xR register is updated by Burst DMA accesses */
828 #define LL_HRTIM_BURSTDMA_TIMCMP2 (HRTIM_BDTUPR_TIMCMP2) /*!< CMP2xR register is updated by Burst DMA accesses */
829 #define LL_HRTIM_BURSTDMA_TIMCMP3 (HRTIM_BDTUPR_TIMCMP3) /*!< CMP3xR register is updated by Burst DMA accesses */
830 #define LL_HRTIM_BURSTDMA_TIMCMP4 (HRTIM_BDTUPR_TIMCMP4) /*!< CMP4xR register is updated by Burst DMA accesses */
831 #define LL_HRTIM_BURSTDMA_TIMDTR (HRTIM_BDTUPR_TIMDTR) /*!< DTxR register is updated by Burst DMA accesses */
832 #define LL_HRTIM_BURSTDMA_TIMSET1R (HRTIM_BDTUPR_TIMSET1R) /*!< SET1R register is updated by Burst DMA accesses */
833 #define LL_HRTIM_BURSTDMA_TIMRST1R (HRTIM_BDTUPR_TIMRST1R) /*!< RST1R register is updated by Burst DMA accesses */
834 #define LL_HRTIM_BURSTDMA_TIMSET2R (HRTIM_BDTUPR_TIMSET2R) /*!< SET2R register is updated by Burst DMA accesses */
835 #define LL_HRTIM_BURSTDMA_TIMRST2R (HRTIM_BDTUPR_TIMRST2R) /*!< RST1R register is updated by Burst DMA accesses */
836 #define LL_HRTIM_BURSTDMA_TIMEEFR1 (HRTIM_BDTUPR_TIMEEFR1) /*!< EEFxR1 register is updated by Burst DMA accesses */
837 #define LL_HRTIM_BURSTDMA_TIMEEFR2 (HRTIM_BDTUPR_TIMEEFR2) /*!< EEFxR2 register is updated by Burst DMA accesses */
838 #define LL_HRTIM_BURSTDMA_TIMRSTR (HRTIM_BDTUPR_TIMRSTR) /*!< RSTxR register is updated by Burst DMA accesses */
839 #define LL_HRTIM_BURSTDMA_TIMCHPR (HRTIM_BDTUPR_TIMCHPR) /*!< CHPxR register is updated by Burst DMA accesses */
840 #define LL_HRTIM_BURSTDMA_TIMOUTR (HRTIM_BDTUPR_TIMOUTR) /*!< OUTxR register is updated by Burst DMA accesses */
841 #define LL_HRTIM_BURSTDMA_TIMFLTR (HRTIM_BDTUPR_TIMFLTR) /*!< FLTxR register is updated by Burst DMA accesses */
846 /** @defgroup HRTIM_LL_EC_CPPSTAT CURRENT PUSH-PULL STATUS
848 * @brief Constants defining on which output the signal is currently applied in push-pull mode.
850 #define LL_HRTIM_CPPSTAT_OUTPUT1 ((uint32_t) 0x00000000U) /*!< Signal applied on output 1 and output 2 forced inactive */
851 #define LL_HRTIM_CPPSTAT_OUTPUT2 (HRTIM_TIMISR_CPPSTAT) /*!< Signal applied on output 2 and output 1 forced inactive */
856 /** @defgroup HRTIM_LL_EC_IPPSTAT IDLE PUSH-PULL STATUS
858 * @brief Constants defining on which output the signal was applied, in push-pull mode balanced fault mode or delayed idle mode, when the protection was triggered.
860 #define LL_HRTIM_IPPSTAT_OUTPUT1 ((uint32_t) 0x00000000U) /*!< Protection occurred when the output 1 was active and output 2 forced inactive */
861 #define LL_HRTIM_IPPSTAT_OUTPUT2 (HRTIM_TIMISR_IPPSTAT) /*!< Protection occurred when the output 2 was active and output 1 forced inactive */
866 /** @defgroup HRTIM_LL_EC_TIM_EEFLTR TIMER EXTERNAL EVENT FILTER
868 * @brief Constants defining the event filtering applied to external events by a timer.
870 #define LL_HRTIM_EEFLTR_NONE (0x00000000U)
871 #define LL_HRTIM_EEFLTR_BLANKINGCMP1 (HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from counter reset/roll-over to Compare 1 */
872 #define LL_HRTIM_EEFLTR_BLANKINGCMP2 (HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from counter reset/roll-over to Compare 2 */
873 #define LL_HRTIM_EEFLTR_BLANKINGCMP3 (HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from counter reset/roll-over to Compare 3 */
874 #define LL_HRTIM_EEFLTR_BLANKINGCMP4 (HRTIM_EEFR1_EE1FLTR_2) /*!< Blanking from counter reset/roll-over to Compare 4 */
875 #define LL_HRTIM_EEFLTR_BLANKINGFLTR1 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR1 source */
876 #define LL_HRTIM_EEFLTR_BLANKINGFLTR2 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from another timing unit: TIMFLTR2 source */
877 #define LL_HRTIM_EEFLTR_BLANKINGFLTR3 (HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR3 source */
878 #define LL_HRTIM_EEFLTR_BLANKINGFLTR4 (HRTIM_EEFR1_EE1FLTR_3) /*!< Blanking from another timing unit: TIMFLTR4 source */
879 #define LL_HRTIM_EEFLTR_BLANKINGFLTR5 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR5 source */
880 #define LL_HRTIM_EEFLTR_BLANKINGFLTR6 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1) /*!< Blanking from another timing unit: TIMFLTR6 source */
881 #define LL_HRTIM_EEFLTR_BLANKINGFLTR7 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Blanking from another timing unit: TIMFLTR7 source */
882 #define LL_HRTIM_EEFLTR_BLANKINGFLTR8 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2) /*!< Blanking from another timing unit: TIMFLTR8 source */
883 #define LL_HRTIM_EEFLTR_WINDOWINGCMP2 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_0) /*!< Windowing from counter reset/roll-over to Compare 2 */
884 #define LL_HRTIM_EEFLTR_WINDOWINGCMP3 (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1) /*!< Windowing from counter reset/roll-over to Compare 3 */
885 #define LL_HRTIM_EEFLTR_WINDOWINGTIM (HRTIM_EEFR1_EE1FLTR_3 | HRTIM_EEFR1_EE1FLTR_2 | HRTIM_EEFR1_EE1FLTR_1 | HRTIM_EEFR1_EE1FLTR_0) /*!< Windowing from another timing unit: TIMWIN source */
890 /** @defgroup HRTIM_LL_EC_TIM_LATCHSTATUS TIMER EXTERNAL EVENT LATCH STATUS
892 * @brief Constants defining whether or not the external event is memorized (latched) and generated as soon as the blanking period is completed or the window ends.
894 #define LL_HRTIM_EELATCH_DISABLED 0x00000000U /*!< Event is ignored if it happens during a blank, or passed through during a window */
895 #define LL_HRTIM_EELATCH_ENABLED HRTIM_EEFR1_EE1LTCH /*!< Event is latched and delayed till the end of the blanking or windowing period */
900 /** @defgroup HRTIM_LL_EC_DT_PRESCALER DEADTIME PRESCALER
902 * @brief Constants defining division ratio between the timer clock frequency (fHRTIM) and the deadtime generator clock (fDTG).
904 #define LL_HRTIM_DT_PRESCALER_MUL8 0x00000000U /*!< fDTG = fHRTIM * 8 */
905 #define LL_HRTIM_DT_PRESCALER_MUL4 (HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM * 4 */
906 #define LL_HRTIM_DT_PRESCALER_MUL2 (HRTIM_DTR_DTPRSC_1) /*!< fDTG = fHRTIM * 2 */
907 #define LL_HRTIM_DT_PRESCALER_DIV1 (HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM */
908 #define LL_HRTIM_DT_PRESCALER_DIV2 (HRTIM_DTR_DTPRSC_2) /*!< fDTG = fHRTIM / 2 */
909 #define LL_HRTIM_DT_PRESCALER_DIV4 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM / 4 */
910 #define LL_HRTIM_DT_PRESCALER_DIV8 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1) /*!< fDTG = fHRTIM / 8 */
911 #define LL_HRTIM_DT_PRESCALER_DIV16 (HRTIM_DTR_DTPRSC_2 | HRTIM_DTR_DTPRSC_1 | HRTIM_DTR_DTPRSC_0) /*!< fDTG = fHRTIM / 16 */
916 /** @defgroup HRTIM_LL_EC_DT_RISING_SIGN DEADTIME RISING SIGN
918 * @brief Constants defining whether the deadtime is positive or negative (overlapping signal) on rising edge.
920 #define LL_HRTIM_DT_RISING_POSITIVE 0x00000000U /*!< Positive deadtime on rising edge */
921 #define LL_HRTIM_DT_RISING_NEGATIVE (HRTIM_DTR_SDTR) /*!< Negative deadtime on rising edge */
926 /** @defgroup HRTIM_LL_EC_DT_FALLING_SIGN DEADTIME FALLING SIGN
928 * @brief Constants defining whether the deadtime is positive or negative (overlapping signal) on falling edge.
930 #define LL_HRTIM_DT_FALLING_POSITIVE 0x00000000U /*!< Positive deadtime on falling edge */
931 #define LL_HRTIM_DT_FALLING_NEGATIVE (HRTIM_DTR_SDTF) /*!< Negative deadtime on falling edge */
936 /** @defgroup HRTIM_LL_EC_CHP_PRESCALER CHOPPER MODE PRESCALER
938 * @brief Constants defining the frequency of the generated high frequency carrier (fCHPFRQ).
940 #define LL_HRTIM_CHP_PRESCALER_DIV16 0x00000000U /*!< fCHPFRQ = fHRTIM / 16 */
941 #define LL_HRTIM_CHP_PRESCALER_DIV32 (HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 32 */
942 #define LL_HRTIM_CHP_PRESCALER_DIV48 (HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 48 */
943 #define LL_HRTIM_CHP_PRESCALER_DIV64 (HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 64 */
944 #define LL_HRTIM_CHP_PRESCALER_DIV80 (HRTIM_CHPR_CARFRQ_2) /*!< fCHPFRQ = fHRTIM / 80 */
945 #define LL_HRTIM_CHP_PRESCALER_DIV96 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 96 */
946 #define LL_HRTIM_CHP_PRESCALER_DIV112 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 112 */
947 #define LL_HRTIM_CHP_PRESCALER_DIV128 (HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 128 */
948 #define LL_HRTIM_CHP_PRESCALER_DIV144 (HRTIM_CHPR_CARFRQ_3) /*!< fCHPFRQ = fHRTIM / 144 */
949 #define LL_HRTIM_CHP_PRESCALER_DIV160 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 160 */
950 #define LL_HRTIM_CHP_PRESCALER_DIV176 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 176 */
951 #define LL_HRTIM_CHP_PRESCALER_DIV192 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 192 */
952 #define LL_HRTIM_CHP_PRESCALER_DIV208 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2) /*!< fCHPFRQ = fHRTIM / 208 */
953 #define LL_HRTIM_CHP_PRESCALER_DIV224 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 224 */
954 #define LL_HRTIM_CHP_PRESCALER_DIV240 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1) /*!< fCHPFRQ = fHRTIM / 240 */
955 #define LL_HRTIM_CHP_PRESCALER_DIV256 (HRTIM_CHPR_CARFRQ_3 | HRTIM_CHPR_CARFRQ_2 | HRTIM_CHPR_CARFRQ_1 | HRTIM_CHPR_CARFRQ_0) /*!< fCHPFRQ = fHRTIM / 256 */
960 /** @defgroup HRTIM_LL_EC_CHP_DUTYCYCLE CHOPPER MODE DUTY CYCLE
962 * @brief Constants defining the duty cycle of the generated high frequency carrier. Duty cycle can be adjusted by 1/8 step (from 0/8 up to 7/8).
964 #define LL_HRTIM_CHP_DUTYCYCLE_0 0x00000000U /*!< Only 1st pulse is present */
965 #define LL_HRTIM_CHP_DUTYCYCLE_125 (HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 12.5 % */
966 #define LL_HRTIM_CHP_DUTYCYCLE_250 (HRTIM_CHPR_CARDTY_1) /*!< Duty cycle of the carrier signal is 25 % */
967 #define LL_HRTIM_CHP_DUTYCYCLE_375 (HRTIM_CHPR_CARDTY_1 | HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 37.5 % */
968 #define LL_HRTIM_CHP_DUTYCYCLE_500 (HRTIM_CHPR_CARDTY_2) /*!< Duty cycle of the carrier signal is 50 % */
969 #define LL_HRTIM_CHP_DUTYCYCLE_625 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 62.5 % */
970 #define LL_HRTIM_CHP_DUTYCYCLE_750 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_1) /*!< Duty cycle of the carrier signal is 75 % */
971 #define LL_HRTIM_CHP_DUTYCYCLE_875 (HRTIM_CHPR_CARDTY_2 | HRTIM_CHPR_CARDTY_1 | HRTIM_CHPR_CARDTY_0) /*!< Duty cycle of the carrier signal is 87.5 % */
976 /** @defgroup HRTIM_LL_EC_CHP_PULSEWIDTH CHOPPER MODE PULSE WIDTH
978 * @brief Constants defining the pulse width of the first pulse of the generated high frequency carrier.
980 #define LL_HRTIM_CHP_PULSEWIDTH_16 0x00000000U /*!< tSTPW = tHRTIM x 16 */
981 #define LL_HRTIM_CHP_PULSEWIDTH_32 (HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 32 */
982 #define LL_HRTIM_CHP_PULSEWIDTH_48 (HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 48 */
983 #define LL_HRTIM_CHP_PULSEWIDTH_64 (HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 64 */
984 #define LL_HRTIM_CHP_PULSEWIDTH_80 (HRTIM_CHPR_STRPW_2) /*!< tSTPW = tHRTIM x 80 */
985 #define LL_HRTIM_CHP_PULSEWIDTH_96 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 96 */
986 #define LL_HRTIM_CHP_PULSEWIDTH_112 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 112 */
987 #define LL_HRTIM_CHP_PULSEWIDTH_128 (HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 128 */
988 #define LL_HRTIM_CHP_PULSEWIDTH_144 (HRTIM_CHPR_STRPW_3) /*!< tSTPW = tHRTIM x 144 */
989 #define LL_HRTIM_CHP_PULSEWIDTH_160 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 160 */
990 #define LL_HRTIM_CHP_PULSEWIDTH_176 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 176 */
991 #define LL_HRTIM_CHP_PULSEWIDTH_192 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 192 */
992 #define LL_HRTIM_CHP_PULSEWIDTH_208 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2) /*!< tSTPW = tHRTIM x 208 */
993 #define LL_HRTIM_CHP_PULSEWIDTH_224 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 224 */
994 #define LL_HRTIM_CHP_PULSEWIDTH_240 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1) /*!< tSTPW = tHRTIM x 240 */
995 #define LL_HRTIM_CHP_PULSEWIDTH_256 (HRTIM_CHPR_STRPW_3 | HRTIM_CHPR_STRPW_2 | HRTIM_CHPR_STRPW_1 | HRTIM_CHPR_STRPW_0) /*!< tSTPW = tHRTIM x 256 */
1000 /** @defgroup HRTIM_LL_EC_CROSSBAR_INPUT CROSSBAR INPUT
1002 * @brief Constants defining the events that can be selected to configure the set/reset crossbar of a timer output.
1004 #define LL_HRTIM_CROSSBAR_NONE 0x00000000U /*!< Reset the output set crossbar */
1005 #define LL_HRTIM_CROSSBAR_RESYNC (HRTIM_SET1R_RESYNC) /*!< Timer reset event coming solely from software or SYNC input forces an output level transision */
1006 #define LL_HRTIM_CROSSBAR_TIMPER (HRTIM_SET1R_PER) /*!< Timer period event forces an output level transision */
1007 #define LL_HRTIM_CROSSBAR_TIMCMP1 (HRTIM_SET1R_CMP1) /*!< Timer compare 1 event forces an output level transision */
1008 #define LL_HRTIM_CROSSBAR_TIMCMP2 (HRTIM_SET1R_CMP2) /*!< Timer compare 2 event forces an output level transision */
1009 #define LL_HRTIM_CROSSBAR_TIMCMP3 (HRTIM_SET1R_CMP3) /*!< Timer compare 3 event forces an output level transision */
1010 #define LL_HRTIM_CROSSBAR_TIMCMP4 (HRTIM_SET1R_CMP4) /*!< Timer compare 4 event forces an output level transision */
1011 #define LL_HRTIM_CROSSBAR_MASTERPER (HRTIM_SET1R_MSTPER) /*!< The master timer period event forces an output level transision */
1012 #define LL_HRTIM_CROSSBAR_MASTERCMP1 (HRTIM_SET1R_MSTCMP1) /*!< Master Timer compare 1 event forces an output level transision */
1013 #define LL_HRTIM_CROSSBAR_MASTERCMP2 (HRTIM_SET1R_MSTCMP2) /*!< Master Timer compare 2 event forces an output level transision */
1014 #define LL_HRTIM_CROSSBAR_MASTERCMP3 (HRTIM_SET1R_MSTCMP3) /*!< Master Timer compare 3 event forces an output level transision */
1015 #define LL_HRTIM_CROSSBAR_MASTERCMP4 (HRTIM_SET1R_MSTCMP4) /*!< Master Timer compare 4 event forces an output level transision */
1016 #define LL_HRTIM_CROSSBAR_TIMEV_1 (HRTIM_SET1R_TIMEVNT1) /*!< Timer event 1 forces an output level transision */
1017 #define LL_HRTIM_CROSSBAR_TIMEV_2 (HRTIM_SET1R_TIMEVNT2) /*!< Timer event 2 forces an output level transision */
1018 #define LL_HRTIM_CROSSBAR_TIMEV_3 (HRTIM_SET1R_TIMEVNT3) /*!< Timer event 3 forces an output level transision */
1019 #define LL_HRTIM_CROSSBAR_TIMEV_4 (HRTIM_SET1R_TIMEVNT4) /*!< Timer event 4 forces an output level transision */
1020 #define LL_HRTIM_CROSSBAR_TIMEV_5 (HRTIM_SET1R_TIMEVNT5) /*!< Timer event 5 forces an output level transision */
1021 #define LL_HRTIM_CROSSBAR_TIMEV_6 (HRTIM_SET1R_TIMEVNT6) /*!< Timer event 6 forces an output level transision */
1022 #define LL_HRTIM_CROSSBAR_TIMEV_7 (HRTIM_SET1R_TIMEVNT7) /*!< Timer event 7 forces an output level transision */
1023 #define LL_HRTIM_CROSSBAR_TIMEV_8 (HRTIM_SET1R_TIMEVNT8) /*!< Timer event 8 forces an output level transision */
1024 #define LL_HRTIM_CROSSBAR_TIMEV_9 (HRTIM_SET1R_TIMEVNT9) /*!< Timer event 9 forces an output level transision */
1025 #define LL_HRTIM_CROSSBAR_EEV_1 (HRTIM_SET1R_EXTVNT1) /*!< External event 1 forces an output level transision */
1026 #define LL_HRTIM_CROSSBAR_EEV_2 (HRTIM_SET1R_EXTVNT2) /*!< External event 2 forces an output level transision */
1027 #define LL_HRTIM_CROSSBAR_EEV_3 (HRTIM_SET1R_EXTVNT3) /*!< External event 3 forces an output level transision */
1028 #define LL_HRTIM_CROSSBAR_EEV_4 (HRTIM_SET1R_EXTVNT4) /*!< External event 4 forces an output level transision */
1029 #define LL_HRTIM_CROSSBAR_EEV_5 (HRTIM_SET1R_EXTVNT5) /*!< External event 5 forces an output level transision */
1030 #define LL_HRTIM_CROSSBAR_EEV_6 (HRTIM_SET1R_EXTVNT6) /*!< External event 6 forces an output level transision */
1031 #define LL_HRTIM_CROSSBAR_EEV_7 (HRTIM_SET1R_EXTVNT7) /*!< External event 7 forces an output level transision */
1032 #define LL_HRTIM_CROSSBAR_EEV_8 (HRTIM_SET1R_EXTVNT8) /*!< External event 8 forces an output level transision */
1033 #define LL_HRTIM_CROSSBAR_EEV_9 (HRTIM_SET1R_EXTVNT9) /*!< External event 9 forces an output level transision */
1034 #define LL_HRTIM_CROSSBAR_EEV_10 (HRTIM_SET1R_EXTVNT10) /*!< External event 10 forces an output level transision */
1035 #define LL_HRTIM_CROSSBAR_UPDATE (HRTIM_SET1R_UPDATE) /*!< Timer register update event forces an output level transision */
1040 /** @defgroup HRTIM_LL_EC_OUT_POLARITY OUPUT_POLARITY
1042 * @brief Constants defining the polarity of a timer output.
1044 #define LL_HRTIM_OUT_POSITIVE_POLARITY 0x00000000U /*!< Output is acitve HIGH */
1045 #define LL_HRTIM_OUT_NEGATIVE_POLARITY (HRTIM_OUTR_POL1) /*!< Output is active LOW */
1050 /** @defgroup HRTIM_LL_EC_OUT_IDLEMODE OUTPUT IDLE MODE
1052 * @brief Constants defining whether or not the timer output transition to its IDLE state when burst mode is entered.
1054 #define LL_HRTIM_OUT_NO_IDLE 0x00000000U /*!< The output is not affected by the burst mode operation */
1055 #define LL_HRTIM_OUT_IDLE_WHEN_BURST (HRTIM_OUTR_IDLM1) /*!< The output is in idle state when requested by the burst mode controller */
1060 /** @defgroup HRTIM_LL_EC_HALF_MODE HALF MODE
1062 * @brief Constants defining the half mode of an HRTIM Timer instance.
1064 #define LL_HRTIM_HALF_MODE_DISABLED 0x000U /*!< HRTIM Half Mode is disabled */
1065 #define LL_HRTIM_HALF_MODE_ENABLE HRTIM_MCR_HALF /*!< HRTIM Half Mode is Half */
1070 /** @defgroup HRTIM_LL_EC_OUT_IDLELEVEL OUTPUT IDLE LEVEL
1072 * @brief Constants defining the output level when output is in IDLE state
1074 #define LL_HRTIM_OUT_IDLELEVEL_INACTIVE 0x00000000U /*!< Output at inactive level when in IDLE state */
1075 #define LL_HRTIM_OUT_IDLELEVEL_ACTIVE (HRTIM_OUTR_IDLES1) /*!< Output at active level when in IDLE state */
1080 /** @defgroup HRTIM_LL_EC_OUT_FAULTSTATE OUTPUT FAULT STATE
1082 * @brief Constants defining the output level when output is in FAULT state.
1084 #define LL_HRTIM_OUT_FAULTSTATE_NO_ACTION 0x00000000U /*!< The output is not affected by the fault input */
1085 #define LL_HRTIM_OUT_FAULTSTATE_ACTIVE (HRTIM_OUTR_FAULT1_0) /*!< Output at active level when in FAULT state */
1086 #define LL_HRTIM_OUT_FAULTSTATE_INACTIVE (HRTIM_OUTR_FAULT1_1) /*!< Output at inactive level when in FAULT state */
1087 #define LL_HRTIM_OUT_FAULTSTATE_HIGHZ (HRTIM_OUTR_FAULT1_1 | HRTIM_OUTR_FAULT1_0) /*!< Output is tri-stated when in FAULT state */
1092 /** @defgroup HRTIM_LL_EC_OUT_CHOPPERMODE OUTPUT CHOPPER MODE
1094 * @brief Constants defining whether or not chopper mode is enabled for a timer output.
1096 #define LL_HRTIM_OUT_CHOPPERMODE_DISABLED 0x00000000U /*!< Output signal is not altered */
1097 #define LL_HRTIM_OUT_CHOPPERMODE_ENABLED (HRTIM_OUTR_CHP1) /*!< Output signal is chopped by a carrier signal */
1102 /** @defgroup HRTIM_LL_EC_OUT_BM_ENTRYMODE OUTPUT BURST MODE ENTRY MODE
1104 * @brief Constants defining the idle state entry mode during a burst mode operation. It is possible to delay the burst mode entry and force the output to an inactive state
1105 during a programmable period before the output takes its idle state.
1107 #define LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR 0x00000000U /*!< The programmed Idle state is applied immediately to the Output */
1108 #define LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED (HRTIM_OUTR_DIDL1) /*!< Deadtime is inserted on output before entering the idle mode */
1112 /** @defgroup HRTIM_LL_EC_OUT_LEVEL OUTPUT LEVEL
1114 * @brief Constants defining the level of a timer output.
1116 #define LL_HRTIM_OUT_LEVEL_INACTIVE 0x00000000U /*!< Corresponds to a logic level 0 for a positive polarity (High) and to a logic level 1 for a negative polarity (Low) */
1117 #define LL_HRTIM_OUT_LEVEL_ACTIVE ((uint32_t)0x00000001) /*!< Corresponds to a logic level 1 for a positive polarity (High) and to a logic level 0 for a negative polarity (Low) */
1122 /** @defgroup HRTIM_LL_EC_EE_SRC EXTERNAL EVENT SOURCE
1124 * @brief Constants defining available sources associated to external events.
1126 #define LL_HRTIM_EE_SRC_1 0x00000000U /*!< External event source 1 (EExSrc1)*/
1127 #define LL_HRTIM_EE_SRC_2 (HRTIM_EECR1_EE1SRC_0) /*!< External event source 2 (EExSrc2) */
1128 #define LL_HRTIM_EE_SRC_3 (HRTIM_EECR1_EE1SRC_1) /*!< External event source 3 (EExSrc3) */
1129 #define LL_HRTIM_EE_SRC_4 (HRTIM_EECR1_EE1SRC_1 | HRTIM_EECR1_EE1SRC_0) /*!< External event source 4 (EExSrc4) */
1133 /** @defgroup HRTIM_LL_EC_EE_POLARITY EXTERNAL EVENT POLARITY
1135 * @brief Constants defining the polarity of an external event.
1137 #define LL_HRTIM_EE_POLARITY_HIGH 0x00000000U /*!< External event is active high */
1138 #define LL_HRTIM_EE_POLARITY_LOW (HRTIM_EECR1_EE1POL) /*!< External event is active low */
1143 /** @defgroup HRTIM_LL_EC_EE_SENSITIVITY EXTERNAL EVENT SENSITIVITY
1145 * @brief Constants defining the sensitivity (level-sensitive or edge-sensitive) of an external event.
1147 #define LL_HRTIM_EE_SENSITIVITY_LEVEL 0x00000000U /*!< External event is active on level */
1148 #define LL_HRTIM_EE_SENSITIVITY_RISINGEDGE (HRTIM_EECR1_EE1SNS_0) /*!< External event is active on Rising edge */
1149 #define LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE (HRTIM_EECR1_EE1SNS_1) /*!< External event is active on Falling edge */
1150 #define LL_HRTIM_EE_SENSITIVITY_BOTHEDGES (HRTIM_EECR1_EE1SNS_1 | HRTIM_EECR1_EE1SNS_0) /*!< External event is active on Rising and Falling edges */
1155 /** @defgroup HRTIM_LL_EC_EE_FASTMODE EXTERNAL EVENT FAST MODE
1157 * @brief Constants defining whether or not an external event is programmed in fast mode.
1159 #define LL_HRTIM_EE_FASTMODE_DISABLE 0x00000000U /*!< External Event is re-synchronized by the HRTIM logic before acting on outputs */
1160 #define LL_HRTIM_EE_FASTMODE_ENABLE (HRTIM_EECR1_EE1FAST) /*!< External Event is acting asynchronously on outputs (low latency mode) */
1165 /** @defgroup HRTIM_LL_EC_EE_FILTER EXTERNAL EVENT DIGITAL FILTER
1167 * @brief Constants defining the frequency used to sample an external event input (fSAMPLING) and the length (N) of the digital filter applied.
1169 #define LL_HRTIM_EE_FILTER_NONE 0x00000000U /*!< Filter disabled */
1170 #define LL_HRTIM_EE_FILTER_1 (HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fHRTIM, N=2 */
1171 #define LL_HRTIM_EE_FILTER_2 (HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fHRTIM, N=4 */
1172 #define LL_HRTIM_EE_FILTER_3 (HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fHRTIM, N=8 */
1173 #define LL_HRTIM_EE_FILTER_4 (HRTIM_EECR3_EE6F_2) /*!< fSAMPLING = fEEVS/2, N=6 */
1174 #define LL_HRTIM_EE_FILTER_5 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/2, N=8 */
1175 #define LL_HRTIM_EE_FILTER_6 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fEEVS/4, N=6 */
1176 #define LL_HRTIM_EE_FILTER_7 (HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/4, N=8 */
1177 #define LL_HRTIM_EE_FILTER_8 (HRTIM_EECR3_EE6F_3) /*!< fSAMPLING = fEEVS/8, N=6 */
1178 #define LL_HRTIM_EE_FILTER_9 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/8, N=8 */
1179 #define LL_HRTIM_EE_FILTER_10 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fEEVS/16, N=5 */
1180 #define LL_HRTIM_EE_FILTER_11 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/16, N=6 */
1181 #define LL_HRTIM_EE_FILTER_12 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2) /*!< fSAMPLING = fEEVS/16, N=8 */
1182 #define LL_HRTIM_EE_FILTER_13 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/32, N=5 */
1183 #define LL_HRTIM_EE_FILTER_14 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1) /*!< fSAMPLING = fEEVS/32, N=6 */
1184 #define LL_HRTIM_EE_FILTER_15 (HRTIM_EECR3_EE6F_3 | HRTIM_EECR3_EE6F_2 | HRTIM_EECR3_EE6F_1 | HRTIM_EECR3_EE6F_0) /*!< fSAMPLING = fEEVS/32, N=8 */
1189 /** @defgroup HRTIM_LL_EC_EE_PRESCALER EXTERNAL EVENT PRESCALER
1191 * @brief Constants defining division ratio between the timer clock frequency (fHRTIM) and the external event signal sampling clock (fEEVS) used by the digital filters.
1193 #define LL_HRTIM_EE_PRESCALER_DIV1 0x00000000U /*!< fEEVS = fHRTIM */
1194 #define LL_HRTIM_EE_PRESCALER_DIV2 (HRTIM_EECR3_EEVSD_0) /*!< fEEVS = fHRTIM / 2 */
1195 #define LL_HRTIM_EE_PRESCALER_DIV4 (HRTIM_EECR3_EEVSD_1) /*!< fEEVS = fHRTIM / 4 */
1196 #define LL_HRTIM_EE_PRESCALER_DIV8 (HRTIM_EECR3_EEVSD_1 | HRTIM_EECR3_EEVSD_0) /*!< fEEVS = fHRTIM / 8 */
1201 /** @defgroup HRTIM_LL_EC_FLT_SRC FAULT SOURCE
1203 * @brief Constants defining whether a faults is be triggered by any external or internal fault source.
1205 #define LL_HRTIM_FLT_SRC_DIGITALINPUT 0x00000000U /*!< Fault input is FLT input pin */
1206 #define LL_HRTIM_FLT_SRC_INTERNAL HRTIM_FLTINR1_FLT1SRC /*!< Fault input is FLT_Int signal (e.g. internal comparator) */
1211 /** @defgroup HRTIM_LL_EC_FLT_POLARITY FAULT POLARITY
1213 * @brief Constants defining the polarity of a fault event.
1215 #define LL_HRTIM_FLT_POLARITY_LOW 0x00000000U /*!< Fault input is active low */
1216 #define LL_HRTIM_FLT_POLARITY_HIGH (HRTIM_FLTINR1_FLT1P) /*!< Fault input is active high */
1221 /** @defgroup HRTIM_LL_EC_FLT_FILTER FAULT DIGITAL FILTER
1223 * @brief Constants defining the frequency used to sample the fault input (fSAMPLING) and the length (N) of the digital filter applied.
1225 #define LL_HRTIM_FLT_FILTER_NONE 0x00000000U /*!< Filter disabled */
1226 #define LL_HRTIM_FLT_FILTER_1 (HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fHRTIM, N=2 */
1227 #define LL_HRTIM_FLT_FILTER_2 (HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fHRTIM, N=4 */
1228 #define LL_HRTIM_FLT_FILTER_3 (HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fHRTIM, N=8 */
1229 #define LL_HRTIM_FLT_FILTER_4 (HRTIM_FLTINR1_FLT1F_2) /*!< fSAMPLING= fFLTS/2, N=6 */
1230 #define LL_HRTIM_FLT_FILTER_5 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/2, N=8 */
1231 #define LL_HRTIM_FLT_FILTER_6 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/4, N=6 */
1232 #define LL_HRTIM_FLT_FILTER_7 (HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/4, N=8 */
1233 #define LL_HRTIM_FLT_FILTER_8 (HRTIM_FLTINR1_FLT1F_3) /*!< fSAMPLING= fFLTS/8, N=6 */
1234 #define LL_HRTIM_FLT_FILTER_9 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/8, N=8 */
1235 #define LL_HRTIM_FLT_FILTER_10 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/16, N=5 */
1236 #define LL_HRTIM_FLT_FILTER_11 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/16, N=6 */
1237 #define LL_HRTIM_FLT_FILTER_12 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2) /*!< fSAMPLING= fFLTS/16, N=8 */
1238 #define LL_HRTIM_FLT_FILTER_13 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/32, N=5 */
1239 #define LL_HRTIM_FLT_FILTER_14 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1) /*!< fSAMPLING= fFLTS/32, N=6 */
1240 #define LL_HRTIM_FLT_FILTER_15 (HRTIM_FLTINR1_FLT1F_3 | HRTIM_FLTINR1_FLT1F_2 | HRTIM_FLTINR1_FLT1F_1 | HRTIM_FLTINR1_FLT1F_0) /*!< fSAMPLING= fFLTS/32, N=8 */
1245 /** @defgroup HRTIM_LL_EC_FLT_PRESCALER BURST FAULT PRESCALER
1247 * @brief Constants defining the division ratio between the timer clock frequency (fHRTIM) and the fault signal sampling clock (fFLTS) used by the digital filters.
1249 #define LL_HRTIM_FLT_PRESCALER_DIV1 0x00000000U /*!< fFLTS = fHRTIM */
1250 #define LL_HRTIM_FLT_PRESCALER_DIV2 (HRTIM_FLTINR2_FLTSD_0) /*!< fFLTS = fHRTIM / 2 */
1251 #define LL_HRTIM_FLT_PRESCALER_DIV4 (HRTIM_FLTINR2_FLTSD_1) /*!< fFLTS = fHRTIM / 4 */
1252 #define LL_HRTIM_FLT_PRESCALER_DIV8 (HRTIM_FLTINR2_FLTSD_1 | HRTIM_FLTINR2_FLTSD_0) /*!< fFLTS = fHRTIM / 8 */
1257 /** @defgroup HRTIM_LL_EC_BM_MODE BURST MODE OPERATING MODE
1259 * @brief Constants defining if the burst mode is entered once or if it is continuously operating.
1261 #define LL_HRTIM_BM_MODE_SINGLESHOT 0x00000000U /*!< Burst mode operates in single shot mode */
1262 #define LL_HRTIM_BM_MODE_CONTINOUS (HRTIM_BMCR_BMOM) /*!< Burst mode operates in continuous mode */
1267 /** @defgroup HRTIM_LL_EC_BM_CLKSRC BURST MODE CLOCK SOURCE
1269 * @brief Constants defining the clock source for the burst mode counter.
1271 #define LL_HRTIM_BM_CLKSRC_MASTER 0x00000000U /*!< Master timer counter reset/roll-over is used as clock source for the burst mode counter */
1272 #define LL_HRTIM_BM_CLKSRC_TIMER_A (HRTIM_BMCR_BMCLK_0) /*!< Timer A counter reset/roll-over is used as clock source for the burst mode counter */
1273 #define LL_HRTIM_BM_CLKSRC_TIMER_B (HRTIM_BMCR_BMCLK_1) /*!< Timer B counter reset/roll-over is used as clock source for the burst mode counter */
1274 #define LL_HRTIM_BM_CLKSRC_TIMER_C (HRTIM_BMCR_BMCLK_1 | HRTIM_BMCR_BMCLK_0) /*!< Timer C counter reset/roll-over is used as clock source for the burst mode counter */
1275 #define LL_HRTIM_BM_CLKSRC_TIMER_D (HRTIM_BMCR_BMCLK_2) /*!< Timer D counter reset/roll-over is used as clock source for the burst mode counter */
1276 #define LL_HRTIM_BM_CLKSRC_TIMER_E (HRTIM_BMCR_BMCLK_2 | HRTIM_BMCR_BMCLK_0) /*!< Timer E counter reset/roll-over is used as clock source for the burst mode counter */
1277 #define LL_HRTIM_BM_CLKSRC_TIM16_OC (HRTIM_BMCR_BMCLK_2 | HRTIM_BMCR_BMCLK_1) /*!< On-chip Event 1 (BMClk[1]), acting as a burst mode counter clock */
1278 #define LL_HRTIM_BM_CLKSRC_TIM17_OC (HRTIM_BMCR_BMCLK_2 | HRTIM_BMCR_BMCLK_1 | HRTIM_BMCR_BMCLK_0) /*!< On-chip Event 2 (BMClk[2]), acting as a burst mode counter clock */
1279 #define LL_HRTIM_BM_CLKSRC_TIM7_TRGO (HRTIM_BMCR_BMCLK_3) /*!< On-chip Event 3 (BMClk[3]), acting as a burst mode counter clock */
1280 #define LL_HRTIM_BM_CLKSRC_FHRTIM (HRTIM_BMCR_BMCLK_3 | HRTIM_BMCR_BMCLK_1) /*!< Prescaled fHRTIM clock is used as clock source for the burst mode counter */
1285 /** @defgroup HRTIM_LL_EC_BM_PRESCALER BURST MODE PRESCALER
1287 * @brief Constants defining the prescaling ratio of the fHRTIM clock for the burst mode controller (fBRST).
1289 #define LL_HRTIM_BM_PRESCALER_DIV1 0x00000000U /*!< fBRST = fHRTIM */
1290 #define LL_HRTIM_BM_PRESCALER_DIV2 (HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/2 */
1291 #define LL_HRTIM_BM_PRESCALER_DIV4 (HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/4 */
1292 #define LL_HRTIM_BM_PRESCALER_DIV8 (HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/8 */
1293 #define LL_HRTIM_BM_PRESCALER_DIV16 (HRTIM_BMCR_BMPRSC_2) /*!< fBRST = fHRTIM/16 */
1294 #define LL_HRTIM_BM_PRESCALER_DIV32 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/32 */
1295 #define LL_HRTIM_BM_PRESCALER_DIV64 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/64 */
1296 #define LL_HRTIM_BM_PRESCALER_DIV128 (HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/128 */
1297 #define LL_HRTIM_BM_PRESCALER_DIV256 (HRTIM_BMCR_BMPRSC_3) /*!< fBRST = fHRTIM/256 */
1298 #define LL_HRTIM_BM_PRESCALER_DIV512 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/512 */
1299 #define LL_HRTIM_BM_PRESCALER_DIV1024 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/1024 */
1300 #define LL_HRTIM_BM_PRESCALER_DIV2048 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/2048*/
1301 #define LL_HRTIM_BM_PRESCALER_DIV4096 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2) /*!< fBRST = fHRTIM/4096 */
1302 #define LL_HRTIM_BM_PRESCALER_DIV8192 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/8192 */
1303 #define LL_HRTIM_BM_PRESCALER_DIV16384 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1) /*!< fBRST = fHRTIM/16384 */
1304 #define LL_HRTIM_BM_PRESCALER_DIV32768 (HRTIM_BMCR_BMPRSC_3 | HRTIM_BMCR_BMPRSC_2 | HRTIM_BMCR_BMPRSC_1 | HRTIM_BMCR_BMPRSC_0) /*!< fBRST = fHRTIM/32768 */
1309 /** @defgroup HRTIM_LL_EC_BM_TRIG HRTIM BURST MODE TRIGGER
1311 * @brief Constants defining the events that can be used to trig the burst mode operation.
1313 #define LL_HRTIM_BM_TRIG_NONE 0x00000000U /*!< No trigger */
1314 #define LL_HRTIM_BM_TRIG_MASTER_RESET (HRTIM_BMTRGR_MSTRST) /*!< Master timer reset event is starting the burst mode operation */
1315 #define LL_HRTIM_BM_TRIG_MASTER_REPETITION (HRTIM_BMTRGR_MSTREP) /*!< Master timer repetition event is starting the burst mode operation */
1316 #define LL_HRTIM_BM_TRIG_MASTER_CMP1 (HRTIM_BMTRGR_MSTCMP1) /*!< Master timer compare 1 event is starting the burst mode operation */
1317 #define LL_HRTIM_BM_TRIG_MASTER_CMP2 (HRTIM_BMTRGR_MSTCMP2) /*!< Master timer compare 2 event is starting the burst mode operation */
1318 #define LL_HRTIM_BM_TRIG_MASTER_CMP3 (HRTIM_BMTRGR_MSTCMP3) /*!< Master timer compare 3 event is starting the burst mode operation */
1319 #define LL_HRTIM_BM_TRIG_MASTER_CMP4 (HRTIM_BMTRGR_MSTCMP4) /*!< Master timer compare 4 event is starting the burst mode operation */
1320 #define LL_HRTIM_BM_TRIG_TIMA_RESET (HRTIM_BMTRGR_TARST) /*!< Timer A reset event is starting the burst mode operation */
1321 #define LL_HRTIM_BM_TRIG_TIMA_REPETITION (HRTIM_BMTRGR_TAREP) /*!< Timer A repetition event is starting the burst mode operation */
1322 #define LL_HRTIM_BM_TRIG_TIMA_CMP1 (HRTIM_BMTRGR_TACMP1) /*!< Timer A compare 1 event is starting the burst mode operation */
1323 #define LL_HRTIM_BM_TRIG_TIMA_CMP2 (HRTIM_BMTRGR_TACMP2) /*!< Timer A compare 2 event is starting the burst mode operation */
1324 #define LL_HRTIM_BM_TRIG_TIMB_RESET (HRTIM_BMTRGR_TBRST) /*!< Timer B reset event is starting the burst mode operation */
1325 #define LL_HRTIM_BM_TRIG_TIMB_REPETITION (HRTIM_BMTRGR_TBREP) /*!< Timer B repetition event is starting the burst mode operation */
1326 #define LL_HRTIM_BM_TRIG_TIMB_CMP1 (HRTIM_BMTRGR_TBCMP1) /*!< Timer B compare 1 event is starting the burst mode operation */
1327 #define LL_HRTIM_BM_TRIG_TIMB_CMP2 (HRTIM_BMTRGR_TBCMP2) /*!< Timer B compare 2 event is starting the burst mode operation */
1328 #define LL_HRTIM_BM_TRIG_TIMC_RESET (HRTIM_BMTRGR_TCRST) /*!< Timer C resetevent is starting the burst mode operation */
1329 #define LL_HRTIM_BM_TRIG_TIMC_REPETITION (HRTIM_BMTRGR_TCREP) /*!< Timer C repetition event is starting the burst mode operation */
1330 #define LL_HRTIM_BM_TRIG_TIMC_CMP1 (HRTIM_BMTRGR_TCCMP1) /*!< Timer C compare 1 event is starting the burst mode operation */
1331 #define LL_HRTIM_BM_TRIG_TIMC_CMP2 (HRTIM_BMTRGR_TCCMP2) /*!< Timer C compare 2 event is starting the burst mode operation */
1332 #define LL_HRTIM_BM_TRIG_TIMD_RESET (HRTIM_BMTRGR_TDRST) /*!< Timer D reset event is starting the burst mode operation */
1333 #define LL_HRTIM_BM_TRIG_TIMD_REPETITION (HRTIM_BMTRGR_TDREP) /*!< Timer D repetition event is starting the burst mode operation */
1334 #define LL_HRTIM_BM_TRIG_TIMD_CMP1 (HRTIM_BMTRGR_TDCMP1) /*!< Timer D compare 1 event is starting the burst mode operation */
1335 #define LL_HRTIM_BM_TRIG_TIMD_CMP2 (HRTIM_BMTRGR_TDCMP2) /*!< Timer D compare 2 event is starting the burst mode operation */
1336 #define LL_HRTIM_BM_TRIG_TIME_RESET (HRTIM_BMTRGR_TERST) /*!< Timer E reset event is starting the burst mode operation */
1337 #define LL_HRTIM_BM_TRIG_TIME_REPETITION (HRTIM_BMTRGR_TEREP) /*!< Timer E repetition event is starting the burst mode operation */
1338 #define LL_HRTIM_BM_TRIG_TIME_CMP1 (HRTIM_BMTRGR_TECMP1) /*!< Timer E compare 1 event is starting the burst mode operation */
1339 #define LL_HRTIM_BM_TRIG_TIME_CMP2 (HRTIM_BMTRGR_TECMP2) /*!< Timer E compare 2 event is starting the burst mode operation */
1340 #define LL_HRTIM_BM_TRIG_TIMA_EVENT7 (HRTIM_BMTRGR_TAEEV7) /*!< Timer A period following an external event 7 (conditioned by TIMA filters) is starting the burst mode operation */
1341 #define LL_HRTIM_BM_TRIG_TIMD_EVENT8 (HRTIM_BMTRGR_TDEEV8) /*!< Timer D period following an external event 8 (conditioned by TIMD filters) is starting the burst mode operation */
1342 #define LL_HRTIM_BM_TRIG_EVENT_7 (HRTIM_BMTRGR_EEV7) /*!< External event 7 conditioned by TIMA filters is starting the burst mode operation */
1343 #define LL_HRTIM_BM_TRIG_EVENT_8 (HRTIM_BMTRGR_EEV8) /*!< External event 8 conditioned by TIMD filters is starting the burst mode operation */
1344 #define LL_HRTIM_BM_TRIG_EVENT_ONCHIP (HRTIM_BMTRGR_OCHPEV) /*!< A rising edge on an on-chip Event (for instance from GP timer or comparator) triggers the burst mode operation */
1349 /** @defgroup HRTIM_LL_EC_BM_STATUS HRTIM BURST MODE STATUS
1351 * @brief Constants defining the operating state of the burst mode controller.
1353 #define LL_HRTIM_BM_STATUS_NORMAL 0x00000000U /*!< Normal operation */
1354 #define LL_HRTIM_BM_STATUS_BURST_ONGOING HRTIM_BMCR_BMSTAT /*!< Burst operation on-going */
1363 /* Exported macro ------------------------------------------------------------*/
1364 /** @defgroup HRTIM_LL_Exported_Macros HRTIM Exported Macros
1368 /** @defgroup HRTIM_LL_EM_WRITE_READ Common Write and read registers Macros
1373 * @brief Write a value in HRTIM register
1374 * @param __INSTANCE__ HRTIM Instance
1375 * @param __REG__ Register to be written
1376 * @param __VALUE__ Value to be written in the register
1379 #define LL_HRTIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
1382 * @brief Read a value in HRTIM register
1383 * @param __INSTANCE__ HRTIM Instance
1384 * @param __REG__ Register to be read
1385 * @retval Register value
1387 #define LL_HRTIM_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
1392 /** @defgroup HRTIM_LL_EM_Exported_Macros Exported_Macros
1396 * @brief HELPER macro returning the output state from output enable/disable status
1397 * @param __OUTPUT_STATUS_EN__ output enable status
1398 * @param __OUTPUT_STATUS_DIS__ output Disable status
1399 * @retval Returned value can be one of the following values:
1400 * @arg @ref LL_HRTIM_OUTPUTSTATE_IDLE
1401 * @arg @ref LL_HRTIM_OUTPUTSTATE_RUN
1402 * @arg @ref LL_HRTIM_OUTPUTSTATE_FAULT
1404 #define __LL_HRTIM_GET_OUTPUT_STATE(__OUTPUT_STATUS_EN__, __OUTPUT_STATUS_DIS__)\
1405 (((__OUTPUT_STATUS_EN__) == 1) ? LL_HRTIM_OUTPUTSTATE_RUN :\
1406 ((__OUTPUT_STATUS_DIS__) == 0) ? LL_HRTIM_OUTPUTSTATE_IDLE : LL_HRTIM_OUTPUTSTATE_FAULT)
1415 /* Exported functions --------------------------------------------------------*/
1416 /** @defgroup HRTIM_LL_Exported_Functions HRTIM Exported Functions
1419 /** @defgroup HRTIM_LL_EF_HRTIM_Control HRTIM_Control
1424 * @brief Select the HRTIM synchronization input source.
1425 * @note This function must not be called when the concerned timer(s) is (are) enabled .
1426 * @rmtoll MCR SYNCIN LL_HRTIM_SetSyncInSrc
1427 * @param HRTIMx High Resolution Timer instance
1428 * @param SyncInSrc This parameter can be one of the following values:
1429 * @arg @ref LL_HRTIM_SYNCIN_SRC_NONE
1430 * @arg @ref LL_HRTIM_SYNCIN_SRC_TIM_EVENT
1431 * @arg @ref LL_HRTIM_SYNCIN_SRC_EXTERNAL_EVENT
1434 __STATIC_INLINE
void LL_HRTIM_SetSyncInSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t SyncInSrc
)
1436 MODIFY_REG(HRTIMx
->sMasterRegs
.MCR
, HRTIM_MCR_SYNC_IN
, SyncInSrc
);
1440 * @brief Get actual HRTIM synchronization input source.
1441 * @rmtoll MCR SYNCIN LL_HRTIM_SetSyncInSrc
1442 * @param HRTIMx High Resolution Timer instance
1443 * @retval SyncInSrc Returned value can be one of the following values:
1444 * @arg @ref LL_HRTIM_SYNCIN_SRC_NONE
1445 * @arg @ref LL_HRTIM_SYNCIN_SRC_TIM_EVENT
1446 * @arg @ref LL_HRTIM_SYNCIN_SRC_EXTERNAL_EVENT
1448 __STATIC_INLINE
uint32_t LL_HRTIM_GetSyncInSrc(HRTIM_TypeDef
*HRTIMx
)
1450 return (READ_BIT(HRTIMx
->sMasterRegs
.MCR
, HRTIM_MCR_SYNC_IN
));
1454 * @brief Configure the HRTIM synchronization output.
1455 * @rmtoll MCR SYNCSRC LL_HRTIM_ConfigSyncOut\n
1456 * MCR SYNCOUT LL_HRTIM_ConfigSyncOut
1457 * @param HRTIMx High Resolution Timer instance
1458 * @param Config This parameter can be one of the following values:
1459 * @arg @ref LL_HRTIM_SYNCOUT_DISABLED
1460 * @arg @ref LL_HRTIM_SYNCOUT_POSITIVE_PULSE
1461 * @arg @ref LL_HRTIM_SYNCOUT_NEGATIVE_PULSE
1462 * @param Src This parameter can be one of the following values:
1463 * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_START
1464 * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1
1465 * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_START
1466 * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1
1469 __STATIC_INLINE
void LL_HRTIM_ConfigSyncOut(HRTIM_TypeDef
*HRTIMx
, uint32_t Config
, uint32_t Src
)
1471 MODIFY_REG(HRTIMx
->sMasterRegs
.MCR
, (HRTIM_MCR_SYNC_OUT
| HRTIM_MCR_SYNC_SRC
), (Config
| Src
));
1475 * @brief Set the routing and conditioning of the synchronization output event.
1476 * @rmtoll MCR SYNCOUT LL_HRTIM_SetSyncOutConfig
1477 * @note This function can be called only when the master timer is enabled.
1478 * @param HRTIMx High Resolution Timer instance
1479 * @param SyncOutConfig This parameter can be one of the following values:
1480 * @arg @ref LL_HRTIM_SYNCOUT_DISABLED
1481 * @arg @ref LL_HRTIM_SYNCOUT_POSITIVE_PULSE
1482 * @arg @ref LL_HRTIM_SYNCOUT_NEGATIVE_PULSE
1485 __STATIC_INLINE
void LL_HRTIM_SetSyncOutConfig(HRTIM_TypeDef
*HRTIMx
, uint32_t SyncOutConfig
)
1487 MODIFY_REG(HRTIMx
->sMasterRegs
.MCR
, HRTIM_MCR_SYNC_OUT
, SyncOutConfig
);
1491 * @brief Get actual routing and conditioning of the synchronization output event.
1492 * @rmtoll MCR SYNCOUT LL_HRTIM_GetSyncOutConfig
1493 * @param HRTIMx High Resolution Timer instance
1494 * @retval SyncOutConfig Returned value can be one of the following values:
1495 * @arg @ref LL_HRTIM_SYNCOUT_DISABLED
1496 * @arg @ref LL_HRTIM_SYNCOUT_POSITIVE_PULSE
1497 * @arg @ref LL_HRTIM_SYNCOUT_NEGATIVE_PULSE
1499 __STATIC_INLINE
uint32_t LL_HRTIM_GetSyncOutConfig(HRTIM_TypeDef
*HRTIMx
)
1501 return (READ_BIT(HRTIMx
->sMasterRegs
.MCR
, HRTIM_MCR_SYNC_OUT
));
1505 * @brief Set the source and event to be sent on the HRTIM synchronization output.
1506 * @rmtoll MCR SYNCSRC LL_HRTIM_SetSyncOutSrc
1507 * @param HRTIMx High Resolution Timer instance
1508 * @param SyncOutSrc This parameter can be one of the following values:
1509 * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_START
1510 * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1
1511 * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_START
1512 * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1
1515 __STATIC_INLINE
void LL_HRTIM_SetSyncOutSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t SyncOutSrc
)
1517 MODIFY_REG(HRTIMx
->sMasterRegs
.MCR
, HRTIM_MCR_SYNC_SRC
, SyncOutSrc
);
1521 * @brief Get actual source and event sent on the HRTIM synchronization output.
1522 * @rmtoll MCR SYNCSRC LL_HRTIM_GetSyncOutSrc
1523 * @param HRTIMx High Resolution Timer instance
1524 * @retval SyncOutSrc Returned value can be one of the following values:
1525 * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_START
1526 * @arg @ref LL_HRTIM_SYNCOUT_SRC_MASTER_CMP1
1527 * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_START
1528 * @arg @ref LL_HRTIM_SYNCOUT_SRC_TIMA_CMP1
1530 __STATIC_INLINE
uint32_t LL_HRTIM_GetSyncOutSrc(HRTIM_TypeDef
*HRTIMx
)
1532 return (READ_BIT(HRTIMx
->sMasterRegs
.MCR
, HRTIM_MCR_SYNC_SRC
));
1536 * @brief Disable (temporarily) update event generation.
1537 * @rmtoll CR1 MUDIS LL_HRTIM_SuspendUpdate\n
1538 * CR1 TAUDIS LL_HRTIM_SuspendUpdate\n
1539 * CR1 TBUDIS LL_HRTIM_SuspendUpdate\n
1540 * CR1 TCUDIS LL_HRTIM_SuspendUpdate\n
1541 * CR1 TDUDIS LL_HRTIM_SuspendUpdate\n
1542 * CR1 TEUDIS LL_HRTIM_SuspendUpdate
1543 * @note Allow to temporarily disable the transfer from preload to active
1544 * registers, whatever the selected update event. This allows to modify
1545 * several registers in multiple timers.
1546 * @param HRTIMx High Resolution Timer instance
1547 * @param Timers This parameter can be a combination of the following values:
1548 * @arg @ref LL_HRTIM_TIMER_MASTER
1549 * @arg @ref LL_HRTIM_TIMER_A
1550 * @arg @ref LL_HRTIM_TIMER_B
1551 * @arg @ref LL_HRTIM_TIMER_C
1552 * @arg @ref LL_HRTIM_TIMER_D
1553 * @arg @ref LL_HRTIM_TIMER_E
1556 __STATIC_INLINE
void LL_HRTIM_SuspendUpdate(HRTIM_TypeDef
*HRTIMx
, uint32_t Timers
)
1558 SET_BIT(HRTIMx
->sCommonRegs
.CR1
, ((Timers
>> HRTIM_MCR_MCEN_Pos
) & HRTIM_CR1_UDIS_MASK
));
1562 * @brief Enable update event generation.
1563 * @rmtoll CR1 MUDIS LL_HRTIM_ResumeUpdate\n
1564 * CR1 TAUDIS LL_HRTIM_ResumeUpdate\n
1565 * CR1 TBUDIS LL_HRTIM_ResumeUpdate\n
1566 * CR1 TCUDIS LL_HRTIM_ResumeUpdate\n
1567 * CR1 TDUDIS LL_HRTIM_ResumeUpdate\n
1568 * CR1 TEUDIS LL_HRTIM_ResumeUpdate
1569 * @note The regular update event takes place.
1570 * @param HRTIMx High Resolution Timer instance
1571 * @param Timers This parameter can be a combination of the following values:
1572 * @arg @ref LL_HRTIM_TIMER_MASTER
1573 * @arg @ref LL_HRTIM_TIMER_A
1574 * @arg @ref LL_HRTIM_TIMER_B
1575 * @arg @ref LL_HRTIM_TIMER_C
1576 * @arg @ref LL_HRTIM_TIMER_D
1577 * @arg @ref LL_HRTIM_TIMER_E
1580 __STATIC_INLINE
void LL_HRTIM_ResumeUpdate(HRTIM_TypeDef
*HRTIMx
, uint32_t Timers
)
1582 CLEAR_BIT(HRTIMx
->sCommonRegs
.CR1
, ((Timers
>> HRTIM_MCR_MCEN_Pos
) & HRTIM_CR1_UDIS_MASK
));
1586 * @brief Force an immediate transfer from the preload to the active register .
1587 * @rmtoll CR2 MSWU LL_HRTIM_ForceUpdate\n
1588 * CR2 TASWU LL_HRTIM_ForceUpdate\n
1589 * CR2 TBSWU LL_HRTIM_ForceUpdate\n
1590 * CR2 TCSWU LL_HRTIM_ForceUpdate\n
1591 * CR2 TDSWU LL_HRTIM_ForceUpdate\n
1592 * CR2 TESWU LL_HRTIM_ForceUpdate
1593 * @note Any pending update request is cancelled.
1594 * @param HRTIMx High Resolution Timer instance
1595 * @param Timers This parameter can be a combination of the following values:
1596 * @arg @ref LL_HRTIM_TIMER_MASTER
1597 * @arg @ref LL_HRTIM_TIMER_A
1598 * @arg @ref LL_HRTIM_TIMER_B
1599 * @arg @ref LL_HRTIM_TIMER_C
1600 * @arg @ref LL_HRTIM_TIMER_D
1601 * @arg @ref LL_HRTIM_TIMER_E
1604 __STATIC_INLINE
void LL_HRTIM_ForceUpdate(HRTIM_TypeDef
*HRTIMx
, uint32_t Timers
)
1606 SET_BIT(HRTIMx
->sCommonRegs
.CR2
, ((Timers
>> HRTIM_MCR_MCEN_Pos
) & HRTIM_CR2_SWUPD_MASK
));
1610 * @brief Reset the HRTIM timer(s) counter.
1611 * @rmtoll CR2 MRST LL_HRTIM_CounterReset\n
1612 * CR2 TARST LL_HRTIM_CounterReset\n
1613 * CR2 TBRST LL_HRTIM_CounterReset\n
1614 * CR2 TCRST LL_HRTIM_CounterReset\n
1615 * CR2 TDRST LL_HRTIM_CounterReset\n
1616 * CR2 TERST LL_HRTIM_CounterReset
1617 * @param HRTIMx High Resolution Timer instance
1618 * @param Timers This parameter can be a combination of the following values:
1619 * @arg @ref LL_HRTIM_TIMER_MASTER
1620 * @arg @ref LL_HRTIM_TIMER_A
1621 * @arg @ref LL_HRTIM_TIMER_B
1622 * @arg @ref LL_HRTIM_TIMER_C
1623 * @arg @ref LL_HRTIM_TIMER_D
1624 * @arg @ref LL_HRTIM_TIMER_E
1627 __STATIC_INLINE
void LL_HRTIM_CounterReset(HRTIM_TypeDef
*HRTIMx
, uint32_t Timers
)
1629 SET_BIT(HRTIMx
->sCommonRegs
.CR2
, (((Timers
>> HRTIM_MCR_MCEN_Pos
) << HRTIM_CR2_MRST_Pos
) & HRTIM_CR2_SWRST_MASK
));
1633 * @brief Enable the HRTIM timer(s) output(s) .
1634 * @rmtoll OENR TA1OEN LL_HRTIM_EnableOutput\n
1635 * OENR TA2OEN LL_HRTIM_EnableOutput\n
1636 * OENR TB1OEN LL_HRTIM_EnableOutput\n
1637 * OENR TB2OEN LL_HRTIM_EnableOutput\n
1638 * OENR TC1OEN LL_HRTIM_EnableOutput\n
1639 * OENR TC2OEN LL_HRTIM_EnableOutput\n
1640 * OENR TD1OEN LL_HRTIM_EnableOutput\n
1641 * OENR TD2OEN LL_HRTIM_EnableOutput\n
1642 * OENR TE1OEN LL_HRTIM_EnableOutput\n
1643 * OENR TE2OEN LL_HRTIM_EnableOutput
1644 * @param HRTIMx High Resolution Timer instance
1645 * @param Outputs This parameter can be a combination of the following values:
1646 * @arg @ref LL_HRTIM_OUTPUT_TA1
1647 * @arg @ref LL_HRTIM_OUTPUT_TA2
1648 * @arg @ref LL_HRTIM_OUTPUT_TB1
1649 * @arg @ref LL_HRTIM_OUTPUT_TB2
1650 * @arg @ref LL_HRTIM_OUTPUT_TC1
1651 * @arg @ref LL_HRTIM_OUTPUT_TC2
1652 * @arg @ref LL_HRTIM_OUTPUT_TD1
1653 * @arg @ref LL_HRTIM_OUTPUT_TD2
1654 * @arg @ref LL_HRTIM_OUTPUT_TE1
1655 * @arg @ref LL_HRTIM_OUTPUT_TE2
1658 __STATIC_INLINE
void LL_HRTIM_EnableOutput(HRTIM_TypeDef
*HRTIMx
, uint32_t Outputs
)
1660 SET_BIT(HRTIMx
->sCommonRegs
.OENR
, (Outputs
& HRTIM_OENR_OEN_MASK
));
1664 * @brief Disable the HRTIM timer(s) output(s) .
1665 * @rmtoll OENR TA1OEN LL_HRTIM_DisableOutput\n
1666 * OENR TA2OEN LL_HRTIM_DisableOutput\n
1667 * OENR TB1OEN LL_HRTIM_DisableOutput\n
1668 * OENR TB2OEN LL_HRTIM_DisableOutput\n
1669 * OENR TC1OEN LL_HRTIM_DisableOutput\n
1670 * OENR TC2OEN LL_HRTIM_DisableOutput\n
1671 * OENR TD1OEN LL_HRTIM_DisableOutput\n
1672 * OENR TD2OEN LL_HRTIM_DisableOutput\n
1673 * OENR TE1OEN LL_HRTIM_DisableOutput\n
1674 * OENR TE2OEN LL_HRTIM_DisableOutput
1675 * @param HRTIMx High Resolution Timer instance
1676 * @param Outputs This parameter can be a combination of the following values:
1677 * @arg @ref LL_HRTIM_OUTPUT_TA1
1678 * @arg @ref LL_HRTIM_OUTPUT_TA2
1679 * @arg @ref LL_HRTIM_OUTPUT_TB1
1680 * @arg @ref LL_HRTIM_OUTPUT_TB2
1681 * @arg @ref LL_HRTIM_OUTPUT_TC1
1682 * @arg @ref LL_HRTIM_OUTPUT_TC2
1683 * @arg @ref LL_HRTIM_OUTPUT_TD1
1684 * @arg @ref LL_HRTIM_OUTPUT_TD2
1685 * @arg @ref LL_HRTIM_OUTPUT_TE1
1686 * @arg @ref LL_HRTIM_OUTPUT_TE2
1689 __STATIC_INLINE
void LL_HRTIM_DisableOutput(HRTIM_TypeDef
*HRTIMx
, uint32_t Outputs
)
1691 SET_BIT(HRTIMx
->sCommonRegs
.ODISR
, (Outputs
& HRTIM_OENR_ODIS_MASK
));
1695 * @brief Indicates whether the HRTIM timer output is enabled.
1696 * @rmtoll OENR TA1OEN LL_HRTIM_IsEnabledOutput\n
1697 * OENR TA2OEN LL_HRTIM_IsEnabledOutput\n
1698 * OENR TB1OEN LL_HRTIM_IsEnabledOutput\n
1699 * OENR TB2OEN LL_HRTIM_IsEnabledOutput\n
1700 * OENR TC1OEN LL_HRTIM_IsEnabledOutput\n
1701 * OENR TC2OEN LL_HRTIM_IsEnabledOutput\n
1702 * OENR TD1OEN LL_HRTIM_IsEnabledOutput\n
1703 * OENR TD2OEN LL_HRTIM_IsEnabledOutput\n
1704 * OENR TE1OEN LL_HRTIM_IsEnabledOutput\n
1705 * OENR TE2OEN LL_HRTIM_IsEnabledOutput
1706 * @param HRTIMx High Resolution Timer instance
1707 * @param Output This parameter can be one of the following values:
1708 * @arg @ref LL_HRTIM_OUTPUT_TA1
1709 * @arg @ref LL_HRTIM_OUTPUT_TA2
1710 * @arg @ref LL_HRTIM_OUTPUT_TB1
1711 * @arg @ref LL_HRTIM_OUTPUT_TB2
1712 * @arg @ref LL_HRTIM_OUTPUT_TC1
1713 * @arg @ref LL_HRTIM_OUTPUT_TC2
1714 * @arg @ref LL_HRTIM_OUTPUT_TD1
1715 * @arg @ref LL_HRTIM_OUTPUT_TD2
1716 * @arg @ref LL_HRTIM_OUTPUT_TE1
1717 * @arg @ref LL_HRTIM_OUTPUT_TE2
1718 * @retval State of TxyOEN bit in HRTIM_OENR register (1 or 0).
1720 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledOutput(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
1722 return ((READ_BIT(HRTIMx
->sCommonRegs
.OENR
, Output
) == Output
) ? 1UL : 0UL);
1726 * @brief Indicates whether the HRTIM timer output is disabled.
1727 * @rmtoll ODISR TA1ODIS LL_HRTIM_IsDisabledOutput\n
1728 * ODISR TA2ODIS LL_HRTIM_IsDisabledOutput\n
1729 * ODISR TB1ODIS LL_HRTIM_IsDisabledOutput\n
1730 * ODISR TB2ODIS LL_HRTIM_IsDisabledOutput\n
1731 * ODISR TC1ODIS LL_HRTIM_IsDisabledOutput\n
1732 * ODISR TC2ODIS LL_HRTIM_IsDisabledOutput\n
1733 * ODISR TD1ODIS LL_HRTIM_IsDisabledOutput\n
1734 * ODISR TD2ODIS LL_HRTIM_IsDisabledOutput\n
1735 * ODISR TE1ODIS LL_HRTIM_IsDisabledOutput\n
1736 * ODISR TE2ODIS LL_HRTIM_IsDisabledOutput
1737 * @param HRTIMx High Resolution Timer instance
1738 * @param Output This parameter can be one of the following values:
1739 * @arg @ref LL_HRTIM_OUTPUT_TA1
1740 * @arg @ref LL_HRTIM_OUTPUT_TA2
1741 * @arg @ref LL_HRTIM_OUTPUT_TB1
1742 * @arg @ref LL_HRTIM_OUTPUT_TB2
1743 * @arg @ref LL_HRTIM_OUTPUT_TC1
1744 * @arg @ref LL_HRTIM_OUTPUT_TC2
1745 * @arg @ref LL_HRTIM_OUTPUT_TD1
1746 * @arg @ref LL_HRTIM_OUTPUT_TD2
1747 * @arg @ref LL_HRTIM_OUTPUT_TE1
1748 * @arg @ref LL_HRTIM_OUTPUT_TE2
1749 * @retval State of TxyODS bit in HRTIM_OENR register (1 or 0).
1751 __STATIC_INLINE
uint32_t LL_HRTIM_IsDisabledOutput(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
1753 return ((READ_BIT(HRTIMx
->sCommonRegs
.OENR
, Output
) == 0U) ? 1UL : 0UL);
1757 * @brief Configure an ADC trigger.
1758 * @rmtoll CR1 ADC1USRC LL_HRTIM_ConfigADCTrig\n
1759 * CR1 ADC2USRC LL_HRTIM_ConfigADCTrig\n
1760 * CR1 ADC3USRC LL_HRTIM_ConfigADCTrig\n
1761 * CR1 ADC4USRC LL_HRTIM_ConfigADCTrig\n
1762 * ADC1R ADC1MC1 LL_HRTIM_ConfigADCTrig\n
1763 * ADC1R ADC1MC2 LL_HRTIM_ConfigADCTrig\n
1764 * ADC1R ADC1MC3 LL_HRTIM_ConfigADCTrig\n
1765 * ADC1R ADC1MC4 LL_HRTIM_ConfigADCTrig\n
1766 * ADC1R ADC1MPER LL_HRTIM_ConfigADCTrig\n
1767 * ADC1R ADC1EEV1 LL_HRTIM_ConfigADCTrig\n
1768 * ADC1R ADC1EEV2 LL_HRTIM_ConfigADCTrig\n
1769 * ADC1R ADC1EEV3 LL_HRTIM_ConfigADCTrig\n
1770 * ADC1R ADC1EEV4 LL_HRTIM_ConfigADCTrig\n
1771 * ADC1R ADC1EEV5 LL_HRTIM_ConfigADCTrig\n
1772 * ADC1R ADC1TAC2 LL_HRTIM_ConfigADCTrig\n
1773 * ADC1R ADC1TAC3 LL_HRTIM_ConfigADCTrig\n
1774 * ADC1R ADC1TAC4 LL_HRTIM_ConfigADCTrig\n
1775 * ADC1R ADC1TAPER LL_HRTIM_ConfigADCTrig\n
1776 * ADC1R ADC1TARST LL_HRTIM_ConfigADCTrig\n
1777 * ADC1R ADC1TBC2 LL_HRTIM_ConfigADCTrig\n
1778 * ADC1R ADC1TBC3 LL_HRTIM_ConfigADCTrig\n
1779 * ADC1R ADC1TBC4 LL_HRTIM_ConfigADCTrig\n
1780 * ADC1R ADC1TBPER LL_HRTIM_ConfigADCTrig\n
1781 * ADC1R ADC1TBRST LL_HRTIM_ConfigADCTrig\n
1782 * ADC1R ADC1TCC2 LL_HRTIM_ConfigADCTrig\n
1783 * ADC1R ADC1TCC3 LL_HRTIM_ConfigADCTrig\n
1784 * ADC1R ADC1TCC4 LL_HRTIM_ConfigADCTrig\n
1785 * ADC1R ADC1TCPER LL_HRTIM_ConfigADCTrig\n
1786 * ADC1R ADC1TDC2 LL_HRTIM_ConfigADCTrig\n
1787 * ADC1R ADC1TDC3 LL_HRTIM_ConfigADCTrig\n
1788 * ADC1R ADC1TDC4 LL_HRTIM_ConfigADCTrig\n
1789 * ADC1R ADC1TDPER LL_HRTIM_ConfigADCTrig\n
1790 * ADC1R ADC1TEC2 LL_HRTIM_ConfigADCTrig\n
1791 * ADC1R ADC1TEC3 LL_HRTIM_ConfigADCTrig\n
1792 * ADC1R ADC1TEC4 LL_HRTIM_ConfigADCTrig\n
1793 * ADC1R ADC1TEPER LL_HRTIM_ConfigADCTrig\n
1794 * ADC2R ADC2MC1 LL_HRTIM_ConfigADCTrig\n
1795 * ADC2R ADC2MC2 LL_HRTIM_ConfigADCTrig\n
1796 * ADC2R ADC2MC3 LL_HRTIM_ConfigADCTrig\n
1797 * ADC2R ADC2MC4 LL_HRTIM_ConfigADCTrig\n
1798 * ADC2R ADC2MPER LL_HRTIM_ConfigADCTrig\n
1799 * ADC2R ADC2EEV6 LL_HRTIM_ConfigADCTrig\n
1800 * ADC2R ADC2EEV7 LL_HRTIM_ConfigADCTrig\n
1801 * ADC2R ADC2EEV8 LL_HRTIM_ConfigADCTrig\n
1802 * ADC2R ADC2EEV9 LL_HRTIM_ConfigADCTrig\n
1803 * ADC2R ADC2EEV10 LL_HRTIM_ConfigADCTrig\n
1804 * ADC2R ADC2TAC2 LL_HRTIM_ConfigADCTrig\n
1805 * ADC2R ADC2TAC3 LL_HRTIM_ConfigADCTrig\n
1806 * ADC2R ADC2TAC4 LL_HRTIM_ConfigADCTrig\n
1807 * ADC2R ADC2TAPER LL_HRTIM_ConfigADCTrig\n
1808 * ADC2R ADC2TBC2 LL_HRTIM_ConfigADCTrig\n
1809 * ADC2R ADC2TBC3 LL_HRTIM_ConfigADCTrig\n
1810 * ADC2R ADC2TBC4 LL_HRTIM_ConfigADCTrig\n
1811 * ADC2R ADC2TBPER LL_HRTIM_ConfigADCTrig\n
1812 * ADC2R ADC2TCC2 LL_HRTIM_ConfigADCTrig\n
1813 * ADC2R ADC2TCC3 LL_HRTIM_ConfigADCTrig\n
1814 * ADC2R ADC2TCC4 LL_HRTIM_ConfigADCTrig\n
1815 * ADC2R ADC2TCPER LL_HRTIM_ConfigADCTrig\n
1816 * ADC2R ADC2TCRST LL_HRTIM_ConfigADCTrig\n
1817 * ADC2R ADC2TDC2 LL_HRTIM_ConfigADCTrig\n
1818 * ADC2R ADC2TDC3 LL_HRTIM_ConfigADCTrig\n
1819 * ADC2R ADC2TDC4 LL_HRTIM_ConfigADCTrig\n
1820 * ADC2R ADC2TDPER LL_HRTIM_ConfigADCTrig\n
1821 * ADC2R ADC2TDRST LL_HRTIM_ConfigADCTrig\n
1822 * ADC2R ADC2TEC2 LL_HRTIM_ConfigADCTrig\n
1823 * ADC2R ADC2TEC3 LL_HRTIM_ConfigADCTrig\n
1824 * ADC2R ADC2TEC4 LL_HRTIM_ConfigADCTrig\n
1825 * ADC2R ADC2TERST LL_HRTIM_ConfigADCTrig\n
1826 * ADC3R ADC3MC1 LL_HRTIM_ConfigADCTrig\n
1827 * ADC3R ADC3MC2 LL_HRTIM_ConfigADCTrig\n
1828 * ADC3R ADC3MC3 LL_HRTIM_ConfigADCTrig\n
1829 * ADC3R ADC3MC4 LL_HRTIM_ConfigADCTrig\n
1830 * ADC3R ADC3MPER LL_HRTIM_ConfigADCTrig\n
1831 * ADC3R ADC3EEV1 LL_HRTIM_ConfigADCTrig\n
1832 * ADC3R ADC3EEV2 LL_HRTIM_ConfigADCTrig\n
1833 * ADC3R ADC3EEV3 LL_HRTIM_ConfigADCTrig\n
1834 * ADC3R ADC3EEV4 LL_HRTIM_ConfigADCTrig\n
1835 * ADC3R ADC3EEV5 LL_HRTIM_ConfigADCTrig\n
1836 * ADC3R ADC3TAC2 LL_HRTIM_ConfigADCTrig\n
1837 * ADC3R ADC3TAC3 LL_HRTIM_ConfigADCTrig\n
1838 * ADC3R ADC3TAC4 LL_HRTIM_ConfigADCTrig\n
1839 * ADC3R ADC3TAPER LL_HRTIM_ConfigADCTrig\n
1840 * ADC3R ADC3TARST LL_HRTIM_ConfigADCTrig\n
1841 * ADC3R ADC3TBC2 LL_HRTIM_ConfigADCTrig\n
1842 * ADC3R ADC3TBC3 LL_HRTIM_ConfigADCTrig\n
1843 * ADC3R ADC3TBC4 LL_HRTIM_ConfigADCTrig\n
1844 * ADC3R ADC3TBPER LL_HRTIM_ConfigADCTrig\n
1845 * ADC3R ADC3TBRST LL_HRTIM_ConfigADCTrig\n
1846 * ADC3R ADC3TCC2 LL_HRTIM_ConfigADCTrig\n
1847 * ADC3R ADC3TCC3 LL_HRTIM_ConfigADCTrig\n
1848 * ADC3R ADC3TCC4 LL_HRTIM_ConfigADCTrig\n
1849 * ADC3R ADC3TCPER LL_HRTIM_ConfigADCTrig\n
1850 * ADC3R ADC3TDC2 LL_HRTIM_ConfigADCTrig\n
1851 * ADC3R ADC3TDC3 LL_HRTIM_ConfigADCTrig\n
1852 * ADC3R ADC3TDC4 LL_HRTIM_ConfigADCTrig\n
1853 * ADC3R ADC3TDPER LL_HRTIM_ConfigADCTrig\n
1854 * ADC3R ADC3TEC2 LL_HRTIM_ConfigADCTrig\n
1855 * ADC3R ADC3TEC3 LL_HRTIM_ConfigADCTrig\n
1856 * ADC3R ADC3TEC4 LL_HRTIM_ConfigADCTrig\n
1857 * ADC3R ADC3TEPER LL_HRTIM_ConfigADCTrig\n
1858 * ADC4R ADC4MC1 LL_HRTIM_ConfigADCTrig\n
1859 * ADC4R ADC4MC2 LL_HRTIM_ConfigADCTrig\n
1860 * ADC4R ADC4MC3 LL_HRTIM_ConfigADCTrig\n
1861 * ADC4R ADC4MC4 LL_HRTIM_ConfigADCTrig\n
1862 * ADC4R ADC4MPER LL_HRTIM_ConfigADCTrig\n
1863 * ADC4R ADC4EEV6 LL_HRTIM_ConfigADCTrig\n
1864 * ADC4R ADC4EEV7 LL_HRTIM_ConfigADCTrig\n
1865 * ADC4R ADC4EEV8 LL_HRTIM_ConfigADCTrig\n
1866 * ADC4R ADC4EEV9 LL_HRTIM_ConfigADCTrig\n
1867 * ADC4R ADC4EEV10 LL_HRTIM_ConfigADCTrig\n
1868 * ADC4R ADC4TAC2 LL_HRTIM_ConfigADCTrig\n
1869 * ADC4R ADC4TAC3 LL_HRTIM_ConfigADCTrig\n
1870 * ADC4R ADC4TAC4 LL_HRTIM_ConfigADCTrig\n
1871 * ADC4R ADC4TAPER LL_HRTIM_ConfigADCTrig\n
1872 * ADC4R ADC4TBC2 LL_HRTIM_ConfigADCTrig\n
1873 * ADC4R ADC4TBC3 LL_HRTIM_ConfigADCTrig\n
1874 * ADC4R ADC4TBC4 LL_HRTIM_ConfigADCTrig\n
1875 * ADC4R ADC4TBPER LL_HRTIM_ConfigADCTrig\n
1876 * ADC4R ADC4TCC2 LL_HRTIM_ConfigADCTrig\n
1877 * ADC4R ADC4TCC3 LL_HRTIM_ConfigADCTrig\n
1878 * ADC4R ADC4TCC4 LL_HRTIM_ConfigADCTrig\n
1879 * ADC4R ADC4TCPER LL_HRTIM_ConfigADCTrig\n
1880 * ADC4R ADC4TCRST LL_HRTIM_ConfigADCTrig\n
1881 * ADC4R ADC4TDC2 LL_HRTIM_ConfigADCTrig\n
1882 * ADC4R ADC4TDC3 LL_HRTIM_ConfigADCTrig\n
1883 * ADC4R ADC4TDC4 LL_HRTIM_ConfigADCTrig\n
1884 * ADC4R ADC4TDPER LL_HRTIM_ConfigADCTrig\n
1885 * ADC4R ADC4TDRST LL_HRTIM_ConfigADCTrig\n
1886 * ADC4R ADC4TEC2 LL_HRTIM_ConfigADCTrig\n
1887 * ADC4R ADC4TEC3 LL_HRTIM_ConfigADCTrig\n
1888 * ADC4R ADC4TEC4 LL_HRTIM_ConfigADCTrig\n
1889 * ADC4R ADC4TERST LL_HRTIM_ConfigADCTrig
1890 * @param HRTIMx High Resolution Timer instance
1891 * @param ADCTrig This parameter can be one of the following values:
1892 * @arg @ref LL_HRTIM_ADCTRIG_1
1893 * @arg @ref LL_HRTIM_ADCTRIG_2
1894 * @arg @ref LL_HRTIM_ADCTRIG_3
1895 * @arg @ref LL_HRTIM_ADCTRIG_4
1896 * @param Update This parameter can be one of the following values:
1897 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_MASTER
1898 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_A
1899 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_B
1900 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_C
1901 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_D
1902 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_E
1903 * @param Src This parameter can be a combination of the following values:
1905 * For ADC trigger 1 and ADC trigger 3:
1906 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_NONE
1907 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP1
1908 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP2
1909 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP3
1910 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP4
1911 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MPER
1912 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV1
1913 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV2
1914 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV3
1915 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV4
1916 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV5
1917 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP2
1918 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP3
1919 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP4
1920 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMAPER
1921 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMARST
1922 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2
1923 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3
1924 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4
1925 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBPER
1926 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBRST
1927 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2
1928 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3
1929 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4
1930 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCPER
1931 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2
1932 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3
1933 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4
1934 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDPER
1935 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP2
1936 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP3
1937 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP4
1938 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMEPER
1940 * For ADC trigger 2 and ADC trigger 4:
1941 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_NONE
1942 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP1
1943 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP2
1944 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP3
1945 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP4
1946 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MPER
1947 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV6
1948 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV7
1949 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV8
1950 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV9
1951 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV10
1952 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP2
1953 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP3
1954 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP4
1955 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMAPER
1956 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2
1957 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3
1958 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4
1959 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBPER
1960 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2
1961 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3
1962 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4
1963 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCPER
1964 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCRST
1965 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2
1966 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3
1967 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4
1968 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDPER
1969 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDRST
1970 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP2
1971 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP3
1972 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP4
1973 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMERST
1977 __STATIC_INLINE
void LL_HRTIM_ConfigADCTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t ADCTrig
, uint32_t Update
, uint32_t Src
)
1979 register uint32_t shift
= ((3U * ADCTrig
) & 0x1FU
);
1980 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.ADC1R
) +
1981 REG_OFFSET_TAB_ADCxR
[ADCTrig
]));
1982 MODIFY_REG(HRTIMx
->sCommonRegs
.CR1
, (HRTIM_CR1_ADC1USRC
<< shift
), (Update
<< shift
));
1983 WRITE_REG(*pReg
, Src
);
1987 * @brief Associate the ADCx trigger to a timer triggering the update of the HRTIM_ADCxR register.
1988 * @rmtoll CR1 ADC1USRC LL_HRTIM_SetADCTrigUpdate\n
1989 * CR1 ADC2USRC LL_HRTIM_SetADCTrigUpdate\n
1990 * CR1 ADC3USRC LL_HRTIM_SetADCTrigUpdate\n
1991 * CR1 ADC4USRC LL_HRTIM_SetADCTrigUpdate\n
1992 * @note When the preload is disabled in the source timer, the HRTIM_ADCxR
1993 * registers are not preloaded either: a write access will result in an
1994 * immediate update of the trigger source.
1995 * @param HRTIMx High Resolution Timer instance
1996 * @param ADCTrig This parameter can be one of the following values:
1997 * @arg @ref LL_HRTIM_ADCTRIG_1
1998 * @arg @ref LL_HRTIM_ADCTRIG_2
1999 * @arg @ref LL_HRTIM_ADCTRIG_3
2000 * @arg @ref LL_HRTIM_ADCTRIG_4
2001 * @param Update This parameter can be one of the following values:
2002 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_MASTER
2003 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_A
2004 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_B
2005 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_C
2006 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_D
2007 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_E
2010 __STATIC_INLINE
void LL_HRTIM_SetADCTrigUpdate(HRTIM_TypeDef
*HRTIMx
, uint32_t ADCTrig
, uint32_t Update
)
2012 register uint32_t shift
= ((3U * ADCTrig
) & 0x1FU
);
2013 MODIFY_REG(HRTIMx
->sCommonRegs
.CR1
, (HRTIM_CR1_ADC1USRC
<< shift
), (Update
<< shift
));
2017 * @brief Get the source timer triggering the update of the HRTIM_ADCxR register.
2018 * @rmtoll CR1 ADC1USRC LL_HRTIM_GetADCTrigUpdate\n
2019 * CR1 ADC2USRC LL_HRTIM_GetADCTrigUpdate\n
2020 * CR1 ADC3USRC LL_HRTIM_GetADCTrigUpdate\n
2021 * CR1 ADC4USRC LL_HRTIM_GetADCTrigUpdate\n
2022 * @param HRTIMx High Resolution Timer instance
2023 * @param ADCTrig This parameter can be one of the following values:
2024 * @arg @ref LL_HRTIM_ADCTRIG_1
2025 * @arg @ref LL_HRTIM_ADCTRIG_2
2026 * @arg @ref LL_HRTIM_ADCTRIG_3
2027 * @arg @ref LL_HRTIM_ADCTRIG_4
2028 * @retval Update Returned value can be one of the following values:
2029 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_MASTER
2030 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_A
2031 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_B
2032 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_C
2033 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_D
2034 * @arg @ref LL_HRTIM_ADCTRIG_UPDATE_TIMER_E
2036 __STATIC_INLINE
uint32_t LL_HRTIM_GetADCTrigUpdate(HRTIM_TypeDef
*HRTIMx
, uint32_t ADCTrig
)
2038 register const uint32_t shift
= ((3U * ADCTrig
) & 0x1FU
);
2039 return (READ_BIT(HRTIMx
->sCommonRegs
.CR1
, (uint32_t)(HRTIM_CR1_ADC1USRC
) << shift
) >> shift
);
2043 * @brief Specify which events (timer events and/or external events) are used as triggers for ADC conversion.
2044 * @rmtoll ADC1R ADC1MC1 LL_HRTIM_SetADCTrigSrc\n
2045 * ADC1R ADC1MC2 LL_HRTIM_SetADCTrigSrc\n
2046 * ADC1R ADC1MC3 LL_HRTIM_SetADCTrigSrc\n
2047 * ADC1R ADC1MC4 LL_HRTIM_SetADCTrigSrc\n
2048 * ADC1R ADC1MPER LL_HRTIM_SetADCTrigSrc\n
2049 * ADC1R ADC1EEV1 LL_HRTIM_SetADCTrigSrc\n
2050 * ADC1R ADC1EEV2 LL_HRTIM_SetADCTrigSrc\n
2051 * ADC1R ADC1EEV3 LL_HRTIM_SetADCTrigSrc\n
2052 * ADC1R ADC1EEV4 LL_HRTIM_SetADCTrigSrc\n
2053 * ADC1R ADC1EEV5 LL_HRTIM_SetADCTrigSrc\n
2054 * ADC1R ADC1TAC2 LL_HRTIM_SetADCTrigSrc\n
2055 * ADC1R ADC1TAC3 LL_HRTIM_SetADCTrigSrc\n
2056 * ADC1R ADC1TAC4 LL_HRTIM_SetADCTrigSrc\n
2057 * ADC1R ADC1TAPER LL_HRTIM_SetADCTrigSrc\n
2058 * ADC1R ADC1TARST LL_HRTIM_SetADCTrigSrc\n
2059 * ADC1R ADC1TBC2 LL_HRTIM_SetADCTrigSrc\n
2060 * ADC1R ADC1TBC3 LL_HRTIM_SetADCTrigSrc\n
2061 * ADC1R ADC1TBC4 LL_HRTIM_SetADCTrigSrc\n
2062 * ADC1R ADC1TBPER LL_HRTIM_SetADCTrigSrc\n
2063 * ADC1R ADC1TBRST LL_HRTIM_SetADCTrigSrc\n
2064 * ADC1R ADC1TCC2 LL_HRTIM_SetADCTrigSrc\n
2065 * ADC1R ADC1TCC3 LL_HRTIM_SetADCTrigSrc\n
2066 * ADC1R ADC1TCC4 LL_HRTIM_SetADCTrigSrc\n
2067 * ADC1R ADC1TCPER LL_HRTIM_SetADCTrigSrc\n
2068 * ADC1R ADC1TDC2 LL_HRTIM_SetADCTrigSrc\n
2069 * ADC1R ADC1TDC3 LL_HRTIM_SetADCTrigSrc\n
2070 * ADC1R ADC1TDC4 LL_HRTIM_SetADCTrigSrc\n
2071 * ADC1R ADC1TDPER LL_HRTIM_SetADCTrigSrc\n
2072 * ADC1R ADC1TEC2 LL_HRTIM_SetADCTrigSrc\n
2073 * ADC1R ADC1TEC3 LL_HRTIM_SetADCTrigSrc\n
2074 * ADC1R ADC1TEC4 LL_HRTIM_SetADCTrigSrc\n
2075 * ADC1R ADC1TEPER LL_HRTIM_SetADCTrigSrc\n
2076 * ADC2R ADC2MC1 LL_HRTIM_SetADCTrigSrc\n
2077 * ADC2R ADC2MC2 LL_HRTIM_SetADCTrigSrc\n
2078 * ADC2R ADC2MC3 LL_HRTIM_SetADCTrigSrc\n
2079 * ADC2R ADC2MC4 LL_HRTIM_SetADCTrigSrc\n
2080 * ADC2R ADC2MPER LL_HRTIM_SetADCTrigSrc\n
2081 * ADC2R ADC2EEV6 LL_HRTIM_SetADCTrigSrc\n
2082 * ADC2R ADC2EEV7 LL_HRTIM_SetADCTrigSrc\n
2083 * ADC2R ADC2EEV8 LL_HRTIM_SetADCTrigSrc\n
2084 * ADC2R ADC2EEV9 LL_HRTIM_SetADCTrigSrc\n
2085 * ADC2R ADC2EEV10 LL_HRTIM_SetADCTrigSrc\n
2086 * ADC2R ADC2TAC2 LL_HRTIM_SetADCTrigSrc\n
2087 * ADC2R ADC2TAC3 LL_HRTIM_SetADCTrigSrc\n
2088 * ADC2R ADC2TAC4 LL_HRTIM_SetADCTrigSrc\n
2089 * ADC2R ADC2TAPER LL_HRTIM_SetADCTrigSrc\n
2090 * ADC2R ADC2TBC2 LL_HRTIM_SetADCTrigSrc\n
2091 * ADC2R ADC2TBC3 LL_HRTIM_SetADCTrigSrc\n
2092 * ADC2R ADC2TBC4 LL_HRTIM_SetADCTrigSrc\n
2093 * ADC2R ADC2TBPER LL_HRTIM_SetADCTrigSrc\n
2094 * ADC2R ADC2TCC2 LL_HRTIM_SetADCTrigSrc\n
2095 * ADC2R ADC2TCC3 LL_HRTIM_SetADCTrigSrc\n
2096 * ADC2R ADC2TCC4 LL_HRTIM_SetADCTrigSrc\n
2097 * ADC2R ADC2TCPER LL_HRTIM_SetADCTrigSrc\n
2098 * ADC2R ADC2TCRST LL_HRTIM_SetADCTrigSrc\n
2099 * ADC2R ADC2TDC2 LL_HRTIM_SetADCTrigSrc\n
2100 * ADC2R ADC2TDC3 LL_HRTIM_SetADCTrigSrc\n
2101 * ADC2R ADC2TDC4 LL_HRTIM_SetADCTrigSrc\n
2102 * ADC2R ADC2TDPER LL_HRTIM_SetADCTrigSrc\n
2103 * ADC2R ADC2TDRST LL_HRTIM_SetADCTrigSrc\n
2104 * ADC2R ADC2TEC2 LL_HRTIM_SetADCTrigSrc\n
2105 * ADC2R ADC2TEC3 LL_HRTIM_SetADCTrigSrc\n
2106 * ADC2R ADC2TEC4 LL_HRTIM_SetADCTrigSrc\n
2107 * ADC2R ADC2TERST LL_HRTIM_SetADCTrigSrc\n
2108 * ADC3R ADC3MC1 LL_HRTIM_SetADCTrigSrc\n
2109 * ADC3R ADC3MC2 LL_HRTIM_SetADCTrigSrc\n
2110 * ADC3R ADC3MC3 LL_HRTIM_SetADCTrigSrc\n
2111 * ADC3R ADC3MC4 LL_HRTIM_SetADCTrigSrc\n
2112 * ADC3R ADC3MPER LL_HRTIM_SetADCTrigSrc\n
2113 * ADC3R ADC3EEV1 LL_HRTIM_SetADCTrigSrc\n
2114 * ADC3R ADC3EEV2 LL_HRTIM_SetADCTrigSrc\n
2115 * ADC3R ADC3EEV3 LL_HRTIM_SetADCTrigSrc\n
2116 * ADC3R ADC3EEV4 LL_HRTIM_SetADCTrigSrc\n
2117 * ADC3R ADC3EEV5 LL_HRTIM_SetADCTrigSrc\n
2118 * ADC3R ADC3TAC2 LL_HRTIM_SetADCTrigSrc\n
2119 * ADC3R ADC3TAC3 LL_HRTIM_SetADCTrigSrc\n
2120 * ADC3R ADC3TAC4 LL_HRTIM_SetADCTrigSrc\n
2121 * ADC3R ADC3TAPER LL_HRTIM_SetADCTrigSrc\n
2122 * ADC3R ADC3TARST LL_HRTIM_SetADCTrigSrc\n
2123 * ADC3R ADC3TBC2 LL_HRTIM_SetADCTrigSrc\n
2124 * ADC3R ADC3TBC3 LL_HRTIM_SetADCTrigSrc\n
2125 * ADC3R ADC3TBC4 LL_HRTIM_SetADCTrigSrc\n
2126 * ADC3R ADC3TBPER LL_HRTIM_SetADCTrigSrc\n
2127 * ADC3R ADC3TBRST LL_HRTIM_SetADCTrigSrc\n
2128 * ADC3R ADC3TCC2 LL_HRTIM_SetADCTrigSrc\n
2129 * ADC3R ADC3TCC3 LL_HRTIM_SetADCTrigSrc\n
2130 * ADC3R ADC3TCC4 LL_HRTIM_SetADCTrigSrc\n
2131 * ADC3R ADC3TCPER LL_HRTIM_SetADCTrigSrc\n
2132 * ADC3R ADC3TDC2 LL_HRTIM_SetADCTrigSrc\n
2133 * ADC3R ADC3TDC3 LL_HRTIM_SetADCTrigSrc\n
2134 * ADC3R ADC3TDC4 LL_HRTIM_SetADCTrigSrc\n
2135 * ADC3R ADC3TDPER LL_HRTIM_SetADCTrigSrc\n
2136 * ADC3R ADC3TEC2 LL_HRTIM_SetADCTrigSrc\n
2137 * ADC3R ADC3TEC3 LL_HRTIM_SetADCTrigSrc\n
2138 * ADC3R ADC3TEC4 LL_HRTIM_SetADCTrigSrc\n
2139 * ADC3R ADC3TEPER LL_HRTIM_SetADCTrigSrc\n
2140 * ADC4R ADC4MC1 LL_HRTIM_SetADCTrigSrc\n
2141 * ADC4R ADC4MC2 LL_HRTIM_SetADCTrigSrc\n
2142 * ADC4R ADC4MC3 LL_HRTIM_SetADCTrigSrc\n
2143 * ADC4R ADC4MC4 LL_HRTIM_SetADCTrigSrc\n
2144 * ADC4R ADC4MPER LL_HRTIM_SetADCTrigSrc\n
2145 * ADC4R ADC4EEV6 LL_HRTIM_SetADCTrigSrc\n
2146 * ADC4R ADC4EEV7 LL_HRTIM_SetADCTrigSrc\n
2147 * ADC4R ADC4EEV8 LL_HRTIM_SetADCTrigSrc\n
2148 * ADC4R ADC4EEV9 LL_HRTIM_SetADCTrigSrc\n
2149 * ADC4R ADC4EEV10 LL_HRTIM_SetADCTrigSrc\n
2150 * ADC4R ADC4TAC2 LL_HRTIM_SetADCTrigSrc\n
2151 * ADC4R ADC4TAC3 LL_HRTIM_SetADCTrigSrc\n
2152 * ADC4R ADC4TAC4 LL_HRTIM_SetADCTrigSrc\n
2153 * ADC4R ADC4TAPER LL_HRTIM_SetADCTrigSrc\n
2154 * ADC4R ADC4TBC2 LL_HRTIM_SetADCTrigSrc\n
2155 * ADC4R ADC4TBC3 LL_HRTIM_SetADCTrigSrc\n
2156 * ADC4R ADC4TBC4 LL_HRTIM_SetADCTrigSrc\n
2157 * ADC4R ADC4TBPER LL_HRTIM_SetADCTrigSrc\n
2158 * ADC4R ADC4TCC2 LL_HRTIM_SetADCTrigSrc\n
2159 * ADC4R ADC4TCC3 LL_HRTIM_SetADCTrigSrc\n
2160 * ADC4R ADC4TCC4 LL_HRTIM_SetADCTrigSrc\n
2161 * ADC4R ADC4TCPER LL_HRTIM_SetADCTrigSrc\n
2162 * ADC4R ADC4TCRST LL_HRTIM_SetADCTrigSrc\n
2163 * ADC4R ADC4TDC2 LL_HRTIM_SetADCTrigSrc\n
2164 * ADC4R ADC4TDC3 LL_HRTIM_SetADCTrigSrc\n
2165 * ADC4R ADC4TDC4 LL_HRTIM_SetADCTrigSrc\n
2166 * ADC4R ADC4TDPER LL_HRTIM_SetADCTrigSrc\n
2167 * ADC4R ADC4TDRST LL_HRTIM_SetADCTrigSrc\n
2168 * ADC4R ADC4TEC2 LL_HRTIM_SetADCTrigSrc\n
2169 * ADC4R ADC4TEC3 LL_HRTIM_SetADCTrigSrc\n
2170 * ADC4R ADC4TEC4 LL_HRTIM_SetADCTrigSrc\n
2171 * ADC4R ADC4TERST LL_HRTIM_SetADCTrigSrc\n
2172 * @param HRTIMx High Resolution Timer instance
2173 * @param ADCTrig This parameter can be one of the following values:
2174 * @arg @ref LL_HRTIM_ADCTRIG_1
2175 * @arg @ref LL_HRTIM_ADCTRIG_2
2176 * @arg @ref LL_HRTIM_ADCTRIG_3
2177 * @arg @ref LL_HRTIM_ADCTRIG_4
2179 * For ADC trigger 1 and ADC trigger 3 this parameter can be a
2180 * combination of the following values:
2181 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_NONE
2182 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP1
2183 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP2
2184 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP3
2185 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP4
2186 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MPER
2187 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV1
2188 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV2
2189 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV3
2190 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV4
2191 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV5
2192 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP2
2193 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP3
2194 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP4
2195 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMAPER
2196 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMARST
2197 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2
2198 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3
2199 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4
2200 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBPER
2201 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBRST
2202 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2
2203 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3
2204 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4
2205 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCPER
2206 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2
2207 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3
2208 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4
2209 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDPER
2210 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP2
2211 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP3
2212 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP4
2213 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMEPER
2215 * For ADC trigger 2 and ADC trigger 4 this parameter can be a
2216 * combination of the following values:
2217 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_NONE
2218 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP1
2219 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP2
2220 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP3
2221 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP4
2222 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MPER
2223 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV6
2224 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV7
2225 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV8
2226 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV9
2227 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV10
2228 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP2
2229 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP3
2230 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP4
2231 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMAPER
2232 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2
2233 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3
2234 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4
2235 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBPER
2236 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2
2237 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3
2238 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4
2239 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCPER
2240 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCRST
2241 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2
2242 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3
2243 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4
2244 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDPER
2245 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDRST
2246 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP2
2247 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP3
2248 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP4
2249 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMERST
2253 __STATIC_INLINE
void LL_HRTIM_SetADCTrigSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t ADCTrig
, uint32_t Src
)
2255 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.ADC1R
) +
2256 REG_OFFSET_TAB_ADCxR
[ADCTrig
]));
2257 WRITE_REG(*pReg
, Src
);
2261 * @brief Indicate which events (timer events and/or external events) are currently used as triggers for ADC conversion.
2262 * @rmtoll ADC1R ADC1MC1 LL_HRTIM_GetADCTrigSrc\n
2263 * ADC1R ADC1MC2 LL_HRTIM_GetADCTrigSrc\n
2264 * ADC1R ADC1MC3 LL_HRTIM_GetADCTrigSrc\n
2265 * ADC1R ADC1MC4 LL_HRTIM_GetADCTrigSrc\n
2266 * ADC1R ADC1MPER LL_HRTIM_GetADCTrigSrc\n
2267 * ADC1R ADC1EEV1 LL_HRTIM_GetADCTrigSrc\n
2268 * ADC1R ADC1EEV2 LL_HRTIM_GetADCTrigSrc\n
2269 * ADC1R ADC1EEV3 LL_HRTIM_GetADCTrigSrc\n
2270 * ADC1R ADC1EEV4 LL_HRTIM_GetADCTrigSrc\n
2271 * ADC1R ADC1EEV5 LL_HRTIM_GetADCTrigSrc\n
2272 * ADC1R ADC1TAC2 LL_HRTIM_GetADCTrigSrc\n
2273 * ADC1R ADC1TAC3 LL_HRTIM_GetADCTrigSrc\n
2274 * ADC1R ADC1TAC4 LL_HRTIM_GetADCTrigSrc\n
2275 * ADC1R ADC1TAPER LL_HRTIM_GetADCTrigSrc\n
2276 * ADC1R ADC1TARST LL_HRTIM_GetADCTrigSrc\n
2277 * ADC1R ADC1TBC2 LL_HRTIM_GetADCTrigSrc\n
2278 * ADC1R ADC1TBC3 LL_HRTIM_GetADCTrigSrc\n
2279 * ADC1R ADC1TBC4 LL_HRTIM_GetADCTrigSrc\n
2280 * ADC1R ADC1TBPER LL_HRTIM_GetADCTrigSrc\n
2281 * ADC1R ADC1TBRST LL_HRTIM_GetADCTrigSrc\n
2282 * ADC1R ADC1TCC2 LL_HRTIM_GetADCTrigSrc\n
2283 * ADC1R ADC1TCC3 LL_HRTIM_GetADCTrigSrc\n
2284 * ADC1R ADC1TCC4 LL_HRTIM_GetADCTrigSrc\n
2285 * ADC1R ADC1TCPER LL_HRTIM_GetADCTrigSrc\n
2286 * ADC1R ADC1TDC2 LL_HRTIM_GetADCTrigSrc\n
2287 * ADC1R ADC1TDC3 LL_HRTIM_GetADCTrigSrc\n
2288 * ADC1R ADC1TDC4 LL_HRTIM_GetADCTrigSrc\n
2289 * ADC1R ADC1TDPER LL_HRTIM_GetADCTrigSrc\n
2290 * ADC1R ADC1TEC2 LL_HRTIM_GetADCTrigSrc\n
2291 * ADC1R ADC1TEC3 LL_HRTIM_GetADCTrigSrc\n
2292 * ADC1R ADC1TEC4 LL_HRTIM_GetADCTrigSrc\n
2293 * ADC1R ADC1TEPER LL_HRTIM_GetADCTrigSrc\n
2294 * ADC2R ADC2MC1 LL_HRTIM_GetADCTrigSrc\n
2295 * ADC2R ADC2MC2 LL_HRTIM_GetADCTrigSrc\n
2296 * ADC2R ADC2MC3 LL_HRTIM_GetADCTrigSrc\n
2297 * ADC2R ADC2MC4 LL_HRTIM_GetADCTrigSrc\n
2298 * ADC2R ADC2MPER LL_HRTIM_GetADCTrigSrc\n
2299 * ADC2R ADC2EEV6 LL_HRTIM_GetADCTrigSrc\n
2300 * ADC2R ADC2EEV7 LL_HRTIM_GetADCTrigSrc\n
2301 * ADC2R ADC2EEV8 LL_HRTIM_GetADCTrigSrc\n
2302 * ADC2R ADC2EEV9 LL_HRTIM_GetADCTrigSrc\n
2303 * ADC2R ADC2EEV10 LL_HRTIM_GetADCTrigSrc\n
2304 * ADC2R ADC2TAC2 LL_HRTIM_GetADCTrigSrc\n
2305 * ADC2R ADC2TAC3 LL_HRTIM_GetADCTrigSrc\n
2306 * ADC2R ADC2TAC4 LL_HRTIM_GetADCTrigSrc\n
2307 * ADC2R ADC2TAPER LL_HRTIM_GetADCTrigSrc\n
2308 * ADC2R ADC2TBC2 LL_HRTIM_GetADCTrigSrc\n
2309 * ADC2R ADC2TBC3 LL_HRTIM_GetADCTrigSrc\n
2310 * ADC2R ADC2TBC4 LL_HRTIM_GetADCTrigSrc\n
2311 * ADC2R ADC2TBPER LL_HRTIM_GetADCTrigSrc\n
2312 * ADC2R ADC2TCC2 LL_HRTIM_GetADCTrigSrc\n
2313 * ADC2R ADC2TCC3 LL_HRTIM_GetADCTrigSrc\n
2314 * ADC2R ADC2TCC4 LL_HRTIM_GetADCTrigSrc\n
2315 * ADC2R ADC2TCPER LL_HRTIM_GetADCTrigSrc\n
2316 * ADC2R ADC2TCRST LL_HRTIM_GetADCTrigSrc\n
2317 * ADC2R ADC2TDC2 LL_HRTIM_GetADCTrigSrc\n
2318 * ADC2R ADC2TDC3 LL_HRTIM_GetADCTrigSrc\n
2319 * ADC2R ADC2TDC4 LL_HRTIM_GetADCTrigSrc\n
2320 * ADC2R ADC2TDPER LL_HRTIM_GetADCTrigSrc\n
2321 * ADC2R ADC2TDRST LL_HRTIM_GetADCTrigSrc\n
2322 * ADC2R ADC2TEC2 LL_HRTIM_GetADCTrigSrc\n
2323 * ADC2R ADC2TEC3 LL_HRTIM_GetADCTrigSrc\n
2324 * ADC2R ADC2TEC4 LL_HRTIM_GetADCTrigSrc\n
2325 * ADC2R ADC2TERST LL_HRTIM_GetADCTrigSrc\n
2326 * ADC3R ADC3MC1 LL_HRTIM_GetADCTrigSrc\n
2327 * ADC3R ADC3MC2 LL_HRTIM_GetADCTrigSrc\n
2328 * ADC3R ADC3MC3 LL_HRTIM_GetADCTrigSrc\n
2329 * ADC3R ADC3MC4 LL_HRTIM_GetADCTrigSrc\n
2330 * ADC3R ADC3MPER LL_HRTIM_GetADCTrigSrc\n
2331 * ADC3R ADC3EEV1 LL_HRTIM_GetADCTrigSrc\n
2332 * ADC3R ADC3EEV2 LL_HRTIM_GetADCTrigSrc\n
2333 * ADC3R ADC3EEV3 LL_HRTIM_GetADCTrigSrc\n
2334 * ADC3R ADC3EEV4 LL_HRTIM_GetADCTrigSrc\n
2335 * ADC3R ADC3EEV5 LL_HRTIM_GetADCTrigSrc\n
2336 * ADC3R ADC3TAC2 LL_HRTIM_GetADCTrigSrc\n
2337 * ADC3R ADC3TAC3 LL_HRTIM_GetADCTrigSrc\n
2338 * ADC3R ADC3TAC4 LL_HRTIM_GetADCTrigSrc\n
2339 * ADC3R ADC3TAPER LL_HRTIM_GetADCTrigSrc\n
2340 * ADC3R ADC3TARST LL_HRTIM_GetADCTrigSrc\n
2341 * ADC3R ADC3TBC2 LL_HRTIM_GetADCTrigSrc\n
2342 * ADC3R ADC3TBC3 LL_HRTIM_GetADCTrigSrc\n
2343 * ADC3R ADC3TBC4 LL_HRTIM_GetADCTrigSrc\n
2344 * ADC3R ADC3TBPER LL_HRTIM_GetADCTrigSrc\n
2345 * ADC3R ADC3TBRST LL_HRTIM_GetADCTrigSrc\n
2346 * ADC3R ADC3TCC2 LL_HRTIM_GetADCTrigSrc\n
2347 * ADC3R ADC3TCC3 LL_HRTIM_GetADCTrigSrc\n
2348 * ADC3R ADC3TCC4 LL_HRTIM_GetADCTrigSrc\n
2349 * ADC3R ADC3TCPER LL_HRTIM_GetADCTrigSrc\n
2350 * ADC3R ADC3TDC2 LL_HRTIM_GetADCTrigSrc\n
2351 * ADC3R ADC3TDC3 LL_HRTIM_GetADCTrigSrc\n
2352 * ADC3R ADC3TDC4 LL_HRTIM_GetADCTrigSrc\n
2353 * ADC3R ADC3TDPER LL_HRTIM_GetADCTrigSrc\n
2354 * ADC3R ADC3TEC2 LL_HRTIM_GetADCTrigSrc\n
2355 * ADC3R ADC3TEC3 LL_HRTIM_GetADCTrigSrc\n
2356 * ADC3R ADC3TEC4 LL_HRTIM_GetADCTrigSrc\n
2357 * ADC3R ADC3TEPER LL_HRTIM_GetADCTrigSrc\n
2358 * ADC4R ADC4MC1 LL_HRTIM_GetADCTrigSrc\n
2359 * ADC4R ADC4MC2 LL_HRTIM_GetADCTrigSrc\n
2360 * ADC4R ADC4MC3 LL_HRTIM_GetADCTrigSrc\n
2361 * ADC4R ADC4MC4 LL_HRTIM_GetADCTrigSrc\n
2362 * ADC4R ADC4MPER LL_HRTIM_GetADCTrigSrc\n
2363 * ADC4R ADC4EEV6 LL_HRTIM_GetADCTrigSrc\n
2364 * ADC4R ADC4EEV7 LL_HRTIM_GetADCTrigSrc\n
2365 * ADC4R ADC4EEV8 LL_HRTIM_GetADCTrigSrc\n
2366 * ADC4R ADC4EEV9 LL_HRTIM_GetADCTrigSrc\n
2367 * ADC4R ADC4EEV10 LL_HRTIM_GetADCTrigSrc\n
2368 * ADC4R ADC4TAC2 LL_HRTIM_GetADCTrigSrc\n
2369 * ADC4R ADC4TAC3 LL_HRTIM_GetADCTrigSrc\n
2370 * ADC4R ADC4TAC4 LL_HRTIM_GetADCTrigSrc\n
2371 * ADC4R ADC4TAPER LL_HRTIM_GetADCTrigSrc\n
2372 * ADC4R ADC4TBC2 LL_HRTIM_GetADCTrigSrc\n
2373 * ADC4R ADC4TBC3 LL_HRTIM_GetADCTrigSrc\n
2374 * ADC4R ADC4TBC4 LL_HRTIM_GetADCTrigSrc\n
2375 * ADC4R ADC4TBPER LL_HRTIM_GetADCTrigSrc\n
2376 * ADC4R ADC4TCC2 LL_HRTIM_GetADCTrigSrc\n
2377 * ADC4R ADC4TCC3 LL_HRTIM_GetADCTrigSrc\n
2378 * ADC4R ADC4TCC4 LL_HRTIM_GetADCTrigSrc\n
2379 * ADC4R ADC4TCPER LL_HRTIM_GetADCTrigSrc\n
2380 * ADC4R ADC4TCRST LL_HRTIM_GetADCTrigSrc\n
2381 * ADC4R ADC4TDC2 LL_HRTIM_GetADCTrigSrc\n
2382 * ADC4R ADC4TDC3 LL_HRTIM_GetADCTrigSrc\n
2383 * ADC4R ADC4TDC4 LL_HRTIM_GetADCTrigSrc\n
2384 * ADC4R ADC4TDPER LL_HRTIM_GetADCTrigSrc\n
2385 * ADC4R ADC4TDRST LL_HRTIM_GetADCTrigSrc\n
2386 * ADC4R ADC4TEC2 LL_HRTIM_GetADCTrigSrc\n
2387 * ADC4R ADC4TEC3 LL_HRTIM_GetADCTrigSrc\n
2388 * ADC4R ADC4TEC4 LL_HRTIM_GetADCTrigSrc\n
2389 * ADC4R ADC4TERST LL_HRTIM_GetADCTrigSrc
2390 * @param HRTIMx High Resolution Timer instance
2391 * @param ADCTrig This parameter can be one of the following values:
2392 * @arg @ref LL_HRTIM_ADCTRIG_1
2393 * @arg @ref LL_HRTIM_ADCTRIG_2
2394 * @arg @ref LL_HRTIM_ADCTRIG_3
2395 * @arg @ref LL_HRTIM_ADCTRIG_4
2396 * @retval Src This parameter can be a combination of the following values:
2398 * For ADC trigger 1 and ADC trigger 3 this parameter can be a
2399 * combination of the following values:
2400 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_NONE
2401 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP1
2402 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP2
2403 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP3
2404 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MCMP4
2405 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_MPER
2406 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV1
2407 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV2
2408 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV3
2409 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV4
2410 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_EEV5
2411 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP2
2412 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP3
2413 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMACMP4
2414 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMAPER
2415 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMARST
2416 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP2
2417 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP3
2418 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBCMP4
2419 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBPER
2420 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMBRST
2421 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP2
2422 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP3
2423 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCCMP4
2424 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMCPER
2425 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP2
2426 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP3
2427 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDCMP4
2428 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMDPER
2429 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP2
2430 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP3
2431 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMECMP4
2432 * @arg @ref LL_HRTIM_ADCTRIG_SRC13_TIMEPER
2434 * For ADC trigger 2 and ADC trigger 4 this parameter can be a
2435 * combination of the following values:
2436 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_NONE
2437 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP1
2438 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP2
2439 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP3
2440 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MCMP4
2441 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_MPER
2442 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV6
2443 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV7
2444 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV8
2445 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV9
2446 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_EEV10
2447 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP2
2448 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP3
2449 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMACMP4
2450 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMAPER
2451 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP2
2452 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP3
2453 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBCMP4
2454 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMBPER
2455 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP2
2456 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP3
2457 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCCMP4
2458 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCPER
2459 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMCRST
2460 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP2
2461 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP3
2462 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDCMP4
2463 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDPER
2464 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMDRST
2465 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP2
2466 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP3
2467 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMECMP4
2468 * @arg @ref LL_HRTIM_ADCTRIG_SRC24_TIMERST
2470 __STATIC_INLINE
uint32_t LL_HRTIM_GetADCTrigSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t ADCTrig
)
2472 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.ADC1R
) +
2473 REG_OFFSET_TAB_ADCxR
[ADCTrig
]));
2483 /** @defgroup HRTIM_LL_EF_HRTIM_Timer_Control HRTIM_Timer_Control
2488 * @brief Enable timer(s) counter.
2489 * @rmtoll MDIER TECEN LL_HRTIM_TIM_CounterEnable\n
2490 * MDIER TDCEN LL_HRTIM_TIM_CounterEnable\n
2491 * MDIER TCCEN LL_HRTIM_TIM_CounterEnable\n
2492 * MDIER TBCEN LL_HRTIM_TIM_CounterEnable\n
2493 * MDIER TACEN LL_HRTIM_TIM_CounterEnable\n
2494 * MDIER MCEN LL_HRTIM_TIM_CounterEnable
2495 * @param HRTIMx High Resolution Timer instance
2496 * @param Timers This parameter can be a combination of the following values:
2497 * @arg @ref LL_HRTIM_TIMER_MASTER
2498 * @arg @ref LL_HRTIM_TIMER_A
2499 * @arg @ref LL_HRTIM_TIMER_B
2500 * @arg @ref LL_HRTIM_TIMER_C
2501 * @arg @ref LL_HRTIM_TIMER_D
2502 * @arg @ref LL_HRTIM_TIMER_E
2505 __STATIC_INLINE
void LL_HRTIM_TIM_CounterEnable(HRTIM_TypeDef
*HRTIMx
, uint32_t Timers
)
2507 SET_BIT(HRTIMx
->sMasterRegs
.MCR
, Timers
);
2511 * @brief Disable timer(s) counter.
2512 * @rmtoll MDIER TECEN LL_HRTIM_TIM_CounterDisable\n
2513 * MDIER TDCEN LL_HRTIM_TIM_CounterDisable\n
2514 * MDIER TCCEN LL_HRTIM_TIM_CounterDisable\n
2515 * MDIER TBCEN LL_HRTIM_TIM_CounterDisable\n
2516 * MDIER TACEN LL_HRTIM_TIM_CounterDisable\n
2517 * MDIER MCEN LL_HRTIM_TIM_CounterDisable
2518 * @param HRTIMx High Resolution Timer instance
2519 * @param Timers This parameter can be a combination of the following values:
2520 * @arg @ref LL_HRTIM_TIMER_MASTER
2521 * @arg @ref LL_HRTIM_TIMER_A
2522 * @arg @ref LL_HRTIM_TIMER_B
2523 * @arg @ref LL_HRTIM_TIMER_C
2524 * @arg @ref LL_HRTIM_TIMER_D
2525 * @arg @ref LL_HRTIM_TIMER_E
2528 __STATIC_INLINE
void LL_HRTIM_TIM_CounterDisable(HRTIM_TypeDef
*HRTIMx
, uint32_t Timers
)
2530 CLEAR_BIT(HRTIMx
->sMasterRegs
.MCR
, Timers
);
2534 * @brief Indicate whether the timer counter is enabled.
2535 * @rmtoll MDIER TECEN LL_HRTIM_TIM_IsCounterEnabled\n
2536 * MDIER TDCEN LL_HRTIM_TIM_IsCounterEnabled\n
2537 * MDIER TCCEN LL_HRTIM_TIM_IsCounterEnabled\n
2538 * MDIER TBCEN LL_HRTIM_TIM_IsCounterEnabled\n
2539 * MDIER TACEN LL_HRTIM_TIM_IsCounterEnabled\n
2540 * MDIER MCEN LL_HRTIM_TIM_IsCounterEnabled
2541 * @param HRTIMx High Resolution Timer instance
2542 * @param Timer This parameter can be one of the following values:
2543 * @arg @ref LL_HRTIM_TIMER_MASTER
2544 * @arg @ref LL_HRTIM_TIMER_A
2545 * @arg @ref LL_HRTIM_TIMER_B
2546 * @arg @ref LL_HRTIM_TIMER_C
2547 * @arg @ref LL_HRTIM_TIMER_D
2548 * @arg @ref LL_HRTIM_TIMER_E
2549 * @retval State of MCEN or TxCEN bit HRTIM_MCR register (1 or 0).
2551 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsCounterEnabled(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2553 return ((READ_BIT(HRTIMx
->sMasterRegs
.MCR
, Timer
) == (Timer
)) ? 1UL : 0UL);
2557 * @brief Set the timer clock prescaler ratio.
2558 * @rmtoll MCR CKPSC LL_HRTIM_TIM_SetPrescaler\n
2559 * TIMxCR CKPSC LL_HRTIM_TIM_SetPrescaler
2560 * @note The counter clock equivalent frequency (CK_CNT) is equal to fHRCK / 2^CKPSC[2:0].
2561 * @note The prescaling ratio cannot be modified once the timer counter is enabled.
2562 * @param HRTIMx High Resolution Timer instance
2563 * @param Timer This parameter can be one of the following values:
2564 * @arg @ref LL_HRTIM_TIMER_MASTER
2565 * @arg @ref LL_HRTIM_TIMER_A
2566 * @arg @ref LL_HRTIM_TIMER_B
2567 * @arg @ref LL_HRTIM_TIMER_C
2568 * @arg @ref LL_HRTIM_TIMER_D
2569 * @arg @ref LL_HRTIM_TIMER_E
2570 * @param Prescaler This parameter can be one of the following values:
2571 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL32
2572 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL16
2573 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL8
2574 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL4
2575 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL2
2576 * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV1
2577 * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV2
2578 * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV4
2581 __STATIC_INLINE
void LL_HRTIM_TIM_SetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Prescaler
)
2583 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2584 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2585 MODIFY_REG(*pReg
, HRTIM_MCR_CK_PSC
, Prescaler
);
2589 * @brief Get the timer clock prescaler ratio
2590 * @rmtoll MCR CKPSC LL_HRTIM_TIM_GetPrescaler\n
2591 * TIMxCR CKPSC LL_HRTIM_TIM_GetPrescaler
2592 * @param HRTIMx High Resolution Timer instance
2593 * @param Timer This parameter can be one of the following values:
2594 * @arg @ref LL_HRTIM_TIMER_MASTER
2595 * @arg @ref LL_HRTIM_TIMER_A
2596 * @arg @ref LL_HRTIM_TIMER_B
2597 * @arg @ref LL_HRTIM_TIMER_C
2598 * @arg @ref LL_HRTIM_TIMER_D
2599 * @arg @ref LL_HRTIM_TIMER_E
2600 * @retval Prescaler Returned value can be one of the following values:
2601 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL32
2602 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL16
2603 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL8
2604 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL4
2605 * @arg @ref LL_HRTIM_PRESCALERRATIO_MUL2
2606 * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV1
2607 * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV2
2608 * @arg @ref LL_HRTIM_PRESCALERRATIO_DIV4
2610 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2612 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2613 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2614 return (READ_BIT(*pReg
, HRTIM_MCR_CK_PSC
));
2618 * @brief Set the counter operating mode mode (single-shot, continuous or re-triggerable).
2619 * @rmtoll MCR CONT LL_HRTIM_TIM_SetCounterMode\n
2620 * MCR RETRIG LL_HRTIM_TIM_SetCounterMode\n
2621 * TIMxCR CONT LL_HRTIM_TIM_SetCounterMode\n
2622 * TIMxCR RETRIG LL_HRTIM_TIM_SetCounterMode
2623 * @param HRTIMx High Resolution Timer instance
2624 * @param Timer This parameter can be one of the following values:
2625 * @arg @ref LL_HRTIM_TIMER_MASTER
2626 * @arg @ref LL_HRTIM_TIMER_A
2627 * @arg @ref LL_HRTIM_TIMER_B
2628 * @arg @ref LL_HRTIM_TIMER_C
2629 * @arg @ref LL_HRTIM_TIMER_D
2630 * @arg @ref LL_HRTIM_TIMER_E
2631 * @param Mode This parameter can be one of the following values:
2632 * @arg @ref LL_HRTIM_MODE_CONTINUOUS
2633 * @arg @ref LL_HRTIM_MODE_SINGLESHOT
2634 * @arg @ref LL_HRTIM_MODE_RETRIGGERABLE
2637 __STATIC_INLINE
void LL_HRTIM_TIM_SetCounterMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Mode
)
2639 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2640 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2641 MODIFY_REG(*pReg
, (HRTIM_TIMCR_RETRIG
| HRTIM_MCR_CONT
), Mode
);
2645 * @brief Get the counter operating mode mode
2646 * @rmtoll MCR CONT LL_HRTIM_TIM_GetCounterMode\n
2647 * MCR RETRIG LL_HRTIM_TIM_GetCounterMode\n
2648 * TIMxCR CONT LL_HRTIM_TIM_GetCounterMode\n
2649 * TIMxCR RETRIG LL_HRTIM_TIM_GetCounterMode
2650 * @param HRTIMx High Resolution Timer instance
2651 * @param Timer This parameter can be one of the following values:
2652 * @arg @ref LL_HRTIM_TIMER_MASTER
2653 * @arg @ref LL_HRTIM_TIMER_A
2654 * @arg @ref LL_HRTIM_TIMER_B
2655 * @arg @ref LL_HRTIM_TIMER_C
2656 * @arg @ref LL_HRTIM_TIMER_D
2657 * @arg @ref LL_HRTIM_TIMER_E
2658 * @retval Mode Returned value can be one of the following values:
2659 * @arg @ref LL_HRTIM_MODE_CONTINUOUS
2660 * @arg @ref LL_HRTIM_MODE_SINGLESHOT
2661 * @arg @ref LL_HRTIM_MODE_RETRIGGERABLE
2663 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCounterMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2665 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2666 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2667 return (READ_BIT(*pReg
, (HRTIM_MCR_RETRIG
| HRTIM_MCR_CONT
)));
2671 * @brief Enable the half duty-cycle mode.
2672 * @rmtoll MCR HALF LL_HRTIM_TIM_EnableHalfMode\n
2673 * TIMxCR HALF LL_HRTIM_TIM_EnableHalfMode
2674 * @note When the half mode is enabled, HRTIM_MCMP1R (or HRTIM_CMP1xR)
2675 * active register is automatically updated with HRTIM_MPER/2
2676 * (or HRTIM_PERxR/2) value when HRTIM_MPER (or HRTIM_PERxR) register is written.
2677 * @param HRTIMx High Resolution Timer instance
2678 * @param Timer This parameter can be one of the following values:
2679 * @arg @ref LL_HRTIM_TIMER_MASTER
2680 * @arg @ref LL_HRTIM_TIMER_A
2681 * @arg @ref LL_HRTIM_TIMER_B
2682 * @arg @ref LL_HRTIM_TIMER_C
2683 * @arg @ref LL_HRTIM_TIMER_D
2684 * @arg @ref LL_HRTIM_TIMER_E
2687 __STATIC_INLINE
void LL_HRTIM_TIM_EnableHalfMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2689 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2690 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2691 SET_BIT(*pReg
, HRTIM_MCR_HALF
);
2695 * @brief Disable the half duty-cycle mode.
2696 * @rmtoll MCR HALF LL_HRTIM_TIM_DisableHalfMode\n
2697 * TIMxCR HALF LL_HRTIM_TIM_DisableHalfMode
2698 * @param HRTIMx High Resolution Timer instance
2699 * @param Timer This parameter can be one of the following values:
2700 * @arg @ref LL_HRTIM_TIMER_MASTER
2701 * @arg @ref LL_HRTIM_TIMER_A
2702 * @arg @ref LL_HRTIM_TIMER_B
2703 * @arg @ref LL_HRTIM_TIMER_C
2704 * @arg @ref LL_HRTIM_TIMER_D
2705 * @arg @ref LL_HRTIM_TIMER_E
2708 __STATIC_INLINE
void LL_HRTIM_TIM_DisableHalfMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2710 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2711 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2712 CLEAR_BIT(*pReg
, HRTIM_MCR_HALF
);
2716 * @brief Indicate whether half duty-cycle mode is enabled for a given timer.
2717 * @rmtoll MCR HALF LL_HRTIM_TIM_IsEnabledHalfMode\n
2718 * TIMxCR HALF LL_HRTIM_TIM_IsEnabledHalfMode
2719 * @param HRTIMx High Resolution Timer instance
2720 * @param Timer This parameter can be one of the following values:
2721 * @arg @ref LL_HRTIM_TIMER_MASTER
2722 * @arg @ref LL_HRTIM_TIMER_A
2723 * @arg @ref LL_HRTIM_TIMER_B
2724 * @arg @ref LL_HRTIM_TIMER_C
2725 * @arg @ref LL_HRTIM_TIMER_D
2726 * @arg @ref LL_HRTIM_TIMER_E
2727 * @retval State of HALF bit to 1 in HRTIM_MCR or HRTIM_TIMxCR register (1 or 0).
2729 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledHalfMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2731 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2732 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2734 return ((READ_BIT(*pReg
, HRTIM_MCR_HALF
) == (HRTIM_MCR_HALF
)) ? 1UL : 0UL);
2737 * @brief Enable the timer start when receiving a synchronization input event.
2738 * @rmtoll MCR SYNCSTRTM LL_HRTIM_TIM_EnableStartOnSync\n
2739 * TIMxCR SYNSTRTA LL_HRTIM_TIM_EnableStartOnSync
2740 * @param HRTIMx High Resolution Timer instance
2741 * @param Timer This parameter can be one of the following values:
2742 * @arg @ref LL_HRTIM_TIMER_MASTER
2743 * @arg @ref LL_HRTIM_TIMER_A
2744 * @arg @ref LL_HRTIM_TIMER_B
2745 * @arg @ref LL_HRTIM_TIMER_C
2746 * @arg @ref LL_HRTIM_TIMER_D
2747 * @arg @ref LL_HRTIM_TIMER_E
2750 __STATIC_INLINE
void LL_HRTIM_TIM_EnableStartOnSync(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2752 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2753 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2754 SET_BIT(*pReg
, HRTIM_MCR_SYNCSTRTM
);
2758 * @brief Disable the timer start when receiving a synchronization input event.
2759 * @rmtoll MCR SYNCSTRTM LL_HRTIM_TIM_DisableStartOnSync\n
2760 * TIMxCR SYNSTRTA LL_HRTIM_TIM_DisableStartOnSync
2761 * @param HRTIMx High Resolution Timer instance
2762 * @param Timer This parameter can be one of the following values:
2763 * @arg @ref LL_HRTIM_TIMER_MASTER
2764 * @arg @ref LL_HRTIM_TIMER_A
2765 * @arg @ref LL_HRTIM_TIMER_B
2766 * @arg @ref LL_HRTIM_TIMER_C
2767 * @arg @ref LL_HRTIM_TIMER_D
2768 * @arg @ref LL_HRTIM_TIMER_E
2771 __STATIC_INLINE
void LL_HRTIM_TIM_DisableStartOnSync(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2773 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2774 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2775 CLEAR_BIT(*pReg
, HRTIM_MCR_SYNCSTRTM
);
2779 * @brief Indicate whether the timer start when receiving a synchronization input event.
2780 * @rmtoll MCR SYNCSTRTM LL_HRTIM_TIM_IsEnabledStartOnSync\n
2781 * TIMxCR SYNSTRTA LL_HRTIM_TIM_IsEnabledStartOnSync
2782 * @param HRTIMx High Resolution Timer instance
2783 * @param Timer This parameter can be one of the following values:
2784 * @arg @ref LL_HRTIM_TIMER_MASTER
2785 * @arg @ref LL_HRTIM_TIMER_A
2786 * @arg @ref LL_HRTIM_TIMER_B
2787 * @arg @ref LL_HRTIM_TIMER_C
2788 * @arg @ref LL_HRTIM_TIMER_D
2789 * @arg @ref LL_HRTIM_TIMER_E
2790 * @retval State of SYNCSTRTx bit in HRTIM_MCR or HRTIM_TIMxCR register (1 or 0).
2792 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledStartOnSync(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2794 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2795 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2797 return ((READ_BIT(*pReg
, HRTIM_MCR_SYNCSTRTM
) == (HRTIM_MCR_SYNCSTRTM
)) ? 1UL : 0UL);
2801 * @brief Enable the timer reset when receiving a synchronization input event.
2802 * @rmtoll MCR SYNCRSTM LL_HRTIM_TIM_EnableResetOnSync\n
2803 * TIMxCR SYNCRSTA LL_HRTIM_TIM_EnableResetOnSync
2804 * @param HRTIMx High Resolution Timer instance
2805 * @param Timer This parameter can be one of the following values:
2806 * @arg @ref LL_HRTIM_TIMER_MASTER
2807 * @arg @ref LL_HRTIM_TIMER_A
2808 * @arg @ref LL_HRTIM_TIMER_B
2809 * @arg @ref LL_HRTIM_TIMER_C
2810 * @arg @ref LL_HRTIM_TIMER_D
2811 * @arg @ref LL_HRTIM_TIMER_E
2814 __STATIC_INLINE
void LL_HRTIM_TIM_EnableResetOnSync(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2816 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2817 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2818 SET_BIT(*pReg
, HRTIM_MCR_SYNCRSTM
);
2822 * @brief Disable the timer reset when receiving a synchronization input event.
2823 * @rmtoll MCR SYNCRSTM LL_HRTIM_TIM_DisableResetOnSync\n
2824 * TIMxCR SYNCRSTA LL_HRTIM_TIM_DisableResetOnSync
2825 * @param HRTIMx High Resolution Timer instance
2826 * @param Timer This parameter can be one of the following values:
2827 * @arg @ref LL_HRTIM_TIMER_MASTER
2828 * @arg @ref LL_HRTIM_TIMER_A
2829 * @arg @ref LL_HRTIM_TIMER_B
2830 * @arg @ref LL_HRTIM_TIMER_C
2831 * @arg @ref LL_HRTIM_TIMER_D
2832 * @arg @ref LL_HRTIM_TIMER_E
2835 __STATIC_INLINE
void LL_HRTIM_TIM_DisableResetOnSync(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2837 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2838 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2839 CLEAR_BIT(*pReg
, HRTIM_MCR_SYNCRSTM
);
2843 * @brief Indicate whether the timer reset when receiving a synchronization input event.
2844 * @rmtoll MCR SYNCRSTM LL_HRTIM_TIM_IsEnabledResetOnSync\n
2845 * TIMxCR SYNCRSTA LL_HRTIM_TIM_IsEnabledResetOnSync
2846 * @param HRTIMx High Resolution Timer instance
2847 * @param Timer This parameter can be one of the following values:
2848 * @arg @ref LL_HRTIM_TIMER_MASTER
2849 * @arg @ref LL_HRTIM_TIMER_A
2850 * @arg @ref LL_HRTIM_TIMER_B
2851 * @arg @ref LL_HRTIM_TIMER_C
2852 * @arg @ref LL_HRTIM_TIMER_D
2853 * @arg @ref LL_HRTIM_TIMER_E
2856 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledResetOnSync(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2858 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2859 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2861 return ((READ_BIT(*pReg
, HRTIM_MCR_SYNCRSTM
) == (HRTIM_MCR_SYNCRSTM
)) ? 1UL : 0UL);
2865 * @brief Set the HRTIM output the DAC synchronization event is generated on (DACtrigOutx).
2866 * @rmtoll MCR DACSYNC LL_HRTIM_TIM_SetDACTrig\n
2867 * TIMxCR DACSYNC LL_HRTIM_TIM_SetDACTrig
2868 * @param HRTIMx High Resolution Timer instance
2869 * @param Timer This parameter can be one of the following values:
2870 * @arg @ref LL_HRTIM_TIMER_MASTER
2871 * @arg @ref LL_HRTIM_TIMER_A
2872 * @arg @ref LL_HRTIM_TIMER_B
2873 * @arg @ref LL_HRTIM_TIMER_C
2874 * @arg @ref LL_HRTIM_TIMER_D
2875 * @arg @ref LL_HRTIM_TIMER_E
2876 * @param DACTrig This parameter can be one of the following values:
2877 * @arg @ref LL_HRTIM_DACTRIG_NONE
2878 * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_1
2879 * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_2
2880 * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_3
2883 __STATIC_INLINE
void LL_HRTIM_TIM_SetDACTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t DACTrig
)
2885 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2886 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2887 MODIFY_REG(*pReg
, HRTIM_MCR_DACSYNC
, DACTrig
);
2891 * @brief Get the HRTIM output the DAC synchronization event is generated on (DACtrigOutx).
2892 * @rmtoll MCR DACSYNC LL_HRTIM_TIM_GetDACTrig\n
2893 * TIMxCR DACSYNC LL_HRTIM_TIM_GetDACTrig
2894 * @param HRTIMx High Resolution Timer instance
2895 * @param Timer This parameter can be one of the following values:
2896 * @arg @ref LL_HRTIM_TIMER_MASTER
2897 * @arg @ref LL_HRTIM_TIMER_A
2898 * @arg @ref LL_HRTIM_TIMER_B
2899 * @arg @ref LL_HRTIM_TIMER_C
2900 * @arg @ref LL_HRTIM_TIMER_D
2901 * @arg @ref LL_HRTIM_TIMER_E
2902 * @retval DACTrig Returned value can be one of the following values:
2903 * @arg @ref LL_HRTIM_DACTRIG_NONE
2904 * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_1
2905 * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_2
2906 * @arg @ref LL_HRTIM_DACTRIG_DACTRIGOUT_3
2908 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetDACTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2910 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2911 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2912 return (READ_BIT(*pReg
, HRTIM_MCR_DACSYNC
));
2916 * @brief Enable the timer registers preload mechanism.
2917 * @rmtoll MCR PREEN LL_HRTIM_TIM_EnablePreload\n
2918 * TIMxCR PREEN LL_HRTIM_TIM_EnablePreload
2919 * @note When the preload mode is enabled, accessed registers are shadow registers.
2920 * Their content is transferred into the active register after an update request,
2921 * either software or synchronized with an event.
2922 * @param HRTIMx High Resolution Timer instance
2923 * @param Timer This parameter can be one of the following values:
2924 * @arg @ref LL_HRTIM_TIMER_MASTER
2925 * @arg @ref LL_HRTIM_TIMER_A
2926 * @arg @ref LL_HRTIM_TIMER_B
2927 * @arg @ref LL_HRTIM_TIMER_C
2928 * @arg @ref LL_HRTIM_TIMER_D
2929 * @arg @ref LL_HRTIM_TIMER_E
2932 __STATIC_INLINE
void LL_HRTIM_TIM_EnablePreload(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2934 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2935 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2936 SET_BIT(*pReg
, HRTIM_MCR_PREEN
);
2940 * @brief Disable the timer registers preload mechanism.
2941 * @rmtoll MCR PREEN LL_HRTIM_TIM_DisablePreload\n
2942 * TIMxCR PREEN LL_HRTIM_TIM_DisablePreload
2943 * @param HRTIMx High Resolution Timer instance
2944 * @param Timer This parameter can be one of the following values:
2945 * @arg @ref LL_HRTIM_TIMER_MASTER
2946 * @arg @ref LL_HRTIM_TIMER_A
2947 * @arg @ref LL_HRTIM_TIMER_B
2948 * @arg @ref LL_HRTIM_TIMER_C
2949 * @arg @ref LL_HRTIM_TIMER_D
2950 * @arg @ref LL_HRTIM_TIMER_E
2953 __STATIC_INLINE
void LL_HRTIM_TIM_DisablePreload(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2955 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2956 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2957 CLEAR_BIT(*pReg
, HRTIM_MCR_PREEN
);
2961 * @brief Indicate whether the timer registers preload mechanism is enabled.
2962 * @rmtoll MCR PREEN LL_HRTIM_TIM_IsEnabledPreload\n
2963 * TIMxCR PREEN LL_HRTIM_TIM_IsEnabledPreload
2964 * @param HRTIMx High Resolution Timer instance
2965 * @param Timer This parameter can be one of the following values:
2966 * @arg @ref LL_HRTIM_TIMER_MASTER
2967 * @arg @ref LL_HRTIM_TIMER_A
2968 * @arg @ref LL_HRTIM_TIMER_B
2969 * @arg @ref LL_HRTIM_TIMER_C
2970 * @arg @ref LL_HRTIM_TIMER_D
2971 * @arg @ref LL_HRTIM_TIMER_E
2972 * @retval State of PREEN bit in HRTIM_MCR or HRTIM_TIMxCR register (1 or 0).
2974 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledPreload(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
2976 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
2977 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
2979 return ((READ_BIT(*pReg
, HRTIM_MCR_PREEN
) == (HRTIM_MCR_PREEN
)) ? 1UL : 0UL);
2983 * @brief Set the timer register update trigger.
2984 * @rmtoll MCR MREPU LL_HRTIM_TIM_SetUpdateTrig\n
2985 * TIMxCR TAU LL_HRTIM_TIM_SetUpdateTrig\n
2986 * TIMxCR TBU LL_HRTIM_TIM_SetUpdateTrig\n
2987 * TIMxCR TCU LL_HRTIM_TIM_SetUpdateTrig\n
2988 * TIMxCR TDU LL_HRTIM_TIM_SetUpdateTrig\n
2989 * TIMxCR TEU LL_HRTIM_TIM_SetUpdateTrig\n
2990 * TIMxCR MSTU LL_HRTIM_TIM_SetUpdateTrig
2991 * @param HRTIMx High Resolution Timer instance
2992 * @param Timer This parameter can be one of the following values:
2993 * @arg @ref LL_HRTIM_TIMER_MASTER
2994 * @arg @ref LL_HRTIM_TIMER_A
2995 * @arg @ref LL_HRTIM_TIMER_B
2996 * @arg @ref LL_HRTIM_TIMER_C
2997 * @arg @ref LL_HRTIM_TIMER_D
2998 * @arg @ref LL_HRTIM_TIMER_E
2999 * @param UpdateTrig This parameter can be one of the following values:
3001 * For the master timer this parameter can be one of the following values:
3002 * @arg @ref LL_HRTIM_UPDATETRIG_NONE
3003 * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
3005 * For timer A..E this parameter can be:
3006 * @arg @ref LL_HRTIM_UPDATETRIG_NONE
3007 * or a combination of the following values:
3008 * @arg @ref LL_HRTIM_UPDATETRIG_MASTER
3009 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_A
3010 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_B
3011 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_C
3012 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_D
3013 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_E
3014 * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
3015 * @arg @ref LL_HRTIM_UPDATETRIG_RESET
3018 __STATIC_INLINE
void LL_HRTIM_TIM_SetUpdateTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t UpdateTrig
)
3020 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3021 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
3022 MODIFY_REG(*pReg
, REG_MASK_TAB_UPDATETRIG
[iTimer
], UpdateTrig
<< REG_SHIFT_TAB_UPDATETRIG
[iTimer
]);
3026 * @brief Get the timer register update trigger.
3027 * @rmtoll MCR MREPU LL_HRTIM_TIM_GetUpdateTrig\n
3028 * TIMxCR TBU LL_HRTIM_TIM_GetUpdateTrig\n
3029 * TIMxCR TCU LL_HRTIM_TIM_GetUpdateTrig\n
3030 * TIMxCR TDU LL_HRTIM_TIM_GetUpdateTrig\n
3031 * TIMxCR TEU LL_HRTIM_TIM_GetUpdateTrig\n
3032 * TIMxCR MSTU LL_HRTIM_TIM_GetUpdateTrig
3033 * @param HRTIMx High Resolution Timer instance
3034 * @param Timer This parameter can be one of the following values:
3035 * @arg @ref LL_HRTIM_TIMER_MASTER
3036 * @arg @ref LL_HRTIM_TIMER_A
3037 * @arg @ref LL_HRTIM_TIMER_B
3038 * @arg @ref LL_HRTIM_TIMER_C
3039 * @arg @ref LL_HRTIM_TIMER_D
3040 * @arg @ref LL_HRTIM_TIMER_E
3041 * @retval UpdateTrig Returned value can be one of the following values:
3043 * For the master timer this parameter can be one of the following values:
3044 * @arg @ref LL_HRTIM_UPDATETRIG_NONE
3045 * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
3047 * For timer A..E this parameter can be:
3048 * @arg @ref LL_HRTIM_UPDATETRIG_NONE
3049 * or a combination of the following values:
3050 * @arg @ref LL_HRTIM_UPDATETRIG_MASTER
3051 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_A
3052 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_B
3053 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_C
3054 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_D
3055 * @arg @ref LL_HRTIM_UPDATETRIG_TIMER_E
3056 * @arg @ref LL_HRTIM_UPDATETRIG_REPETITION
3057 * @arg @ref LL_HRTIM_UPDATETRIG_RESET
3059 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetUpdateTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3061 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3062 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
3063 return (READ_BIT(*pReg
, REG_MASK_TAB_UPDATETRIG
[iTimer
]) >> REG_SHIFT_TAB_UPDATETRIG
[iTimer
]);
3067 * @brief Set the timer registers update condition (how the registers update occurs relatively to the burst DMA transaction or an external update request received on one of the update enable inputs (UPD_EN[3:1])).
3068 * @rmtoll MCR BRSTDMA LL_HRTIM_TIM_SetUpdateGating\n
3069 * TIMxCR UPDGAT LL_HRTIM_TIM_SetUpdateGating
3070 * @param HRTIMx High Resolution Timer instance
3071 * @param Timer This parameter can be one of the following values:
3072 * @arg @ref LL_HRTIM_TIMER_MASTER
3073 * @arg @ref LL_HRTIM_TIMER_A
3074 * @arg @ref LL_HRTIM_TIMER_B
3075 * @arg @ref LL_HRTIM_TIMER_C
3076 * @arg @ref LL_HRTIM_TIMER_D
3077 * @arg @ref LL_HRTIM_TIMER_E
3078 * @param UpdateGating This parameter can be one of the following values:
3080 * For the master timer this parameter can be one of the following values:
3081 * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
3082 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
3083 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
3085 * For the timer A..E this parameter can be one of the following values:
3086 * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
3087 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
3088 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
3089 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1
3090 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2
3091 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3
3092 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1_UPDATE
3093 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2_UPDATE
3094 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3_UPDATE
3097 __STATIC_INLINE
void LL_HRTIM_TIM_SetUpdateGating(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t UpdateGating
)
3099 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3100 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
3101 MODIFY_REG(*pReg
, REG_MASK_TAB_UPDATEGATING
[iTimer
], (UpdateGating
<< REG_SHIFT_TAB_UPDATEGATING
[iTimer
]));
3105 * @brief Get the timer registers update condition.
3106 * @rmtoll MCR BRSTDMA LL_HRTIM_TIM_GetUpdateGating\n
3107 * TIMxCR UPDGAT LL_HRTIM_TIM_GetUpdateGating
3108 * @param HRTIMx High Resolution Timer instance
3109 * @param Timer This parameter can be one of the following values:
3110 * @arg @ref LL_HRTIM_TIMER_MASTER
3111 * @arg @ref LL_HRTIM_TIMER_A
3112 * @arg @ref LL_HRTIM_TIMER_B
3113 * @arg @ref LL_HRTIM_TIMER_C
3114 * @arg @ref LL_HRTIM_TIMER_D
3115 * @arg @ref LL_HRTIM_TIMER_E
3116 * @retval UpdateGating Returned value can be one of the following values:
3118 * For the master timer this parameter can be one of the following values:
3119 * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
3120 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
3121 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
3123 * For the timer A..E this parameter can be one of the following values:
3124 * @arg @ref LL_HRTIM_UPDATEGATING_INDEPENDENT
3125 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST
3126 * @arg @ref LL_HRTIM_UPDATEGATING_DMABURST_UPDATE
3127 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1
3128 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2
3129 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3
3130 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN1_UPDATE
3131 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN2_UPDATE
3132 * @arg @ref LL_HRTIM_UPDATEGATING_UPDEN3_UPDATE
3134 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetUpdateGating(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3136 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3137 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCR
) + REG_OFFSET_TAB_TIMER
[iTimer
]));
3138 return (READ_BIT(*pReg
, REG_MASK_TAB_UPDATEGATING
[iTimer
]) >> REG_SHIFT_TAB_UPDATEGATING
[iTimer
]);
3142 * @brief Enable the push-pull mode.
3143 * @rmtoll TIMxCR PSHPLL LL_HRTIM_TIM_EnablePushPullMode
3144 * @param HRTIMx High Resolution Timer instance
3145 * @param Timer This parameter can be one of the following values:
3146 * @arg @ref LL_HRTIM_TIMER_A
3147 * @arg @ref LL_HRTIM_TIMER_B
3148 * @arg @ref LL_HRTIM_TIMER_C
3149 * @arg @ref LL_HRTIM_TIMER_D
3150 * @arg @ref LL_HRTIM_TIMER_E
3153 __STATIC_INLINE
void LL_HRTIM_TIM_EnablePushPullMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3155 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3156 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].TIMxCR
) +
3157 REG_OFFSET_TAB_TIMER
[iTimer
]));
3158 SET_BIT(*pReg
, HRTIM_TIMCR_PSHPLL
);
3162 * @brief Disable the push-pull mode.
3163 * @rmtoll TIMxCR PSHPLL LL_HRTIM_TIM_DisablePushPullMode
3164 * @param HRTIMx High Resolution Timer instance
3165 * @param Timer This parameter can be one of the following values:
3166 * @arg @ref LL_HRTIM_TIMER_A
3167 * @arg @ref LL_HRTIM_TIMER_B
3168 * @arg @ref LL_HRTIM_TIMER_C
3169 * @arg @ref LL_HRTIM_TIMER_D
3170 * @arg @ref LL_HRTIM_TIMER_E
3173 __STATIC_INLINE
void LL_HRTIM_TIM_DisablePushPullMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3175 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3176 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].TIMxCR
) +
3177 REG_OFFSET_TAB_TIMER
[iTimer
]));
3178 CLEAR_BIT(*pReg
, HRTIM_TIMCR_PSHPLL
);
3182 * @brief Indicate whether the push-pull mode is enabled.
3183 * @rmtoll TIMxCR PSHPLL LL_HRTIM_TIM_IsEnabledPushPullMode\n
3184 * @param HRTIMx High Resolution Timer instance
3185 * @param Timer This parameter can be one of the following values:
3186 * @arg @ref LL_HRTIM_TIMER_A
3187 * @arg @ref LL_HRTIM_TIMER_B
3188 * @arg @ref LL_HRTIM_TIMER_C
3189 * @arg @ref LL_HRTIM_TIMER_D
3190 * @arg @ref LL_HRTIM_TIMER_E
3191 * @retval State of PSHPLL bit in HRTIM_TIMxCR register (1 or 0).
3193 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledPushPullMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3195 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3196 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].TIMxCR
) +
3197 REG_OFFSET_TAB_TIMER
[iTimer
]));
3198 return ((READ_BIT(*pReg
, HRTIM_TIMCR_PSHPLL
) == (HRTIM_TIMCR_PSHPLL
)) ? 1UL : 0UL);
3202 * @brief Set the functioning mode of the compare unit (CMP2 or CMP4 can operate in standard mode or in auto delayed mode).
3203 * @rmtoll TIMxCR DELCMP2 LL_HRTIM_TIM_SetCompareMode\n
3204 * TIMxCR DELCMP4 LL_HRTIM_TIM_SetCompareMode
3205 * @note In auto-delayed mode the compare match occurs independently from the timer counter value.
3206 * @param HRTIMx High Resolution Timer instance
3207 * @param Timer This parameter can be one of the following values:
3208 * @arg @ref LL_HRTIM_TIMER_A
3209 * @arg @ref LL_HRTIM_TIMER_B
3210 * @arg @ref LL_HRTIM_TIMER_C
3211 * @arg @ref LL_HRTIM_TIMER_D
3212 * @arg @ref LL_HRTIM_TIMER_E
3213 * @param CompareUnit This parameter can be one of the following values:
3214 * @arg @ref LL_HRTIM_COMPAREUNIT_2
3215 * @arg @ref LL_HRTIM_COMPAREUNIT_4
3216 * @param Mode This parameter can be one of the following values:
3217 * @arg @ref LL_HRTIM_COMPAREMODE_REGULAR
3218 * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_NOTIMEOUT
3219 * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP1
3220 * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP3
3223 __STATIC_INLINE
void LL_HRTIM_TIM_SetCompareMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CompareUnit
,
3226 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3227 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].TIMxCR
) +
3228 REG_OFFSET_TAB_TIMER
[iTimer
]));
3229 register uint32_t shift
= (((uint32_t)POSITION_VAL(CompareUnit
) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2
)) & 0x1FU
);
3230 MODIFY_REG(* pReg
, (HRTIM_TIMCR_DELCMP2
<< shift
), (Mode
<< shift
));
3234 * @brief Get the functioning mode of the compare unit.
3235 * @rmtoll TIMxCR DELCMP2 LL_HRTIM_TIM_GetCompareMode\n
3236 * TIMxCR DELCMP4 LL_HRTIM_TIM_GetCompareMode
3237 * @param HRTIMx High Resolution Timer instance
3238 * @param Timer This parameter can be one of the following values:
3239 * @arg @ref LL_HRTIM_TIMER_A
3240 * @arg @ref LL_HRTIM_TIMER_B
3241 * @arg @ref LL_HRTIM_TIMER_C
3242 * @arg @ref LL_HRTIM_TIMER_D
3243 * @arg @ref LL_HRTIM_TIMER_E
3244 * @param CompareUnit This parameter can be one of the following values:
3245 * @arg @ref LL_HRTIM_COMPAREUNIT_2
3246 * @arg @ref LL_HRTIM_COMPAREUNIT_4
3247 * @retval Mode Returned value can be one of the following values:
3248 * @arg @ref LL_HRTIM_COMPAREMODE_REGULAR
3249 * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_NOTIMEOUT
3250 * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP1
3251 * @arg @ref LL_HRTIM_COMPAREMODE_DELAY_CMP3
3253 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCompareMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CompareUnit
)
3255 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3256 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].TIMxCR
) +
3257 REG_OFFSET_TAB_TIMER
[iTimer
]));
3258 register uint32_t shift
= (((uint32_t)POSITION_VAL(CompareUnit
) - (uint32_t)POSITION_VAL(LL_HRTIM_COMPAREUNIT_2
)) & 0x1FU
);
3259 return (READ_BIT(*pReg
, (HRTIM_TIMCR_DELCMP2
<< shift
)) >> shift
);
3263 * @brief Set the timer counter value.
3264 * @rmtoll MCNTR MCNT LL_HRTIM_TIM_SetCounter\n
3265 * CNTxR CNTx LL_HRTIM_TIM_SetCounter
3266 * @note This function can only be called when the timer is stopped.
3267 * @note For HR clock prescaling ratio below 32 (CKPSC[2:0] < 5), the least
3268 * significant bits of the counter are not significant. They cannot be
3269 * written and return 0 when read.
3270 * @note The timer behavior is not guaranteed if the counter value is set above
3272 * @param HRTIMx High Resolution Timer instance
3273 * @param Timer This parameter can be one of the following values:
3274 * @arg @ref LL_HRTIM_TIMER_MASTER
3275 * @arg @ref LL_HRTIM_TIMER_A
3276 * @arg @ref LL_HRTIM_TIMER_B
3277 * @arg @ref LL_HRTIM_TIMER_C
3278 * @arg @ref LL_HRTIM_TIMER_D
3279 * @arg @ref LL_HRTIM_TIMER_E
3280 * @param Counter Value between 0 and 0xFFFF
3283 __STATIC_INLINE
void LL_HRTIM_TIM_SetCounter(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Counter
)
3285 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3286 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCNTR
) +
3287 REG_OFFSET_TAB_TIMER
[iTimer
]));
3288 MODIFY_REG(* pReg
, HRTIM_MCNTR_MCNTR
, Counter
);
3292 * @brief Get actual timer counter value.
3293 * @rmtoll MCNTR MCNT LL_HRTIM_TIM_GetCounter\n
3294 * CNTxR CNTx LL_HRTIM_TIM_GetCounter
3295 * @param HRTIMx High Resolution Timer instance
3296 * @param Timer This parameter can be one of the following values:
3297 * @arg @ref LL_HRTIM_TIMER_MASTER
3298 * @arg @ref LL_HRTIM_TIMER_A
3299 * @arg @ref LL_HRTIM_TIMER_B
3300 * @arg @ref LL_HRTIM_TIMER_C
3301 * @arg @ref LL_HRTIM_TIMER_D
3302 * @arg @ref LL_HRTIM_TIMER_E
3303 * @retval Counter Value between 0 and 0xFFFF
3305 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCounter(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3307 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3308 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCNTR
) +
3309 REG_OFFSET_TAB_TIMER
[iTimer
]));
3310 return (READ_BIT(*pReg
, HRTIM_MCNTR_MCNTR
));
3314 * @brief Set the timer period value.
3315 * @rmtoll MPER MPER LL_HRTIM_TIM_SetPeriod\n
3316 * PERxR PERx LL_HRTIM_TIM_SetPeriod
3317 * @param HRTIMx High Resolution Timer instance
3318 * @param Timer This parameter can be one of the following values:
3319 * @arg @ref LL_HRTIM_TIMER_MASTER
3320 * @arg @ref LL_HRTIM_TIMER_A
3321 * @arg @ref LL_HRTIM_TIMER_B
3322 * @arg @ref LL_HRTIM_TIMER_C
3323 * @arg @ref LL_HRTIM_TIMER_D
3324 * @arg @ref LL_HRTIM_TIMER_E
3325 * @param Period Value between 0 and 0xFFFF
3328 __STATIC_INLINE
void LL_HRTIM_TIM_SetPeriod(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Period
)
3330 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3331 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MPER
) +
3332 REG_OFFSET_TAB_TIMER
[iTimer
]));
3333 MODIFY_REG(* pReg
, HRTIM_MPER_MPER
, Period
);
3337 * @brief Get actual timer period value.
3338 * @rmtoll MPER MPER LL_HRTIM_TIM_GetPeriod\n
3339 * PERxR PERx LL_HRTIM_TIM_GetPeriod
3340 * @param HRTIMx High Resolution Timer instance
3341 * @param Timer This parameter can be one of the following values:
3342 * @arg @ref LL_HRTIM_TIMER_MASTER
3343 * @arg @ref LL_HRTIM_TIMER_A
3344 * @arg @ref LL_HRTIM_TIMER_B
3345 * @arg @ref LL_HRTIM_TIMER_C
3346 * @arg @ref LL_HRTIM_TIMER_D
3347 * @arg @ref LL_HRTIM_TIMER_E
3348 * @retval Period Value between 0 and 0xFFFF
3350 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetPeriod(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3352 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3353 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MPER
) +
3354 REG_OFFSET_TAB_TIMER
[iTimer
]));
3355 return (READ_BIT(*pReg
, HRTIM_MPER_MPER
));
3359 * @brief Set the timer repetition period value.
3360 * @rmtoll MREP MREP LL_HRTIM_TIM_SetRepetition\n
3361 * REPxR REPx LL_HRTIM_TIM_SetRepetition
3362 * @param HRTIMx High Resolution Timer instance
3363 * @param Timer This parameter can be one of the following values:
3364 * @arg @ref LL_HRTIM_TIMER_MASTER
3365 * @arg @ref LL_HRTIM_TIMER_A
3366 * @arg @ref LL_HRTIM_TIMER_B
3367 * @arg @ref LL_HRTIM_TIMER_C
3368 * @arg @ref LL_HRTIM_TIMER_D
3369 * @arg @ref LL_HRTIM_TIMER_E
3370 * @param Repetition Value between 0 and 0xFF
3373 __STATIC_INLINE
void LL_HRTIM_TIM_SetRepetition(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Repetition
)
3375 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3376 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MREP
) +
3377 REG_OFFSET_TAB_TIMER
[iTimer
]));
3378 MODIFY_REG(* pReg
, HRTIM_MREP_MREP
, Repetition
);
3382 * @brief Get actual timer repetition period value.
3383 * @rmtoll MREP MREP LL_HRTIM_TIM_GetRepetition\n
3384 * REPxR REPx LL_HRTIM_TIM_GetRepetition
3385 * @param HRTIMx High Resolution Timer instance
3386 * @param Timer This parameter can be one of the following values:
3387 * @arg @ref LL_HRTIM_TIMER_MASTER
3388 * @arg @ref LL_HRTIM_TIMER_A
3389 * @arg @ref LL_HRTIM_TIMER_B
3390 * @arg @ref LL_HRTIM_TIMER_C
3391 * @arg @ref LL_HRTIM_TIMER_D
3392 * @arg @ref LL_HRTIM_TIMER_E
3393 * @retval Repetition Value between 0 and 0xFF
3395 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetRepetition(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3397 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3398 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MREP
) +
3399 REG_OFFSET_TAB_TIMER
[iTimer
]));
3400 return (READ_BIT(*pReg
, HRTIM_MREP_MREP
));
3404 * @brief Set the compare value of the compare unit 1.
3405 * @rmtoll MCMP1R MCMP1 LL_HRTIM_TIM_SetCompare1\n
3406 * CMP1xR CMP1x LL_HRTIM_TIM_SetCompare1
3407 * @param HRTIMx High Resolution Timer instance
3408 * @param Timer This parameter can be one of the following values:
3409 * @arg @ref LL_HRTIM_TIMER_MASTER
3410 * @arg @ref LL_HRTIM_TIMER_A
3411 * @arg @ref LL_HRTIM_TIMER_B
3412 * @arg @ref LL_HRTIM_TIMER_C
3413 * @arg @ref LL_HRTIM_TIMER_D
3414 * @arg @ref LL_HRTIM_TIMER_E
3415 * @param CompareValue Compare value must be above or equal to 3
3416 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3417 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3420 __STATIC_INLINE
void LL_HRTIM_TIM_SetCompare1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CompareValue
)
3422 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3423 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP1R
) +
3424 REG_OFFSET_TAB_TIMER
[iTimer
]));
3425 MODIFY_REG(* pReg
, HRTIM_MCMP1R_MCMP1R
, CompareValue
);
3429 * @brief Get actual compare value of the compare unit 1.
3430 * @rmtoll MCMP1R MCMP1 LL_HRTIM_TIM_GetCompare1\n
3431 * CMP1xR CMP1x LL_HRTIM_TIM_GetCompare1
3432 * @param HRTIMx High Resolution Timer instance
3433 * @param Timer This parameter can be one of the following values:
3434 * @arg @ref LL_HRTIM_TIMER_MASTER
3435 * @arg @ref LL_HRTIM_TIMER_A
3436 * @arg @ref LL_HRTIM_TIMER_B
3437 * @arg @ref LL_HRTIM_TIMER_C
3438 * @arg @ref LL_HRTIM_TIMER_D
3439 * @arg @ref LL_HRTIM_TIMER_E
3440 * @retval CompareValue Compare value must be above or equal to 3
3441 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3442 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3444 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCompare1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3446 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3447 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP1R
) +
3448 REG_OFFSET_TAB_TIMER
[iTimer
]));
3449 return (READ_BIT(*pReg
, HRTIM_MCMP1R_MCMP1R
));
3453 * @brief Set the compare value of the compare unit 2.
3454 * @rmtoll MCMP2R MCMP2 LL_HRTIM_TIM_SetCompare2\n
3455 * CMP2xR CMP2x LL_HRTIM_TIM_SetCompare2
3456 * @param HRTIMx High Resolution Timer instance
3457 * @param Timer This parameter can be one of the following values:
3458 * @arg @ref LL_HRTIM_TIMER_MASTER
3459 * @arg @ref LL_HRTIM_TIMER_A
3460 * @arg @ref LL_HRTIM_TIMER_B
3461 * @arg @ref LL_HRTIM_TIMER_C
3462 * @arg @ref LL_HRTIM_TIMER_D
3463 * @arg @ref LL_HRTIM_TIMER_E
3464 * @param CompareValue Compare value must be above or equal to 3
3465 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3466 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3469 __STATIC_INLINE
void LL_HRTIM_TIM_SetCompare2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CompareValue
)
3471 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3472 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP2R
) +
3473 REG_OFFSET_TAB_TIMER
[iTimer
]));
3474 MODIFY_REG(* pReg
, HRTIM_MCMP1R_MCMP2R
, CompareValue
);
3478 * @brief Get actual compare value of the compare unit 2.
3479 * @rmtoll MCMP2R MCMP2 LL_HRTIM_TIM_GetCompare2\n
3480 * CMP2xR CMP2x LL_HRTIM_TIM_GetCompare2\n
3481 * @param HRTIMx High Resolution Timer instance
3482 * @param Timer This parameter can be one of the following values:
3483 * @arg @ref LL_HRTIM_TIMER_MASTER
3484 * @arg @ref LL_HRTIM_TIMER_A
3485 * @arg @ref LL_HRTIM_TIMER_B
3486 * @arg @ref LL_HRTIM_TIMER_C
3487 * @arg @ref LL_HRTIM_TIMER_D
3488 * @arg @ref LL_HRTIM_TIMER_E
3489 * @retval CompareValue Compare value must be above or equal to 3
3490 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3491 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3493 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCompare2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3495 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3496 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP2R
) +
3497 REG_OFFSET_TAB_TIMER
[iTimer
]));
3498 return (READ_BIT(*pReg
, HRTIM_MCMP1R_MCMP2R
));
3502 * @brief Set the compare value of the compare unit 3.
3503 * @rmtoll MCMP3R MCMP3 LL_HRTIM_TIM_SetCompare3\n
3504 * CMP3xR CMP3x LL_HRTIM_TIM_SetCompare3
3505 * @param HRTIMx High Resolution Timer instance
3506 * @param Timer This parameter can be one of the following values:
3507 * @arg @ref LL_HRTIM_TIMER_MASTER
3508 * @arg @ref LL_HRTIM_TIMER_A
3509 * @arg @ref LL_HRTIM_TIMER_B
3510 * @arg @ref LL_HRTIM_TIMER_C
3511 * @arg @ref LL_HRTIM_TIMER_D
3512 * @arg @ref LL_HRTIM_TIMER_E
3513 * @param CompareValue Compare value must be above or equal to 3
3514 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3515 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3518 __STATIC_INLINE
void LL_HRTIM_TIM_SetCompare3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CompareValue
)
3520 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3521 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP3R
) +
3522 REG_OFFSET_TAB_TIMER
[iTimer
]));
3523 MODIFY_REG(* pReg
, HRTIM_MCMP1R_MCMP3R
, CompareValue
);
3527 * @brief Get actual compare value of the compare unit 3.
3528 * @rmtoll MCMP3R MCMP3 LL_HRTIM_TIM_GetCompare3\n
3529 * CMP3xR CMP3x LL_HRTIM_TIM_GetCompare3
3530 * @param HRTIMx High Resolution Timer instance
3531 * @param Timer This parameter can be one of the following values:
3532 * @arg @ref LL_HRTIM_TIMER_MASTER
3533 * @arg @ref LL_HRTIM_TIMER_A
3534 * @arg @ref LL_HRTIM_TIMER_B
3535 * @arg @ref LL_HRTIM_TIMER_C
3536 * @arg @ref LL_HRTIM_TIMER_D
3537 * @arg @ref LL_HRTIM_TIMER_E
3538 * @retval CompareValue Compare value must be above or equal to 3
3539 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3540 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3542 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCompare3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3544 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3545 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP3R
) +
3546 REG_OFFSET_TAB_TIMER
[iTimer
]));
3547 return (READ_BIT(*pReg
, HRTIM_MCMP1R_MCMP3R
));
3551 * @brief Set the compare value of the compare unit 4.
3552 * @rmtoll MCMP4R MCMP4 LL_HRTIM_TIM_SetCompare4\n
3553 * CMP4xR CMP4x LL_HRTIM_TIM_SetCompare4
3554 * @param HRTIMx High Resolution Timer instance
3555 * @param Timer This parameter can be one of the following values:
3556 * @arg @ref LL_HRTIM_TIMER_MASTER
3557 * @arg @ref LL_HRTIM_TIMER_A
3558 * @arg @ref LL_HRTIM_TIMER_B
3559 * @arg @ref LL_HRTIM_TIMER_C
3560 * @arg @ref LL_HRTIM_TIMER_D
3561 * @arg @ref LL_HRTIM_TIMER_E
3562 * @param CompareValue Compare value must be above or equal to 3
3563 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3564 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3567 __STATIC_INLINE
void LL_HRTIM_TIM_SetCompare4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CompareValue
)
3569 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3570 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP4R
) +
3571 REG_OFFSET_TAB_TIMER
[iTimer
]));
3572 MODIFY_REG(* pReg
, HRTIM_MCMP1R_MCMP4R
, CompareValue
);
3576 * @brief Get actual compare value of the compare unit 4.
3577 * @rmtoll MCMP4R MCMP4 LL_HRTIM_TIM_GetCompare4\n
3578 * CMP4xR CMP4x LL_HRTIM_TIM_GetCompare4
3579 * @param HRTIMx High Resolution Timer instance
3580 * @param Timer This parameter can be one of the following values:
3581 * @arg @ref LL_HRTIM_TIMER_MASTER
3582 * @arg @ref LL_HRTIM_TIMER_A
3583 * @arg @ref LL_HRTIM_TIMER_B
3584 * @arg @ref LL_HRTIM_TIMER_C
3585 * @arg @ref LL_HRTIM_TIMER_D
3586 * @arg @ref LL_HRTIM_TIMER_E
3587 * @retval CompareValue Compare value must be above or equal to 3
3588 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
3589 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
3591 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCompare4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3593 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
3594 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MCMP4R
) +
3595 REG_OFFSET_TAB_TIMER
[iTimer
]));
3596 return (READ_BIT(*pReg
, HRTIM_MCMP1R_MCMP4R
));
3600 * @brief Set the reset trigger of a timer counter.
3601 * @rmtoll RSTxR UPDT LL_HRTIM_TIM_SetResetTrig\n
3602 * RSTxR CMP2 LL_HRTIM_TIM_SetResetTrig\n
3603 * RSTxR CMP4 LL_HRTIM_TIM_SetResetTrig\n
3604 * RSTxR MSTPER LL_HRTIM_TIM_SetResetTrig\n
3605 * RSTxR MSTCMP1 LL_HRTIM_TIM_SetResetTrig\n
3606 * RSTxR MSTCMP2 LL_HRTIM_TIM_SetResetTrig\n
3607 * RSTxR MSTCMP3 LL_HRTIM_TIM_SetResetTrig\n
3608 * RSTxR MSTCMP4 LL_HRTIM_TIM_SetResetTrig\n
3609 * RSTxR EXTEVNT1 LL_HRTIM_TIM_SetResetTrig\n
3610 * RSTxR EXTEVNT2 LL_HRTIM_TIM_SetResetTrig\n
3611 * RSTxR EXTEVNT3 LL_HRTIM_TIM_SetResetTrig\n
3612 * RSTxR EXTEVNT4 LL_HRTIM_TIM_SetResetTrig\n
3613 * RSTxR EXTEVNT5 LL_HRTIM_TIM_SetResetTrig\n
3614 * RSTxR EXTEVNT6 LL_HRTIM_TIM_SetResetTrig\n
3615 * RSTxR EXTEVNT7 LL_HRTIM_TIM_SetResetTrig\n
3616 * RSTxR EXTEVNT8 LL_HRTIM_TIM_SetResetTrig\n
3617 * RSTxR EXTEVNT9 LL_HRTIM_TIM_SetResetTrig\n
3618 * RSTxR EXTEVNT10 LL_HRTIM_TIM_SetResetTrig\n
3619 * RSTxR TIMBCMP1 LL_HRTIM_TIM_SetResetTrig\n
3620 * RSTxR TIMBCMP2 LL_HRTIM_TIM_SetResetTrig\n
3621 * RSTxR TIMBCMP4 LL_HRTIM_TIM_SetResetTrig\n
3622 * RSTxR TIMCCMP1 LL_HRTIM_TIM_SetResetTrig\n
3623 * RSTxR TIMCCMP2 LL_HRTIM_TIM_SetResetTrig\n
3624 * RSTxR TIMCCMP4 LL_HRTIM_TIM_SetResetTrig\n
3625 * RSTxR TIMDCMP1 LL_HRTIM_TIM_SetResetTrig\n
3626 * RSTxR TIMDCMP2 LL_HRTIM_TIM_SetResetTrig\n
3627 * RSTxR TIMDCMP4 LL_HRTIM_TIM_SetResetTrig\n
3628 * RSTxR TIMECMP1 LL_HRTIM_TIM_SetResetTrig\n
3629 * RSTxR TIMECMP2 LL_HRTIM_TIM_SetResetTrig\n
3630 * RSTxR TIMECMP4 LL_HRTIM_TIM_SetResetTrig
3631 * @note The reset of the timer counter can be triggered by up to 30 events
3632 * that can be selected among the following sources:
3633 * @arg The timing unit: Compare 2, Compare 4 and Update (3 events).
3634 * @arg The master timer: Reset and Compare 1..4 (5 events).
3635 * @arg The external events EXTEVNT1..10 (10 events).
3636 * @arg All other timing units (e.g. Timer B..E for timer A): Compare 1, 2 and 4 (12 events).
3637 * @param HRTIMx High Resolution Timer instance
3638 * @param Timer This parameter can be one of the following values:
3639 * @arg @ref LL_HRTIM_TIMER_A
3640 * @arg @ref LL_HRTIM_TIMER_B
3641 * @arg @ref LL_HRTIM_TIMER_C
3642 * @arg @ref LL_HRTIM_TIMER_D
3643 * @arg @ref LL_HRTIM_TIMER_E
3644 * @param ResetTrig This parameter can be a combination of the following values:
3645 * @arg @ref LL_HRTIM_RESETTRIG_NONE
3646 * @arg @ref LL_HRTIM_RESETTRIG_UPDATE
3647 * @arg @ref LL_HRTIM_RESETTRIG_CMP2
3648 * @arg @ref LL_HRTIM_RESETTRIG_CMP4
3649 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_PER
3650 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP1
3651 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP2
3652 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP3
3653 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP4
3654 * @arg @ref LL_HRTIM_RESETTRIG_EEV_1
3655 * @arg @ref LL_HRTIM_RESETTRIG_EEV_2
3656 * @arg @ref LL_HRTIM_RESETTRIG_EEV_3
3657 * @arg @ref LL_HRTIM_RESETTRIG_EEV_4
3658 * @arg @ref LL_HRTIM_RESETTRIG_EEV_5
3659 * @arg @ref LL_HRTIM_RESETTRIG_EEV_6
3660 * @arg @ref LL_HRTIM_RESETTRIG_EEV_7
3661 * @arg @ref LL_HRTIM_RESETTRIG_EEV_8
3662 * @arg @ref LL_HRTIM_RESETTRIG_EEV_9
3663 * @arg @ref LL_HRTIM_RESETTRIG_EEV_10
3664 * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP1
3665 * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP2
3666 * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP4
3667 * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP1
3668 * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP2
3669 * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP4
3670 * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP1
3671 * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP2
3672 * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP4
3673 * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP1
3674 * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP2
3675 * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP4
3678 __STATIC_INLINE
void LL_HRTIM_TIM_SetResetTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t ResetTrig
)
3680 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3681 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].RSTxR
) +
3682 REG_OFFSET_TAB_TIMER
[iTimer
]));
3683 WRITE_REG(*pReg
, ResetTrig
);
3687 * @brief Get actual reset trigger of a timer counter.
3688 * @rmtoll RSTxR UPDT LL_HRTIM_TIM_GetResetTrig\n
3689 * RSTxR CMP2 LL_HRTIM_TIM_GetResetTrig\n
3690 * RSTxR CMP4 LL_HRTIM_TIM_GetResetTrig\n
3691 * RSTxR MSTPER LL_HRTIM_TIM_GetResetTrig\n
3692 * RSTxR MSTCMP1 LL_HRTIM_TIM_GetResetTrig\n
3693 * RSTxR MSTCMP2 LL_HRTIM_TIM_GetResetTrig\n
3694 * RSTxR MSTCMP3 LL_HRTIM_TIM_GetResetTrig\n
3695 * RSTxR MSTCMP4 LL_HRTIM_TIM_GetResetTrig\n
3696 * RSTxR EXTEVNT1 LL_HRTIM_TIM_GetResetTrig\n
3697 * RSTxR EXTEVNT2 LL_HRTIM_TIM_GetResetTrig\n
3698 * RSTxR EXTEVNT3 LL_HRTIM_TIM_GetResetTrig\n
3699 * RSTxR EXTEVNT4 LL_HRTIM_TIM_GetResetTrig\n
3700 * RSTxR EXTEVNT5 LL_HRTIM_TIM_GetResetTrig\n
3701 * RSTxR EXTEVNT6 LL_HRTIM_TIM_GetResetTrig\n
3702 * RSTxR EXTEVNT7 LL_HRTIM_TIM_GetResetTrig\n
3703 * RSTxR EXTEVNT8 LL_HRTIM_TIM_GetResetTrig\n
3704 * RSTxR EXTEVNT9 LL_HRTIM_TIM_GetResetTrig\n
3705 * RSTxR EXTEVNT10 LL_HRTIM_TIM_GetResetTrig\n
3706 * RSTxR TIMBCMP1 LL_HRTIM_TIM_GetResetTrig\n
3707 * RSTxR TIMBCMP2 LL_HRTIM_TIM_GetResetTrig\n
3708 * RSTxR TIMBCMP4 LL_HRTIM_TIM_GetResetTrig\n
3709 * RSTxR TIMCCMP1 LL_HRTIM_TIM_GetResetTrig\n
3710 * RSTxR TIMCCMP2 LL_HRTIM_TIM_GetResetTrig\n
3711 * RSTxR TIMCCMP4 LL_HRTIM_TIM_GetResetTrig\n
3712 * RSTxR TIMDCMP1 LL_HRTIM_TIM_GetResetTrig\n
3713 * RSTxR TIMDCMP2 LL_HRTIM_TIM_GetResetTrig\n
3714 * RSTxR TIMDCMP4 LL_HRTIM_TIM_GetResetTrig\n
3715 * RSTxR TIMECMP1 LL_HRTIM_TIM_GetResetTrig\n
3716 * RSTxR TIMECMP2 LL_HRTIM_TIM_GetResetTrig\n
3717 * RSTxR TIMECMP4 LL_HRTIM_TIM_GetResetTrig
3718 * @param HRTIMx High Resolution Timer instance
3719 * @param Timer This parameter can be one of the following values:
3720 * @arg @ref LL_HRTIM_TIMER_A
3721 * @arg @ref LL_HRTIM_TIMER_B
3722 * @arg @ref LL_HRTIM_TIMER_C
3723 * @arg @ref LL_HRTIM_TIMER_D
3724 * @arg @ref LL_HRTIM_TIMER_E
3725 * @retval ResetTrig Returned value can be one of the following values:
3726 * @arg @ref LL_HRTIM_RESETTRIG_NONE
3727 * @arg @ref LL_HRTIM_RESETTRIG_UPDATE
3728 * @arg @ref LL_HRTIM_RESETTRIG_CMP2
3729 * @arg @ref LL_HRTIM_RESETTRIG_CMP4
3730 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_PER
3731 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP1
3732 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP2
3733 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP3
3734 * @arg @ref LL_HRTIM_RESETTRIG_MASTER_CMP4
3735 * @arg @ref LL_HRTIM_RESETTRIG_EEV_1
3736 * @arg @ref LL_HRTIM_RESETTRIG_EEV_2
3737 * @arg @ref LL_HRTIM_RESETTRIG_EEV_3
3738 * @arg @ref LL_HRTIM_RESETTRIG_EEV_4
3739 * @arg @ref LL_HRTIM_RESETTRIG_EEV_5
3740 * @arg @ref LL_HRTIM_RESETTRIG_EEV_6
3741 * @arg @ref LL_HRTIM_RESETTRIG_EEV_7
3742 * @arg @ref LL_HRTIM_RESETTRIG_EEV_8
3743 * @arg @ref LL_HRTIM_RESETTRIG_EEV_9
3744 * @arg @ref LL_HRTIM_RESETTRIG_EEV_10
3745 * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP1
3746 * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP2
3747 * @arg @ref LL_HRTIM_RESETTRIG_OTHER1_CMP4
3748 * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP1
3749 * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP2
3750 * @arg @ref LL_HRTIM_RESETTRIG_OTHER2_CMP4
3751 * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP1
3752 * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP2
3753 * @arg @ref LL_HRTIM_RESETTRIG_OTHER3_CMP4
3754 * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP1
3755 * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP2
3756 * @arg @ref LL_HRTIM_RESETTRIG_OTHER4_CMP4
3758 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetResetTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3760 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3761 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].RSTxR
) +
3762 REG_OFFSET_TAB_TIMER
[iTimer
]));
3763 return (READ_REG(*pReg
));
3767 * @brief Get captured value for capture unit 1.
3768 * @rmtoll CPT1xR CPT1x LL_HRTIM_TIM_GetCapture1
3769 * @param HRTIMx High Resolution Timer instance
3770 * @param Timer This parameter can be one of the following values:
3771 * @arg @ref LL_HRTIM_TIMER_A
3772 * @arg @ref LL_HRTIM_TIMER_B
3773 * @arg @ref LL_HRTIM_TIMER_C
3774 * @arg @ref LL_HRTIM_TIMER_D
3775 * @arg @ref LL_HRTIM_TIMER_E
3776 * @retval Captured value
3778 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCapture1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3780 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3781 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CPT1xR
) +
3782 REG_OFFSET_TAB_TIMER
[iTimer
]));
3783 return (READ_REG(*pReg
));
3787 * @brief Get captured value for capture unit 2.
3788 * @rmtoll CPT2xR CPT2x LL_HRTIM_TIM_GetCapture2
3789 * @param HRTIMx High Resolution Timer instance
3790 * @param Timer This parameter can be one of the following values:
3791 * @arg @ref LL_HRTIM_TIMER_A
3792 * @arg @ref LL_HRTIM_TIMER_B
3793 * @arg @ref LL_HRTIM_TIMER_C
3794 * @arg @ref LL_HRTIM_TIMER_D
3795 * @arg @ref LL_HRTIM_TIMER_E
3796 * @retval Captured value
3798 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCapture2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3800 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3801 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CPT2xR
) +
3802 REG_OFFSET_TAB_TIMER
[iTimer
]));
3803 return (READ_REG(*pReg
));
3807 * @brief Set the trigger of a capture unit for a given timer.
3808 * @rmtoll CPT1xCR SWCPT LL_HRTIM_TIM_SetCaptureTrig\n
3809 * CPT1xCR UPDCPT LL_HRTIM_TIM_SetCaptureTrig\n
3810 * CPT1xCR EXEV1CPT LL_HRTIM_TIM_SetCaptureTrig\n
3811 * CPT1xCR EXEV2CPT LL_HRTIM_TIM_SetCaptureTrig\n
3812 * CPT1xCR EXEV3CPT LL_HRTIM_TIM_SetCaptureTrig\n
3813 * CPT1xCR EXEV4CPT LL_HRTIM_TIM_SetCaptureTrig\n
3814 * CPT1xCR EXEV5CPT LL_HRTIM_TIM_SetCaptureTrig\n
3815 * CPT1xCR EXEV6CPT LL_HRTIM_TIM_SetCaptureTrig\n
3816 * CPT1xCR EXEV7CPT LL_HRTIM_TIM_SetCaptureTrig\n
3817 * CPT1xCR EXEV8CPT LL_HRTIM_TIM_SetCaptureTrig\n
3818 * CPT1xCR EXEV9CPT LL_HRTIM_TIM_SetCaptureTrig\n
3819 * CPT1xCR EXEV10CPT LL_HRTIM_TIM_SetCaptureTrig\n
3820 * CPT1xCR TA1SET LL_HRTIM_TIM_SetCaptureTrig\n
3821 * CPT1xCR TA1RST LL_HRTIM_TIM_SetCaptureTrig\n
3822 * CPT1xCR TACMP1 LL_HRTIM_TIM_SetCaptureTrig\n
3823 * CPT1xCR TACMP2 LL_HRTIM_TIM_SetCaptureTrig\n
3824 * CPT1xCR TB1SET LL_HRTIM_TIM_SetCaptureTrig\n
3825 * CPT1xCR TB1RST LL_HRTIM_TIM_SetCaptureTrig\n
3826 * CPT1xCR TBCMP1 LL_HRTIM_TIM_SetCaptureTrig\n
3827 * CPT1xCR TBCMP2 LL_HRTIM_TIM_SetCaptureTrig\n
3828 * CPT1xCR TC1SET LL_HRTIM_TIM_SetCaptureTrig\n
3829 * CPT1xCR TC1RST LL_HRTIM_TIM_SetCaptureTrig\n
3830 * CPT1xCR TCCMP1 LL_HRTIM_TIM_SetCaptureTrig\n
3831 * CPT1xCR TCCMP2 LL_HRTIM_TIM_SetCaptureTrig\n
3832 * CPT1xCR TD1SET LL_HRTIM_TIM_SetCaptureTrig\n
3833 * CPT1xCR TD1RST LL_HRTIM_TIM_SetCaptureTrig\n
3834 * CPT1xCR TDCMP1 LL_HRTIM_TIM_SetCaptureTrig\n
3835 * CPT1xCR TDCMP2 LL_HRTIM_TIM_SetCaptureTrig\n
3836 * CPT1xCR TE1SET LL_HRTIM_TIM_SetCaptureTrig\n
3837 * CPT1xCR TE1RST LL_HRTIM_TIM_SetCaptureTrig\n
3838 * CPT1xCR TECMP1 LL_HRTIM_TIM_SetCaptureTrig\n
3839 * CPT1xCR TECMP2 LL_HRTIM_TIM_SetCaptureTrig
3840 * @param HRTIMx High Resolution Timer instance
3841 * @param Timer This parameter can be one of the following values:
3842 * @arg @ref LL_HRTIM_TIMER_A
3843 * @arg @ref LL_HRTIM_TIMER_B
3844 * @arg @ref LL_HRTIM_TIMER_C
3845 * @arg @ref LL_HRTIM_TIMER_D
3846 * @arg @ref LL_HRTIM_TIMER_E
3847 * @param CaptureUnit This parameter can be one of the following values:
3848 * @arg @ref LL_HRTIM_CAPTUREUNIT_1
3849 * @arg @ref LL_HRTIM_CAPTUREUNIT_2
3850 * @param CaptureTrig This parameter can be a combination of the following values:
3851 * @arg @ref LL_HRTIM_CAPTURETRIG_NONE
3852 * @arg @ref LL_HRTIM_CAPTURETRIG_UPDATE
3853 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_1
3854 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_2
3855 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_3
3856 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_4
3857 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_5
3858 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_6
3859 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_7
3860 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_8
3861 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_9
3862 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_10
3863 * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_SET
3864 * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_RESET
3865 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP1
3866 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP2
3867 * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_SET
3868 * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_RESET
3869 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP1
3870 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP2
3871 * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_SET
3872 * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_RESET
3873 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP1
3874 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP2
3875 * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_SET
3876 * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_RESET
3877 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP1
3878 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP2
3879 * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_SET
3880 * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_RESET
3881 * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP1
3882 * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP2
3885 __STATIC_INLINE
void LL_HRTIM_TIM_SetCaptureTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CaptureUnit
,
3886 uint32_t CaptureTrig
)
3888 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3889 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0U].CPT1xCR
) +
3890 REG_OFFSET_TAB_TIMER
[iTimer
] + (CaptureUnit
* 4U)));
3891 WRITE_REG(*pReg
, CaptureTrig
);
3895 * @brief Get actual trigger of a capture unit for a given timer.
3896 * @rmtoll CPT1xCR SWCPT LL_HRTIM_TIM_GetCaptureTrig\n
3897 * CPT1xCR UPDCPT LL_HRTIM_TIM_GetCaptureTrig\n
3898 * CPT1xCR EXEV1CPT LL_HRTIM_TIM_GetCaptureTrig\n
3899 * CPT1xCR EXEV2CPT LL_HRTIM_TIM_GetCaptureTrig\n
3900 * CPT1xCR EXEV3CPT LL_HRTIM_TIM_GetCaptureTrig\n
3901 * CPT1xCR EXEV4CPT LL_HRTIM_TIM_GetCaptureTrig\n
3902 * CPT1xCR EXEV5CPT LL_HRTIM_TIM_GetCaptureTrig\n
3903 * CPT1xCR EXEV6CPT LL_HRTIM_TIM_GetCaptureTrig\n
3904 * CPT1xCR EXEV7CPT LL_HRTIM_TIM_GetCaptureTrig\n
3905 * CPT1xCR EXEV8CPT LL_HRTIM_TIM_GetCaptureTrig\n
3906 * CPT1xCR EXEV9CPT LL_HRTIM_TIM_GetCaptureTrig\n
3907 * CPT1xCR EXEV10CPT LL_HRTIM_TIM_GetCaptureTrig\n
3908 * CPT1xCR TA1SET LL_HRTIM_TIM_GetCaptureTrig\n
3909 * CPT1xCR TA1RST LL_HRTIM_TIM_GetCaptureTrig\n
3910 * CPT1xCR TACMP1 LL_HRTIM_TIM_GetCaptureTrig\n
3911 * CPT1xCR TACMP2 LL_HRTIM_TIM_GetCaptureTrig\n
3912 * CPT1xCR TB1SET LL_HRTIM_TIM_GetCaptureTrig\n
3913 * CPT1xCR TB1RST LL_HRTIM_TIM_GetCaptureTrig\n
3914 * CPT1xCR TBCMP1 LL_HRTIM_TIM_GetCaptureTrig\n
3915 * CPT1xCR TBCMP2 LL_HRTIM_TIM_GetCaptureTrig\n
3916 * CPT1xCR TC1SET LL_HRTIM_TIM_GetCaptureTrig\n
3917 * CPT1xCR TC1RST LL_HRTIM_TIM_GetCaptureTrig\n
3918 * CPT1xCR TCCMP1 LL_HRTIM_TIM_GetCaptureTrig\n
3919 * CPT1xCR TCCMP2 LL_HRTIM_TIM_GetCaptureTrig\n
3920 * CPT1xCR TD1SET LL_HRTIM_TIM_GetCaptureTrig\n
3921 * CPT1xCR TD1RST LL_HRTIM_TIM_GetCaptureTrig\n
3922 * CPT1xCR TDCMP1 LL_HRTIM_TIM_GetCaptureTrig\n
3923 * CPT1xCR TDCMP2 LL_HRTIM_TIM_GetCaptureTrig\n
3924 * CPT1xCR TE1SET LL_HRTIM_TIM_GetCaptureTrig\n
3925 * CPT1xCR TE1RST LL_HRTIM_TIM_GetCaptureTrig\n
3926 * CPT1xCR TECMP1 LL_HRTIM_TIM_GetCaptureTrig\n
3927 * CPT1xCR TECMP2 LL_HRTIM_TIM_GetCaptureTrig
3928 * @param HRTIMx High Resolution Timer instance
3929 * @param Timer This parameter can be one of the following values:
3930 * @arg @ref LL_HRTIM_TIMER_A
3931 * @arg @ref LL_HRTIM_TIMER_B
3932 * @arg @ref LL_HRTIM_TIMER_C
3933 * @arg @ref LL_HRTIM_TIMER_D
3934 * @arg @ref LL_HRTIM_TIMER_E
3935 * @param CaptureUnit This parameter can be one of the following values:
3936 * @arg @ref LL_HRTIM_CAPTUREUNIT_1
3937 * @arg @ref LL_HRTIM_CAPTUREUNIT_2
3938 * @retval CaptureTrig This parameter can be a combination of the following values:
3939 * @arg @ref LL_HRTIM_CAPTURETRIG_NONE
3940 * @arg @ref LL_HRTIM_CAPTURETRIG_UPDATE
3941 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_1
3942 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_2
3943 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_3
3944 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_4
3945 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_5
3946 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_6
3947 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_7
3948 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_8
3949 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_9
3950 * @arg @ref LL_HRTIM_CAPTURETRIG_EEV_10
3951 * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_SET
3952 * @arg @ref LL_HRTIM_CAPTURETRIG_TA1_RESET
3953 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP1
3954 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMA_CMP2
3955 * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_SET
3956 * @arg @ref LL_HRTIM_CAPTURETRIG_TB1_RESET
3957 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP1
3958 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMB_CMP2
3959 * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_SET
3960 * @arg @ref LL_HRTIM_CAPTURETRIG_TC1_RESET
3961 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP1
3962 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMC_CMP2
3963 * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_SET
3964 * @arg @ref LL_HRTIM_CAPTURETRIG_TD1_RESET
3965 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP1
3966 * @arg @ref LL_HRTIM_CAPTURETRIG_TIMD_CMP2
3967 * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_SET
3968 * @arg @ref LL_HRTIM_CAPTURETRIG_TE1_RESET
3969 * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP1
3970 * @arg @ref LL_HRTIM_CAPTURETRIG_TIME_CMP2
3972 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCaptureTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t CaptureUnit
)
3974 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3975 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0U].CPT1xCR
) +
3976 REG_OFFSET_TAB_TIMER
[iTimer
] + (CaptureUnit
* 4U)));
3977 return (READ_REG(*pReg
));
3981 * @brief Enable deadtime insertion for a given timer.
3982 * @rmtoll OUTxR DTEN LL_HRTIM_TIM_EnableDeadTime
3983 * @param HRTIMx High Resolution Timer instance
3984 * @param Timer This parameter can be one of the following values:
3985 * @arg @ref LL_HRTIM_TIMER_A
3986 * @arg @ref LL_HRTIM_TIMER_B
3987 * @arg @ref LL_HRTIM_TIMER_C
3988 * @arg @ref LL_HRTIM_TIMER_D
3989 * @arg @ref LL_HRTIM_TIMER_E
3992 __STATIC_INLINE
void LL_HRTIM_TIM_EnableDeadTime(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
3994 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
3995 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
3996 REG_OFFSET_TAB_TIMER
[iTimer
]));
3997 SET_BIT(*pReg
, HRTIM_OUTR_DTEN
);
4001 * @brief Disable deadtime insertion for a given timer.
4002 * @rmtoll OUTxR DTEN LL_HRTIM_TIM_DisableDeadTime
4003 * @param HRTIMx High Resolution Timer instance
4004 * @param Timer This parameter can be one of the following values:
4005 * @arg @ref LL_HRTIM_TIMER_A
4006 * @arg @ref LL_HRTIM_TIMER_B
4007 * @arg @ref LL_HRTIM_TIMER_C
4008 * @arg @ref LL_HRTIM_TIMER_D
4009 * @arg @ref LL_HRTIM_TIMER_E
4012 __STATIC_INLINE
void LL_HRTIM_TIM_DisableDeadTime(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4014 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4015 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
4016 REG_OFFSET_TAB_TIMER
[iTimer
]));
4017 CLEAR_BIT(*pReg
, HRTIM_OUTR_DTEN
);
4021 * @brief Indicate whether deadtime insertion is enabled for a given timer.
4022 * @rmtoll OUTxR DTEN LL_HRTIM_TIM_IsEnabledDeadTime
4023 * @param HRTIMx High Resolution Timer instance
4024 * @param Timer This parameter can be one of the following values:
4025 * @arg @ref LL_HRTIM_TIMER_A
4026 * @arg @ref LL_HRTIM_TIMER_B
4027 * @arg @ref LL_HRTIM_TIMER_C
4028 * @arg @ref LL_HRTIM_TIMER_D
4029 * @arg @ref LL_HRTIM_TIMER_E
4030 * @retval State of DTEN bit in HRTIM_OUTxR register (1 or 0).
4032 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledDeadTime(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4034 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4035 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
4036 REG_OFFSET_TAB_TIMER
[iTimer
]));
4038 return ((READ_BIT(*pReg
, HRTIM_OUTR_DTEN
) == (HRTIM_OUTR_DTEN
)) ? 1UL : 0UL);
4042 * @brief Set the delayed protection (DLYPRT) mode.
4043 * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_SetDLYPRTMode\n
4044 * OUTxR DLYPRT LL_HRTIM_TIM_SetDLYPRTMode
4045 * @note This function must be called prior enabling the delayed protection
4046 * @note Balanced Idle mode is only available in push-pull mode
4047 * @param HRTIMx High Resolution Timer instance
4048 * @param Timer This parameter can be one of the following values:
4049 * @arg @ref LL_HRTIM_TIMER_A
4050 * @arg @ref LL_HRTIM_TIMER_B
4051 * @arg @ref LL_HRTIM_TIMER_C
4052 * @arg @ref LL_HRTIM_TIMER_D
4053 * @arg @ref LL_HRTIM_TIMER_E
4054 * @param DLYPRTMode Delayed protection (DLYPRT) mode
4056 * For timers A, B and C this parameter can be one of the following values:
4057 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV6
4058 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV6
4059 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV6
4060 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV6
4061 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV7
4062 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV7
4063 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV7
4064 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV7
4066 * For timers D and E this parameter can be one of the following values:
4067 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV8
4068 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV8
4069 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV8
4070 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV8
4071 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV9
4072 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV9
4073 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV9
4074 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV9
4077 __STATIC_INLINE
void LL_HRTIM_TIM_SetDLYPRTMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t DLYPRTMode
)
4079 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4080 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
4081 REG_OFFSET_TAB_TIMER
[iTimer
]));
4082 MODIFY_REG(*pReg
, HRTIM_OUTR_DLYPRT
, DLYPRTMode
);
4086 * @brief Get the delayed protection (DLYPRT) mode.
4087 * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_GetDLYPRTMode\n
4088 * OUTxR DLYPRT LL_HRTIM_TIM_GetDLYPRTMode
4089 * @param HRTIMx High Resolution Timer instance
4090 * @param Timer This parameter can be one of the following values:
4091 * @arg @ref LL_HRTIM_TIMER_A
4092 * @arg @ref LL_HRTIM_TIMER_B
4093 * @arg @ref LL_HRTIM_TIMER_C
4094 * @arg @ref LL_HRTIM_TIMER_D
4095 * @arg @ref LL_HRTIM_TIMER_E
4096 * @retval DLYPRTMode Delayed protection (DLYPRT) mode
4098 * For timers A, B and C this parameter can be one of the following values:
4099 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV6
4100 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV6
4101 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV6
4102 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV6
4103 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV7
4104 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV7
4105 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV7
4106 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV7
4108 * For timers D and E this parameter can be one of the following values:
4109 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV8
4110 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV8
4111 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV8
4112 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV8
4113 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT1_EEV9
4114 * @arg @ref LL_HRTIM_DLYPRT_DELAYOUT2_EEV9
4115 * @arg @ref LL_HRTIM_DLYPRT_DELAYBOTH_EEV9
4116 * @arg @ref LL_HRTIM_DLYPRT_BALANCED_EEV9
4118 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetDLYPRTMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4120 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4121 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
4122 REG_OFFSET_TAB_TIMER
[iTimer
]));
4123 return (READ_BIT(*pReg
, HRTIM_OUTR_DLYPRT
));
4127 * @brief Enable delayed protection (DLYPRT) for a given timer.
4128 * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_EnableDLYPRT
4129 * @note This function must not be called once the concerned timer is enabled
4130 * @param HRTIMx High Resolution Timer instance
4131 * @param Timer This parameter can be one of the following values:
4132 * @arg @ref LL_HRTIM_TIMER_A
4133 * @arg @ref LL_HRTIM_TIMER_B
4134 * @arg @ref LL_HRTIM_TIMER_C
4135 * @arg @ref LL_HRTIM_TIMER_D
4136 * @arg @ref LL_HRTIM_TIMER_E
4139 __STATIC_INLINE
void LL_HRTIM_TIM_EnableDLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4141 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4142 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
4143 REG_OFFSET_TAB_TIMER
[iTimer
]));
4144 SET_BIT(*pReg
, HRTIM_OUTR_DLYPRTEN
);
4148 * @brief Disable delayed protection (DLYPRT) for a given timer.
4149 * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_DisableDLYPRT
4150 * @note This function must not be called once the concerned timer is enabled
4151 * @param HRTIMx High Resolution Timer instance
4152 * @param Timer This parameter can be one of the following values:
4153 * @arg @ref LL_HRTIM_TIMER_A
4154 * @arg @ref LL_HRTIM_TIMER_B
4155 * @arg @ref LL_HRTIM_TIMER_C
4156 * @arg @ref LL_HRTIM_TIMER_D
4157 * @arg @ref LL_HRTIM_TIMER_E
4160 __STATIC_INLINE
void LL_HRTIM_TIM_DisableDLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4162 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4163 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
4164 REG_OFFSET_TAB_TIMER
[iTimer
]));
4165 CLEAR_BIT(*pReg
, HRTIM_OUTR_DLYPRTEN
);
4169 * @brief Indicate whether delayed protection (DLYPRT) is enabled for a given timer.
4170 * @rmtoll OUTxR DLYPRTEN LL_HRTIM_TIM_IsEnabledDLYPRT
4171 * @param HRTIMx High Resolution Timer instance
4172 * @param Timer This parameter can be one of the following values:
4173 * @arg @ref LL_HRTIM_TIMER_A
4174 * @arg @ref LL_HRTIM_TIMER_B
4175 * @arg @ref LL_HRTIM_TIMER_C
4176 * @arg @ref LL_HRTIM_TIMER_D
4177 * @arg @ref LL_HRTIM_TIMER_E
4178 * @retval State of DLYPRTEN bit in HRTIM_OUTxR register (1 or 0).
4180 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledDLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4182 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4183 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
4184 REG_OFFSET_TAB_TIMER
[iTimer
]));
4185 return ((READ_BIT(*pReg
, HRTIM_OUTR_DLYPRTEN
) == (HRTIM_OUTR_DLYPRTEN
)) ? 1UL : 0UL);
4189 * @brief Enable the fault channel(s) for a given timer.
4190 * @rmtoll FLTxR FLT1EN LL_HRTIM_TIM_EnableFault\n
4191 * FLTxR FLT2EN LL_HRTIM_TIM_EnableFault\n
4192 * FLTxR FLT3EN LL_HRTIM_TIM_EnableFault\n
4193 * FLTxR FLT4EN LL_HRTIM_TIM_EnableFault\n
4194 * FLTxR FLT5EN LL_HRTIM_TIM_EnableFault
4195 * @param HRTIMx High Resolution Timer instance
4196 * @param Timer This parameter can be one of the following values:
4197 * @arg @ref LL_HRTIM_TIMER_A
4198 * @arg @ref LL_HRTIM_TIMER_B
4199 * @arg @ref LL_HRTIM_TIMER_C
4200 * @arg @ref LL_HRTIM_TIMER_D
4201 * @arg @ref LL_HRTIM_TIMER_E
4202 * @param Faults This parameter can be a combination of the following values:
4203 * @arg @ref LL_HRTIM_FAULT_1
4204 * @arg @ref LL_HRTIM_FAULT_2
4205 * @arg @ref LL_HRTIM_FAULT_3
4206 * @arg @ref LL_HRTIM_FAULT_4
4207 * @arg @ref LL_HRTIM_FAULT_5
4210 __STATIC_INLINE
void LL_HRTIM_TIM_EnableFault(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Faults
)
4212 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4213 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].FLTxR
) +
4214 REG_OFFSET_TAB_TIMER
[iTimer
]));
4215 SET_BIT(*pReg
, Faults
);
4219 * @brief Disable the fault channel(s) for a given timer.
4220 * @rmtoll FLTxR FLT1EN LL_HRTIM_TIM_DisableFault\n
4221 * FLTxR FLT2EN LL_HRTIM_TIM_DisableFault\n
4222 * FLTxR FLT3EN LL_HRTIM_TIM_DisableFault\n
4223 * FLTxR FLT4EN LL_HRTIM_TIM_DisableFault\n
4224 * FLTxR FLT5EN LL_HRTIM_TIM_DisableFault
4225 * @param HRTIMx High Resolution Timer instance
4226 * @param Timer This parameter can be one of the following values:
4227 * @arg @ref LL_HRTIM_TIMER_A
4228 * @arg @ref LL_HRTIM_TIMER_B
4229 * @arg @ref LL_HRTIM_TIMER_C
4230 * @arg @ref LL_HRTIM_TIMER_D
4231 * @arg @ref LL_HRTIM_TIMER_E
4232 * @param Faults This parameter can be a combination of the following values:
4233 * @arg @ref LL_HRTIM_FAULT_1
4234 * @arg @ref LL_HRTIM_FAULT_2
4235 * @arg @ref LL_HRTIM_FAULT_3
4236 * @arg @ref LL_HRTIM_FAULT_4
4237 * @arg @ref LL_HRTIM_FAULT_5
4240 __STATIC_INLINE
void LL_HRTIM_TIM_DisableFault(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Faults
)
4242 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4243 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].FLTxR
) +
4244 REG_OFFSET_TAB_TIMER
[iTimer
]));
4245 CLEAR_BIT(*pReg
, Faults
);
4249 * @brief Indicate whether the fault channel is enabled for a given timer.
4250 * @rmtoll FLTxR FLT1EN LL_HRTIM_TIM_IsEnabledFault\n
4251 * FLTxR FLT2EN LL_HRTIM_TIM_IsEnabledFault\n
4252 * FLTxR FLT3EN LL_HRTIM_TIM_IsEnabledFault\n
4253 * FLTxR FLT4EN LL_HRTIM_TIM_IsEnabledFault\n
4254 * FLTxR FLT5EN LL_HRTIM_TIM_IsEnabledFault
4255 * @param HRTIMx High Resolution Timer instance
4256 * @param Timer This parameter can be one of the following values:
4257 * @arg @ref LL_HRTIM_TIMER_A
4258 * @arg @ref LL_HRTIM_TIMER_B
4259 * @arg @ref LL_HRTIM_TIMER_C
4260 * @arg @ref LL_HRTIM_TIMER_D
4261 * @arg @ref LL_HRTIM_TIMER_E
4262 * @param Fault This parameter can be one of the following values:
4263 * @arg @ref LL_HRTIM_FAULT_1
4264 * @arg @ref LL_HRTIM_FAULT_2
4265 * @arg @ref LL_HRTIM_FAULT_3
4266 * @arg @ref LL_HRTIM_FAULT_4
4267 * @arg @ref LL_HRTIM_FAULT_5
4268 * @retval State of FLTxEN bit in HRTIM_FLTxR register (1 or 0).
4270 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_IsEnabledFault(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Fault
)
4272 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4273 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].FLTxR
) +
4274 REG_OFFSET_TAB_TIMER
[iTimer
]));
4276 return ((READ_BIT(*pReg
, Fault
) == (Fault
)) ? 1UL : 0UL);
4280 * @brief Lock the fault conditioning set-up for a given timer.
4281 * @rmtoll FLTxR FLTLCK LL_HRTIM_TIM_LockFault
4282 * @note Timer fault-related set-up is frozen until the next HRTIM or system reset
4283 * @param HRTIMx High Resolution Timer instance
4284 * @param Timer This parameter can be one of the following values:
4285 * @arg @ref LL_HRTIM_TIMER_A
4286 * @arg @ref LL_HRTIM_TIMER_B
4287 * @arg @ref LL_HRTIM_TIMER_C
4288 * @arg @ref LL_HRTIM_TIMER_D
4289 * @arg @ref LL_HRTIM_TIMER_E
4292 __STATIC_INLINE
void LL_HRTIM_TIM_LockFault(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4294 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4295 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].FLTxR
) +
4296 REG_OFFSET_TAB_TIMER
[iTimer
]));
4297 SET_BIT(*pReg
, HRTIM_FLTR_FLTLCK
);
4301 * @brief Define how the timer behaves during a burst mode operation.
4302 * @rmtoll BMCR MTBM LL_HRTIM_TIM_SetBurstModeOption\n
4303 * BMCR TABM LL_HRTIM_TIM_SetBurstModeOption\n
4304 * BMCR TBBM LL_HRTIM_TIM_SetBurstModeOption\n
4305 * BMCR TCBM LL_HRTIM_TIM_SetBurstModeOption\n
4306 * BMCR TDBM LL_HRTIM_TIM_SetBurstModeOption\n
4307 * BMCR TEBM LL_HRTIM_TIM_SetBurstModeOption
4308 * @note This function must not be called when the burst mode is enabled
4309 * @param HRTIMx High Resolution Timer instance
4310 * @param Timer This parameter can be one of the following values:
4311 * @arg @ref LL_HRTIM_TIMER_MASTER
4312 * @arg @ref LL_HRTIM_TIMER_A
4313 * @arg @ref LL_HRTIM_TIMER_B
4314 * @arg @ref LL_HRTIM_TIMER_C
4315 * @arg @ref LL_HRTIM_TIMER_D
4316 * @arg @ref LL_HRTIM_TIMER_E
4317 * @param BurtsModeOption This parameter can be one of the following values:
4318 * @arg @ref LL_HRTIM_BURSTMODE_MAINTAINCLOCK
4319 * @arg @ref LL_HRTIM_BURSTMODE_RESETCOUNTER
4322 __STATIC_INLINE
void LL_HRTIM_TIM_SetBurstModeOption(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t BurtsModeOption
)
4324 register uint32_t iTimer
= (uint8_t)((POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
) & 0x1FU
);
4325 MODIFY_REG(HRTIMx
->sCommonRegs
.BMCR
, Timer
, BurtsModeOption
<< iTimer
);
4329 * @brief Retrieve how the timer behaves during a burst mode operation.
4330 * @rmtoll BMCR MCR LL_HRTIM_TIM_GetBurstModeOption\n
4331 * BMCR TABM LL_HRTIM_TIM_GetBurstModeOption\n
4332 * BMCR TBBM LL_HRTIM_TIM_GetBurstModeOption\n
4333 * BMCR TCBM LL_HRTIM_TIM_GetBurstModeOption\n
4334 * BMCR TDBM LL_HRTIM_TIM_GetBurstModeOption\n
4335 * BMCR TEBM LL_HRTIM_TIM_GetBurstModeOption
4336 * @param HRTIMx High Resolution Timer instance
4337 * @param Timer This parameter can be one of the following values:
4338 * @arg @ref LL_HRTIM_TIMER_MASTER
4339 * @arg @ref LL_HRTIM_TIMER_A
4340 * @arg @ref LL_HRTIM_TIMER_B
4341 * @arg @ref LL_HRTIM_TIMER_C
4342 * @arg @ref LL_HRTIM_TIMER_D
4343 * @arg @ref LL_HRTIM_TIMER_E
4344 * @retval BurtsMode This parameter can be one of the following values:
4345 * @arg @ref LL_HRTIM_BURSTMODE_MAINTAINCLOCK
4346 * @arg @ref LL_HRTIM_BURSTMODE_RESETCOUNTER
4348 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetBurstModeOption(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4350 register uint32_t iTimer
= (uint8_t)((POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
) & 0x1FU
);
4351 return (READ_BIT(HRTIMx
->sCommonRegs
.BMCR
, Timer
) >> iTimer
);
4355 * @brief Program which registers are to be written by Burst DMA transfers.
4356 * @rmtoll BDMUPDR MTBM LL_HRTIM_TIM_ConfigBurstDMA\n
4357 * BDMUPDR MICR LL_HRTIM_TIM_ConfigBurstDMA\n
4358 * BDMUPDR MDIER LL_HRTIM_TIM_ConfigBurstDMA\n
4359 * BDMUPDR MCNT LL_HRTIM_TIM_ConfigBurstDMA\n
4360 * BDMUPDR MPER LL_HRTIM_TIM_ConfigBurstDMA\n
4361 * BDMUPDR MREP LL_HRTIM_TIM_ConfigBurstDMA\n
4362 * BDMUPDR MCMP1 LL_HRTIM_TIM_ConfigBurstDMA\n
4363 * BDMUPDR MCMP2 LL_HRTIM_TIM_ConfigBurstDMA\n
4364 * BDMUPDR MCMP3 LL_HRTIM_TIM_ConfigBurstDMA\n
4365 * BDMUPDR MCMP4 LL_HRTIM_TIM_ConfigBurstDMA\n
4366 * BDTxUPDR TIMxCR LL_HRTIM_TIM_ConfigBurstDMA\n
4367 * BDTxUPDR TIMxICR LL_HRTIM_TIM_ConfigBurstDMA\n
4368 * BDTxUPDR TIMxDIER LL_HRTIM_TIM_ConfigBurstDMA\n
4369 * BDTxUPDR TIMxCNT LL_HRTIM_TIM_ConfigBurstDMA\n
4370 * BDTxUPDR TIMxPER LL_HRTIM_TIM_ConfigBurstDMA\n
4371 * BDTxUPDR TIMxREP LL_HRTIM_TIM_ConfigBurstDMA\n
4372 * BDTxUPDR TIMxCMP1 LL_HRTIM_TIM_ConfigBurstDMA\n
4373 * BDTxUPDR TIMxCMP2 LL_HRTIM_TIM_ConfigBurstDMA\n
4374 * BDTxUPDR TIMxCMP3 LL_HRTIM_TIM_ConfigBurstDMA\n
4375 * BDTxUPDR TIMxCMP4 LL_HRTIM_TIM_ConfigBurstDMA\n
4376 * BDTxUPDR TIMxDTR LL_HRTIM_TIM_ConfigBurstDMA\n
4377 * BDTxUPDR TIMxSET1R LL_HRTIM_TIM_ConfigBurstDMA\n
4378 * BDTxUPDR TIMxRST1R LL_HRTIM_TIM_ConfigBurstDMA\n
4379 * BDTxUPDR TIMxSET2R LL_HRTIM_TIM_ConfigBurstDMA\n
4380 * BDTxUPDR TIMxRST2R LL_HRTIM_TIM_ConfigBurstDMA\n
4381 * BDTxUPDR TIMxEEFR1 LL_HRTIM_TIM_ConfigBurstDMA\n
4382 * BDTxUPDR TIMxEEFR2 LL_HRTIM_TIM_ConfigBurstDMA\n
4383 * BDTxUPDR TIMxRSTR LL_HRTIM_TIM_ConfigBurstDMA\n
4384 * BDTxUPDR TIMxOUTR LL_HRTIM_TIM_ConfigBurstDMA\n
4385 * BDTxUPDR TIMxLTCH LL_HRTIM_TIM_ConfigBurstDMA
4386 * @param HRTIMx High Resolution Timer instance
4387 * @param Timer This parameter can be one of the following values:
4388 * @arg @ref LL_HRTIM_TIMER_MASTER
4389 * @arg @ref LL_HRTIM_TIMER_A
4390 * @arg @ref LL_HRTIM_TIMER_B
4391 * @arg @ref LL_HRTIM_TIMER_C
4392 * @arg @ref LL_HRTIM_TIMER_D
4393 * @arg @ref LL_HRTIM_TIMER_E
4394 * @param Registers Registers to be updated by the DMA request
4396 * For Master timer this parameter can be can be a combination of the following values:
4397 * @arg @ref LL_HRTIM_BURSTDMA_NONE
4398 * @arg @ref LL_HRTIM_BURSTDMA_MCR
4399 * @arg @ref LL_HRTIM_BURSTDMA_MICR
4400 * @arg @ref LL_HRTIM_BURSTDMA_MDIER
4401 * @arg @ref LL_HRTIM_BURSTDMA_MCNT
4402 * @arg @ref LL_HRTIM_BURSTDMA_MPER
4403 * @arg @ref LL_HRTIM_BURSTDMA_MREP
4404 * @arg @ref LL_HRTIM_BURSTDMA_MCMP1
4405 * @arg @ref LL_HRTIM_BURSTDMA_MCMP2
4406 * @arg @ref LL_HRTIM_BURSTDMA_MCMP3
4407 * @arg @ref LL_HRTIM_BURSTDMA_MCMP4
4409 * For Timers A..E this parameter can be can be a combination of the following values:
4410 * @arg @ref LL_HRTIM_BURSTDMA_NONE
4411 * @arg @ref LL_HRTIM_BURSTDMA_TIMMCR
4412 * @arg @ref LL_HRTIM_BURSTDMA_TIMICR
4413 * @arg @ref LL_HRTIM_BURSTDMA_TIMDIER
4414 * @arg @ref LL_HRTIM_BURSTDMA_TIMCNT
4415 * @arg @ref LL_HRTIM_BURSTDMA_TIMPER
4416 * @arg @ref LL_HRTIM_BURSTDMA_TIMREP
4417 * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP1
4418 * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP2
4419 * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP3
4420 * @arg @ref LL_HRTIM_BURSTDMA_TIMCMP4
4421 * @arg @ref LL_HRTIM_BURSTDMA_TIMDTR
4422 * @arg @ref LL_HRTIM_BURSTDMA_TIMSET1R
4423 * @arg @ref LL_HRTIM_BURSTDMA_TIMRST1R
4424 * @arg @ref LL_HRTIM_BURSTDMA_TIMSET2R
4425 * @arg @ref LL_HRTIM_BURSTDMA_TIMRST2R
4426 * @arg @ref LL_HRTIM_BURSTDMA_TIMEEFR1
4427 * @arg @ref LL_HRTIM_BURSTDMA_TIMEEFR2
4428 * @arg @ref LL_HRTIM_BURSTDMA_TIMRSTR
4429 * @arg @ref LL_HRTIM_BURSTDMA_TIMCHPR
4430 * @arg @ref LL_HRTIM_BURSTDMA_TIMOUTR
4431 * @arg @ref LL_HRTIM_BURSTDMA_TIMFLTR
4434 __STATIC_INLINE
void LL_HRTIM_TIM_ConfigBurstDMA(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Registers
)
4437 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
4438 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.BDMUPR
) + (4U * iTimer
)));
4439 WRITE_REG(*pReg
, Registers
);
4443 * @brief Indicate on which output the signal is currently applied.
4444 * @rmtoll TIMxISR CPPSTAT LL_HRTIM_TIM_GetCurrentPushPullStatus
4445 * @note Only significant when the timer operates in push-pull mode.
4446 * @param HRTIMx High Resolution Timer instance
4447 * @param Timer This parameter can be one of the following values:
4448 * @arg @ref LL_HRTIM_TIMER_A
4449 * @arg @ref LL_HRTIM_TIMER_B
4450 * @arg @ref LL_HRTIM_TIMER_C
4451 * @arg @ref LL_HRTIM_TIMER_D
4452 * @arg @ref LL_HRTIM_TIMER_E
4453 * @retval CPPSTAT This parameter can be one of the following values:
4454 * @arg @ref LL_HRTIM_CPPSTAT_OUTPUT1
4455 * @arg @ref LL_HRTIM_CPPSTAT_OUTPUT2
4457 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetCurrentPushPullStatus(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4459 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
4460 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
4461 REG_OFFSET_TAB_TIMER
[iTimer
]));
4462 return (READ_BIT(*pReg
, HRTIM_TIMISR_CPPSTAT
));
4466 * @brief Indicate on which output the signal was applied, in push-pull mode, balanced fault mode or delayed idle mode, when the protection was triggered.
4467 * @rmtoll TIMxISR IPPSTAT LL_HRTIM_TIM_GetIdlePushPullStatus
4468 * @param HRTIMx High Resolution Timer instance
4469 * @param Timer This parameter can be one of the following values:
4470 * @arg @ref LL_HRTIM_TIMER_A
4471 * @arg @ref LL_HRTIM_TIMER_B
4472 * @arg @ref LL_HRTIM_TIMER_C
4473 * @arg @ref LL_HRTIM_TIMER_D
4474 * @arg @ref LL_HRTIM_TIMER_E
4475 * @retval IPPSTAT This parameter can be one of the following values:
4476 * @arg @ref LL_HRTIM_IPPSTAT_OUTPUT1
4477 * @arg @ref LL_HRTIM_IPPSTAT_OUTPUT2
4479 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetIdlePushPullStatus(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4481 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
4482 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
4483 REG_OFFSET_TAB_TIMER
[iTimer
]));
4484 return (READ_BIT(*pReg
, HRTIM_TIMISR_IPPSTAT
));
4488 * @brief Set the event filter for a given timer.
4489 * @rmtoll EEFxR1 EE1LTCH LL_HRTIM_TIM_SetEventFilter\n
4490 * EEFxR1 EE2LTCH LL_HRTIM_TIM_SetEventFilter\n
4491 * EEFxR1 EE3LTCH LL_HRTIM_TIM_SetEventFilter\n
4492 * EEFxR1 EE4LTCH LL_HRTIM_TIM_SetEventFilter\n
4493 * EEFxR1 EE5LTCH LL_HRTIM_TIM_SetEventFilter\n
4494 * EEFxR2 EE6LTCH LL_HRTIM_TIM_SetEventFilter\n
4495 * EEFxR2 EE7LTCH LL_HRTIM_TIM_SetEventFilter\n
4496 * EEFxR2 EE8LTCH LL_HRTIM_TIM_SetEventFilter\n
4497 * EEFxR2 EE9LTCH LL_HRTIM_TIM_SetEventFilter\n
4498 * EEFxR2 EE10LTCH LL_HRTIM_TIM_SetEventFilter
4499 * @note This function must not be called when the timer counter is enabled.
4500 * @param HRTIMx High Resolution Timer instance
4501 * @param Timer This parameter can be one of the following values:
4502 * @arg @ref LL_HRTIM_TIMER_A
4503 * @arg @ref LL_HRTIM_TIMER_B
4504 * @arg @ref LL_HRTIM_TIMER_C
4505 * @arg @ref LL_HRTIM_TIMER_D
4506 * @arg @ref LL_HRTIM_TIMER_E
4507 * @param Event This parameter can be one of the following values:
4508 * @arg @ref LL_HRTIM_EVENT_1
4509 * @arg @ref LL_HRTIM_EVENT_2
4510 * @arg @ref LL_HRTIM_EVENT_3
4511 * @arg @ref LL_HRTIM_EVENT_4
4512 * @arg @ref LL_HRTIM_EVENT_5
4513 * @arg @ref LL_HRTIM_EVENT_6
4514 * @arg @ref LL_HRTIM_EVENT_7
4515 * @arg @ref LL_HRTIM_EVENT_8
4516 * @arg @ref LL_HRTIM_EVENT_9
4517 * @arg @ref LL_HRTIM_EVENT_10
4518 * @param Filter This parameter can be one of the following values:
4519 * @arg @ref LL_HRTIM_EEFLTR_NONE
4520 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP1
4521 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP2
4522 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP3
4523 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP4
4524 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR1
4525 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR2
4526 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR3
4527 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR4
4528 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR5
4529 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR6
4530 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR7
4531 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR8
4532 * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP2
4533 * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP3
4534 * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGTIM
4538 __STATIC_INLINE
void LL_HRTIM_TIM_SetEventFilter(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Event
, uint32_t Filter
)
4540 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - POSITION_VAL(LL_HRTIM_TIMER_A
));
4541 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
4542 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].EEFxR1
) +
4543 REG_OFFSET_TAB_TIMER
[iTimer
] + REG_OFFSET_TAB_EECR
[iEvent
]));
4544 MODIFY_REG(*pReg
, (HRTIM_EEFR1_EE1FLTR
<< REG_SHIFT_TAB_EExSRC
[iEvent
]), (Filter
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
4548 * @brief Get actual event filter settings for a given timer.
4549 * @rmtoll EEFxR1 EE1FLTR LL_HRTIM_TIM_GetEventFilter\n
4550 * EEFxR1 EE2FLTR LL_HRTIM_TIM_GetEventFilter\n
4551 * EEFxR1 EE3FLTR LL_HRTIM_TIM_GetEventFilter\n
4552 * EEFxR1 EE4FLTR LL_HRTIM_TIM_GetEventFilter\n
4553 * EEFxR1 EE5FLTR LL_HRTIM_TIM_GetEventFilter\n
4554 * EEFxR2 EE6FLTR LL_HRTIM_TIM_GetEventFilter\n
4555 * EEFxR2 EE7FLTR LL_HRTIM_TIM_GetEventFilter\n
4556 * EEFxR2 EE8FLTR LL_HRTIM_TIM_GetEventFilter\n
4557 * EEFxR2 EE9FLTR LL_HRTIM_TIM_GetEventFilter\n
4558 * EEFxR2 EE10FLTR LL_HRTIM_TIM_GetEventFilter
4559 * @param HRTIMx High Resolution Timer instance
4560 * @param Timer This parameter can be one of the following values:
4561 * @arg @ref LL_HRTIM_TIMER_A
4562 * @arg @ref LL_HRTIM_TIMER_B
4563 * @arg @ref LL_HRTIM_TIMER_C
4564 * @arg @ref LL_HRTIM_TIMER_D
4565 * @arg @ref LL_HRTIM_TIMER_E
4566 * @param Event This parameter can be one of the following values:
4567 * @arg @ref LL_HRTIM_EVENT_1
4568 * @arg @ref LL_HRTIM_EVENT_2
4569 * @arg @ref LL_HRTIM_EVENT_3
4570 * @arg @ref LL_HRTIM_EVENT_4
4571 * @arg @ref LL_HRTIM_EVENT_5
4572 * @arg @ref LL_HRTIM_EVENT_6
4573 * @arg @ref LL_HRTIM_EVENT_7
4574 * @arg @ref LL_HRTIM_EVENT_8
4575 * @arg @ref LL_HRTIM_EVENT_9
4576 * @arg @ref LL_HRTIM_EVENT_10
4577 * @retval Filter This parameter can be one of the following values:
4578 * @arg @ref LL_HRTIM_EEFLTR_NONE
4579 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP1
4580 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP2
4581 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP3
4582 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGCMP4
4583 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR1
4584 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR2
4585 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR3
4586 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR4
4587 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR5
4588 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR6
4589 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR7
4590 * @arg @ref LL_HRTIM_EEFLTR_BLANKINGFLTR8
4591 * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP2
4592 * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGCMP3
4593 * @arg @ref LL_HRTIM_EEFLTR_WINDOWINGTIM
4595 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetEventFilter(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Event
)
4597 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - POSITION_VAL(LL_HRTIM_TIMER_A
));
4598 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
4599 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].EEFxR1
) +
4600 REG_OFFSET_TAB_TIMER
[iTimer
] + REG_OFFSET_TAB_EECR
[iEvent
]));
4601 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_EEFR1_EE1FLTR
) << (REG_SHIFT_TAB_EExSRC
[iEvent
])) >> (REG_SHIFT_TAB_EExSRC
[iEvent
]));
4605 * @brief Enable or disable event latch mechanism for a given timer.
4606 * @rmtoll EEFxR1 EE1LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4607 * EEFxR1 EE2LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4608 * EEFxR1 EE3LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4609 * EEFxR1 EE4LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4610 * EEFxR1 EE5LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4611 * EEFxR2 EE6LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4612 * EEFxR2 EE7LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4613 * EEFxR2 EE8LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4614 * EEFxR2 EE9LTCH LL_HRTIM_TIM_SetEventLatchStatus\n
4615 * EEFxR2 EE10LTCH LL_HRTIM_TIM_SetEventLatchStatus
4616 * @note This function must not be called when the timer counter is enabled.
4617 * @param HRTIMx High Resolution Timer instance
4618 * @param Timer This parameter can be one of the following values:
4619 * @arg @ref LL_HRTIM_TIMER_A
4620 * @arg @ref LL_HRTIM_TIMER_B
4621 * @arg @ref LL_HRTIM_TIMER_C
4622 * @arg @ref LL_HRTIM_TIMER_D
4623 * @arg @ref LL_HRTIM_TIMER_E
4624 * @param Event This parameter can be one of the following values:
4625 * @arg @ref LL_HRTIM_EVENT_1
4626 * @arg @ref LL_HRTIM_EVENT_2
4627 * @arg @ref LL_HRTIM_EVENT_3
4628 * @arg @ref LL_HRTIM_EVENT_4
4629 * @arg @ref LL_HRTIM_EVENT_5
4630 * @arg @ref LL_HRTIM_EVENT_6
4631 * @arg @ref LL_HRTIM_EVENT_7
4632 * @arg @ref LL_HRTIM_EVENT_8
4633 * @arg @ref LL_HRTIM_EVENT_9
4634 * @arg @ref LL_HRTIM_EVENT_10
4635 * @param LatchStatus This parameter can be one of the following values:
4636 * @arg @ref LL_HRTIM_EELATCH_DISABLED
4637 * @arg @ref LL_HRTIM_EELATCH_ENABLED
4640 __STATIC_INLINE
void LL_HRTIM_TIM_SetEventLatchStatus(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Event
,
4641 uint32_t LatchStatus
)
4643 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - POSITION_VAL(LL_HRTIM_TIMER_A
));
4644 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
4645 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].EEFxR1
) +
4646 REG_OFFSET_TAB_TIMER
[iTimer
] + REG_OFFSET_TAB_EECR
[iEvent
]));
4647 MODIFY_REG(*pReg
, (HRTIM_EEFR1_EE1LTCH
<< REG_SHIFT_TAB_EExSRC
[iEvent
]), (LatchStatus
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
4651 * @brief Get actual event latch status for a given timer.
4652 * @rmtoll EEFxR1 EE1LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4653 * EEFxR1 EE2LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4654 * EEFxR1 EE3LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4655 * EEFxR1 EE4LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4656 * EEFxR1 EE5LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4657 * EEFxR2 EE6LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4658 * EEFxR2 EE7LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4659 * EEFxR2 EE8LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4660 * EEFxR2 EE9LTCH LL_HRTIM_TIM_GetEventLatchStatus\n
4661 * EEFxR2 EE10LTCH LL_HRTIM_TIM_GetEventLatchStatus
4662 * @param HRTIMx High Resolution Timer instance
4663 * @param Timer This parameter can be one of the following values:
4664 * @arg @ref LL_HRTIM_TIMER_A
4665 * @arg @ref LL_HRTIM_TIMER_B
4666 * @arg @ref LL_HRTIM_TIMER_C
4667 * @arg @ref LL_HRTIM_TIMER_D
4668 * @arg @ref LL_HRTIM_TIMER_E
4669 * @param Event This parameter can be one of the following values:
4670 * @arg @ref LL_HRTIM_EVENT_1
4671 * @arg @ref LL_HRTIM_EVENT_2
4672 * @arg @ref LL_HRTIM_EVENT_3
4673 * @arg @ref LL_HRTIM_EVENT_4
4674 * @arg @ref LL_HRTIM_EVENT_5
4675 * @arg @ref LL_HRTIM_EVENT_6
4676 * @arg @ref LL_HRTIM_EVENT_7
4677 * @arg @ref LL_HRTIM_EVENT_8
4678 * @arg @ref LL_HRTIM_EVENT_9
4679 * @arg @ref LL_HRTIM_EVENT_10
4680 * @retval LatchStatus This parameter can be one of the following values:
4681 * @arg @ref LL_HRTIM_EELATCH_DISABLED
4682 * @arg @ref LL_HRTIM_EELATCH_ENABLED
4684 __STATIC_INLINE
uint32_t LL_HRTIM_TIM_GetEventLatchStatus(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Event
)
4686 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - POSITION_VAL(LL_HRTIM_TIMER_A
));
4687 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
4688 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].EEFxR1
) +
4689 REG_OFFSET_TAB_TIMER
[iTimer
] + REG_OFFSET_TAB_EECR
[iEvent
]));
4690 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_EEFR1_EE1LTCH
) << REG_SHIFT_TAB_EExSRC
[iEvent
]) >> (REG_SHIFT_TAB_EExSRC
[iEvent
]));
4697 /** @defgroup HRTIM_LL_EF_Dead_Time_Configuration Dead_Time_Configuration
4702 * @brief Configure the dead time insertion feature for a given timer.
4703 * @rmtoll DTxR DTPRSC LL_HRTIM_DT_Config\n
4704 * DTxR SDTF LL_HRTIM_DT_Config\n
4705 * DTxR SDRT LL_HRTIM_DT_Config
4706 * @param HRTIMx High Resolution Timer instance
4707 * @param Timer This parameter can be one of the following values:
4708 * @arg @ref LL_HRTIM_TIMER_A
4709 * @arg @ref LL_HRTIM_TIMER_B
4710 * @arg @ref LL_HRTIM_TIMER_C
4711 * @arg @ref LL_HRTIM_TIMER_D
4712 * @arg @ref LL_HRTIM_TIMER_E
4713 * @param Configuration This parameter must be a combination of all the following values:
4714 * @arg @ref LL_HRTIM_DT_PRESCALER_MUL8 or ... or @ref LL_HRTIM_DT_PRESCALER_DIV16
4715 * @arg @ref LL_HRTIM_DT_RISING_POSITIVE or @ref LL_HRTIM_DT_RISING_NEGATIVE
4716 * @arg @ref LL_HRTIM_DT_FALLING_POSITIVE or @ref LL_HRTIM_DT_FALLING_NEGATIVE
4719 __STATIC_INLINE
void LL_HRTIM_DT_Config(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Configuration
)
4721 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4722 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4723 REG_OFFSET_TAB_TIMER
[iTimer
]));
4724 MODIFY_REG(*pReg
, HRTIM_DTR_SDTF
| HRTIM_DTR_DTPRSC
| HRTIM_DTR_SDTR
, Configuration
);
4728 * @brief Set the deadtime prescaler value.
4729 * @rmtoll DTxR DTPRSC LL_HRTIM_DT_SetPrescaler
4730 * @param HRTIMx High Resolution Timer instance
4731 * @param Timer This parameter can be one of the following values:
4732 * @arg @ref LL_HRTIM_TIMER_A
4733 * @arg @ref LL_HRTIM_TIMER_B
4734 * @arg @ref LL_HRTIM_TIMER_C
4735 * @arg @ref LL_HRTIM_TIMER_D
4736 * @arg @ref LL_HRTIM_TIMER_E
4737 * @param Prescaler This parameter can be one of the following values:
4738 * @arg @ref LL_HRTIM_DT_PRESCALER_MUL8
4739 * @arg @ref LL_HRTIM_DT_PRESCALER_MUL4
4740 * @arg @ref LL_HRTIM_DT_PRESCALER_MUL2
4741 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV1
4742 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV2
4743 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV4
4744 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV8
4745 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV16
4748 __STATIC_INLINE
void LL_HRTIM_DT_SetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Prescaler
)
4750 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4751 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4752 REG_OFFSET_TAB_TIMER
[iTimer
]));
4753 MODIFY_REG(*pReg
, HRTIM_DTR_DTPRSC
, Prescaler
);
4757 * @brief Get actual deadtime prescaler value.
4758 * @rmtoll DTxR DTPRSC LL_HRTIM_DT_GetPrescaler
4759 * @param HRTIMx High Resolution Timer instance
4760 * @param Timer This parameter can be one of the following values:
4761 * @arg @ref LL_HRTIM_TIMER_A
4762 * @arg @ref LL_HRTIM_TIMER_B
4763 * @arg @ref LL_HRTIM_TIMER_C
4764 * @arg @ref LL_HRTIM_TIMER_D
4765 * @arg @ref LL_HRTIM_TIMER_E
4766 * @retval Prescaler This parameter can be one of the following values:
4767 * @arg @ref LL_HRTIM_DT_PRESCALER_MUL8
4768 * @arg @ref LL_HRTIM_DT_PRESCALER_MUL4
4769 * @arg @ref LL_HRTIM_DT_PRESCALER_MUL2
4770 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV1
4771 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV2
4772 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV4
4773 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV8
4774 * @arg @ref LL_HRTIM_DT_PRESCALER_DIV16
4776 __STATIC_INLINE
uint32_t LL_HRTIM_DT_GetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4778 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4779 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4780 REG_OFFSET_TAB_TIMER
[iTimer
]));
4781 return (READ_BIT(*pReg
, HRTIM_DTR_DTPRSC
));
4785 * @brief Set the deadtime rising value.
4786 * @rmtoll DTxR DTR LL_HRTIM_DT_SetRisingValue
4787 * @param HRTIMx High Resolution Timer instance
4788 * @param Timer This parameter can be one of the following values:
4789 * @arg @ref LL_HRTIM_TIMER_A
4790 * @arg @ref LL_HRTIM_TIMER_B
4791 * @arg @ref LL_HRTIM_TIMER_C
4792 * @arg @ref LL_HRTIM_TIMER_D
4793 * @arg @ref LL_HRTIM_TIMER_E
4794 * @param RisingValue Value between 0 and 0x1FF
4797 __STATIC_INLINE
void LL_HRTIM_DT_SetRisingValue(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t RisingValue
)
4799 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4800 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4801 REG_OFFSET_TAB_TIMER
[iTimer
]));
4802 MODIFY_REG(*pReg
, HRTIM_DTR_DTR
, RisingValue
);
4806 * @brief Get actual deadtime rising value.
4807 * @rmtoll DTxR DTR LL_HRTIM_DT_GetRisingValue
4808 * @param HRTIMx High Resolution Timer instance
4809 * @param Timer This parameter can be one of the following values:
4810 * @arg @ref LL_HRTIM_TIMER_A
4811 * @arg @ref LL_HRTIM_TIMER_B
4812 * @arg @ref LL_HRTIM_TIMER_C
4813 * @arg @ref LL_HRTIM_TIMER_D
4814 * @arg @ref LL_HRTIM_TIMER_E
4815 * @retval RisingValue Value between 0 and 0x1FF
4817 __STATIC_INLINE
uint32_t LL_HRTIM_DT_GetRisingValue(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4819 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4820 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4821 REG_OFFSET_TAB_TIMER
[iTimer
]));
4822 return (READ_BIT(*pReg
, HRTIM_DTR_DTR
));
4826 * @brief Set the deadtime sign on rising edge.
4827 * @rmtoll DTxR SDTR LL_HRTIM_DT_SetRisingSign
4828 * @param HRTIMx High Resolution Timer instance
4829 * @param Timer This parameter can be one of the following values:
4830 * @arg @ref LL_HRTIM_TIMER_A
4831 * @arg @ref LL_HRTIM_TIMER_B
4832 * @arg @ref LL_HRTIM_TIMER_C
4833 * @arg @ref LL_HRTIM_TIMER_D
4834 * @arg @ref LL_HRTIM_TIMER_E
4835 * @param RisingSign This parameter can be one of the following values:
4836 * @arg @ref LL_HRTIM_DT_RISING_POSITIVE
4837 * @arg @ref LL_HRTIM_DT_RISING_NEGATIVE
4840 __STATIC_INLINE
void LL_HRTIM_DT_SetRisingSign(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t RisingSign
)
4842 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4843 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4844 REG_OFFSET_TAB_TIMER
[iTimer
]));
4845 MODIFY_REG(*pReg
, HRTIM_DTR_SDTR
, RisingSign
);
4849 * @brief Get actual deadtime sign on rising edge.
4850 * @rmtoll DTxR SDTR LL_HRTIM_DT_GetRisingSign
4851 * @param HRTIMx High Resolution Timer instance
4852 * @param Timer This parameter can be one of the following values:
4853 * @arg @ref LL_HRTIM_TIMER_A
4854 * @arg @ref LL_HRTIM_TIMER_B
4855 * @arg @ref LL_HRTIM_TIMER_C
4856 * @arg @ref LL_HRTIM_TIMER_D
4857 * @arg @ref LL_HRTIM_TIMER_E
4858 * @retval RisingSign This parameter can be one of the following values:
4859 * @arg @ref LL_HRTIM_DT_RISING_POSITIVE
4860 * @arg @ref LL_HRTIM_DT_RISING_NEGATIVE
4862 __STATIC_INLINE
uint32_t LL_HRTIM_DT_GetRisingSign(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4864 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4865 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4866 REG_OFFSET_TAB_TIMER
[iTimer
]));
4867 return (READ_BIT(*pReg
, HRTIM_DTR_SDTR
));
4871 * @brief Set the deadime falling value.
4872 * @rmtoll DTxR DTF LL_HRTIM_DT_SetFallingValue
4873 * @param HRTIMx High Resolution Timer instance
4874 * @param Timer This parameter can be one of the following values:
4875 * @arg @ref LL_HRTIM_TIMER_A
4876 * @arg @ref LL_HRTIM_TIMER_B
4877 * @arg @ref LL_HRTIM_TIMER_C
4878 * @arg @ref LL_HRTIM_TIMER_D
4879 * @arg @ref LL_HRTIM_TIMER_E
4880 * @param FallingValue Value between 0 and 0x1FF
4883 __STATIC_INLINE
void LL_HRTIM_DT_SetFallingValue(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t FallingValue
)
4885 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4886 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4887 REG_OFFSET_TAB_TIMER
[iTimer
]));
4888 MODIFY_REG(*pReg
, HRTIM_DTR_DTF
, FallingValue
<< HRTIM_DTR_DTF_Pos
);
4892 * @brief Get actual deadtime falling value
4893 * @rmtoll DTxR DTF LL_HRTIM_DT_GetFallingValue
4894 * @param HRTIMx High Resolution Timer instance
4895 * @param Timer This parameter can be one of the following values:
4896 * @arg @ref LL_HRTIM_TIMER_A
4897 * @arg @ref LL_HRTIM_TIMER_B
4898 * @arg @ref LL_HRTIM_TIMER_C
4899 * @arg @ref LL_HRTIM_TIMER_D
4900 * @arg @ref LL_HRTIM_TIMER_E
4901 * @retval FallingValue Value between 0 and 0x1FF
4903 __STATIC_INLINE
uint32_t LL_HRTIM_DT_GetFallingValue(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4905 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4906 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4907 REG_OFFSET_TAB_TIMER
[iTimer
]));
4908 return ((READ_BIT(*pReg
, HRTIM_DTR_DTF
)) >> HRTIM_DTR_DTF_Pos
);
4912 * @brief Set the deadtime sign on falling edge.
4913 * @rmtoll DTxR SDTF LL_HRTIM_DT_SetFallingSign
4914 * @param HRTIMx High Resolution Timer instance
4915 * @param Timer This parameter can be one of the following values:
4916 * @arg @ref LL_HRTIM_TIMER_A
4917 * @arg @ref LL_HRTIM_TIMER_B
4918 * @arg @ref LL_HRTIM_TIMER_C
4919 * @arg @ref LL_HRTIM_TIMER_D
4920 * @arg @ref LL_HRTIM_TIMER_E
4921 * @param FallingSign This parameter can be one of the following values:
4922 * @arg @ref LL_HRTIM_DT_FALLING_POSITIVE
4923 * @arg @ref LL_HRTIM_DT_FALLING_NEGATIVE
4926 __STATIC_INLINE
void LL_HRTIM_DT_SetFallingSign(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t FallingSign
)
4928 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4929 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4930 REG_OFFSET_TAB_TIMER
[iTimer
]));
4931 MODIFY_REG(*pReg
, HRTIM_DTR_SDTF
, FallingSign
);
4935 * @brief Get actual deadtime sign on falling edge.
4936 * @rmtoll DTxR SDTF LL_HRTIM_DT_GetFallingSign
4937 * @param HRTIMx High Resolution Timer instance
4938 * @param Timer This parameter can be one of the following values:
4939 * @arg @ref LL_HRTIM_TIMER_A
4940 * @arg @ref LL_HRTIM_TIMER_B
4941 * @arg @ref LL_HRTIM_TIMER_C
4942 * @arg @ref LL_HRTIM_TIMER_D
4943 * @arg @ref LL_HRTIM_TIMER_E
4944 * @retval FallingSign This parameter can be one of the following values:
4945 * @arg @ref LL_HRTIM_DT_FALLING_POSITIVE
4946 * @arg @ref LL_HRTIM_DT_FALLING_NEGATIVE
4948 __STATIC_INLINE
uint32_t LL_HRTIM_DT_GetFallingSign(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4950 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4951 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4952 REG_OFFSET_TAB_TIMER
[iTimer
]));
4953 return (READ_BIT(*pReg
, HRTIM_DTR_SDTF
));
4957 * @brief Lock the deadtime value and sign on rising edge.
4958 * @rmtoll DTxR DTRLK LL_HRTIM_DT_LockRising
4959 * @param HRTIMx High Resolution Timer instance
4960 * @param Timer This parameter can be one of the following values:
4961 * @arg @ref LL_HRTIM_TIMER_A
4962 * @arg @ref LL_HRTIM_TIMER_B
4963 * @arg @ref LL_HRTIM_TIMER_C
4964 * @arg @ref LL_HRTIM_TIMER_D
4965 * @arg @ref LL_HRTIM_TIMER_E
4968 __STATIC_INLINE
void LL_HRTIM_DT_LockRising(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4970 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4971 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4972 REG_OFFSET_TAB_TIMER
[iTimer
]));
4973 SET_BIT(*pReg
, HRTIM_DTR_DTRLK
);
4977 * @brief Lock the deadtime sign on rising edge.
4978 * @rmtoll DTxR DTRSLK LL_HRTIM_DT_LockRisingSign
4979 * @param HRTIMx High Resolution Timer instance
4980 * @param Timer This parameter can be one of the following values:
4981 * @arg @ref LL_HRTIM_TIMER_A
4982 * @arg @ref LL_HRTIM_TIMER_B
4983 * @arg @ref LL_HRTIM_TIMER_C
4984 * @arg @ref LL_HRTIM_TIMER_D
4985 * @arg @ref LL_HRTIM_TIMER_E
4988 __STATIC_INLINE
void LL_HRTIM_DT_LockRisingSign(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
4990 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
4991 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
4992 REG_OFFSET_TAB_TIMER
[iTimer
]));
4993 SET_BIT(*pReg
, HRTIM_DTR_DTRSLK
);
4997 * @brief Lock the deadtime value and sign on falling edge.
4998 * @rmtoll DTxR DTFLK LL_HRTIM_DT_LockFalling
4999 * @param HRTIMx High Resolution Timer instance
5000 * @param Timer This parameter can be one of the following values:
5001 * @arg @ref LL_HRTIM_TIMER_A
5002 * @arg @ref LL_HRTIM_TIMER_B
5003 * @arg @ref LL_HRTIM_TIMER_C
5004 * @arg @ref LL_HRTIM_TIMER_D
5005 * @arg @ref LL_HRTIM_TIMER_E
5008 __STATIC_INLINE
void LL_HRTIM_DT_LockFalling(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
5010 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5011 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
5012 REG_OFFSET_TAB_TIMER
[iTimer
]));
5013 SET_BIT(*pReg
, HRTIM_DTR_DTFLK
);
5017 * @brief Lock the deadtime sign on falling edge.
5018 * @rmtoll DTxR DTFSLK LL_HRTIM_DT_LockFallingSign
5019 * @param HRTIMx High Resolution Timer instance
5020 * @param Timer This parameter can be one of the following values:
5021 * @arg @ref LL_HRTIM_TIMER_A
5022 * @arg @ref LL_HRTIM_TIMER_B
5023 * @arg @ref LL_HRTIM_TIMER_C
5024 * @arg @ref LL_HRTIM_TIMER_D
5025 * @arg @ref LL_HRTIM_TIMER_E
5028 __STATIC_INLINE
void LL_HRTIM_DT_LockFallingSign(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
5030 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5031 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].DTxR
) +
5032 REG_OFFSET_TAB_TIMER
[iTimer
]));
5033 SET_BIT(*pReg
, HRTIM_DTR_DTFSLK
);
5040 /** @defgroup HRTIM_LL_EF_Chopper_Mode_Configuration Chopper_Mode_Configuration
5045 * @brief Configure the chopper stage for a given timer.
5046 * @rmtoll CHPxR CARFRQ LL_HRTIM_CHP_Config\n
5047 * CHPxR CARDTY LL_HRTIM_CHP_Config\n
5048 * CHPxR STRTPW LL_HRTIM_CHP_Config
5049 * @note This function must not be called if the chopper mode is already
5050 * enabled for one of the timer outputs.
5051 * @param HRTIMx High Resolution Timer instance
5052 * @param Timer This parameter can be one of the following values:
5053 * @arg @ref LL_HRTIM_TIMER_A
5054 * @arg @ref LL_HRTIM_TIMER_B
5055 * @arg @ref LL_HRTIM_TIMER_C
5056 * @arg @ref LL_HRTIM_TIMER_D
5057 * @arg @ref LL_HRTIM_TIMER_E
5058 * @param Configuration This parameter must be a combination of all the following values:
5059 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV16 or ... or @ref LL_HRTIM_CHP_PRESCALER_DIV256
5060 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_0 or ... or @ref LL_HRTIM_CHP_DUTYCYCLE_875
5061 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_16 or ... or @ref LL_HRTIM_CHP_PULSEWIDTH_256
5064 __STATIC_INLINE
void LL_HRTIM_CHP_Config(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Configuration
)
5066 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5067 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CHPxR
) +
5068 REG_OFFSET_TAB_TIMER
[iTimer
]));
5069 MODIFY_REG(*pReg
, HRTIM_CHPR_STRPW
| HRTIM_CHPR_CARDTY
| HRTIM_CHPR_CARFRQ
, Configuration
);
5073 * @brief Set prescaler determining the carrier frequency to be added on top
5074 * of the timer output signals when chopper mode is enabled.
5075 * @rmtoll CHPxR CARFRQ LL_HRTIM_CHP_SetPrescaler
5076 * @note This function must not be called if the chopper mode is already
5077 * enabled for one of the timer outputs.
5078 * @param HRTIMx High Resolution Timer instance
5079 * @param Timer This parameter can be one of the following values:
5080 * @arg @ref LL_HRTIM_TIMER_A
5081 * @arg @ref LL_HRTIM_TIMER_B
5082 * @arg @ref LL_HRTIM_TIMER_C
5083 * @arg @ref LL_HRTIM_TIMER_D
5084 * @arg @ref LL_HRTIM_TIMER_E
5085 * @param Prescaler This parameter can be one of the following values:
5086 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV16
5087 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV32
5088 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV48
5089 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV64
5090 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV80
5091 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV96
5092 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV112
5093 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV128
5094 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV144
5095 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV160
5096 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV176
5097 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV192
5098 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV208
5099 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV224
5100 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV240
5101 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV256
5104 __STATIC_INLINE
void LL_HRTIM_CHP_SetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t Prescaler
)
5106 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5107 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CHPxR
) +
5108 REG_OFFSET_TAB_TIMER
[iTimer
]));
5109 MODIFY_REG(*pReg
, HRTIM_CHPR_CARFRQ
, Prescaler
);
5113 * @brief Get actual chopper stage prescaler value.
5114 * @rmtoll CHPxR CARFRQ LL_HRTIM_CHP_GetPrescaler
5115 * @param HRTIMx High Resolution Timer instance
5116 * @param Timer This parameter can be one of the following values:
5117 * @arg @ref LL_HRTIM_TIMER_A
5118 * @arg @ref LL_HRTIM_TIMER_B
5119 * @arg @ref LL_HRTIM_TIMER_C
5120 * @arg @ref LL_HRTIM_TIMER_D
5121 * @arg @ref LL_HRTIM_TIMER_E
5122 * @retval Prescaler This parameter can be one of the following values:
5123 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV16
5124 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV32
5125 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV48
5126 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV64
5127 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV80
5128 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV96
5129 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV112
5130 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV128
5131 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV144
5132 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV160
5133 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV176
5134 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV192
5135 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV208
5136 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV224
5137 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV240
5138 * @arg @ref LL_HRTIM_CHP_PRESCALER_DIV256
5140 __STATIC_INLINE
uint32_t LL_HRTIM_CHP_GetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
5142 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5143 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CHPxR
) +
5144 REG_OFFSET_TAB_TIMER
[iTimer
]));
5145 return (READ_BIT(*pReg
, HRTIM_CHPR_CARFRQ
));
5149 * @brief Set the chopper duty cycle.
5150 * @rmtoll CHPxR CARDTY LL_HRTIM_CHP_SetDutyCycle
5151 * @note Duty cycle can be adjusted by 1/8 step (from 0/8 up to 7/8)
5152 * @note This function must not be called if the chopper mode is already
5153 * enabled for one of the timer outputs.
5154 * @param HRTIMx High Resolution Timer instance
5155 * @param Timer This parameter can be one of the following values:
5156 * @arg @ref LL_HRTIM_TIMER_A
5157 * @arg @ref LL_HRTIM_TIMER_B
5158 * @arg @ref LL_HRTIM_TIMER_C
5159 * @arg @ref LL_HRTIM_TIMER_D
5160 * @arg @ref LL_HRTIM_TIMER_E
5161 * @param DutyCycle This parameter can be one of the following values:
5162 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_0
5163 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_125
5164 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_250
5165 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_375
5166 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_500
5167 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_625
5168 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_750
5169 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_875
5172 __STATIC_INLINE
void LL_HRTIM_CHP_SetDutyCycle(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t DutyCycle
)
5174 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5175 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CHPxR
) +
5176 REG_OFFSET_TAB_TIMER
[iTimer
]));
5177 MODIFY_REG(*pReg
, HRTIM_CHPR_CARDTY
, DutyCycle
);
5181 * @brief Get actual chopper duty cycle.
5182 * @rmtoll CHPxR CARDTY LL_HRTIM_CHP_GetDutyCycle
5183 * @param HRTIMx High Resolution Timer instance
5184 * @param Timer This parameter can be one of the following values:
5185 * @arg @ref LL_HRTIM_TIMER_A
5186 * @arg @ref LL_HRTIM_TIMER_B
5187 * @arg @ref LL_HRTIM_TIMER_C
5188 * @arg @ref LL_HRTIM_TIMER_D
5189 * @arg @ref LL_HRTIM_TIMER_E
5190 * @retval DutyCycle This parameter can be one of the following values:
5191 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_0
5192 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_125
5193 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_250
5194 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_375
5195 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_500
5196 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_625
5197 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_750
5198 * @arg @ref LL_HRTIM_CHP_DUTYCYCLE_875
5200 __STATIC_INLINE
uint32_t LL_HRTIM_CHP_GetDutyCycle(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
5202 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5203 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CHPxR
) +
5204 REG_OFFSET_TAB_TIMER
[iTimer
]));
5205 return (READ_BIT(*pReg
, HRTIM_CHPR_CARDTY
));
5209 * @brief Set the start pulse width.
5210 * @rmtoll CHPxR STRPW LL_HRTIM_CHP_SetPulseWidth
5211 * @note This function must not be called if the chopper mode is already
5212 * enabled for one of the timer outputs.
5213 * @param HRTIMx High Resolution Timer instance
5214 * @param Timer This parameter can be one of the following values:
5215 * @arg @ref LL_HRTIM_TIMER_A
5216 * @arg @ref LL_HRTIM_TIMER_B
5217 * @arg @ref LL_HRTIM_TIMER_C
5218 * @arg @ref LL_HRTIM_TIMER_D
5219 * @arg @ref LL_HRTIM_TIMER_E
5220 * @param PulseWidth This parameter can be one of the following values:
5221 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_16
5222 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_32
5223 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_48
5224 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_64
5225 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_80
5226 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_96
5227 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_112
5228 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_128
5229 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_144
5230 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_160
5231 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_176
5232 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_192
5233 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_208
5234 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_224
5235 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_240
5236 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_256
5239 __STATIC_INLINE
void LL_HRTIM_CHP_SetPulseWidth(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
, uint32_t PulseWidth
)
5241 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5242 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CHPxR
) +
5243 REG_OFFSET_TAB_TIMER
[iTimer
]));
5244 MODIFY_REG(*pReg
, HRTIM_CHPR_STRPW
, PulseWidth
);
5248 * @brief Get actual start pulse width.
5249 * @rmtoll CHPxR STRPW LL_HRTIM_CHP_GetPulseWidth
5250 * @param HRTIMx High Resolution Timer instance
5251 * @param Timer This parameter can be one of the following values:
5252 * @arg @ref LL_HRTIM_TIMER_A
5253 * @arg @ref LL_HRTIM_TIMER_B
5254 * @arg @ref LL_HRTIM_TIMER_C
5255 * @arg @ref LL_HRTIM_TIMER_D
5256 * @arg @ref LL_HRTIM_TIMER_E
5257 * @retval PulseWidth This parameter can be one of the following values:
5258 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_16
5259 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_32
5260 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_48
5261 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_64
5262 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_80
5263 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_96
5264 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_112
5265 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_128
5266 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_144
5267 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_160
5268 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_176
5269 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_192
5270 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_208
5271 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_224
5272 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_240
5273 * @arg @ref LL_HRTIM_CHP_PULSEWIDTH_256
5275 __STATIC_INLINE
uint32_t LL_HRTIM_CHP_GetPulseWidth(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
5277 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_TACEN_Pos
);
5278 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].CHPxR
) +
5279 REG_OFFSET_TAB_TIMER
[iTimer
]));
5280 return (READ_BIT(*pReg
, HRTIM_CHPR_STRPW
));
5287 /** @defgroup HRTIM_LL_EF_Output_Management Output_Management
5292 * @brief Set the timer output set source.
5293 * @rmtoll SETx1R SST LL_HRTIM_OUT_SetOutputSetSrc\n
5294 * SETx1R RESYNC LL_HRTIM_OUT_SetOutputSetSrc\n
5295 * SETx1R PER LL_HRTIM_OUT_SetOutputSetSrc\n
5296 * SETx1R CMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
5297 * SETx1R CMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
5298 * SETx1R CMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
5299 * SETx1R CMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
5300 * SETx1R MSTPER LL_HRTIM_OUT_SetOutputSetSrc\n
5301 * SETx1R MSTCMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
5302 * SETx1R MSTCMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
5303 * SETx1R MSTCMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
5304 * SETx1R MSTCMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
5305 * SETx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
5306 * SETx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
5307 * SETx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
5308 * SETx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
5309 * SETx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
5310 * SETx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
5311 * SETx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
5312 * SETx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
5313 * SETx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
5314 * SETx1R EXEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
5315 * SETx1R EXEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
5316 * SETx1R EXEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
5317 * SETx1R EXEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
5318 * SETx1R EXEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
5319 * SETx1R EXEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
5320 * SETx1R EXEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
5321 * SETx1R EXEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
5322 * SETx1R EXEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
5323 * SETx1R EXEVNT10 LL_HRTIM_OUT_SetOutputSetSrc\n
5324 * SETx1R UPDATE LL_HRTIM_OUT_SetOutputSetSrc\n
5325 * SETx1R SST LL_HRTIM_OUT_SetOutputSetSrc\n
5326 * SETx1R RESYNC LL_HRTIM_OUT_SetOutputSetSrc\n
5327 * SETx1R PER LL_HRTIM_OUT_SetOutputSetSrc\n
5328 * SETx1R CMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
5329 * SETx1R CMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
5330 * SETx1R CMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
5331 * SETx1R CMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
5332 * SETx1R MSTPER LL_HRTIM_OUT_SetOutputSetSrc\n
5333 * SETx1R MSTCMP1 LL_HRTIM_OUT_SetOutputSetSrc\n
5334 * SETx1R MSTCMP2 LL_HRTIM_OUT_SetOutputSetSrc\n
5335 * SETx1R MSTCMP3 LL_HRTIM_OUT_SetOutputSetSrc\n
5336 * SETx1R MSTCMP4 LL_HRTIM_OUT_SetOutputSetSrc\n
5337 * SETx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
5338 * SETx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
5339 * SETx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
5340 * SETx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
5341 * SETx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
5342 * SETx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
5343 * SETx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
5344 * SETx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
5345 * SETx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
5346 * SETx1R EXEVNT1 LL_HRTIM_OUT_SetOutputSetSrc\n
5347 * SETx1R EXEVNT2 LL_HRTIM_OUT_SetOutputSetSrc\n
5348 * SETx1R EXEVNT3 LL_HRTIM_OUT_SetOutputSetSrc\n
5349 * SETx1R EXEVNT4 LL_HRTIM_OUT_SetOutputSetSrc\n
5350 * SETx1R EXEVNT5 LL_HRTIM_OUT_SetOutputSetSrc\n
5351 * SETx1R EXEVNT6 LL_HRTIM_OUT_SetOutputSetSrc\n
5352 * SETx1R EXEVNT7 LL_HRTIM_OUT_SetOutputSetSrc\n
5353 * SETx1R EXEVNT8 LL_HRTIM_OUT_SetOutputSetSrc\n
5354 * SETx1R EXEVNT9 LL_HRTIM_OUT_SetOutputSetSrc\n
5355 * SETx1R EXEVNT10 LL_HRTIM_OUT_SetOutputSetSrc\n
5356 * SETx1R UPDATE LL_HRTIM_OUT_SetOutputSetSrc
5357 * @param HRTIMx High Resolution Timer instance
5358 * @param Output This parameter can be one of the following values:
5359 * @arg @ref LL_HRTIM_OUTPUT_TA1
5360 * @arg @ref LL_HRTIM_OUTPUT_TA2
5361 * @arg @ref LL_HRTIM_OUTPUT_TB1
5362 * @arg @ref LL_HRTIM_OUTPUT_TB2
5363 * @arg @ref LL_HRTIM_OUTPUT_TC1
5364 * @arg @ref LL_HRTIM_OUTPUT_TC2
5365 * @arg @ref LL_HRTIM_OUTPUT_TD1
5366 * @arg @ref LL_HRTIM_OUTPUT_TD2
5367 * @arg @ref LL_HRTIM_OUTPUT_TE1
5368 * @arg @ref LL_HRTIM_OUTPUT_TE2
5369 * @param SetSrc This parameter can be a combination of the following values:
5370 * @arg @ref LL_HRTIM_CROSSBAR_NONE
5371 * @arg @ref LL_HRTIM_CROSSBAR_RESYNC
5372 * @arg @ref LL_HRTIM_CROSSBAR_TIMPER
5373 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP1
5374 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP2
5375 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP3
5376 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP4
5377 * @arg @ref LL_HRTIM_CROSSBAR_MASTERPER
5378 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP1
5379 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP2
5380 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP3
5381 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP4
5382 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_1
5383 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_2
5384 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_3
5385 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_4
5386 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_5
5387 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_6
5388 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_7
5389 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_8
5390 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_9
5391 * @arg @ref LL_HRTIM_CROSSBAR_EEV_1
5392 * @arg @ref LL_HRTIM_CROSSBAR_EEV_2
5393 * @arg @ref LL_HRTIM_CROSSBAR_EEV_3
5394 * @arg @ref LL_HRTIM_CROSSBAR_EEV_4
5395 * @arg @ref LL_HRTIM_CROSSBAR_EEV_5
5396 * @arg @ref LL_HRTIM_CROSSBAR_EEV_6
5397 * @arg @ref LL_HRTIM_CROSSBAR_EEV_7
5398 * @arg @ref LL_HRTIM_CROSSBAR_EEV_8
5399 * @arg @ref LL_HRTIM_CROSSBAR_EEV_9
5400 * @arg @ref LL_HRTIM_CROSSBAR_EEV_10
5401 * @arg @ref LL_HRTIM_CROSSBAR_UPDATE
5404 __STATIC_INLINE
void LL_HRTIM_OUT_SetOutputSetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t SetSrc
)
5406 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5407 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].SETx1R
) +
5408 REG_OFFSET_TAB_SETxR
[iOutput
]));
5409 WRITE_REG(*pReg
, SetSrc
);
5413 * @brief Get the timer output set source.
5414 * @rmtoll SETx1R SST LL_HRTIM_OUT_GetOutputSetSrc\n
5415 * SETx1R RESYNC LL_HRTIM_OUT_GetOutputSetSrc\n
5416 * SETx1R PER LL_HRTIM_OUT_GetOutputSetSrc\n
5417 * SETx1R CMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
5418 * SETx1R CMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
5419 * SETx1R CMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
5420 * SETx1R CMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
5421 * SETx1R MSTPER LL_HRTIM_OUT_GetOutputSetSrc\n
5422 * SETx1R MSTCMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
5423 * SETx1R MSTCMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
5424 * SETx1R MSTCMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
5425 * SETx1R MSTCMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
5426 * SETx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
5427 * SETx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
5428 * SETx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
5429 * SETx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
5430 * SETx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
5431 * SETx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
5432 * SETx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
5433 * SETx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
5434 * SETx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
5435 * SETx1R EXEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
5436 * SETx1R EXEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
5437 * SETx1R EXEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
5438 * SETx1R EXEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
5439 * SETx1R EXEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
5440 * SETx1R EXEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
5441 * SETx1R EXEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
5442 * SETx1R EXEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
5443 * SETx1R EXEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
5444 * SETx1R EXEVNT10 LL_HRTIM_OUT_GetOutputSetSrc\n
5445 * SETx1R UPDATE LL_HRTIM_OUT_GetOutputSetSrc\n
5446 * SETx1R SST LL_HRTIM_OUT_GetOutputSetSrc\n
5447 * SETx1R RESYNC LL_HRTIM_OUT_GetOutputSetSrc\n
5448 * SETx1R PER LL_HRTIM_OUT_GetOutputSetSrc\n
5449 * SETx1R CMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
5450 * SETx1R CMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
5451 * SETx1R CMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
5452 * SETx1R CMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
5453 * SETx1R MSTPER LL_HRTIM_OUT_GetOutputSetSrc\n
5454 * SETx1R MSTCMP1 LL_HRTIM_OUT_GetOutputSetSrc\n
5455 * SETx1R MSTCMP2 LL_HRTIM_OUT_GetOutputSetSrc\n
5456 * SETx1R MSTCMP3 LL_HRTIM_OUT_GetOutputSetSrc\n
5457 * SETx1R MSTCMP4 LL_HRTIM_OUT_GetOutputSetSrc\n
5458 * SETx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
5459 * SETx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
5460 * SETx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
5461 * SETx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
5462 * SETx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
5463 * SETx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
5464 * SETx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
5465 * SETx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
5466 * SETx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
5467 * SETx1R EXEVNT1 LL_HRTIM_OUT_GetOutputSetSrc\n
5468 * SETx1R EXEVNT2 LL_HRTIM_OUT_GetOutputSetSrc\n
5469 * SETx1R EXEVNT3 LL_HRTIM_OUT_GetOutputSetSrc\n
5470 * SETx1R EXEVNT4 LL_HRTIM_OUT_GetOutputSetSrc\n
5471 * SETx1R EXEVNT5 LL_HRTIM_OUT_GetOutputSetSrc\n
5472 * SETx1R EXEVNT6 LL_HRTIM_OUT_GetOutputSetSrc\n
5473 * SETx1R EXEVNT7 LL_HRTIM_OUT_GetOutputSetSrc\n
5474 * SETx1R EXEVNT8 LL_HRTIM_OUT_GetOutputSetSrc\n
5475 * SETx1R EXEVNT9 LL_HRTIM_OUT_GetOutputSetSrc\n
5476 * SETx1R EXEVNT10 LL_HRTIM_OUT_GetOutputSetSrc\n
5477 * SETx1R UPDATE LL_HRTIM_OUT_GetOutputSetSrc
5478 * @param HRTIMx High Resolution Timer instance
5479 * @param Output This parameter can be one of the following values:
5480 * @arg @ref LL_HRTIM_OUTPUT_TA1
5481 * @arg @ref LL_HRTIM_OUTPUT_TA2
5482 * @arg @ref LL_HRTIM_OUTPUT_TB1
5483 * @arg @ref LL_HRTIM_OUTPUT_TB2
5484 * @arg @ref LL_HRTIM_OUTPUT_TC1
5485 * @arg @ref LL_HRTIM_OUTPUT_TC2
5486 * @arg @ref LL_HRTIM_OUTPUT_TD1
5487 * @arg @ref LL_HRTIM_OUTPUT_TD2
5488 * @arg @ref LL_HRTIM_OUTPUT_TE1
5489 * @arg @ref LL_HRTIM_OUTPUT_TE2
5490 * @retval SetSrc This parameter can be a combination of the following values:
5491 * @arg @ref LL_HRTIM_CROSSBAR_NONE
5492 * @arg @ref LL_HRTIM_CROSSBAR_RESYNC
5493 * @arg @ref LL_HRTIM_CROSSBAR_TIMPER
5494 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP1
5495 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP2
5496 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP3
5497 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP4
5498 * @arg @ref LL_HRTIM_CROSSBAR_MASTERPER
5499 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP1
5500 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP2
5501 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP3
5502 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP4
5503 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_1
5504 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_2
5505 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_3
5506 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_4
5507 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_5
5508 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_6
5509 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_7
5510 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_8
5511 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_9
5512 * @arg @ref LL_HRTIM_CROSSBAR_EEV_1
5513 * @arg @ref LL_HRTIM_CROSSBAR_EEV_2
5514 * @arg @ref LL_HRTIM_CROSSBAR_EEV_3
5515 * @arg @ref LL_HRTIM_CROSSBAR_EEV_4
5516 * @arg @ref LL_HRTIM_CROSSBAR_EEV_5
5517 * @arg @ref LL_HRTIM_CROSSBAR_EEV_6
5518 * @arg @ref LL_HRTIM_CROSSBAR_EEV_7
5519 * @arg @ref LL_HRTIM_CROSSBAR_EEV_8
5520 * @arg @ref LL_HRTIM_CROSSBAR_EEV_9
5521 * @arg @ref LL_HRTIM_CROSSBAR_EEV_10
5522 * @arg @ref LL_HRTIM_CROSSBAR_UPDATE
5524 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetOutputSetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
5526 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5527 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].SETx1R
) +
5528 REG_OFFSET_TAB_SETxR
[iOutput
]));
5529 return (uint32_t) READ_REG(*pReg
);
5533 * @brief Set the timer output reset source.
5534 * @rmtoll RSTx1R RST LL_HRTIM_OUT_SetOutputResetSrc\n
5535 * RSTx1R RESYNC LL_HRTIM_OUT_SetOutputResetSrc\n
5536 * RSTx1R PER LL_HRTIM_OUT_SetOutputResetSrc\n
5537 * RSTx1R CMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
5538 * RSTx1R CMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
5539 * RSTx1R CMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
5540 * RSTx1R CMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
5541 * RSTx1R MSTPER LL_HRTIM_OUT_SetOutputResetSrc\n
5542 * RSTx1R MSTCMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
5543 * RSTx1R MSTCMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
5544 * RSTx1R MSTCMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
5545 * RSTx1R MSTCMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
5546 * RSTx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
5547 * RSTx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
5548 * RSTx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
5549 * RSTx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
5550 * RSTx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
5551 * RSTx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
5552 * RSTx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
5553 * RSTx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
5554 * RSTx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
5555 * RSTx1R EXEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
5556 * RSTx1R EXEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
5557 * RSTx1R EXEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
5558 * RSTx1R EXEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
5559 * RSTx1R EXEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
5560 * RSTx1R EXEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
5561 * RSTx1R EXEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
5562 * RSTx1R EXEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
5563 * RSTx1R EXEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
5564 * RSTx1R EXEVNT10 LL_HRTIM_OUT_SetOutputResetSrc\n
5565 * RSTx1R UPDATE LL_HRTIM_OUT_SetOutputResetSrc\n
5566 * RSTx1R RST LL_HRTIM_OUT_SetOutputResetSrc\n
5567 * RSTx1R RESYNC LL_HRTIM_OUT_SetOutputResetSrc\n
5568 * RSTx1R PER LL_HRTIM_OUT_SetOutputResetSrc\n
5569 * RSTx1R CMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
5570 * RSTx1R CMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
5571 * RSTx1R CMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
5572 * RSTx1R CMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
5573 * RSTx1R MSTPER LL_HRTIM_OUT_SetOutputResetSrc\n
5574 * RSTx1R MSTCMP1 LL_HRTIM_OUT_SetOutputResetSrc\n
5575 * RSTx1R MSTCMP2 LL_HRTIM_OUT_SetOutputResetSrc\n
5576 * RSTx1R MSTCMP3 LL_HRTIM_OUT_SetOutputResetSrc\n
5577 * RSTx1R MSTCMP4 LL_HRTIM_OUT_SetOutputResetSrc\n
5578 * RSTx1R TIMEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
5579 * RSTx1R TIMEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
5580 * RSTx1R TIMEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
5581 * RSTx1R TIMEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
5582 * RSTx1R TIMEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
5583 * RSTx1R TIMEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
5584 * RSTx1R TIMEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
5585 * RSTx1R TIMEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
5586 * RSTx1R TIMEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
5587 * RSTx1R EXEVNT1 LL_HRTIM_OUT_SetOutputResetSrc\n
5588 * RSTx1R EXEVNT2 LL_HRTIM_OUT_SetOutputResetSrc\n
5589 * RSTx1R EXEVNT3 LL_HRTIM_OUT_SetOutputResetSrc\n
5590 * RSTx1R EXEVNT4 LL_HRTIM_OUT_SetOutputResetSrc\n
5591 * RSTx1R EXEVNT5 LL_HRTIM_OUT_SetOutputResetSrc\n
5592 * RSTx1R EXEVNT6 LL_HRTIM_OUT_SetOutputResetSrc\n
5593 * RSTx1R EXEVNT7 LL_HRTIM_OUT_SetOutputResetSrc\n
5594 * RSTx1R EXEVNT8 LL_HRTIM_OUT_SetOutputResetSrc\n
5595 * RSTx1R EXEVNT9 LL_HRTIM_OUT_SetOutputResetSrc\n
5596 * RSTx1R EXEVNT10 LL_HRTIM_OUT_SetOutputResetSrc\n
5597 * RSTx1R UPDATE LL_HRTIM_OUT_SetOutputResetSrc
5598 * @param HRTIMx High Resolution Timer instance
5599 * @param Output This parameter can be one of the following values:
5600 * @arg @ref LL_HRTIM_OUTPUT_TA1
5601 * @arg @ref LL_HRTIM_OUTPUT_TA2
5602 * @arg @ref LL_HRTIM_OUTPUT_TB1
5603 * @arg @ref LL_HRTIM_OUTPUT_TB2
5604 * @arg @ref LL_HRTIM_OUTPUT_TC1
5605 * @arg @ref LL_HRTIM_OUTPUT_TC2
5606 * @arg @ref LL_HRTIM_OUTPUT_TD1
5607 * @arg @ref LL_HRTIM_OUTPUT_TD2
5608 * @arg @ref LL_HRTIM_OUTPUT_TE1
5609 * @arg @ref LL_HRTIM_OUTPUT_TE2
5610 * @param ResetSrc This parameter can be a combination of the following values:
5611 * @arg @ref LL_HRTIM_CROSSBAR_NONE
5612 * @arg @ref LL_HRTIM_CROSSBAR_RESYNC
5613 * @arg @ref LL_HRTIM_CROSSBAR_TIMPER
5614 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP1
5615 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP2
5616 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP3
5617 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP4
5618 * @arg @ref LL_HRTIM_CROSSBAR_MASTERPER
5619 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP1
5620 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP2
5621 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP3
5622 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP4
5623 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_1
5624 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_2
5625 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_3
5626 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_4
5627 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_5
5628 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_6
5629 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_7
5630 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_8
5631 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_9
5632 * @arg @ref LL_HRTIM_CROSSBAR_EEV_1
5633 * @arg @ref LL_HRTIM_CROSSBAR_EEV_2
5634 * @arg @ref LL_HRTIM_CROSSBAR_EEV_3
5635 * @arg @ref LL_HRTIM_CROSSBAR_EEV_4
5636 * @arg @ref LL_HRTIM_CROSSBAR_EEV_5
5637 * @arg @ref LL_HRTIM_CROSSBAR_EEV_6
5638 * @arg @ref LL_HRTIM_CROSSBAR_EEV_7
5639 * @arg @ref LL_HRTIM_CROSSBAR_EEV_8
5640 * @arg @ref LL_HRTIM_CROSSBAR_EEV_9
5641 * @arg @ref LL_HRTIM_CROSSBAR_EEV_10
5642 * @arg @ref LL_HRTIM_CROSSBAR_UPDATE
5645 __STATIC_INLINE
void LL_HRTIM_OUT_SetOutputResetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t ResetSrc
)
5647 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5648 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].RSTx1R
) +
5649 REG_OFFSET_TAB_SETxR
[iOutput
]));
5650 WRITE_REG(*pReg
, ResetSrc
);
5654 * @brief Get the timer output set source.
5655 * @rmtoll RSTx1R RST LL_HRTIM_OUT_GetOutputResetSrc\n
5656 * RSTx1R RESYNC LL_HRTIM_OUT_GetOutputResetSrc\n
5657 * RSTx1R PER LL_HRTIM_OUT_GetOutputResetSrc\n
5658 * RSTx1R CMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
5659 * RSTx1R CMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
5660 * RSTx1R CMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
5661 * RSTx1R CMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
5662 * RSTx1R MSTPER LL_HRTIM_OUT_GetOutputResetSrc\n
5663 * RSTx1R MSTCMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
5664 * RSTx1R MSTCMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
5665 * RSTx1R MSTCMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
5666 * RSTx1R MSTCMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
5667 * RSTx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
5668 * RSTx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
5669 * RSTx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
5670 * RSTx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
5671 * RSTx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
5672 * RSTx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
5673 * RSTx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
5674 * RSTx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
5675 * RSTx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
5676 * RSTx1R EXEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
5677 * RSTx1R EXEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
5678 * RSTx1R EXEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
5679 * RSTx1R EXEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
5680 * RSTx1R EXEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
5681 * RSTx1R EXEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
5682 * RSTx1R EXEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
5683 * RSTx1R EXEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
5684 * RSTx1R EXEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
5685 * RSTx1R EXEVNT10 LL_HRTIM_OUT_GetOutputResetSrc\n
5686 * RSTx1R UPDATE LL_HRTIM_OUT_GetOutputResetSrc\n
5687 * RSTx1R RST LL_HRTIM_OUT_GetOutputResetSrc\n
5688 * RSTx1R RESYNC LL_HRTIM_OUT_GetOutputResetSrc\n
5689 * RSTx1R PER LL_HRTIM_OUT_GetOutputResetSrc\n
5690 * RSTx1R CMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
5691 * RSTx1R CMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
5692 * RSTx1R CMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
5693 * RSTx1R CMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
5694 * RSTx1R MSTPER LL_HRTIM_OUT_GetOutputResetSrc\n
5695 * RSTx1R MSTCMP1 LL_HRTIM_OUT_GetOutputResetSrc\n
5696 * RSTx1R MSTCMP2 LL_HRTIM_OUT_GetOutputResetSrc\n
5697 * RSTx1R MSTCMP3 LL_HRTIM_OUT_GetOutputResetSrc\n
5698 * RSTx1R MSTCMP4 LL_HRTIM_OUT_GetOutputResetSrc\n
5699 * RSTx1R TIMEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
5700 * RSTx1R TIMEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
5701 * RSTx1R TIMEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
5702 * RSTx1R TIMEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
5703 * RSTx1R TIMEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
5704 * RSTx1R TIMEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
5705 * RSTx1R TIMEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
5706 * RSTx1R TIMEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
5707 * RSTx1R TIMEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
5708 * RSTx1R EXEVNT1 LL_HRTIM_OUT_GetOutputResetSrc\n
5709 * RSTx1R EXEVNT2 LL_HRTIM_OUT_GetOutputResetSrc\n
5710 * RSTx1R EXEVNT3 LL_HRTIM_OUT_GetOutputResetSrc\n
5711 * RSTx1R EXEVNT4 LL_HRTIM_OUT_GetOutputResetSrc\n
5712 * RSTx1R EXEVNT5 LL_HRTIM_OUT_GetOutputResetSrc\n
5713 * RSTx1R EXEVNT6 LL_HRTIM_OUT_GetOutputResetSrc\n
5714 * RSTx1R EXEVNT7 LL_HRTIM_OUT_GetOutputResetSrc\n
5715 * RSTx1R EXEVNT8 LL_HRTIM_OUT_GetOutputResetSrc\n
5716 * RSTx1R EXEVNT9 LL_HRTIM_OUT_GetOutputResetSrc\n
5717 * RSTx1R EXEVNT10 LL_HRTIM_OUT_GetOutputResetSrc\n
5718 * RSTx1R UPDATE LL_HRTIM_OUT_GetOutputResetSrc
5719 * @param HRTIMx High Resolution Timer instance
5720 * @param Output This parameter can be one of the following values:
5721 * @arg @ref LL_HRTIM_OUTPUT_TA1
5722 * @arg @ref LL_HRTIM_OUTPUT_TA2
5723 * @arg @ref LL_HRTIM_OUTPUT_TB1
5724 * @arg @ref LL_HRTIM_OUTPUT_TB2
5725 * @arg @ref LL_HRTIM_OUTPUT_TC1
5726 * @arg @ref LL_HRTIM_OUTPUT_TC2
5727 * @arg @ref LL_HRTIM_OUTPUT_TD1
5728 * @arg @ref LL_HRTIM_OUTPUT_TD2
5729 * @arg @ref LL_HRTIM_OUTPUT_TE1
5730 * @arg @ref LL_HRTIM_OUTPUT_TE2
5731 * @retval ResetSrc This parameter can be a combination of the following values:
5732 * @arg @ref LL_HRTIM_CROSSBAR_NONE
5733 * @arg @ref LL_HRTIM_CROSSBAR_RESYNC
5734 * @arg @ref LL_HRTIM_CROSSBAR_TIMPER
5735 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP1
5736 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP2
5737 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP3
5738 * @arg @ref LL_HRTIM_CROSSBAR_TIMCMP4
5739 * @arg @ref LL_HRTIM_CROSSBAR_MASTERPER
5740 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP1
5741 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP2
5742 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP3
5743 * @arg @ref LL_HRTIM_CROSSBAR_MASTERCMP4
5744 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_1
5745 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_2
5746 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_3
5747 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_4
5748 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_5
5749 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_6
5750 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_7
5751 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_8
5752 * @arg @ref LL_HRTIM_CROSSBAR_TIMEV_9
5753 * @arg @ref LL_HRTIM_CROSSBAR_EEV_1
5754 * @arg @ref LL_HRTIM_CROSSBAR_EEV_2
5755 * @arg @ref LL_HRTIM_CROSSBAR_EEV_3
5756 * @arg @ref LL_HRTIM_CROSSBAR_EEV_4
5757 * @arg @ref LL_HRTIM_CROSSBAR_EEV_5
5758 * @arg @ref LL_HRTIM_CROSSBAR_EEV_6
5759 * @arg @ref LL_HRTIM_CROSSBAR_EEV_7
5760 * @arg @ref LL_HRTIM_CROSSBAR_EEV_8
5761 * @arg @ref LL_HRTIM_CROSSBAR_EEV_9
5762 * @arg @ref LL_HRTIM_CROSSBAR_EEV_10
5763 * @arg @ref LL_HRTIM_CROSSBAR_UPDATE
5765 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetOutputResetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
5767 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5768 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].RSTx1R
) +
5769 REG_OFFSET_TAB_SETxR
[iOutput
]));
5770 return (uint32_t) READ_REG(*pReg
);
5774 * @brief Configure a timer output.
5775 * @rmtoll OUTxR POL1 LL_HRTIM_OUT_Config\n
5776 * OUTxR IDLEM1 LL_HRTIM_OUT_Config\n
5777 * OUTxR IDLES1 LL_HRTIM_OUT_Config\n
5778 * OUTxR FAULT1 LL_HRTIM_OUT_Config\n
5779 * OUTxR CHP1 LL_HRTIM_OUT_Config\n
5780 * OUTxR DIDL1 LL_HRTIM_OUT_Config\n
5781 * OUTxR POL2 LL_HRTIM_OUT_Config\n
5782 * OUTxR IDLEM2 LL_HRTIM_OUT_Config\n
5783 * OUTxR IDLES2 LL_HRTIM_OUT_Config\n
5784 * OUTxR FAULT2 LL_HRTIM_OUT_Config\n
5785 * OUTxR CHP2 LL_HRTIM_OUT_Config\n
5786 * OUTxR DIDL2 LL_HRTIM_OUT_Config
5787 * @param HRTIMx High Resolution Timer instance
5788 * @param Output This parameter can be one of the following values:
5789 * @arg @ref LL_HRTIM_OUTPUT_TA1
5790 * @arg @ref LL_HRTIM_OUTPUT_TA2
5791 * @arg @ref LL_HRTIM_OUTPUT_TB1
5792 * @arg @ref LL_HRTIM_OUTPUT_TB2
5793 * @arg @ref LL_HRTIM_OUTPUT_TC1
5794 * @arg @ref LL_HRTIM_OUTPUT_TC2
5795 * @arg @ref LL_HRTIM_OUTPUT_TD1
5796 * @arg @ref LL_HRTIM_OUTPUT_TD2
5797 * @arg @ref LL_HRTIM_OUTPUT_TE1
5798 * @arg @ref LL_HRTIM_OUTPUT_TE2
5799 * @param Configuration This parameter must be a combination of all the following values:
5800 * @arg @ref LL_HRTIM_OUT_POSITIVE_POLARITY or @ref LL_HRTIM_OUT_NEGATIVE_POLARITY
5801 * @arg @ref LL_HRTIM_OUT_NO_IDLE or @ref LL_HRTIM_OUT_IDLE_WHEN_BURST
5802 * @arg @ref LL_HRTIM_OUT_IDLELEVEL_INACTIVE or @ref LL_HRTIM_OUT_IDLELEVEL_ACTIVE
5803 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_NO_ACTION or @ref LL_HRTIM_OUT_FAULTSTATE_ACTIVE or @ref LL_HRTIM_OUT_FAULTSTATE_INACTIVE or @ref LL_HRTIM_OUT_FAULTSTATE_HIGHZ
5804 * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_DISABLED or @ref LL_HRTIM_OUT_CHOPPERMODE_ENABLED
5805 * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR or @ref LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED
5808 __STATIC_INLINE
void LL_HRTIM_OUT_Config(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t Configuration
)
5810 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5811 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
5812 REG_OFFSET_TAB_OUTxR
[iOutput
]));
5813 MODIFY_REG(*pReg
, (HRTIM_OUT_CONFIG_MASK
<< REG_SHIFT_TAB_OUTxR
[iOutput
]),
5814 (Configuration
<< REG_SHIFT_TAB_OUTxR
[iOutput
]));
5818 * @brief Set the polarity of a timer output.
5819 * @rmtoll OUTxR POL1 LL_HRTIM_OUT_SetPolarity\n
5820 * OUTxR POL2 LL_HRTIM_OUT_SetPolarity
5821 * @param HRTIMx High Resolution Timer instance
5822 * @param Output This parameter can be one of the following values:
5823 * @arg @ref LL_HRTIM_OUTPUT_TA1
5824 * @arg @ref LL_HRTIM_OUTPUT_TA2
5825 * @arg @ref LL_HRTIM_OUTPUT_TB1
5826 * @arg @ref LL_HRTIM_OUTPUT_TB2
5827 * @arg @ref LL_HRTIM_OUTPUT_TC1
5828 * @arg @ref LL_HRTIM_OUTPUT_TC2
5829 * @arg @ref LL_HRTIM_OUTPUT_TD1
5830 * @arg @ref LL_HRTIM_OUTPUT_TD2
5831 * @arg @ref LL_HRTIM_OUTPUT_TE1
5832 * @arg @ref LL_HRTIM_OUTPUT_TE2
5833 * @param Polarity This parameter can be one of the following values:
5834 * @arg @ref LL_HRTIM_OUT_POSITIVE_POLARITY
5835 * @arg @ref LL_HRTIM_OUT_NEGATIVE_POLARITY
5838 __STATIC_INLINE
void LL_HRTIM_OUT_SetPolarity(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t Polarity
)
5840 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5841 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
5842 REG_OFFSET_TAB_OUTxR
[iOutput
]));
5843 MODIFY_REG(*pReg
, (HRTIM_OUTR_POL1
<< REG_SHIFT_TAB_OUTxR
[iOutput
]), (Polarity
<< REG_SHIFT_TAB_OUTxR
[iOutput
]));
5847 * @brief Get actual polarity of the timer output.
5848 * @rmtoll OUTxR POL1 LL_HRTIM_OUT_GetPolarity\n
5849 * OUTxR POL2 LL_HRTIM_OUT_GetPolarity
5850 * @param HRTIMx High Resolution Timer instance
5851 * @param Output This parameter can be one of the following values:
5852 * @arg @ref LL_HRTIM_OUTPUT_TA1
5853 * @arg @ref LL_HRTIM_OUTPUT_TA2
5854 * @arg @ref LL_HRTIM_OUTPUT_TB1
5855 * @arg @ref LL_HRTIM_OUTPUT_TB2
5856 * @arg @ref LL_HRTIM_OUTPUT_TC1
5857 * @arg @ref LL_HRTIM_OUTPUT_TC2
5858 * @arg @ref LL_HRTIM_OUTPUT_TD1
5859 * @arg @ref LL_HRTIM_OUTPUT_TD2
5860 * @arg @ref LL_HRTIM_OUTPUT_TE1
5861 * @arg @ref LL_HRTIM_OUTPUT_TE2
5862 * @retval Polarity This parameter can be one of the following values:
5863 * @arg @ref LL_HRTIM_OUT_POSITIVE_POLARITY
5864 * @arg @ref LL_HRTIM_OUT_NEGATIVE_POLARITY
5866 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetPolarity(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
5868 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5869 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
5870 REG_OFFSET_TAB_OUTxR
[iOutput
]));
5871 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_OUTR_POL1
) << REG_SHIFT_TAB_OUTxR
[iOutput
]) >> REG_SHIFT_TAB_OUTxR
[iOutput
]);
5875 * @brief Set the output IDLE mode.
5876 * @rmtoll OUTxR IDLEM1 LL_HRTIM_OUT_SetIdleMode\n
5877 * OUTxR IDLEM2 LL_HRTIM_OUT_SetIdleMode
5878 * @note This function must not be called when the burst mode is active
5879 * @param HRTIMx High Resolution Timer instance
5880 * @param Output This parameter can be one of the following values:
5881 * @arg @ref LL_HRTIM_OUTPUT_TA1
5882 * @arg @ref LL_HRTIM_OUTPUT_TA2
5883 * @arg @ref LL_HRTIM_OUTPUT_TB1
5884 * @arg @ref LL_HRTIM_OUTPUT_TB2
5885 * @arg @ref LL_HRTIM_OUTPUT_TC1
5886 * @arg @ref LL_HRTIM_OUTPUT_TC2
5887 * @arg @ref LL_HRTIM_OUTPUT_TD1
5888 * @arg @ref LL_HRTIM_OUTPUT_TD2
5889 * @arg @ref LL_HRTIM_OUTPUT_TE1
5890 * @arg @ref LL_HRTIM_OUTPUT_TE2
5891 * @param IdleMode This parameter can be one of the following values:
5892 * @arg @ref LL_HRTIM_OUT_NO_IDLE
5893 * @arg @ref LL_HRTIM_OUT_IDLE_WHEN_BURST
5896 __STATIC_INLINE
void LL_HRTIM_OUT_SetIdleMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t IdleMode
)
5898 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5899 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
5900 REG_OFFSET_TAB_OUTxR
[iOutput
]));
5901 MODIFY_REG(*pReg
, (HRTIM_OUTR_IDLM1
<< (REG_SHIFT_TAB_OUTxR
[iOutput
])), (IdleMode
<< (REG_SHIFT_TAB_OUTxR
[iOutput
])));
5905 * @brief Get actual output IDLE mode.
5906 * @rmtoll OUTxR IDLEM1 LL_HRTIM_OUT_GetIdleMode\n
5907 * OUTxR IDLEM2 LL_HRTIM_OUT_GetIdleMode
5908 * @param HRTIMx High Resolution Timer instance
5909 * @param Output This parameter can be one of the following values:
5910 * @arg @ref LL_HRTIM_OUTPUT_TA1
5911 * @arg @ref LL_HRTIM_OUTPUT_TA2
5912 * @arg @ref LL_HRTIM_OUTPUT_TB1
5913 * @arg @ref LL_HRTIM_OUTPUT_TB2
5914 * @arg @ref LL_HRTIM_OUTPUT_TC1
5915 * @arg @ref LL_HRTIM_OUTPUT_TC2
5916 * @arg @ref LL_HRTIM_OUTPUT_TD1
5917 * @arg @ref LL_HRTIM_OUTPUT_TD2
5918 * @arg @ref LL_HRTIM_OUTPUT_TE1
5919 * @arg @ref LL_HRTIM_OUTPUT_TE2
5920 * @retval IdleMode This parameter can be one of the following values:
5921 * @arg @ref LL_HRTIM_OUT_NO_IDLE
5922 * @arg @ref LL_HRTIM_OUT_IDLE_WHEN_BURST
5924 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetIdleMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
5926 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5927 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
5928 REG_OFFSET_TAB_OUTxR
[iOutput
]));
5929 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_OUTR_IDLM1
) << REG_SHIFT_TAB_OUTxR
[iOutput
]) >> REG_SHIFT_TAB_OUTxR
[iOutput
]);
5933 * @brief Set the output IDLE level.
5934 * @rmtoll OUTxR IDLES1 LL_HRTIM_OUT_SetIdleLevel\n
5935 * OUTxR IDLES2 LL_HRTIM_OUT_SetIdleLevel
5936 * @note This function must be called prior enabling the timer.
5937 * @note Idle level isn't relevant when the output idle mode is set to LL_HRTIM_OUT_NO_IDLE.
5938 * @param HRTIMx High Resolution Timer instance
5939 * @param Output This parameter can be one of the following values:
5940 * @arg @ref LL_HRTIM_OUTPUT_TA1
5941 * @arg @ref LL_HRTIM_OUTPUT_TA2
5942 * @arg @ref LL_HRTIM_OUTPUT_TB1
5943 * @arg @ref LL_HRTIM_OUTPUT_TB2
5944 * @arg @ref LL_HRTIM_OUTPUT_TC1
5945 * @arg @ref LL_HRTIM_OUTPUT_TC2
5946 * @arg @ref LL_HRTIM_OUTPUT_TD1
5947 * @arg @ref LL_HRTIM_OUTPUT_TD2
5948 * @arg @ref LL_HRTIM_OUTPUT_TE1
5949 * @arg @ref LL_HRTIM_OUTPUT_TE2
5950 * @param IdleLevel This parameter can be one of the following values:
5951 * @arg @ref LL_HRTIM_OUT_IDLELEVEL_INACTIVE
5952 * @arg @ref LL_HRTIM_OUT_IDLELEVEL_ACTIVE
5955 __STATIC_INLINE
void LL_HRTIM_OUT_SetIdleLevel(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t IdleLevel
)
5957 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5958 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
5959 REG_OFFSET_TAB_OUTxR
[iOutput
]));
5960 MODIFY_REG(*pReg
, (HRTIM_OUTR_IDLES1
<< REG_SHIFT_TAB_OUTxR
[iOutput
]), (IdleLevel
<< REG_SHIFT_TAB_OUTxR
[iOutput
]));
5964 * @brief Get actual output IDLE level.
5965 * @rmtoll OUTxR IDLES1 LL_HRTIM_OUT_GetIdleLevel\n
5966 * OUTxR IDLES2 LL_HRTIM_OUT_GetIdleLevel
5967 * @param HRTIMx High Resolution Timer instance
5968 * @param Output This parameter can be one of the following values:
5969 * @arg @ref LL_HRTIM_OUTPUT_TA1
5970 * @arg @ref LL_HRTIM_OUTPUT_TA2
5971 * @arg @ref LL_HRTIM_OUTPUT_TB1
5972 * @arg @ref LL_HRTIM_OUTPUT_TB2
5973 * @arg @ref LL_HRTIM_OUTPUT_TC1
5974 * @arg @ref LL_HRTIM_OUTPUT_TC2
5975 * @arg @ref LL_HRTIM_OUTPUT_TD1
5976 * @arg @ref LL_HRTIM_OUTPUT_TD2
5977 * @arg @ref LL_HRTIM_OUTPUT_TE1
5978 * @arg @ref LL_HRTIM_OUTPUT_TE2
5979 * @retval IdleLevel This parameter can be one of the following values:
5980 * @arg @ref LL_HRTIM_OUT_IDLELEVEL_INACTIVE
5981 * @arg @ref LL_HRTIM_OUT_IDLELEVEL_ACTIVE
5983 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetIdleLevel(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
5985 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
5986 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
5987 REG_OFFSET_TAB_OUTxR
[iOutput
]));
5988 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_OUTR_IDLES1
) << REG_SHIFT_TAB_OUTxR
[iOutput
]) >> REG_SHIFT_TAB_OUTxR
[iOutput
]);
5992 * @brief Set the output FAULT state.
5993 * @rmtoll OUTxR FAULT1 LL_HRTIM_OUT_SetFaultState\n
5994 * OUTxR FAULT2 LL_HRTIM_OUT_SetFaultState
5995 * @note This function must not called when the timer is enabled and a fault
5996 * channel is enabled at timer level.
5997 * @param HRTIMx High Resolution Timer instance
5998 * @param Output This parameter can be one of the following values:
5999 * @arg @ref LL_HRTIM_OUTPUT_TA1
6000 * @arg @ref LL_HRTIM_OUTPUT_TA2
6001 * @arg @ref LL_HRTIM_OUTPUT_TB1
6002 * @arg @ref LL_HRTIM_OUTPUT_TB2
6003 * @arg @ref LL_HRTIM_OUTPUT_TC1
6004 * @arg @ref LL_HRTIM_OUTPUT_TC2
6005 * @arg @ref LL_HRTIM_OUTPUT_TD1
6006 * @arg @ref LL_HRTIM_OUTPUT_TD2
6007 * @arg @ref LL_HRTIM_OUTPUT_TE1
6008 * @arg @ref LL_HRTIM_OUTPUT_TE2
6009 * @param FaultState This parameter can be one of the following values:
6010 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_NO_ACTION
6011 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_ACTIVE
6012 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_INACTIVE
6013 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_HIGHZ
6016 __STATIC_INLINE
void LL_HRTIM_OUT_SetFaultState(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t FaultState
)
6018 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6019 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
6020 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6021 MODIFY_REG(*pReg
, (HRTIM_OUTR_FAULT1
<< REG_SHIFT_TAB_OUTxR
[iOutput
]), (FaultState
<< REG_SHIFT_TAB_OUTxR
[iOutput
]));
6025 * @brief Get actual FAULT state.
6026 * @rmtoll OUTxR FAULT1 LL_HRTIM_OUT_GetFaultState\n
6027 * OUTxR FAULT2 LL_HRTIM_OUT_GetFaultState
6028 * @param HRTIMx High Resolution Timer instance
6029 * @param Output This parameter can be one of the following values:
6030 * @arg @ref LL_HRTIM_OUTPUT_TA1
6031 * @arg @ref LL_HRTIM_OUTPUT_TA2
6032 * @arg @ref LL_HRTIM_OUTPUT_TB1
6033 * @arg @ref LL_HRTIM_OUTPUT_TB2
6034 * @arg @ref LL_HRTIM_OUTPUT_TC1
6035 * @arg @ref LL_HRTIM_OUTPUT_TC2
6036 * @arg @ref LL_HRTIM_OUTPUT_TD1
6037 * @arg @ref LL_HRTIM_OUTPUT_TD2
6038 * @arg @ref LL_HRTIM_OUTPUT_TE1
6039 * @arg @ref LL_HRTIM_OUTPUT_TE2
6040 * @retval FaultState This parameter can be one of the following values:
6041 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_NO_ACTION
6042 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_ACTIVE
6043 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_INACTIVE
6044 * @arg @ref LL_HRTIM_OUT_FAULTSTATE_HIGHZ
6046 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetFaultState(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
6048 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6049 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
6050 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6051 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_OUTR_FAULT1
) << REG_SHIFT_TAB_OUTxR
[iOutput
]) >> REG_SHIFT_TAB_OUTxR
[iOutput
]);
6055 * @brief Set the output chopper mode.
6056 * @rmtoll OUTxR CHP1 LL_HRTIM_OUT_SetChopperMode\n
6057 * OUTxR CHP2 LL_HRTIM_OUT_SetChopperMode
6058 * @note This function must not called when the timer is enabled.
6059 * @param HRTIMx High Resolution Timer instance
6060 * @param Output This parameter can be one of the following values:
6061 * @arg @ref LL_HRTIM_OUTPUT_TA1
6062 * @arg @ref LL_HRTIM_OUTPUT_TA2
6063 * @arg @ref LL_HRTIM_OUTPUT_TB1
6064 * @arg @ref LL_HRTIM_OUTPUT_TB2
6065 * @arg @ref LL_HRTIM_OUTPUT_TC1
6066 * @arg @ref LL_HRTIM_OUTPUT_TC2
6067 * @arg @ref LL_HRTIM_OUTPUT_TD1
6068 * @arg @ref LL_HRTIM_OUTPUT_TD2
6069 * @arg @ref LL_HRTIM_OUTPUT_TE1
6070 * @arg @ref LL_HRTIM_OUTPUT_TE2
6071 * @param ChopperMode This parameter can be one of the following values:
6072 * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_DISABLED
6073 * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_ENABLED
6076 __STATIC_INLINE
void LL_HRTIM_OUT_SetChopperMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t ChopperMode
)
6078 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6079 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
6080 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6081 MODIFY_REG(*pReg
, (HRTIM_OUTR_CHP1
<< REG_SHIFT_TAB_OUTxR
[iOutput
]), (ChopperMode
<< REG_SHIFT_TAB_OUTxR
[iOutput
]));
6085 * @brief Get actual output chopper mode
6086 * @rmtoll OUTxR CHP1 LL_HRTIM_OUT_GetChopperMode\n
6087 * OUTxR CHP2 LL_HRTIM_OUT_GetChopperMode
6088 * @param HRTIMx High Resolution Timer instance
6089 * @param Output This parameter can be one of the following values:
6090 * @arg @ref LL_HRTIM_OUTPUT_TA1
6091 * @arg @ref LL_HRTIM_OUTPUT_TA2
6092 * @arg @ref LL_HRTIM_OUTPUT_TB1
6093 * @arg @ref LL_HRTIM_OUTPUT_TB2
6094 * @arg @ref LL_HRTIM_OUTPUT_TC1
6095 * @arg @ref LL_HRTIM_OUTPUT_TC2
6096 * @arg @ref LL_HRTIM_OUTPUT_TD1
6097 * @arg @ref LL_HRTIM_OUTPUT_TD2
6098 * @arg @ref LL_HRTIM_OUTPUT_TE1
6099 * @arg @ref LL_HRTIM_OUTPUT_TE2
6100 * @retval ChopperMode This parameter can be one of the following values:
6101 * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_DISABLED
6102 * @arg @ref LL_HRTIM_OUT_CHOPPERMODE_ENABLED
6104 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetChopperMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
6106 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6107 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
6108 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6109 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_OUTR_CHP1
) << REG_SHIFT_TAB_OUTxR
[iOutput
]) >> REG_SHIFT_TAB_OUTxR
[iOutput
]);
6113 * @brief Set the output burst mode entry mode.
6114 * @rmtoll OUTxR DIDL1 LL_HRTIM_OUT_SetBMEntryMode\n
6115 * OUTxR DIDL2 LL_HRTIM_OUT_SetBMEntryMode
6116 * @note This function must not called when the timer is enabled.
6117 * @param HRTIMx High Resolution Timer instance
6118 * @param Output This parameter can be one of the following values:
6119 * @arg @ref LL_HRTIM_OUTPUT_TA1
6120 * @arg @ref LL_HRTIM_OUTPUT_TA2
6121 * @arg @ref LL_HRTIM_OUTPUT_TB1
6122 * @arg @ref LL_HRTIM_OUTPUT_TB2
6123 * @arg @ref LL_HRTIM_OUTPUT_TC1
6124 * @arg @ref LL_HRTIM_OUTPUT_TC2
6125 * @arg @ref LL_HRTIM_OUTPUT_TD1
6126 * @arg @ref LL_HRTIM_OUTPUT_TD2
6127 * @arg @ref LL_HRTIM_OUTPUT_TE1
6128 * @arg @ref LL_HRTIM_OUTPUT_TE2
6129 * @param BMEntryMode This parameter can be one of the following values:
6130 * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR
6131 * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED
6134 __STATIC_INLINE
void LL_HRTIM_OUT_SetBMEntryMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t BMEntryMode
)
6136 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6137 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
6138 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6139 MODIFY_REG(*pReg
, (HRTIM_OUTR_DIDL1
<< REG_SHIFT_TAB_OUTxR
[iOutput
]), (BMEntryMode
<< REG_SHIFT_TAB_OUTxR
[iOutput
]));
6143 * @brief Get actual output burst mode entry mode.
6144 * @rmtoll OUTxR DIDL1 LL_HRTIM_OUT_GetBMEntryMode\n
6145 * OUTxR DIDL2 LL_HRTIM_OUT_GetBMEntryMode
6146 * @param HRTIMx High Resolution Timer instance
6147 * @param Output This parameter can be one of the following values:
6148 * @arg @ref LL_HRTIM_OUTPUT_TA1
6149 * @arg @ref LL_HRTIM_OUTPUT_TA2
6150 * @arg @ref LL_HRTIM_OUTPUT_TB1
6151 * @arg @ref LL_HRTIM_OUTPUT_TB2
6152 * @arg @ref LL_HRTIM_OUTPUT_TC1
6153 * @arg @ref LL_HRTIM_OUTPUT_TC2
6154 * @arg @ref LL_HRTIM_OUTPUT_TD1
6155 * @arg @ref LL_HRTIM_OUTPUT_TD2
6156 * @arg @ref LL_HRTIM_OUTPUT_TE1
6157 * @arg @ref LL_HRTIM_OUTPUT_TE2
6158 * @retval BMEntryMode This parameter can be one of the following values:
6159 * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_REGULAR
6160 * @arg @ref LL_HRTIM_OUT_BM_ENTRYMODE_DELAYED
6162 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetBMEntryMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
6164 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6165 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].OUTxR
) +
6166 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6167 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_OUTR_DIDL1
) << REG_SHIFT_TAB_OUTxR
[iOutput
]) >> REG_SHIFT_TAB_OUTxR
[iOutput
]);
6171 * @brief Get the level (active or inactive) of the designated output when the
6172 * delayed protection was triggered.
6173 * @rmtoll TIMxISR O1SRSR LL_HRTIM_OUT_GetDLYPRTOutStatus\n
6174 * TIMxISR O2SRSR LL_HRTIM_OUT_GetDLYPRTOutStatus
6175 * @param HRTIMx High Resolution Timer instance
6176 * @param Output This parameter can be one of the following values:
6177 * @arg @ref LL_HRTIM_OUTPUT_TA1
6178 * @arg @ref LL_HRTIM_OUTPUT_TA2
6179 * @arg @ref LL_HRTIM_OUTPUT_TB1
6180 * @arg @ref LL_HRTIM_OUTPUT_TB2
6181 * @arg @ref LL_HRTIM_OUTPUT_TC1
6182 * @arg @ref LL_HRTIM_OUTPUT_TC2
6183 * @arg @ref LL_HRTIM_OUTPUT_TD1
6184 * @arg @ref LL_HRTIM_OUTPUT_TD2
6185 * @arg @ref LL_HRTIM_OUTPUT_TE1
6186 * @arg @ref LL_HRTIM_OUTPUT_TE2
6187 * @retval OutputLevel This parameter can be one of the following values:
6188 * @arg @ref LL_HRTIM_OUT_LEVEL_INACTIVE
6189 * @arg @ref LL_HRTIM_OUT_LEVEL_ACTIVE
6191 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetDLYPRTOutStatus(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
6193 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6194 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].TIMxISR
) +
6195 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6196 return ((READ_BIT(*pReg
, (uint32_t)(HRTIM_TIMISR_O1STAT
) << REG_SHIFT_TAB_OxSTAT
[iOutput
]) >> REG_SHIFT_TAB_OxSTAT
[iOutput
]) >>
6197 HRTIM_TIMISR_O1STAT_Pos
);
6201 * @brief Force the timer output to its active or inactive level.
6202 * @rmtoll SETx1R SST LL_HRTIM_OUT_ForceLevel\n
6203 * RSTx1R SRT LL_HRTIM_OUT_ForceLevel\n
6204 * SETx2R SST LL_HRTIM_OUT_ForceLevel\n
6205 * RSTx2R SRT LL_HRTIM_OUT_ForceLevel
6206 * @param HRTIMx High Resolution Timer instance
6207 * @param Output This parameter can be one of the following values:
6208 * @arg @ref LL_HRTIM_OUTPUT_TA1
6209 * @arg @ref LL_HRTIM_OUTPUT_TA2
6210 * @arg @ref LL_HRTIM_OUTPUT_TB1
6211 * @arg @ref LL_HRTIM_OUTPUT_TB2
6212 * @arg @ref LL_HRTIM_OUTPUT_TC1
6213 * @arg @ref LL_HRTIM_OUTPUT_TC2
6214 * @arg @ref LL_HRTIM_OUTPUT_TD1
6215 * @arg @ref LL_HRTIM_OUTPUT_TD2
6216 * @arg @ref LL_HRTIM_OUTPUT_TE1
6217 * @arg @ref LL_HRTIM_OUTPUT_TE2
6218 * @param OutputLevel This parameter can be one of the following values:
6219 * @arg @ref LL_HRTIM_OUT_LEVEL_INACTIVE
6220 * @arg @ref LL_HRTIM_OUT_LEVEL_ACTIVE
6223 __STATIC_INLINE
void LL_HRTIM_OUT_ForceLevel(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
, uint32_t OutputLevel
)
6225 const uint8_t REG_OFFSET_TAB_OUT_LEVEL
[] =
6227 0x04U
, /* 0: LL_HRTIM_OUT_LEVEL_INACTIVE */
6228 0x00U
/* 1: LL_HRTIM_OUT_LEVEL_ACTIVE */
6231 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6232 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].SETx1R
) +
6233 REG_OFFSET_TAB_SETxR
[iOutput
] + REG_OFFSET_TAB_OUT_LEVEL
[OutputLevel
]));
6234 SET_BIT(*pReg
, HRTIM_SET1R_SST
);
6238 * @brief Get actual output level, before the output stage (chopper, polarity).
6239 * @rmtoll TIMxISR O1CPY LL_HRTIM_OUT_GetLevel\n
6240 * TIMxISR O2CPY LL_HRTIM_OUT_GetLevel
6241 * @param HRTIMx High Resolution Timer instance
6242 * @param Output This parameter can be one of the following values:
6243 * @arg @ref LL_HRTIM_OUTPUT_TA1
6244 * @arg @ref LL_HRTIM_OUTPUT_TA2
6245 * @arg @ref LL_HRTIM_OUTPUT_TB1
6246 * @arg @ref LL_HRTIM_OUTPUT_TB2
6247 * @arg @ref LL_HRTIM_OUTPUT_TC1
6248 * @arg @ref LL_HRTIM_OUTPUT_TC2
6249 * @arg @ref LL_HRTIM_OUTPUT_TD1
6250 * @arg @ref LL_HRTIM_OUTPUT_TD2
6251 * @arg @ref LL_HRTIM_OUTPUT_TE1
6252 * @arg @ref LL_HRTIM_OUTPUT_TE2
6253 * @retval OutputLevel This parameter can be one of the following values:
6254 * @arg @ref LL_HRTIM_OUT_LEVEL_INACTIVE
6255 * @arg @ref LL_HRTIM_OUT_LEVEL_ACTIVE
6257 __STATIC_INLINE
uint32_t LL_HRTIM_OUT_GetLevel(HRTIM_TypeDef
*HRTIMx
, uint32_t Output
)
6259 register uint32_t iOutput
= (uint8_t)(POSITION_VAL(Output
) - POSITION_VAL(LL_HRTIM_OUTPUT_TA1
));
6260 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sTimerxRegs
[0].TIMxISR
) +
6261 REG_OFFSET_TAB_OUTxR
[iOutput
]));
6262 return ((READ_BIT(*pReg
, (uint32_t)(HRTIM_TIMISR_O1CPY
) << REG_SHIFT_TAB_OxSTAT
[iOutput
]) >> REG_SHIFT_TAB_OxSTAT
[iOutput
]) >>
6263 HRTIM_TIMISR_O1CPY_Pos
);
6270 /** @defgroup HRTIM_LL_EF_External_Event_management External_Event_management
6275 * @brief Configure external event conditioning.
6276 * @rmtoll EECR1 EE1SRC LL_HRTIM_EE_Config\n
6277 * EECR1 EE1POL LL_HRTIM_EE_Config\n
6278 * EECR1 EE1SNS LL_HRTIM_EE_Config\n
6279 * EECR1 EE1FAST LL_HRTIM_EE_Config\n
6280 * EECR1 EE2SRC LL_HRTIM_EE_Config\n
6281 * EECR1 EE2POL LL_HRTIM_EE_Config\n
6282 * EECR1 EE2SNS LL_HRTIM_EE_Config\n
6283 * EECR1 EE2FAST LL_HRTIM_EE_Config\n
6284 * EECR1 EE3SRC LL_HRTIM_EE_Config\n
6285 * EECR1 EE3POL LL_HRTIM_EE_Config\n
6286 * EECR1 EE3SNS LL_HRTIM_EE_Config\n
6287 * EECR1 EE3FAST LL_HRTIM_EE_Config\n
6288 * EECR1 EE4SRC LL_HRTIM_EE_Config\n
6289 * EECR1 EE4POL LL_HRTIM_EE_Config\n
6290 * EECR1 EE4SNS LL_HRTIM_EE_Config\n
6291 * EECR1 EE4FAST LL_HRTIM_EE_Config\n
6292 * EECR1 EE5SRC LL_HRTIM_EE_Config\n
6293 * EECR1 EE5POL LL_HRTIM_EE_Config\n
6294 * EECR1 EE5SNS LL_HRTIM_EE_Config\n
6295 * EECR1 EE5FAST LL_HRTIM_EE_Config\n
6296 * EECR2 EE6SRC LL_HRTIM_EE_Config\n
6297 * EECR2 EE6POL LL_HRTIM_EE_Config\n
6298 * EECR2 EE6SNS LL_HRTIM_EE_Config\n
6299 * EECR2 EE6FAST LL_HRTIM_EE_Config\n
6300 * EECR2 EE7SRC LL_HRTIM_EE_Config\n
6301 * EECR2 EE7POL LL_HRTIM_EE_Config\n
6302 * EECR2 EE7SNS LL_HRTIM_EE_Config\n
6303 * EECR2 EE7FAST LL_HRTIM_EE_Config\n
6304 * EECR2 EE8SRC LL_HRTIM_EE_Config\n
6305 * EECR2 EE8POL LL_HRTIM_EE_Config\n
6306 * EECR2 EE8SNS LL_HRTIM_EE_Config\n
6307 * EECR2 EE8FAST LL_HRTIM_EE_Config\n
6308 * EECR2 EE9SRC LL_HRTIM_EE_Config\n
6309 * EECR2 EE9POL LL_HRTIM_EE_Config\n
6310 * EECR2 EE9SNS LL_HRTIM_EE_Config\n
6311 * EECR2 EE9FAST LL_HRTIM_EE_Config\n
6312 * EECR2 EE10SRC LL_HRTIM_EE_Config\n
6313 * EECR2 EE10POL LL_HRTIM_EE_Config\n
6314 * EECR2 EE10SNS LL_HRTIM_EE_Config\n
6315 * EECR2 EE10FAST LL_HRTIM_EE_Config
6316 * @note This function must not be called when the timer counter is enabled.
6317 * @note Event source (EExSrc1..EExSRC4) mapping depends on configured event channel.
6318 * @note Fast mode is available only for LL_HRTIM_EVENT_1..5.
6319 * @param HRTIMx High Resolution Timer instance
6320 * @param Event This parameter can be one of the following values:
6321 * @arg @ref LL_HRTIM_EVENT_1
6322 * @arg @ref LL_HRTIM_EVENT_2
6323 * @arg @ref LL_HRTIM_EVENT_3
6324 * @arg @ref LL_HRTIM_EVENT_4
6325 * @arg @ref LL_HRTIM_EVENT_5
6326 * @arg @ref LL_HRTIM_EVENT_6
6327 * @arg @ref LL_HRTIM_EVENT_7
6328 * @arg @ref LL_HRTIM_EVENT_8
6329 * @arg @ref LL_HRTIM_EVENT_9
6330 * @arg @ref LL_HRTIM_EVENT_10
6331 * @param Configuration This parameter must be a combination of all the following values:
6332 * @arg External event source 1 or External event source 2 or External event source 3 or External event source 4
6333 * @arg @ref LL_HRTIM_EE_POLARITY_HIGH or @ref LL_HRTIM_EE_POLARITY_LOW
6334 * @arg @ref LL_HRTIM_EE_SENSITIVITY_LEVEL or @ref LL_HRTIM_EE_SENSITIVITY_RISINGEDGE or @ref LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE or @ref LL_HRTIM_EE_SENSITIVITY_BOTHEDGES
6335 * @arg @ref LL_HRTIM_EE_FASTMODE_DISABLE or @ref LL_HRTIM_EE_FASTMODE_ENABLE
6338 __STATIC_INLINE
void LL_HRTIM_EE_Config(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
, uint32_t Configuration
)
6340 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6341 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6342 REG_OFFSET_TAB_EECR
[iEvent
]));
6343 MODIFY_REG(*pReg
, (HRTIM_EE_CONFIG_MASK
<< REG_SHIFT_TAB_EExSRC
[iEvent
]),
6344 (Configuration
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
6348 * @brief Set the external event source.
6349 * @rmtoll EECR1 EE1SRC LL_HRTIM_EE_SetSrc\n
6350 * EECR1 EE2SRC LL_HRTIM_EE_SetSrc\n
6351 * EECR1 EE3SRC LL_HRTIM_EE_SetSrc\n
6352 * EECR1 EE4SRC LL_HRTIM_EE_SetSrc\n
6353 * EECR1 EE5SRC LL_HRTIM_EE_SetSrc\n
6354 * EECR2 EE6SRC LL_HRTIM_EE_SetSrc\n
6355 * EECR2 EE7SRC LL_HRTIM_EE_SetSrc\n
6356 * EECR2 EE8SRC LL_HRTIM_EE_SetSrc\n
6357 * EECR2 EE9SRC LL_HRTIM_EE_SetSrc\n
6358 * EECR2 EE10SRC LL_HRTIM_EE_SetSrc
6359 * @param HRTIMx High Resolution Timer instance
6360 * @param Event This parameter can be one of the following values:
6361 * @arg @ref LL_HRTIM_EVENT_1
6362 * @arg @ref LL_HRTIM_EVENT_2
6363 * @arg @ref LL_HRTIM_EVENT_3
6364 * @arg @ref LL_HRTIM_EVENT_4
6365 * @arg @ref LL_HRTIM_EVENT_5
6366 * @arg @ref LL_HRTIM_EVENT_6
6367 * @arg @ref LL_HRTIM_EVENT_7
6368 * @arg @ref LL_HRTIM_EVENT_8
6369 * @arg @ref LL_HRTIM_EVENT_9
6370 * @arg @ref LL_HRTIM_EVENT_10
6371 * @param Src This parameter can be one of the following values:
6372 * @arg External event source 1
6373 * @arg External event source 2
6374 * @arg External event source 3
6375 * @arg External event source 4
6378 __STATIC_INLINE
void LL_HRTIM_EE_SetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
, uint32_t Src
)
6380 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6381 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6382 REG_OFFSET_TAB_EECR
[iEvent
]));
6383 MODIFY_REG(*pReg
, (HRTIM_EECR1_EE1SRC
<< REG_SHIFT_TAB_EExSRC
[iEvent
]), (Src
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
6387 * @brief Get actual external event source.
6388 * @rmtoll EECR1 EE1SRC LL_HRTIM_EE_GetSrc\n
6389 * EECR1 EE2SRC LL_HRTIM_EE_GetSrc\n
6390 * EECR1 EE3SRC LL_HRTIM_EE_GetSrc\n
6391 * EECR1 EE4SRC LL_HRTIM_EE_GetSrc\n
6392 * EECR1 EE5SRC LL_HRTIM_EE_GetSrc\n
6393 * EECR2 EE6SRC LL_HRTIM_EE_GetSrc\n
6394 * EECR2 EE7SRC LL_HRTIM_EE_GetSrc\n
6395 * EECR2 EE8SRC LL_HRTIM_EE_GetSrc\n
6396 * EECR2 EE9SRC LL_HRTIM_EE_GetSrc\n
6397 * EECR2 EE10SRC LL_HRTIM_EE_GetSrc
6398 * @param HRTIMx High Resolution Timer instance
6399 * @param Event This parameter can be one of the following values:
6400 * @arg @ref LL_HRTIM_EVENT_1
6401 * @arg @ref LL_HRTIM_EVENT_2
6402 * @arg @ref LL_HRTIM_EVENT_3
6403 * @arg @ref LL_HRTIM_EVENT_4
6404 * @arg @ref LL_HRTIM_EVENT_5
6405 * @arg @ref LL_HRTIM_EVENT_6
6406 * @arg @ref LL_HRTIM_EVENT_7
6407 * @arg @ref LL_HRTIM_EVENT_8
6408 * @arg @ref LL_HRTIM_EVENT_9
6409 * @arg @ref LL_HRTIM_EVENT_10
6410 * @retval EventSrc This parameter can be one of the following values:
6411 * @arg External event source 1
6412 * @arg External event source 2
6413 * @arg External event source 3
6414 * @arg External event source 4
6416 __STATIC_INLINE
uint32_t LL_HRTIM_EE_GetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
)
6418 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6419 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6420 REG_OFFSET_TAB_EECR
[iEvent
]));
6421 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_EECR1_EE1SRC
) << REG_SHIFT_TAB_EExSRC
[iEvent
]) >> REG_SHIFT_TAB_EExSRC
[iEvent
]);
6425 * @brief Set the polarity of an external event.
6426 * @rmtoll EECR1 EE1POL LL_HRTIM_EE_SetPolarity\n
6427 * EECR1 EE2POL LL_HRTIM_EE_SetPolarity\n
6428 * EECR1 EE3POL LL_HRTIM_EE_SetPolarity\n
6429 * EECR1 EE4POL LL_HRTIM_EE_SetPolarity\n
6430 * EECR1 EE5POL LL_HRTIM_EE_SetPolarity\n
6431 * EECR2 EE6POL LL_HRTIM_EE_SetPolarity\n
6432 * EECR2 EE7POL LL_HRTIM_EE_SetPolarity\n
6433 * EECR2 EE8POL LL_HRTIM_EE_SetPolarity\n
6434 * EECR2 EE9POL LL_HRTIM_EE_SetPolarity\n
6435 * EECR2 EE10POL LL_HRTIM_EE_SetPolarity
6436 * @note This function must not be called when the timer counter is enabled.
6437 * @note Event polarity is only significant when event detection is level-sensitive.
6438 * @param HRTIMx High Resolution Timer instance
6439 * @param Event This parameter can be one of the following values:
6440 * @arg @ref LL_HRTIM_EVENT_1
6441 * @arg @ref LL_HRTIM_EVENT_2
6442 * @arg @ref LL_HRTIM_EVENT_3
6443 * @arg @ref LL_HRTIM_EVENT_4
6444 * @arg @ref LL_HRTIM_EVENT_5
6445 * @arg @ref LL_HRTIM_EVENT_6
6446 * @arg @ref LL_HRTIM_EVENT_7
6447 * @arg @ref LL_HRTIM_EVENT_8
6448 * @arg @ref LL_HRTIM_EVENT_9
6449 * @arg @ref LL_HRTIM_EVENT_10
6450 * @param Polarity This parameter can be one of the following values:
6451 * @arg @ref LL_HRTIM_EE_POLARITY_HIGH
6452 * @arg @ref LL_HRTIM_EE_POLARITY_LOW
6455 __STATIC_INLINE
void LL_HRTIM_EE_SetPolarity(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
, uint32_t Polarity
)
6457 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6458 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6459 REG_OFFSET_TAB_EECR
[iEvent
]));
6460 MODIFY_REG(*pReg
, (HRTIM_EECR1_EE1POL
<< REG_SHIFT_TAB_EExSRC
[iEvent
]), (Polarity
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
6464 * @brief Get actual polarity setting of an external event.
6465 * @rmtoll EECR1 EE1POL LL_HRTIM_EE_GetPolarity\n
6466 * EECR1 EE2POL LL_HRTIM_EE_GetPolarity\n
6467 * EECR1 EE3POL LL_HRTIM_EE_GetPolarity\n
6468 * EECR1 EE4POL LL_HRTIM_EE_GetPolarity\n
6469 * EECR1 EE5POL LL_HRTIM_EE_GetPolarity\n
6470 * EECR2 EE6POL LL_HRTIM_EE_GetPolarity\n
6471 * EECR2 EE7POL LL_HRTIM_EE_GetPolarity\n
6472 * EECR2 EE8POL LL_HRTIM_EE_GetPolarity\n
6473 * EECR2 EE9POL LL_HRTIM_EE_GetPolarity\n
6474 * EECR2 EE10POL LL_HRTIM_EE_GetPolarity
6475 * @param HRTIMx High Resolution Timer instance
6476 * @param Event This parameter can be one of the following values:
6477 * @arg @ref LL_HRTIM_EVENT_1
6478 * @arg @ref LL_HRTIM_EVENT_2
6479 * @arg @ref LL_HRTIM_EVENT_3
6480 * @arg @ref LL_HRTIM_EVENT_4
6481 * @arg @ref LL_HRTIM_EVENT_5
6482 * @arg @ref LL_HRTIM_EVENT_6
6483 * @arg @ref LL_HRTIM_EVENT_7
6484 * @arg @ref LL_HRTIM_EVENT_8
6485 * @arg @ref LL_HRTIM_EVENT_9
6486 * @arg @ref LL_HRTIM_EVENT_10
6487 * @retval Polarity This parameter can be one of the following values:
6488 * @arg @ref LL_HRTIM_EE_POLARITY_HIGH
6489 * @arg @ref LL_HRTIM_EE_POLARITY_LOW
6491 __STATIC_INLINE
uint32_t LL_HRTIM_EE_GetPolarity(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
)
6493 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6494 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6495 REG_OFFSET_TAB_EECR
[iEvent
]));
6496 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_EECR1_EE1POL
) << REG_SHIFT_TAB_EExSRC
[iEvent
]) >> REG_SHIFT_TAB_EExSRC
[iEvent
]);
6500 * @brief Set the sensitivity of an external event.
6501 * @rmtoll EECR1 EE1SNS LL_HRTIM_EE_SetSensitivity\n
6502 * EECR1 EE2SNS LL_HRTIM_EE_SetSensitivity\n
6503 * EECR1 EE3SNS LL_HRTIM_EE_SetSensitivity\n
6504 * EECR1 EE4SNS LL_HRTIM_EE_SetSensitivity\n
6505 * EECR1 EE5SNS LL_HRTIM_EE_SetSensitivity\n
6506 * EECR2 EE6SNS LL_HRTIM_EE_SetSensitivity\n
6507 * EECR2 EE7SNS LL_HRTIM_EE_SetSensitivity\n
6508 * EECR2 EE8SNS LL_HRTIM_EE_SetSensitivity\n
6509 * EECR2 EE9SNS LL_HRTIM_EE_SetSensitivity\n
6510 * EECR2 EE10SNS LL_HRTIM_EE_SetSensitivity
6511 * @param HRTIMx High Resolution Timer instance
6512 * @param Event This parameter can be one of the following values:
6513 * @arg @ref LL_HRTIM_EVENT_1
6514 * @arg @ref LL_HRTIM_EVENT_2
6515 * @arg @ref LL_HRTIM_EVENT_3
6516 * @arg @ref LL_HRTIM_EVENT_4
6517 * @arg @ref LL_HRTIM_EVENT_5
6518 * @arg @ref LL_HRTIM_EVENT_6
6519 * @arg @ref LL_HRTIM_EVENT_7
6520 * @arg @ref LL_HRTIM_EVENT_8
6521 * @arg @ref LL_HRTIM_EVENT_9
6522 * @arg @ref LL_HRTIM_EVENT_10
6523 * @param Sensitivity This parameter can be one of the following values:
6524 * @arg @ref LL_HRTIM_EE_SENSITIVITY_LEVEL
6525 * @arg @ref LL_HRTIM_EE_SENSITIVITY_RISINGEDGE
6526 * @arg @ref LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE
6527 * @arg @ref LL_HRTIM_EE_SENSITIVITY_BOTHEDGES
6531 __STATIC_INLINE
void LL_HRTIM_EE_SetSensitivity(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
, uint32_t Sensitivity
)
6533 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6534 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6535 REG_OFFSET_TAB_EECR
[iEvent
]));
6536 MODIFY_REG(*pReg
, (HRTIM_EECR1_EE1SNS
<< REG_SHIFT_TAB_EExSRC
[iEvent
]), (Sensitivity
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
6540 * @brief Get actual sensitivity setting of an external event.
6541 * @rmtoll EECR1 EE1SNS LL_HRTIM_EE_GetSensitivity\n
6542 * EECR1 EE2SNS LL_HRTIM_EE_GetSensitivity\n
6543 * EECR1 EE3SNS LL_HRTIM_EE_GetSensitivity\n
6544 * EECR1 EE4SNS LL_HRTIM_EE_GetSensitivity\n
6545 * EECR1 EE5SNS LL_HRTIM_EE_GetSensitivity\n
6546 * EECR2 EE6SNS LL_HRTIM_EE_GetSensitivity\n
6547 * EECR2 EE7SNS LL_HRTIM_EE_GetSensitivity\n
6548 * EECR2 EE8SNS LL_HRTIM_EE_GetSensitivity\n
6549 * EECR2 EE9SNS LL_HRTIM_EE_GetSensitivity\n
6550 * EECR2 EE10SNS LL_HRTIM_EE_GetSensitivity
6551 * @param HRTIMx High Resolution Timer instance
6552 * @param Event This parameter can be one of the following values:
6553 * @arg @ref LL_HRTIM_EVENT_1
6554 * @arg @ref LL_HRTIM_EVENT_2
6555 * @arg @ref LL_HRTIM_EVENT_3
6556 * @arg @ref LL_HRTIM_EVENT_4
6557 * @arg @ref LL_HRTIM_EVENT_5
6558 * @arg @ref LL_HRTIM_EVENT_6
6559 * @arg @ref LL_HRTIM_EVENT_7
6560 * @arg @ref LL_HRTIM_EVENT_8
6561 * @arg @ref LL_HRTIM_EVENT_9
6562 * @arg @ref LL_HRTIM_EVENT_10
6563 * @retval Polarity This parameter can be one of the following values:
6564 * @arg @ref LL_HRTIM_EE_SENSITIVITY_LEVEL
6565 * @arg @ref LL_HRTIM_EE_SENSITIVITY_RISINGEDGE
6566 * @arg @ref LL_HRTIM_EE_SENSITIVITY_FALLINGEDGE
6567 * @arg @ref LL_HRTIM_EE_SENSITIVITY_BOTHEDGES
6569 __STATIC_INLINE
uint32_t LL_HRTIM_EE_GetSensitivity(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
)
6571 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6572 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6573 REG_OFFSET_TAB_EECR
[iEvent
]));
6574 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_EECR1_EE1SNS
) << REG_SHIFT_TAB_EExSRC
[iEvent
]) >> REG_SHIFT_TAB_EExSRC
[iEvent
]);
6578 * @brief Set the fast mode of an external event.
6579 * @rmtoll EECR1 EE1FAST LL_HRTIM_EE_SetFastMode\n
6580 * EECR1 EE2FAST LL_HRTIM_EE_SetFastMode\n
6581 * EECR1 EE3FAST LL_HRTIM_EE_SetFastMode\n
6582 * EECR1 EE4FAST LL_HRTIM_EE_SetFastMode\n
6583 * EECR1 EE5FAST LL_HRTIM_EE_SetFastMode\n
6584 * EECR2 EE6FAST LL_HRTIM_EE_SetFastMode\n
6585 * EECR2 EE7FAST LL_HRTIM_EE_SetFastMode\n
6586 * EECR2 EE8FAST LL_HRTIM_EE_SetFastMode\n
6587 * EECR2 EE9FAST LL_HRTIM_EE_SetFastMode\n
6588 * EECR2 EE10FAST LL_HRTIM_EE_SetFastMode
6589 * @note This function must not be called when the timer counter is enabled.
6590 * @param HRTIMx High Resolution Timer instance
6591 * @param Event This parameter can be one of the following values:
6592 * @arg @ref LL_HRTIM_EVENT_1
6593 * @arg @ref LL_HRTIM_EVENT_2
6594 * @arg @ref LL_HRTIM_EVENT_3
6595 * @arg @ref LL_HRTIM_EVENT_4
6596 * @arg @ref LL_HRTIM_EVENT_5
6597 * @param FastMode This parameter can be one of the following values:
6598 * @arg @ref LL_HRTIM_EE_FASTMODE_DISABLE
6599 * @arg @ref LL_HRTIM_EE_FASTMODE_ENABLE
6602 __STATIC_INLINE
void LL_HRTIM_EE_SetFastMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
, uint32_t FastMode
)
6604 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6605 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6606 REG_OFFSET_TAB_EECR
[iEvent
]));
6607 MODIFY_REG(*pReg
, (HRTIM_EECR1_EE1FAST
<< REG_SHIFT_TAB_EExSRC
[iEvent
]), (FastMode
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
6611 * @brief Get actual fast mode setting of an external event.
6612 * @rmtoll EECR1 EE1FAST LL_HRTIM_EE_GetFastMode\n
6613 * EECR1 EE2FAST LL_HRTIM_EE_GetFastMode\n
6614 * EECR1 EE3FAST LL_HRTIM_EE_GetFastMode\n
6615 * EECR1 EE4FAST LL_HRTIM_EE_GetFastMode\n
6616 * EECR1 EE5FAST LL_HRTIM_EE_GetFastMode\n
6617 * EECR2 EE6FAST LL_HRTIM_EE_GetFastMode\n
6618 * EECR2 EE7FAST LL_HRTIM_EE_GetFastMode\n
6619 * EECR2 EE8FAST LL_HRTIM_EE_GetFastMode\n
6620 * EECR2 EE9FAST LL_HRTIM_EE_GetFastMode\n
6621 * EECR2 EE10FAST LL_HRTIM_EE_GetFastMode
6622 * @param HRTIMx High Resolution Timer instance
6623 * @param Event This parameter can be one of the following values:
6624 * @arg @ref LL_HRTIM_EVENT_1
6625 * @arg @ref LL_HRTIM_EVENT_2
6626 * @arg @ref LL_HRTIM_EVENT_3
6627 * @arg @ref LL_HRTIM_EVENT_4
6628 * @arg @ref LL_HRTIM_EVENT_5
6629 * @retval FastMode This parameter can be one of the following values:
6630 * @arg @ref LL_HRTIM_EE_FASTMODE_DISABLE
6631 * @arg @ref LL_HRTIM_EE_FASTMODE_ENABLE
6633 __STATIC_INLINE
uint32_t LL_HRTIM_EE_GetFastMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
)
6635 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6636 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.EECR1
) +
6637 REG_OFFSET_TAB_EECR
[iEvent
]));
6638 return (READ_BIT(*pReg
, (uint32_t)(HRTIM_EECR1_EE1FAST
) << REG_SHIFT_TAB_EExSRC
[iEvent
]) >> REG_SHIFT_TAB_EExSRC
[iEvent
]);
6642 * @brief Set the digital noise filter of a external event.
6643 * @rmtoll EECR3 EE6F LL_HRTIM_EE_SetFilter\n
6644 * EECR3 EE7F LL_HRTIM_EE_SetFilter\n
6645 * EECR3 EE8F LL_HRTIM_EE_SetFilter\n
6646 * EECR3 EE9F LL_HRTIM_EE_SetFilter\n
6647 * EECR3 EE10F LL_HRTIM_EE_SetFilter
6648 * @param HRTIMx High Resolution Timer instance
6649 * @param Event This parameter can be one of the following values:
6650 * @arg @ref LL_HRTIM_EVENT_6
6651 * @arg @ref LL_HRTIM_EVENT_7
6652 * @arg @ref LL_HRTIM_EVENT_8
6653 * @arg @ref LL_HRTIM_EVENT_9
6654 * @arg @ref LL_HRTIM_EVENT_10
6655 * @param Filter This parameter can be one of the following values:
6656 * @arg @ref LL_HRTIM_EE_FILTER_NONE
6657 * @arg @ref LL_HRTIM_EE_FILTER_1
6658 * @arg @ref LL_HRTIM_EE_FILTER_2
6659 * @arg @ref LL_HRTIM_EE_FILTER_3
6660 * @arg @ref LL_HRTIM_EE_FILTER_4
6661 * @arg @ref LL_HRTIM_EE_FILTER_5
6662 * @arg @ref LL_HRTIM_EE_FILTER_6
6663 * @arg @ref LL_HRTIM_EE_FILTER_7
6664 * @arg @ref LL_HRTIM_EE_FILTER_8
6665 * @arg @ref LL_HRTIM_EE_FILTER_9
6666 * @arg @ref LL_HRTIM_EE_FILTER_10
6667 * @arg @ref LL_HRTIM_EE_FILTER_11
6668 * @arg @ref LL_HRTIM_EE_FILTER_12
6669 * @arg @ref LL_HRTIM_EE_FILTER_13
6670 * @arg @ref LL_HRTIM_EE_FILTER_14
6671 * @arg @ref LL_HRTIM_EE_FILTER_15
6674 __STATIC_INLINE
void LL_HRTIM_EE_SetFilter(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
, uint32_t Filter
)
6676 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_1
));
6677 MODIFY_REG(HRTIMx
->sCommonRegs
.EECR3
, (HRTIM_EECR3_EE6F
<< REG_SHIFT_TAB_EExSRC
[iEvent
]),
6678 (Filter
<< REG_SHIFT_TAB_EExSRC
[iEvent
]));
6682 * @brief Get actual digital noise filter setting of a external event.
6683 * @rmtoll EECR3 EE6F LL_HRTIM_EE_GetFilter\n
6684 * EECR3 EE7F LL_HRTIM_EE_GetFilter\n
6685 * EECR3 EE8F LL_HRTIM_EE_GetFilter\n
6686 * EECR3 EE9F LL_HRTIM_EE_GetFilter\n
6687 * EECR3 EE10F LL_HRTIM_EE_GetFilter
6688 * @param HRTIMx High Resolution Timer instance
6689 * @param Event This parameter can be one of the following values:
6690 * @arg @ref LL_HRTIM_EVENT_6
6691 * @arg @ref LL_HRTIM_EVENT_7
6692 * @arg @ref LL_HRTIM_EVENT_8
6693 * @arg @ref LL_HRTIM_EVENT_9
6694 * @arg @ref LL_HRTIM_EVENT_10
6695 * @retval Filter This parameter can be one of the following values:
6696 * @arg @ref LL_HRTIM_EE_FILTER_NONE
6697 * @arg @ref LL_HRTIM_EE_FILTER_1
6698 * @arg @ref LL_HRTIM_EE_FILTER_2
6699 * @arg @ref LL_HRTIM_EE_FILTER_3
6700 * @arg @ref LL_HRTIM_EE_FILTER_4
6701 * @arg @ref LL_HRTIM_EE_FILTER_5
6702 * @arg @ref LL_HRTIM_EE_FILTER_6
6703 * @arg @ref LL_HRTIM_EE_FILTER_7
6704 * @arg @ref LL_HRTIM_EE_FILTER_8
6705 * @arg @ref LL_HRTIM_EE_FILTER_9
6706 * @arg @ref LL_HRTIM_EE_FILTER_10
6707 * @arg @ref LL_HRTIM_EE_FILTER_11
6708 * @arg @ref LL_HRTIM_EE_FILTER_12
6709 * @arg @ref LL_HRTIM_EE_FILTER_13
6710 * @arg @ref LL_HRTIM_EE_FILTER_14
6711 * @arg @ref LL_HRTIM_EE_FILTER_15
6713 __STATIC_INLINE
uint32_t LL_HRTIM_EE_GetFilter(HRTIM_TypeDef
*HRTIMx
, uint32_t Event
)
6715 register uint32_t iEvent
= (uint8_t)(POSITION_VAL(Event
) - POSITION_VAL(LL_HRTIM_EVENT_6
));
6716 return (READ_BIT(HRTIMx
->sCommonRegs
.EECR3
,
6717 (uint32_t)(HRTIM_EECR3_EE6F
) << REG_SHIFT_TAB_EExSRC
[iEvent
]) >> REG_SHIFT_TAB_EExSRC
[iEvent
]);
6721 * @brief Set the external event prescaler.
6722 * @rmtoll EECR3 EEVSD LL_HRTIM_EE_SetPrescaler
6723 * @param HRTIMx High Resolution Timer instance
6724 * @param Prescaler This parameter can be one of the following values:
6725 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV1
6726 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV2
6727 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV4
6728 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV8
6732 __STATIC_INLINE
void LL_HRTIM_EE_SetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Prescaler
)
6734 MODIFY_REG(HRTIMx
->sCommonRegs
.EECR3
, HRTIM_EECR3_EEVSD
, Prescaler
);
6738 * @brief Get actual external event prescaler setting.
6739 * @rmtoll EECR3 EEVSD LL_HRTIM_EE_GetPrescaler
6740 * @param HRTIMx High Resolution Timer instance
6741 * @retval Prescaler This parameter can be one of the following values:
6742 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV1
6743 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV2
6744 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV4
6745 * @arg @ref LL_HRTIM_EE_PRESCALER_DIV8
6748 __STATIC_INLINE
uint32_t LL_HRTIM_EE_GetPrescaler(HRTIM_TypeDef
*HRTIMx
)
6750 return (READ_BIT(HRTIMx
->sCommonRegs
.EECR3
, HRTIM_EECR3_EEVSD
));
6757 /** @defgroup HRTIM_LL_EF_Fault_management Fault_management
6761 * @brief Configure fault signal conditioning Polarity and Source.
6762 * @rmtoll FLTINR1 FLT1P LL_HRTIM_FLT_Config\n
6763 * FLTINR1 FLT1SRC LL_HRTIM_FLT_Config\n
6764 * FLTINR1 FLT2P LL_HRTIM_FLT_Config\n
6765 * FLTINR1 FLT2SRC LL_HRTIM_FLT_Config\n
6766 * FLTINR1 FLT3P LL_HRTIM_FLT_Config\n
6767 * FLTINR1 FLT3SRC LL_HRTIM_FLT_Config\n
6768 * FLTINR1 FLT4P LL_HRTIM_FLT_Config\n
6769 * FLTINR1 FLT4SRC LL_HRTIM_FLT_Config\n
6770 * FLTINR2 FLT5P LL_HRTIM_FLT_Config\n
6771 * FLTINR2 FLT5SRC LL_HRTIM_FLT_Config
6772 * @note This function must not be called when the fault channel is enabled.
6773 * @param HRTIMx High Resolution Timer instance
6774 * @param Fault This parameter can be one of the following values:
6775 * @arg @ref LL_HRTIM_FAULT_1
6776 * @arg @ref LL_HRTIM_FAULT_2
6777 * @arg @ref LL_HRTIM_FAULT_3
6778 * @arg @ref LL_HRTIM_FAULT_4
6779 * @arg @ref LL_HRTIM_FAULT_5
6780 * @param Configuration This parameter must be a combination of all the following values:
6781 * @arg @ref LL_HRTIM_FLT_SRC_DIGITALINPUT..LL_HRTIM_FLT_SRC_INTERNAL
6782 * @arg @ref LL_HRTIM_FLT_POLARITY_LOW..LL_HRTIM_FLT_POLARITY_HIGH
6785 __STATIC_INLINE
void LL_HRTIM_FLT_Config(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
, uint32_t Configuration
)
6787 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
6788 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
6789 REG_OFFSET_TAB_FLTINR
[iFault
]));
6790 MODIFY_REG(*pReg
, (HRTIM_FLT_CONFIG_MASK
<< REG_SHIFT_TAB_FLTxE
[iFault
]),
6791 (Configuration
<< REG_SHIFT_TAB_FLTxE
[iFault
]));
6795 * @brief Set the source of a fault signal.
6796 * @rmtoll FLTINR1 FLT1SRC LL_HRTIM_FLT_SetSrc\n
6797 * FLTINR1 FLT2SRC LL_HRTIM_FLT_SetSrc\n
6798 * FLTINR1 FLT3SRC LL_HRTIM_FLT_SetSrc\n
6799 * FLTINR1 FLT4SRC LL_HRTIM_FLT_SetSrc\n
6800 * FLTINR2 FLT5SRC LL_HRTIM_FLT_SetSrc
6801 * @note This function must not be called when the fault channel is enabled.
6802 * @param HRTIMx High Resolution Timer instance
6803 * @param Fault This parameter can be one of the following values:
6804 * @arg @ref LL_HRTIM_FAULT_1
6805 * @arg @ref LL_HRTIM_FAULT_2
6806 * @arg @ref LL_HRTIM_FAULT_3
6807 * @arg @ref LL_HRTIM_FAULT_4
6808 * @arg @ref LL_HRTIM_FAULT_5
6809 * @param Src This parameter can be one of the following values:
6810 * @arg @ref LL_HRTIM_FLT_SRC_DIGITALINPUT
6811 * @arg @ref LL_HRTIM_FLT_SRC_INTERNAL
6814 __STATIC_INLINE
void LL_HRTIM_FLT_SetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
, uint32_t Src
)
6816 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
6817 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
6818 REG_OFFSET_TAB_FLTINR
[iFault
]));
6819 MODIFY_REG(*pReg
, (HRTIM_FLTINR1_FLT1SRC
<< REG_SHIFT_TAB_FLTxE
[iFault
]), (Src
<< REG_SHIFT_TAB_FLTxE
[iFault
]));
6823 * @brief Get actual source of a fault signal.
6824 * @rmtoll FLTINR1 FLT1SRC LL_HRTIM_FLT_GetSrc\n
6825 * FLTINR1 FLT2SRC LL_HRTIM_FLT_GetSrc\n
6826 * FLTINR1 FLT3SRC LL_HRTIM_FLT_GetSrc\n
6827 * FLTINR1 FLT4SRC LL_HRTIM_FLT_GetSrc\n
6828 * FLTINR2 FLT5SRC LL_HRTIM_FLT_GetSrc
6829 * @param HRTIMx High Resolution Timer instance
6830 * @param Fault This parameter can be one of the following values:
6831 * @arg @ref LL_HRTIM_FAULT_1
6832 * @arg @ref LL_HRTIM_FAULT_2
6833 * @arg @ref LL_HRTIM_FAULT_3
6834 * @arg @ref LL_HRTIM_FAULT_4
6835 * @arg @ref LL_HRTIM_FAULT_5
6836 * @retval Source This parameter can be one of the following values:
6837 * @arg @ref LL_HRTIM_FLT_SRC_DIGITALINPUT
6838 * @arg @ref LL_HRTIM_FLT_SRC_INTERNAL
6840 __STATIC_INLINE
uint32_t LL_HRTIM_FLT_GetSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
)
6842 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
6843 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
6844 REG_OFFSET_TAB_FLTINR
[iFault
]));
6845 return (READ_BIT(*pReg
, (HRTIM_FLTINR1_FLT1SRC
<< REG_SHIFT_TAB_FLTxE
[iFault
])) >> REG_SHIFT_TAB_FLTxE
[iFault
]);
6849 * @brief Set the polarity of a fault signal.
6850 * @rmtoll FLTINR1 FLT1P LL_HRTIM_FLT_SetPolarity\n
6851 * FLTINR1 FLT2P LL_HRTIM_FLT_SetPolarity\n
6852 * FLTINR1 FLT3P LL_HRTIM_FLT_SetPolarity\n
6853 * FLTINR1 FLT4P LL_HRTIM_FLT_SetPolarity\n
6854 * FLTINR2 FLT5P LL_HRTIM_FLT_SetPolarity
6855 * @note This function must not be called when the fault channel is enabled.
6856 * @param HRTIMx High Resolution Timer instance
6857 * @param Fault This parameter can be one of the following values:
6858 * @arg @ref LL_HRTIM_FAULT_1
6859 * @arg @ref LL_HRTIM_FAULT_2
6860 * @arg @ref LL_HRTIM_FAULT_3
6861 * @arg @ref LL_HRTIM_FAULT_4
6862 * @arg @ref LL_HRTIM_FAULT_5
6863 * @param Polarity This parameter can be one of the following values:
6864 * @arg @ref LL_HRTIM_FLT_POLARITY_LOW
6865 * @arg @ref LL_HRTIM_FLT_POLARITY_HIGH
6868 __STATIC_INLINE
void LL_HRTIM_FLT_SetPolarity(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
, uint32_t Polarity
)
6870 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
6871 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
6872 REG_OFFSET_TAB_FLTINR
[iFault
]));
6873 MODIFY_REG(*pReg
, (HRTIM_FLTINR1_FLT1P
<< REG_SHIFT_TAB_FLTxE
[iFault
]), (Polarity
<< REG_SHIFT_TAB_FLTxE
[iFault
]));
6877 * @brief Get actual polarity of a fault signal.
6878 * @rmtoll FLTINR1 FLT1P LL_HRTIM_FLT_GetPolarity\n
6879 * FLTINR1 FLT2P LL_HRTIM_FLT_GetPolarity\n
6880 * FLTINR1 FLT3P LL_HRTIM_FLT_GetPolarity\n
6881 * FLTINR1 FLT4P LL_HRTIM_FLT_GetPolarity\n
6882 * FLTINR2 FLT5P LL_HRTIM_FLT_GetPolarity
6883 * @param HRTIMx High Resolution Timer instance
6884 * @param Fault This parameter can be one of the following values:
6885 * @arg @ref LL_HRTIM_FAULT_1
6886 * @arg @ref LL_HRTIM_FAULT_2
6887 * @arg @ref LL_HRTIM_FAULT_3
6888 * @arg @ref LL_HRTIM_FAULT_4
6889 * @arg @ref LL_HRTIM_FAULT_5
6890 * @retval Polarity This parameter can be one of the following values:
6891 * @arg @ref LL_HRTIM_FLT_POLARITY_LOW
6892 * @arg @ref LL_HRTIM_FLT_POLARITY_HIGH
6894 __STATIC_INLINE
uint32_t LL_HRTIM_FLT_GetPolarity(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
)
6896 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
6897 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
6898 REG_OFFSET_TAB_FLTINR
[iFault
]));
6899 return (READ_BIT(*pReg
, (HRTIM_FLTINR1_FLT1P
<< REG_SHIFT_TAB_FLTxE
[iFault
])) >> REG_SHIFT_TAB_FLTxE
[iFault
]);
6903 * @brief Set the digital noise filter of a fault signal.
6904 * @rmtoll FLTINR1 FLT1F LL_HRTIM_FLT_SetFilter\n
6905 * FLTINR1 FLT2F LL_HRTIM_FLT_SetFilter\n
6906 * FLTINR1 FLT3F LL_HRTIM_FLT_SetFilter\n
6907 * FLTINR1 FLT4F LL_HRTIM_FLT_SetFilter\n
6908 * FLTINR2 FLT5F LL_HRTIM_FLT_SetFilter
6909 * @note This function must not be called when the fault channel is enabled.
6910 * @param HRTIMx High Resolution Timer instance
6911 * @param Fault This parameter can be one of the following values:
6912 * @arg @ref LL_HRTIM_FAULT_1
6913 * @arg @ref LL_HRTIM_FAULT_2
6914 * @arg @ref LL_HRTIM_FAULT_3
6915 * @arg @ref LL_HRTIM_FAULT_4
6916 * @arg @ref LL_HRTIM_FAULT_5
6917 * @param Filter This parameter can be one of the following values:
6918 * @arg @ref LL_HRTIM_FLT_FILTER_NONE
6919 * @arg @ref LL_HRTIM_FLT_FILTER_1
6920 * @arg @ref LL_HRTIM_FLT_FILTER_2
6921 * @arg @ref LL_HRTIM_FLT_FILTER_3
6922 * @arg @ref LL_HRTIM_FLT_FILTER_4
6923 * @arg @ref LL_HRTIM_FLT_FILTER_5
6924 * @arg @ref LL_HRTIM_FLT_FILTER_6
6925 * @arg @ref LL_HRTIM_FLT_FILTER_7
6926 * @arg @ref LL_HRTIM_FLT_FILTER_8
6927 * @arg @ref LL_HRTIM_FLT_FILTER_9
6928 * @arg @ref LL_HRTIM_FLT_FILTER_10
6929 * @arg @ref LL_HRTIM_FLT_FILTER_11
6930 * @arg @ref LL_HRTIM_FLT_FILTER_12
6931 * @arg @ref LL_HRTIM_FLT_FILTER_13
6932 * @arg @ref LL_HRTIM_FLT_FILTER_14
6933 * @arg @ref LL_HRTIM_FLT_FILTER_15
6936 __STATIC_INLINE
void LL_HRTIM_FLT_SetFilter(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
, uint32_t Filter
)
6938 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
6939 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
6940 REG_OFFSET_TAB_FLTINR
[iFault
]));
6941 MODIFY_REG(*pReg
, (HRTIM_FLTINR1_FLT1F
<< REG_SHIFT_TAB_FLTxE
[iFault
]), (Filter
<< REG_SHIFT_TAB_FLTxE
[iFault
]));
6945 * @brief Get actual digital noise filter setting of a fault signal.
6946 * @rmtoll FLTINR1 FLT1F LL_HRTIM_FLT_GetFilter\n
6947 * FLTINR1 FLT2F LL_HRTIM_FLT_GetFilter\n
6948 * FLTINR1 FLT3F LL_HRTIM_FLT_GetFilter\n
6949 * FLTINR1 FLT4F LL_HRTIM_FLT_GetFilter\n
6950 * FLTINR2 FLT5F LL_HRTIM_FLT_GetFilter
6951 * @param HRTIMx High Resolution Timer instance
6952 * @param Fault This parameter can be one of the following values:
6953 * @arg @ref LL_HRTIM_FAULT_1
6954 * @arg @ref LL_HRTIM_FAULT_2
6955 * @arg @ref LL_HRTIM_FAULT_3
6956 * @arg @ref LL_HRTIM_FAULT_4
6957 * @arg @ref LL_HRTIM_FAULT_5
6958 * @retval Filter This parameter can be one of the following values:
6959 * @arg @ref LL_HRTIM_FLT_FILTER_NONE
6960 * @arg @ref LL_HRTIM_FLT_FILTER_1
6961 * @arg @ref LL_HRTIM_FLT_FILTER_2
6962 * @arg @ref LL_HRTIM_FLT_FILTER_3
6963 * @arg @ref LL_HRTIM_FLT_FILTER_4
6964 * @arg @ref LL_HRTIM_FLT_FILTER_5
6965 * @arg @ref LL_HRTIM_FLT_FILTER_6
6966 * @arg @ref LL_HRTIM_FLT_FILTER_7
6967 * @arg @ref LL_HRTIM_FLT_FILTER_8
6968 * @arg @ref LL_HRTIM_FLT_FILTER_9
6969 * @arg @ref LL_HRTIM_FLT_FILTER_10
6970 * @arg @ref LL_HRTIM_FLT_FILTER_11
6971 * @arg @ref LL_HRTIM_FLT_FILTER_12
6972 * @arg @ref LL_HRTIM_FLT_FILTER_13
6973 * @arg @ref LL_HRTIM_FLT_FILTER_14
6974 * @arg @ref LL_HRTIM_FLT_FILTER_15
6976 __STATIC_INLINE
uint32_t LL_HRTIM_FLT_GetFilter(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
)
6978 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
6979 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
6980 REG_OFFSET_TAB_FLTINR
[iFault
]));
6981 return (READ_BIT(*pReg
, (HRTIM_FLTINR1_FLT1F
<< REG_SHIFT_TAB_FLTxE
[iFault
])) >> REG_SHIFT_TAB_FLTxE
[iFault
]);
6986 * @brief Set the fault circuitry prescaler.
6987 * @rmtoll FLTINR2 FLTSD LL_HRTIM_FLT_SetPrescaler
6988 * @param HRTIMx High Resolution Timer instance
6989 * @param Prescaler This parameter can be one of the following values:
6990 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV1
6991 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV2
6992 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV4
6993 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV8
6996 __STATIC_INLINE
void LL_HRTIM_FLT_SetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Prescaler
)
6998 MODIFY_REG(HRTIMx
->sCommonRegs
.FLTINR2
, HRTIM_FLTINR2_FLTSD
, Prescaler
);
7002 * @brief Get actual fault circuitry prescaler setting.
7003 * @rmtoll FLTINR2 FLTSD LL_HRTIM_FLT_GetPrescaler
7004 * @param HRTIMx High Resolution Timer instance
7005 * @retval Prescaler This parameter can be one of the following values:
7006 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV1
7007 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV2
7008 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV4
7009 * @arg @ref LL_HRTIM_FLT_PRESCALER_DIV8
7011 __STATIC_INLINE
uint32_t LL_HRTIM_FLT_GetPrescaler(HRTIM_TypeDef
*HRTIMx
)
7013 return (READ_BIT(HRTIMx
->sCommonRegs
.FLTINR2
, HRTIM_FLTINR2_FLTSD
));
7017 * @brief Lock the fault signal conditioning settings.
7018 * @rmtoll FLTINR1 FLT1LCK LL_HRTIM_FLT_Lock\n
7019 * FLTINR1 FLT2LCK LL_HRTIM_FLT_Lock\n
7020 * FLTINR1 FLT3LCK LL_HRTIM_FLT_Lock\n
7021 * FLTINR1 FLT4LCK LL_HRTIM_FLT_Lock\n
7022 * FLTINR2 FLT5LCK LL_HRTIM_FLT_Lock
7023 * @param HRTIMx High Resolution Timer instance
7024 * @param Fault This parameter can be one of the following values:
7025 * @arg @ref LL_HRTIM_FAULT_1
7026 * @arg @ref LL_HRTIM_FAULT_2
7027 * @arg @ref LL_HRTIM_FAULT_3
7028 * @arg @ref LL_HRTIM_FAULT_4
7029 * @arg @ref LL_HRTIM_FAULT_5
7032 __STATIC_INLINE
void LL_HRTIM_FLT_Lock(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
)
7034 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
7035 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
7036 REG_OFFSET_TAB_FLTINR
[iFault
]));
7037 SET_BIT(*pReg
, (HRTIM_FLTINR1_FLT1LCK
<< REG_SHIFT_TAB_FLTxE
[iFault
]));
7041 * @brief Enable the fault circuitry for the designated fault input.
7042 * @rmtoll FLTINR1 FLT1E LL_HRTIM_FLT_Enable\n
7043 * FLTINR1 FLT2E LL_HRTIM_FLT_Enable\n
7044 * FLTINR1 FLT3E LL_HRTIM_FLT_Enable\n
7045 * FLTINR1 FLT4E LL_HRTIM_FLT_Enable\n
7046 * FLTINR2 FLT5E LL_HRTIM_FLT_Enable
7047 * @param HRTIMx High Resolution Timer instance
7048 * @param Fault This parameter can be one of the following values:
7049 * @arg @ref LL_HRTIM_FAULT_1
7050 * @arg @ref LL_HRTIM_FAULT_2
7051 * @arg @ref LL_HRTIM_FAULT_3
7052 * @arg @ref LL_HRTIM_FAULT_4
7053 * @arg @ref LL_HRTIM_FAULT_5
7056 __STATIC_INLINE
void LL_HRTIM_FLT_Enable(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
)
7058 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
7059 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
7060 REG_OFFSET_TAB_FLTINR
[iFault
]));
7061 SET_BIT(*pReg
, (HRTIM_FLTINR1_FLT1E
<< REG_SHIFT_TAB_FLTxE
[iFault
]));
7065 * @brief Disable the fault circuitry for for the designated fault input.
7066 * @rmtoll FLTINR1 FLT1E LL_HRTIM_FLT_Disable\n
7067 * FLTINR1 FLT2E LL_HRTIM_FLT_Disable\n
7068 * FLTINR1 FLT3E LL_HRTIM_FLT_Disable\n
7069 * FLTINR1 FLT4E LL_HRTIM_FLT_Disable\n
7070 * FLTINR2 FLT5E LL_HRTIM_FLT_Disable
7071 * @param HRTIMx High Resolution Timer instance
7072 * @param Fault This parameter can be one of the following values:
7073 * @arg @ref LL_HRTIM_FAULT_1
7074 * @arg @ref LL_HRTIM_FAULT_2
7075 * @arg @ref LL_HRTIM_FAULT_3
7076 * @arg @ref LL_HRTIM_FAULT_4
7077 * @arg @ref LL_HRTIM_FAULT_5
7080 __STATIC_INLINE
void LL_HRTIM_FLT_Disable(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
)
7082 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
7083 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
7084 REG_OFFSET_TAB_FLTINR
[iFault
]));
7085 CLEAR_BIT(*pReg
, (HRTIM_FLTINR1_FLT1E
<< REG_SHIFT_TAB_FLTxE
[iFault
]));
7089 * @brief Indicate whether the fault circuitry is enabled for a given fault input.
7090 * @rmtoll FLTINR1 FLT1E LL_HRTIM_FLT_IsEnabled\n
7091 * FLTINR1 FLT2E LL_HRTIM_FLT_IsEnabled\n
7092 * FLTINR1 FLT3E LL_HRTIM_FLT_IsEnabled\n
7093 * FLTINR1 FLT4E LL_HRTIM_FLT_IsEnabled\n
7094 * FLTINR2 FLT5E LL_HRTIM_FLT_IsEnabled
7095 * @param HRTIMx High Resolution Timer instance
7096 * @param Fault This parameter can be one of the following values:
7097 * @arg @ref LL_HRTIM_FAULT_1
7098 * @arg @ref LL_HRTIM_FAULT_2
7099 * @arg @ref LL_HRTIM_FAULT_3
7100 * @arg @ref LL_HRTIM_FAULT_4
7101 * @arg @ref LL_HRTIM_FAULT_5
7102 * @retval State of FLTxEN bit in HRTIM_FLTINRx register (1 or 0).
7104 __STATIC_INLINE
uint32_t LL_HRTIM_FLT_IsEnabled(HRTIM_TypeDef
*HRTIMx
, uint32_t Fault
)
7106 register uint32_t iFault
= (uint8_t)POSITION_VAL(Fault
);
7107 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sCommonRegs
.FLTINR1
) +
7108 REG_OFFSET_TAB_FLTINR
[iFault
]));
7109 return (((READ_BIT(*pReg
, (HRTIM_FLTINR1_FLT1E
<< REG_SHIFT_TAB_FLTxE
[iFault
])) >> REG_SHIFT_TAB_FLTxE
[iFault
]) ==
7110 (HRTIM_IER_FLT1
)) ? 1UL : 0UL);
7117 /** @defgroup HRTIM_LL_EF_Burst_Mode_management Burst_Mode_management
7122 * @brief Configure the burst mode controller.
7123 * @rmtoll BMCR BMOM LL_HRTIM_BM_Config\n
7124 * BMCR BMCLK LL_HRTIM_BM_Config\n
7125 * BMCR BMPRSC LL_HRTIM_BM_Config
7126 * @param HRTIMx High Resolution Timer instance
7127 * @param Configuration This parameter must be a combination of all the following values:
7128 * @arg @ref LL_HRTIM_BM_MODE_SINGLESHOT or @ref LL_HRTIM_BM_MODE_CONTINOUS
7129 * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER or ... or @ref LL_HRTIM_BM_CLKSRC_FHRTIM
7130 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1 or ... @ref LL_HRTIM_BM_PRESCALER_DIV32768
7133 __STATIC_INLINE
void LL_HRTIM_BM_Config(HRTIM_TypeDef
*HRTIMx
, uint32_t Configuration
)
7135 MODIFY_REG(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BM_CONFIG_MASK
, Configuration
);
7139 * @brief Set the burst mode controller operating mode.
7140 * @rmtoll BMCR BMOM LL_HRTIM_BM_SetMode
7141 * @param HRTIMx High Resolution Timer instance
7142 * @param Mode This parameter can be one of the following values:
7143 * @arg @ref LL_HRTIM_BM_MODE_SINGLESHOT
7144 * @arg @ref LL_HRTIM_BM_MODE_CONTINOUS
7147 __STATIC_INLINE
void LL_HRTIM_BM_SetMode(HRTIM_TypeDef
*HRTIMx
, uint32_t Mode
)
7149 MODIFY_REG(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMOM
, Mode
);
7153 * @brief Get actual burst mode controller operating mode.
7154 * @rmtoll BMCR BMOM LL_HRTIM_BM_GetMode
7155 * @param HRTIMx High Resolution Timer instance
7156 * @retval Mode This parameter can be one of the following values:
7157 * @arg @ref LL_HRTIM_BM_MODE_SINGLESHOT
7158 * @arg @ref LL_HRTIM_BM_MODE_CONTINOUS
7160 __STATIC_INLINE
uint32_t LL_HRTIM_BM_GetMode(HRTIM_TypeDef
*HRTIMx
)
7162 return (uint32_t)READ_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMOM
);
7166 * @brief Set the burst mode controller clock source.
7167 * @rmtoll BMCR BMCLK LL_HRTIM_BM_SetClockSrc
7168 * @param HRTIMx High Resolution Timer instance
7169 * @param ClockSrc This parameter can be one of the following values:
7170 * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER
7171 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_A
7172 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_B
7173 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_C
7174 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_D
7175 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_E
7176 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM16_OC
7177 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM17_OC
7178 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM7_TRGO
7179 * @arg @ref LL_HRTIM_BM_CLKSRC_FHRTIM
7182 __STATIC_INLINE
void LL_HRTIM_BM_SetClockSrc(HRTIM_TypeDef
*HRTIMx
, uint32_t ClockSrc
)
7184 MODIFY_REG(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMCLK
, ClockSrc
);
7188 * @brief Get actual burst mode controller clock source.
7189 * @rmtoll BMCR BMCLK LL_HRTIM_BM_GetClockSrc
7190 * @param HRTIMx High Resolution Timer instance
7191 * @retval ClockSrc This parameter can be one of the following values:
7192 * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER
7193 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_A
7194 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_B
7195 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_C
7196 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_D
7197 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_E
7198 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM16_OC
7199 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM17_OC
7200 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM7_TRGO
7201 * @arg @ref LL_HRTIM_BM_CLKSRC_FHRTIM
7202 * @retval ClockSrc This parameter can be one of the following values:
7203 * @arg @ref LL_HRTIM_BM_CLKSRC_MASTER
7204 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_A
7205 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_B
7206 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_C
7207 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_D
7208 * @arg @ref LL_HRTIM_BM_CLKSRC_TIMER_E
7209 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM16_OC
7210 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM17_OC
7211 * @arg @ref LL_HRTIM_BM_CLKSRC_TIM7_TRGO
7212 * @arg @ref LL_HRTIM_BM_CLKSRC_FHRTIM
7214 __STATIC_INLINE
uint32_t LL_HRTIM_BM_GetClockSrc(HRTIM_TypeDef
*HRTIMx
)
7216 return (uint32_t)READ_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMCLK
);
7220 * @brief Set the burst mode controller prescaler.
7221 * @rmtoll BMCR BMPRSC LL_HRTIM_BM_SetPrescaler
7222 * @param HRTIMx High Resolution Timer instance
7223 * @param Prescaler This parameter can be one of the following values:
7224 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1
7225 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2
7226 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4
7227 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8
7228 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16
7229 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32
7230 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV64
7231 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV128
7232 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV256
7233 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV512
7234 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1024
7235 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2048
7236 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4096
7237 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8192
7238 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16384
7239 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32768
7242 __STATIC_INLINE
void LL_HRTIM_BM_SetPrescaler(HRTIM_TypeDef
*HRTIMx
, uint32_t Prescaler
)
7244 MODIFY_REG(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMPRSC
, Prescaler
);
7248 * @brief Get actual burst mode controller prescaler setting.
7249 * @rmtoll BMCR BMPRSC LL_HRTIM_BM_GetPrescaler
7250 * @param HRTIMx High Resolution Timer instance
7251 * @retval Prescaler This parameter can be one of the following values:
7252 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1
7253 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2
7254 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4
7255 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8
7256 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16
7257 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32
7258 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV64
7259 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV128
7260 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV256
7261 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV512
7262 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV1024
7263 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV2048
7264 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV4096
7265 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV8192
7266 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV16384
7267 * @arg @ref LL_HRTIM_BM_PRESCALER_DIV32768
7269 __STATIC_INLINE
uint32_t LL_HRTIM_BM_GetPrescaler(HRTIM_TypeDef
*HRTIMx
)
7271 return (uint32_t)READ_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMPRSC
);
7275 * @brief Enable burst mode compare and period registers preload.
7276 * @rmtoll BMCR BMPREN LL_HRTIM_BM_EnablePreload
7277 * @param HRTIMx High Resolution Timer instance
7280 __STATIC_INLINE
void LL_HRTIM_BM_EnablePreload(HRTIM_TypeDef
*HRTIMx
)
7282 SET_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMPREN
);
7286 * @brief Disable burst mode compare and period registers preload.
7287 * @rmtoll BMCR BMPREN LL_HRTIM_BM_DisablePreload
7288 * @param HRTIMx High Resolution Timer instance
7291 __STATIC_INLINE
void LL_HRTIM_BM_DisablePreload(HRTIM_TypeDef
*HRTIMx
)
7293 CLEAR_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMPREN
);
7297 * @brief Indicate whether burst mode compare and period registers are preloaded.
7298 * @rmtoll BMCR BMPREN LL_HRTIM_BM_IsEnabledPreload
7299 * @param HRTIMx High Resolution Timer instance
7300 * @retval State of BMPREN bit in HRTIM_BMCR register (1 or 0).
7302 __STATIC_INLINE
uint32_t LL_HRTIM_BM_IsEnabledPreload(HRTIM_TypeDef
*HRTIMx
)
7304 uint32_t temp
; /* MISRAC-2012 compliancy */
7305 temp
= READ_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMPREN
);
7307 return ((temp
== (HRTIM_BMCR_BMPREN
)) ? 1UL : 0UL);
7311 * @brief Set the burst mode controller trigger
7312 * @rmtoll BMTRGR SW LL_HRTIM_BM_SetTrig\n
7313 * BMTRGR MSTRST LL_HRTIM_BM_SetTrig\n
7314 * BMTRGR MSTREP LL_HRTIM_BM_SetTrig\n
7315 * BMTRGR MSTCMP1 LL_HRTIM_BM_SetTrig\n
7316 * BMTRGR MSTCMP2 LL_HRTIM_BM_SetTrig\n
7317 * BMTRGR MSTCMP3 LL_HRTIM_BM_SetTrig\n
7318 * BMTRGR MSTCMP4 LL_HRTIM_BM_SetTrig\n
7319 * BMTRGR TARST LL_HRTIM_BM_SetTrig\n
7320 * BMTRGR TAREP LL_HRTIM_BM_SetTrig\n
7321 * BMTRGR TACMP1 LL_HRTIM_BM_SetTrig\n
7322 * BMTRGR TACMP2 LL_HRTIM_BM_SetTrig\n
7323 * BMTRGR TBRST LL_HRTIM_BM_SetTrig\n
7324 * BMTRGR TBREP LL_HRTIM_BM_SetTrig\n
7325 * BMTRGR TBCMP1 LL_HRTIM_BM_SetTrig\n
7326 * BMTRGR TBCMP2 LL_HRTIM_BM_SetTrig\n
7327 * BMTRGR TCRST LL_HRTIM_BM_SetTrig\n
7328 * BMTRGR TCREP LL_HRTIM_BM_SetTrig\n
7329 * BMTRGR TCCMP1 LL_HRTIM_BM_SetTrig\n
7330 * BMTRGR TCCMP2 LL_HRTIM_BM_SetTrig\n
7331 * BMTRGR TDRST LL_HRTIM_BM_SetTrig\n
7332 * BMTRGR TDREP LL_HRTIM_BM_SetTrig\n
7333 * BMTRGR TDCMP1 LL_HRTIM_BM_SetTrig\n
7334 * BMTRGR TDCMP2 LL_HRTIM_BM_SetTrig\n
7335 * BMTRGR TERST LL_HRTIM_BM_SetTrig\n
7336 * BMTRGR TEREP LL_HRTIM_BM_SetTrig\n
7337 * BMTRGR TECMP1 LL_HRTIM_BM_SetTrig\n
7338 * BMTRGR TECMP2 LL_HRTIM_BM_SetTrig\n
7339 * BMTRGR TAEEV7 LL_HRTIM_BM_SetTrig\n
7340 * BMTRGR TAEEV8 LL_HRTIM_BM_SetTrig\n
7341 * BMTRGR EEV7 LL_HRTIM_BM_SetTrig\n
7342 * BMTRGR EEV8 LL_HRTIM_BM_SetTrig\n
7343 * BMTRGR OCHIPEV LL_HRTIM_BM_SetTrig
7344 * @param HRTIMx High Resolution Timer instance
7345 * @param Trig This parameter can be a combination of the following values:
7346 * @arg @ref LL_HRTIM_BM_TRIG_NONE
7347 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_RESET
7348 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_REPETITION
7349 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP1
7350 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP2
7351 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP3
7352 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP4
7353 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_RESET
7354 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_REPETITION
7355 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP1
7356 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP2
7357 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_RESET
7358 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_REPETITION
7359 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP1
7360 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP2
7361 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_RESET
7362 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_REPETITION
7363 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP1
7364 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP2
7365 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_RESET
7366 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_REPETITION
7367 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP1
7368 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP2
7369 * @arg @ref LL_HRTIM_BM_TRIG_TIME_RESET
7370 * @arg @ref LL_HRTIM_BM_TRIG_TIME_REPETITION
7371 * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP1
7372 * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP2
7373 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_EVENT7
7374 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_EVENT8
7375 * @arg @ref LL_HRTIM_BM_TRIG_EVENT_7
7376 * @arg @ref LL_HRTIM_BM_TRIG_EVENT_8
7377 * @arg @ref LL_HRTIM_BM_TRIG_EVENT_ONCHIP
7380 __STATIC_INLINE
void LL_HRTIM_BM_SetTrig(HRTIM_TypeDef
*HRTIMx
, uint32_t Trig
)
7382 WRITE_REG(HRTIMx
->sCommonRegs
.BMTRGR
, Trig
);
7386 * @brief Get actual burst mode controller trigger.
7387 * @rmtoll BMTRGR SW LL_HRTIM_BM_GetTrig\n
7388 * BMTRGR MSTRST LL_HRTIM_BM_GetTrig\n
7389 * BMTRGR MSTREP LL_HRTIM_BM_GetTrig\n
7390 * BMTRGR MSTCMP1 LL_HRTIM_BM_GetTrig\n
7391 * BMTRGR MSTCMP2 LL_HRTIM_BM_GetTrig\n
7392 * BMTRGR MSTCMP3 LL_HRTIM_BM_GetTrig\n
7393 * BMTRGR MSTCMP4 LL_HRTIM_BM_GetTrig\n
7394 * BMTRGR TARST LL_HRTIM_BM_GetTrig\n
7395 * BMTRGR TAREP LL_HRTIM_BM_GetTrig\n
7396 * BMTRGR TACMP1 LL_HRTIM_BM_GetTrig\n
7397 * BMTRGR TACMP2 LL_HRTIM_BM_GetTrig\n
7398 * BMTRGR TBRST LL_HRTIM_BM_GetTrig\n
7399 * BMTRGR TBREP LL_HRTIM_BM_GetTrig\n
7400 * BMTRGR TBCMP1 LL_HRTIM_BM_GetTrig\n
7401 * BMTRGR TBCMP2 LL_HRTIM_BM_GetTrig\n
7402 * BMTRGR TCRST LL_HRTIM_BM_GetTrig\n
7403 * BMTRGR TCREP LL_HRTIM_BM_GetTrig\n
7404 * BMTRGR TCCMP1 LL_HRTIM_BM_GetTrig\n
7405 * BMTRGR TCCMP2 LL_HRTIM_BM_GetTrig\n
7406 * BMTRGR TDRST LL_HRTIM_BM_GetTrig\n
7407 * BMTRGR TDREP LL_HRTIM_BM_GetTrig\n
7408 * BMTRGR TDCMP1 LL_HRTIM_BM_GetTrig\n
7409 * BMTRGR TDCMP2 LL_HRTIM_BM_GetTrig\n
7410 * BMTRGR TERST LL_HRTIM_BM_GetTrig\n
7411 * BMTRGR TEREP LL_HRTIM_BM_GetTrig\n
7412 * BMTRGR TECMP1 LL_HRTIM_BM_GetTrig\n
7413 * BMTRGR TECMP2 LL_HRTIM_BM_GetTrig\n
7414 * BMTRGR TAEEV7 LL_HRTIM_BM_GetTrig\n
7415 * BMTRGR TAEEV8 LL_HRTIM_BM_GetTrig\n
7416 * BMTRGR EEV7 LL_HRTIM_BM_GetTrig\n
7417 * BMTRGR EEV8 LL_HRTIM_BM_GetTrig\n
7418 * BMTRGR OCHIPEV LL_HRTIM_BM_GetTrig
7419 * @param HRTIMx High Resolution Timer instance
7420 * @retval Trig This parameter can be a combination of the following values:
7421 * @arg @ref LL_HRTIM_BM_TRIG_NONE
7422 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_RESET
7423 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_REPETITION
7424 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP1
7425 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP2
7426 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP3
7427 * @arg @ref LL_HRTIM_BM_TRIG_MASTER_CMP4
7428 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_RESET
7429 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_REPETITION
7430 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP1
7431 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_CMP2
7432 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_RESET
7433 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_REPETITION
7434 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP1
7435 * @arg @ref LL_HRTIM_BM_TRIG_TIMB_CMP2
7436 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_RESET
7437 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_REPETITION
7438 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP1
7439 * @arg @ref LL_HRTIM_BM_TRIG_TIMC_CMP2
7440 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_RESET
7441 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_REPETITION
7442 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP1
7443 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_CMP2
7444 * @arg @ref LL_HRTIM_BM_TRIG_TIME_RESET
7445 * @arg @ref LL_HRTIM_BM_TRIG_TIME_REPETITION
7446 * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP1
7447 * @arg @ref LL_HRTIM_BM_TRIG_TIME_CMP2
7448 * @arg @ref LL_HRTIM_BM_TRIG_TIMA_EVENT7
7449 * @arg @ref LL_HRTIM_BM_TRIG_TIMD_EVENT8
7450 * @arg @ref LL_HRTIM_BM_TRIG_EVENT_7
7451 * @arg @ref LL_HRTIM_BM_TRIG_EVENT_8
7452 * @arg @ref LL_HRTIM_BM_TRIG_EVENT_ONCHIP
7454 __STATIC_INLINE
uint32_t LL_HRTIM_BM_GetTrig(HRTIM_TypeDef
*HRTIMx
)
7456 return (uint32_t)READ_REG(HRTIMx
->sCommonRegs
.BMTRGR
);
7460 * @brief Set the burst mode controller compare value.
7461 * @rmtoll BMCMPR BMCMP LL_HRTIM_BM_SetCompare
7462 * @param HRTIMx High Resolution Timer instance
7463 * @param CompareValue Compare value must be above or equal to 3
7464 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
7465 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
7468 __STATIC_INLINE
void LL_HRTIM_BM_SetCompare(HRTIM_TypeDef
*HRTIMx
, uint32_t CompareValue
)
7470 WRITE_REG(HRTIMx
->sCommonRegs
.BMCMPR
, CompareValue
);
7474 * @brief Get actual burst mode controller compare value.
7475 * @rmtoll BMCMPR BMCMP LL_HRTIM_BM_GetCompare
7476 * @param HRTIMx High Resolution Timer instance
7477 * @retval CompareValue Compare value must be above or equal to 3
7478 * periods of the fHRTIM clock, that is 0x60 if CKPSC[2:0] = 0,
7479 * 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
7481 __STATIC_INLINE
uint32_t LL_HRTIM_BM_GetCompare(HRTIM_TypeDef
*HRTIMx
)
7483 return (uint32_t)READ_REG(HRTIMx
->sCommonRegs
.BMCMPR
);
7487 * @brief Set the burst mode controller period.
7488 * @rmtoll BMPER BMPER LL_HRTIM_BM_SetPeriod
7489 * @param HRTIMx High Resolution Timer instance
7490 * @param Period The period value must be above or equal to 3 periods of the fHRTIM clock,
7491 * that is 0x60 if CKPSC[2:0] = 0, 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
7492 * The maximum value is 0x0000 FFDF.
7495 __STATIC_INLINE
void LL_HRTIM_BM_SetPeriod(HRTIM_TypeDef
*HRTIMx
, uint32_t Period
)
7497 WRITE_REG(HRTIMx
->sCommonRegs
.BMPER
, Period
);
7501 * @brief Get actual burst mode controller period.
7502 * @rmtoll BMPER BMPER LL_HRTIM_BM_GetPeriod
7503 * @param HRTIMx High Resolution Timer instance
7504 * @retval The period value must be above or equal to 3 periods of the fHRTIM clock,
7505 * that is 0x60 if CKPSC[2:0] = 0, 0x30 if CKPSC[2:0] = 1, 0x18 if CKPSC[2:0] = 2,...
7506 * The maximum value is 0x0000 FFDF.
7508 __STATIC_INLINE
uint32_t LL_HRTIM_BM_GetPeriod(HRTIM_TypeDef
*HRTIMx
)
7510 return (uint32_t)READ_REG(HRTIMx
->sCommonRegs
.BMPER
);
7514 * @brief Enable the burst mode controller
7515 * @rmtoll BMCR BME LL_HRTIM_BM_Enable
7516 * @param HRTIMx High Resolution Timer instance
7519 __STATIC_INLINE
void LL_HRTIM_BM_Enable(HRTIM_TypeDef
*HRTIMx
)
7521 SET_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BME
);
7525 * @brief Disable the burst mode controller
7526 * @rmtoll BMCR BME LL_HRTIM_BM_Disable
7527 * @param HRTIMx High Resolution Timer instance
7530 __STATIC_INLINE
void LL_HRTIM_BM_Disable(HRTIM_TypeDef
*HRTIMx
)
7532 CLEAR_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BME
);
7536 * @brief Indicate whether the burst mode controller is enabled.
7537 * @rmtoll BMCR BME LL_HRTIM_BM_IsEnabled
7538 * @param HRTIMx High Resolution Timer instance
7539 * @retval State of BME bit in HRTIM_BMCR register (1 or 0).
7541 __STATIC_INLINE
uint32_t LL_HRTIM_BM_IsEnabled(HRTIM_TypeDef
*HRTIMx
)
7543 return ((READ_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BME
) == (HRTIM_BMCR_BME
)) ? 1UL : 0UL);
7547 * @brief Trigger the burst operation (software trigger)
7548 * @rmtoll BMTRGR SW LL_HRTIM_BM_Start
7549 * @param HRTIMx High Resolution Timer instance
7552 __STATIC_INLINE
void LL_HRTIM_BM_Start(HRTIM_TypeDef
*HRTIMx
)
7554 SET_BIT(HRTIMx
->sCommonRegs
.BMTRGR
, HRTIM_BMTRGR_SW
);
7558 * @brief Stop the burst mode operation.
7559 * @rmtoll BMCR BMSTAT LL_HRTIM_BM_Stop
7560 * @note Causes a burst mode early termination.
7561 * @param HRTIMx High Resolution Timer instance
7564 __STATIC_INLINE
void LL_HRTIM_BM_Stop(HRTIM_TypeDef
*HRTIMx
)
7566 CLEAR_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMSTAT
);
7570 * @brief Get actual burst mode status
7571 * @rmtoll BMCR BMSTAT LL_HRTIM_BM_GetStatus
7572 * @param HRTIMx High Resolution Timer instance
7573 * @retval Status This parameter can be one of the following values:
7574 * @arg @ref LL_HRTIM_BM_STATUS_NORMAL
7575 * @arg @ref LL_HRTIM_BM_STATUS_BURST_ONGOING
7577 __STATIC_INLINE
uint32_t LL_HRTIM_BM_GetStatus(HRTIM_TypeDef
*HRTIMx
)
7579 return (READ_BIT(HRTIMx
->sCommonRegs
.BMCR
, HRTIM_BMCR_BMSTAT
));
7586 /** @defgroup HRTIM_LL_EF_FLAG_Management FLAG_Management
7591 * @brief Clear the Fault 1 interrupt flag.
7592 * @rmtoll ICR FLT1C LL_HRTIM_ClearFlag_FLT1
7593 * @param HRTIMx High Resolution Timer instance
7596 __STATIC_INLINE
void LL_HRTIM_ClearFlag_FLT1(HRTIM_TypeDef
*HRTIMx
)
7598 SET_BIT(HRTIMx
->sCommonRegs
.ICR
, HRTIM_ICR_FLT1C
);
7602 * @brief Indicate whether Fault 1 interrupt occurred.
7603 * @rmtoll ICR FLT1 LL_HRTIM_IsActiveFlag_FLT1
7604 * @param HRTIMx High Resolution Timer instance
7605 * @retval State of FLT1 bit in HRTIM_ISR register (1 or 0).
7607 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_FLT1(HRTIM_TypeDef
*HRTIMx
)
7609 return ((READ_BIT(HRTIMx
->sCommonRegs
.ISR
, HRTIM_ISR_FLT1
) == (HRTIM_ISR_FLT1
)) ? 1UL : 0UL);
7613 * @brief Clear the Fault 2 interrupt flag.
7614 * @rmtoll ICR FLT2C LL_HRTIM_ClearFlag_FLT2
7615 * @param HRTIMx High Resolution Timer instance
7618 __STATIC_INLINE
void LL_HRTIM_ClearFlag_FLT2(HRTIM_TypeDef
*HRTIMx
)
7620 SET_BIT(HRTIMx
->sCommonRegs
.ICR
, HRTIM_ICR_FLT2C
);
7624 * @brief Indicate whether Fault 2 interrupt occurred.
7625 * @rmtoll ICR FLT2 LL_HRTIM_IsActiveFlag_FLT2
7626 * @param HRTIMx High Resolution Timer instance
7627 * @retval State of FLT2 bit in HRTIM_ISR register (1 or 0).
7629 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_FLT2(HRTIM_TypeDef
*HRTIMx
)
7631 return ((READ_BIT(HRTIMx
->sCommonRegs
.ISR
, HRTIM_ISR_FLT2
) == (HRTIM_ISR_FLT2
)) ? 1UL : 0UL);
7635 * @brief Clear the Fault 3 interrupt flag.
7636 * @rmtoll ICR FLT3C LL_HRTIM_ClearFlag_FLT3
7637 * @param HRTIMx High Resolution Timer instance
7640 __STATIC_INLINE
void LL_HRTIM_ClearFlag_FLT3(HRTIM_TypeDef
*HRTIMx
)
7642 SET_BIT(HRTIMx
->sCommonRegs
.ICR
, HRTIM_ICR_FLT3C
);
7646 * @brief Indicate whether Fault 3 interrupt occurred.
7647 * @rmtoll ICR FLT3 LL_HRTIM_IsActiveFlag_FLT3
7648 * @param HRTIMx High Resolution Timer instance
7649 * @retval State of FLT3 bit in HRTIM_ISR register (1 or 0).
7651 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_FLT3(HRTIM_TypeDef
*HRTIMx
)
7653 return ((READ_BIT(HRTIMx
->sCommonRegs
.ISR
, HRTIM_ISR_FLT3
) == (HRTIM_ISR_FLT3
)) ? 1UL : 0UL);
7657 * @brief Clear the Fault 4 interrupt flag.
7658 * @rmtoll ICR FLT4C LL_HRTIM_ClearFlag_FLT4
7659 * @param HRTIMx High Resolution Timer instance
7662 __STATIC_INLINE
void LL_HRTIM_ClearFlag_FLT4(HRTIM_TypeDef
*HRTIMx
)
7664 SET_BIT(HRTIMx
->sCommonRegs
.ICR
, HRTIM_ICR_FLT4C
);
7668 * @brief Indicate whether Fault 4 interrupt occurred.
7669 * @rmtoll ICR FLT4 LL_HRTIM_IsActiveFlag_FLT4
7670 * @param HRTIMx High Resolution Timer instance
7671 * @retval State of FLT4 bit in HRTIM_ISR register (1 or 0).
7673 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_FLT4(HRTIM_TypeDef
*HRTIMx
)
7675 return ((READ_BIT(HRTIMx
->sCommonRegs
.ISR
, HRTIM_ISR_FLT4
) == (HRTIM_ISR_FLT4
)) ? 1UL : 0UL);
7679 * @brief Clear the Fault 5 interrupt flag.
7680 * @rmtoll ICR FLT5C LL_HRTIM_ClearFlag_FLT5
7681 * @param HRTIMx High Resolution Timer instance
7684 __STATIC_INLINE
void LL_HRTIM_ClearFlag_FLT5(HRTIM_TypeDef
*HRTIMx
)
7686 SET_BIT(HRTIMx
->sCommonRegs
.ICR
, HRTIM_ICR_FLT5C
);
7690 * @brief Indicate whether Fault 5 interrupt occurred.
7691 * @rmtoll ICR FLT5 LL_HRTIM_IsActiveFlag_FLT5
7692 * @param HRTIMx High Resolution Timer instance
7693 * @retval State of FLT5 bit in HRTIM_ISR register (1 or 0).
7695 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_FLT5(HRTIM_TypeDef
*HRTIMx
)
7697 return ((READ_BIT(HRTIMx
->sCommonRegs
.ISR
, HRTIM_ISR_FLT5
) == (HRTIM_ISR_FLT5
)) ? 1UL : 0UL);
7701 * @brief Clear the System Fault interrupt flag.
7702 * @rmtoll ICR SYSFLTC LL_HRTIM_ClearFlag_SYSFLT
7703 * @param HRTIMx High Resolution Timer instance
7706 __STATIC_INLINE
void LL_HRTIM_ClearFlag_SYSFLT(HRTIM_TypeDef
*HRTIMx
)
7708 SET_BIT(HRTIMx
->sCommonRegs
.ICR
, HRTIM_ICR_SYSFLTC
);
7712 * @brief Indicate whether System Fault interrupt occurred.
7713 * @rmtoll ISR SYSFLT LL_HRTIM_IsActiveFlag_SYSFLT
7714 * @param HRTIMx High Resolution Timer instance
7715 * @retval State of SYSFLT bit in HRTIM_ISR register (1 or 0).
7717 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_SYSFLT(HRTIM_TypeDef
*HRTIMx
)
7719 return ((READ_BIT(HRTIMx
->sCommonRegs
.ISR
, HRTIM_ISR_SYSFLT
) == (HRTIM_ISR_SYSFLT
)) ? 1UL : 0UL);
7723 * @brief Clear the Burst Mode period interrupt flag.
7724 * @rmtoll ICR BMPERC LL_HRTIM_ClearFlag_BMPER
7725 * @param HRTIMx High Resolution Timer instance
7728 __STATIC_INLINE
void LL_HRTIM_ClearFlag_BMPER(HRTIM_TypeDef
*HRTIMx
)
7730 SET_BIT(HRTIMx
->sCommonRegs
.ICR
, HRTIM_ICR_BMPERC
);
7734 * @brief Indicate whether Burst Mode period interrupt occurred.
7735 * @rmtoll ISR BMPER LL_HRTIM_IsActiveFlag_BMPER
7736 * @param HRTIMx High Resolution Timer instance
7737 * @retval State of BMPER bit in HRTIM_ISR register (1 or 0).
7739 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_BMPER(HRTIM_TypeDef
*HRTIMx
)
7741 return ((READ_BIT(HRTIMx
->sCommonRegs
.ISR
, HRTIM_ISR_BMPER
) == (HRTIM_ISR_BMPER
)) ? 1UL : 0UL);
7745 * @brief Clear the Synchronization Input interrupt flag.
7746 * @rmtoll MICR SYNCC LL_HRTIM_ClearFlag_SYNC
7747 * @param HRTIMx High Resolution Timer instance
7750 __STATIC_INLINE
void LL_HRTIM_ClearFlag_SYNC(HRTIM_TypeDef
*HRTIMx
)
7752 SET_BIT(HRTIMx
->sMasterRegs
.MICR
, HRTIM_MICR_SYNC
);
7756 * @brief Indicate whether the Synchronization Input interrupt occurred.
7757 * @rmtoll MISR SYNC LL_HRTIM_IsActiveFlag_SYNC
7758 * @param HRTIMx High Resolution Timer instance
7759 * @retval State of SYNC bit in HRTIM_MISR register (1 or 0).
7761 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_SYNC(HRTIM_TypeDef
*HRTIMx
)
7763 return ((READ_BIT(HRTIMx
->sMasterRegs
.MISR
, HRTIM_MISR_SYNC
) == (HRTIM_MISR_SYNC
)) ? 1UL : 0UL);
7767 * @brief Clear the update interrupt flag for a given timer (including the master timer) .
7768 * @rmtoll MICR MUPDC LL_HRTIM_ClearFlag_UPDATE\n
7769 * TIMxICR UPDC LL_HRTIM_ClearFlag_UPDATE
7770 * @param HRTIMx High Resolution Timer instance
7771 * @param Timer This parameter can be one of the following values:
7772 * @arg @ref LL_HRTIM_TIMER_MASTER
7773 * @arg @ref LL_HRTIM_TIMER_A
7774 * @arg @ref LL_HRTIM_TIMER_B
7775 * @arg @ref LL_HRTIM_TIMER_C
7776 * @arg @ref LL_HRTIM_TIMER_D
7777 * @arg @ref LL_HRTIM_TIMER_E
7780 __STATIC_INLINE
void LL_HRTIM_ClearFlag_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7782 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7783 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
7784 REG_OFFSET_TAB_TIMER
[iTimer
]));
7785 SET_BIT(*pReg
, HRTIM_MICR_MUPD
);
7789 * @brief Indicate whether the update interrupt has occurred for a given timer (including the master timer) .
7790 * @rmtoll MISR MUPD LL_HRTIM_IsActiveFlag_UPDATE\n
7791 * TIMxISR UPD LL_HRTIM_IsActiveFlag_UPDATE
7792 * @param HRTIMx High Resolution Timer instance
7793 * @param Timer This parameter can be one of the following values:
7794 * @arg @ref LL_HRTIM_TIMER_MASTER
7795 * @arg @ref LL_HRTIM_TIMER_A
7796 * @arg @ref LL_HRTIM_TIMER_B
7797 * @arg @ref LL_HRTIM_TIMER_C
7798 * @arg @ref LL_HRTIM_TIMER_D
7799 * @arg @ref LL_HRTIM_TIMER_E
7800 * @retval State of MUPD/UPD bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
7802 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7804 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7805 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
7806 REG_OFFSET_TAB_TIMER
[iTimer
]));
7808 return ((READ_BIT(*pReg
, HRTIM_MISR_MUPD
) == (HRTIM_MISR_MUPD
)) ? 1UL : 0UL);
7812 * @brief Clear the repetition interrupt flag for a given timer (including the master timer) .
7813 * @rmtoll MICR MREPC LL_HRTIM_ClearFlag_REP\n
7814 * TIMxICR REPC LL_HRTIM_ClearFlag_REP
7815 * @param HRTIMx High Resolution Timer instance
7816 * @param Timer This parameter can be one of the following values:
7817 * @arg @ref LL_HRTIM_TIMER_MASTER
7818 * @arg @ref LL_HRTIM_TIMER_A
7819 * @arg @ref LL_HRTIM_TIMER_B
7820 * @arg @ref LL_HRTIM_TIMER_C
7821 * @arg @ref LL_HRTIM_TIMER_D
7822 * @arg @ref LL_HRTIM_TIMER_E
7825 __STATIC_INLINE
void LL_HRTIM_ClearFlag_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7827 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7828 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
7829 REG_OFFSET_TAB_TIMER
[iTimer
]));
7830 SET_BIT(*pReg
, HRTIM_MICR_MREP
);
7835 * @brief Indicate whether the repetition interrupt has occurred for a given timer (including the master timer) .
7836 * @rmtoll MISR MREP LL_HRTIM_IsActiveFlag_REP\n
7837 * TIMxISR REP LL_HRTIM_IsActiveFlag_REP
7838 * @param HRTIMx High Resolution Timer instance
7839 * @param Timer This parameter can be one of the following values:
7840 * @arg @ref LL_HRTIM_TIMER_MASTER
7841 * @arg @ref LL_HRTIM_TIMER_A
7842 * @arg @ref LL_HRTIM_TIMER_B
7843 * @arg @ref LL_HRTIM_TIMER_C
7844 * @arg @ref LL_HRTIM_TIMER_D
7845 * @arg @ref LL_HRTIM_TIMER_E
7846 * @retval State of MREP/REP bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
7848 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7850 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7851 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
7852 REG_OFFSET_TAB_TIMER
[iTimer
]));
7854 return ((READ_BIT(*pReg
, HRTIM_MISR_MREP
) == (HRTIM_MISR_MREP
)) ? 1UL : 0UL);
7858 * @brief Clear the compare 1 match interrupt for a given timer (including the master timer).
7859 * @rmtoll MICR MCMP1C LL_HRTIM_ClearFlag_CMP1\n
7860 * TIMxICR CMP1C LL_HRTIM_ClearFlag_CMP1
7861 * @param HRTIMx High Resolution Timer instance
7862 * @param Timer This parameter can be one of the following values:
7863 * @arg @ref LL_HRTIM_TIMER_MASTER
7864 * @arg @ref LL_HRTIM_TIMER_A
7865 * @arg @ref LL_HRTIM_TIMER_B
7866 * @arg @ref LL_HRTIM_TIMER_C
7867 * @arg @ref LL_HRTIM_TIMER_D
7868 * @arg @ref LL_HRTIM_TIMER_E
7871 __STATIC_INLINE
void LL_HRTIM_ClearFlag_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7873 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7874 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
7875 REG_OFFSET_TAB_TIMER
[iTimer
]));
7876 SET_BIT(*pReg
, HRTIM_MICR_MCMP1
);
7880 * @brief Indicate whether the compare match 1 interrupt has occurred for a given timer (including the master timer) .
7881 * @rmtoll MISR MCMP1 LL_HRTIM_IsActiveFlag_CMP1\n
7882 * TIMxISR CMP1 LL_HRTIM_IsActiveFlag_CMP1
7883 * @param HRTIMx High Resolution Timer instance
7884 * @param Timer This parameter can be one of the following values:
7885 * @arg @ref LL_HRTIM_TIMER_MASTER
7886 * @arg @ref LL_HRTIM_TIMER_A
7887 * @arg @ref LL_HRTIM_TIMER_B
7888 * @arg @ref LL_HRTIM_TIMER_C
7889 * @arg @ref LL_HRTIM_TIMER_D
7890 * @arg @ref LL_HRTIM_TIMER_E
7891 * @retval State of MCMP1/CMP1 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
7893 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7895 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7896 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
7897 REG_OFFSET_TAB_TIMER
[iTimer
]));
7899 return ((READ_BIT(*pReg
, HRTIM_MISR_MCMP1
) == (HRTIM_MISR_MCMP1
)) ? 1UL : 0UL);
7903 * @brief Clear the compare 2 match interrupt for a given timer (including the master timer).
7904 * @rmtoll MICR MCMP2C LL_HRTIM_ClearFlag_CMP2\n
7905 * TIMxICR CMP2C LL_HRTIM_ClearFlag_CMP2
7906 * @param HRTIMx High Resolution Timer instance
7907 * @param Timer This parameter can be one of the following values:
7908 * @arg @ref LL_HRTIM_TIMER_MASTER
7909 * @arg @ref LL_HRTIM_TIMER_A
7910 * @arg @ref LL_HRTIM_TIMER_B
7911 * @arg @ref LL_HRTIM_TIMER_C
7912 * @arg @ref LL_HRTIM_TIMER_D
7913 * @arg @ref LL_HRTIM_TIMER_E
7916 __STATIC_INLINE
void LL_HRTIM_ClearFlag_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7918 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7919 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
7920 REG_OFFSET_TAB_TIMER
[iTimer
]));
7921 SET_BIT(*pReg
, HRTIM_MICR_MCMP2
);
7925 * @brief Indicate whether the compare match 2 interrupt has occurred for a given timer (including the master timer) .
7926 * @rmtoll MISR MCMP2 LL_HRTIM_IsActiveFlag_CMP2\n
7927 * TIMxISR CMP2 LL_HRTIM_IsActiveFlag_CMP2
7928 * @param HRTIMx High Resolution Timer instance
7929 * @param Timer This parameter can be one of the following values:
7930 * @arg @ref LL_HRTIM_TIMER_MASTER
7931 * @arg @ref LL_HRTIM_TIMER_A
7932 * @arg @ref LL_HRTIM_TIMER_B
7933 * @arg @ref LL_HRTIM_TIMER_C
7934 * @arg @ref LL_HRTIM_TIMER_D
7935 * @arg @ref LL_HRTIM_TIMER_E
7936 * @retval State of MCMP2/CMP2 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
7938 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7940 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7941 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
7942 REG_OFFSET_TAB_TIMER
[iTimer
]));
7944 return ((READ_BIT(*pReg
, HRTIM_MISR_MCMP2
) == (HRTIM_MISR_MCMP2
)) ? 1UL : 0UL);
7948 * @brief Clear the compare 3 match interrupt for a given timer (including the master timer).
7949 * @rmtoll MICR MCMP3C LL_HRTIM_ClearFlag_CMP3\n
7950 * TIMxICR CMP3C LL_HRTIM_ClearFlag_CMP3
7951 * @param HRTIMx High Resolution Timer instance
7952 * @param Timer This parameter can be one of the following values:
7953 * @arg @ref LL_HRTIM_TIMER_MASTER
7954 * @arg @ref LL_HRTIM_TIMER_A
7955 * @arg @ref LL_HRTIM_TIMER_B
7956 * @arg @ref LL_HRTIM_TIMER_C
7957 * @arg @ref LL_HRTIM_TIMER_D
7958 * @arg @ref LL_HRTIM_TIMER_E
7961 __STATIC_INLINE
void LL_HRTIM_ClearFlag_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7963 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7964 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
7965 REG_OFFSET_TAB_TIMER
[iTimer
]));
7966 SET_BIT(*pReg
, HRTIM_MICR_MCMP3
);
7970 * @brief Indicate whether the compare match 3 interrupt has occurred for a given timer (including the master timer) .
7971 * @rmtoll MISR MCMP3 LL_HRTIM_IsActiveFlag_CMP3\n
7972 * TIMxISR CMP3 LL_HRTIM_IsActiveFlag_CMP3
7973 * @param HRTIMx High Resolution Timer instance
7974 * @param Timer This parameter can be one of the following values:
7975 * @arg @ref LL_HRTIM_TIMER_MASTER
7976 * @arg @ref LL_HRTIM_TIMER_A
7977 * @arg @ref LL_HRTIM_TIMER_B
7978 * @arg @ref LL_HRTIM_TIMER_C
7979 * @arg @ref LL_HRTIM_TIMER_D
7980 * @arg @ref LL_HRTIM_TIMER_E
7981 * @retval State of MCMP3/CMP3 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
7983 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
7985 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
7986 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
7987 REG_OFFSET_TAB_TIMER
[iTimer
]));
7989 return ((READ_BIT(*pReg
, HRTIM_MISR_MCMP3
) == (HRTIM_MISR_MCMP3
)) ? 1UL : 0UL);
7993 * @brief Clear the compare 4 match interrupt for a given timer (including the master timer).
7994 * @rmtoll MICR MCMP4C LL_HRTIM_ClearFlag_CMP4\n
7995 * TIMxICR CMP4C LL_HRTIM_ClearFlag_CMP4
7996 * @param HRTIMx High Resolution Timer instance
7997 * @param Timer This parameter can be one of the following values:
7998 * @arg @ref LL_HRTIM_TIMER_MASTER
7999 * @arg @ref LL_HRTIM_TIMER_A
8000 * @arg @ref LL_HRTIM_TIMER_B
8001 * @arg @ref LL_HRTIM_TIMER_C
8002 * @arg @ref LL_HRTIM_TIMER_D
8003 * @arg @ref LL_HRTIM_TIMER_E
8006 __STATIC_INLINE
void LL_HRTIM_ClearFlag_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8008 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8009 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8010 REG_OFFSET_TAB_TIMER
[iTimer
]));
8011 SET_BIT(*pReg
, HRTIM_MICR_MCMP4
);
8015 * @brief Indicate whether the compare match 4 interrupt has occurred for a given timer (including the master timer) .
8016 * @rmtoll MISR MCMP4 LL_HRTIM_IsActiveFlag_CMP4\n
8017 * TIMxISR CMP4 LL_HRTIM_IsActiveFlag_CMP4
8018 * @param HRTIMx High Resolution Timer instance
8019 * @param Timer This parameter can be one of the following values:
8020 * @arg @ref LL_HRTIM_TIMER_MASTER
8021 * @arg @ref LL_HRTIM_TIMER_A
8022 * @arg @ref LL_HRTIM_TIMER_B
8023 * @arg @ref LL_HRTIM_TIMER_C
8024 * @arg @ref LL_HRTIM_TIMER_D
8025 * @arg @ref LL_HRTIM_TIMER_E
8026 * @retval State of MCMP4/CMP4 bit in HRTIM_MISR/HRTIM_TIMxISR register (1 or 0).
8028 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8030 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8031 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8032 REG_OFFSET_TAB_TIMER
[iTimer
]));
8034 return ((READ_BIT(*pReg
, HRTIM_MISR_MCMP4
) == (HRTIM_MISR_MCMP4
)) ? 1UL : 0UL);
8038 * @brief Clear the capture 1 interrupt flag for a given timer.
8039 * @rmtoll TIMxICR CPT1C LL_HRTIM_ClearFlag_CPT1
8040 * @param HRTIMx High Resolution Timer instance
8041 * @param Timer This parameter can be one of the following values:
8042 * @arg @ref LL_HRTIM_TIMER_A
8043 * @arg @ref LL_HRTIM_TIMER_B
8044 * @arg @ref LL_HRTIM_TIMER_C
8045 * @arg @ref LL_HRTIM_TIMER_D
8046 * @arg @ref LL_HRTIM_TIMER_E
8049 __STATIC_INLINE
void LL_HRTIM_ClearFlag_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8051 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8052 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8053 REG_OFFSET_TAB_TIMER
[iTimer
]));
8054 SET_BIT(*pReg
, HRTIM_TIMICR_CPT1C
);
8058 * @brief Indicate whether the capture 1 interrupt occurred for a given timer.
8059 * @rmtoll TIMxISR CPT1 LL_HRTIM_IsActiveFlag_CPT1
8060 * @param HRTIMx High Resolution Timer instance
8061 * @param Timer This parameter can be one of the following values:
8062 * @arg @ref LL_HRTIM_TIMER_A
8063 * @arg @ref LL_HRTIM_TIMER_B
8064 * @arg @ref LL_HRTIM_TIMER_C
8065 * @arg @ref LL_HRTIM_TIMER_D
8066 * @arg @ref LL_HRTIM_TIMER_E
8067 * @retval State of CPT1 bit in HRTIM_TIMxISR register (1 or 0).
8069 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8071 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8072 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8073 REG_OFFSET_TAB_TIMER
[iTimer
]));
8075 return ((READ_BIT(*pReg
, HRTIM_TIMISR_CPT1
) == (HRTIM_TIMISR_CPT1
)) ? 1UL : 0UL);
8079 * @brief Clear the capture 2 interrupt flag for a given timer.
8080 * @rmtoll TIMxICR CPT2C LL_HRTIM_ClearFlag_CPT2
8081 * @param HRTIMx High Resolution Timer instance
8082 * @param Timer This parameter can be one of the following values:
8083 * @arg @ref LL_HRTIM_TIMER_A
8084 * @arg @ref LL_HRTIM_TIMER_B
8085 * @arg @ref LL_HRTIM_TIMER_C
8086 * @arg @ref LL_HRTIM_TIMER_D
8087 * @arg @ref LL_HRTIM_TIMER_E
8090 __STATIC_INLINE
void LL_HRTIM_ClearFlag_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8092 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8093 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8094 REG_OFFSET_TAB_TIMER
[iTimer
]));
8095 SET_BIT(*pReg
, HRTIM_TIMICR_CPT2C
);
8099 * @brief Indicate whether the capture 2 interrupt occurred for a given timer.
8100 * @rmtoll TIMxISR CPT2 LL_HRTIM_IsActiveFlag_CPT2
8101 * @param HRTIMx High Resolution Timer instance
8102 * @param Timer This parameter can be one of the following values:
8103 * @arg @ref LL_HRTIM_TIMER_A
8104 * @arg @ref LL_HRTIM_TIMER_B
8105 * @arg @ref LL_HRTIM_TIMER_C
8106 * @arg @ref LL_HRTIM_TIMER_D
8107 * @arg @ref LL_HRTIM_TIMER_E
8108 * @retval State of CPT2 bit in HRTIM_TIMxISR register (1 or 0).
8110 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8112 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8113 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8114 REG_OFFSET_TAB_TIMER
[iTimer
]));
8116 return ((READ_BIT(*pReg
, HRTIM_TIMISR_CPT2
) == (HRTIM_TIMISR_CPT2
)) ? 1UL : 0UL);
8120 * @brief Clear the output 1 set interrupt flag for a given timer.
8121 * @rmtoll TIMxICR SET1C LL_HRTIM_ClearFlag_SET1
8122 * @param HRTIMx High Resolution Timer instance
8123 * @param Timer This parameter can be one of the following values:
8124 * @arg @ref LL_HRTIM_TIMER_A
8125 * @arg @ref LL_HRTIM_TIMER_B
8126 * @arg @ref LL_HRTIM_TIMER_C
8127 * @arg @ref LL_HRTIM_TIMER_D
8128 * @arg @ref LL_HRTIM_TIMER_E
8131 __STATIC_INLINE
void LL_HRTIM_ClearFlag_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8133 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8134 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8135 REG_OFFSET_TAB_TIMER
[iTimer
]));
8136 SET_BIT(*pReg
, HRTIM_TIMICR_SET1C
);
8140 * @brief Indicate whether the output 1 set interrupt occurred for a given timer.
8141 * @rmtoll TIMxISR SET1 LL_HRTIM_IsActiveFlag_SET1
8142 * @param HRTIMx High Resolution Timer instance
8143 * @param Timer This parameter can be one of the following values:
8144 * @arg @ref LL_HRTIM_TIMER_A
8145 * @arg @ref LL_HRTIM_TIMER_B
8146 * @arg @ref LL_HRTIM_TIMER_C
8147 * @arg @ref LL_HRTIM_TIMER_D
8148 * @arg @ref LL_HRTIM_TIMER_E
8149 * @retval State of SETx1 bit in HRTIM_TIMxISR register (1 or 0).
8151 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8153 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8154 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8155 REG_OFFSET_TAB_TIMER
[iTimer
]));
8157 return ((READ_BIT(*pReg
, HRTIM_TIMISR_SET1
) == (HRTIM_TIMISR_SET1
)) ? 1UL : 0UL);
8161 * @brief Clear the output 1 reset interrupt flag for a given timer.
8162 * @rmtoll TIMxICR RST1C LL_HRTIM_ClearFlag_RST1
8163 * @param HRTIMx High Resolution Timer instance
8164 * @param Timer This parameter can be one of the following values:
8165 * @arg @ref LL_HRTIM_TIMER_A
8166 * @arg @ref LL_HRTIM_TIMER_B
8167 * @arg @ref LL_HRTIM_TIMER_C
8168 * @arg @ref LL_HRTIM_TIMER_D
8169 * @arg @ref LL_HRTIM_TIMER_E
8172 __STATIC_INLINE
void LL_HRTIM_ClearFlag_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8174 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8175 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8176 REG_OFFSET_TAB_TIMER
[iTimer
]));
8177 SET_BIT(*pReg
, HRTIM_TIMICR_RST1C
);
8181 * @brief Indicate whether the output 1 reset interrupt occurred for a given timer.
8182 * @rmtoll TIMxISR RST1 LL_HRTIM_IsActiveFlag_RST1
8183 * @param HRTIMx High Resolution Timer instance
8184 * @param Timer This parameter can be one of the following values:
8185 * @arg @ref LL_HRTIM_TIMER_A
8186 * @arg @ref LL_HRTIM_TIMER_B
8187 * @arg @ref LL_HRTIM_TIMER_C
8188 * @arg @ref LL_HRTIM_TIMER_D
8189 * @arg @ref LL_HRTIM_TIMER_E
8190 * @retval State of RSTx1 bit in HRTIM_TIMxISR register (1 or 0).
8192 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8194 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8195 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8196 REG_OFFSET_TAB_TIMER
[iTimer
]));
8198 return ((READ_BIT(*pReg
, HRTIM_TIMISR_RST1
) == (HRTIM_TIMISR_RST1
)) ? 1UL : 0UL);
8202 * @brief Clear the output 2 set interrupt flag for a given timer.
8203 * @rmtoll TIMxICR SET2C LL_HRTIM_ClearFlag_SET2
8204 * @param HRTIMx High Resolution Timer instance
8205 * @param Timer This parameter can be one of the following values:
8206 * @arg @ref LL_HRTIM_TIMER_A
8207 * @arg @ref LL_HRTIM_TIMER_B
8208 * @arg @ref LL_HRTIM_TIMER_C
8209 * @arg @ref LL_HRTIM_TIMER_D
8210 * @arg @ref LL_HRTIM_TIMER_E
8213 __STATIC_INLINE
void LL_HRTIM_ClearFlag_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8215 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8216 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8217 REG_OFFSET_TAB_TIMER
[iTimer
]));
8218 SET_BIT(*pReg
, HRTIM_TIMICR_SET2C
);
8222 * @brief Indicate whether the output 2 set interrupt occurred for a given timer.
8223 * @rmtoll TIMxISR SET2 LL_HRTIM_IsActiveFlag_SET2
8224 * @param HRTIMx High Resolution Timer instance
8225 * @param Timer This parameter can be one of the following values:
8226 * @arg @ref LL_HRTIM_TIMER_A
8227 * @arg @ref LL_HRTIM_TIMER_B
8228 * @arg @ref LL_HRTIM_TIMER_C
8229 * @arg @ref LL_HRTIM_TIMER_D
8230 * @arg @ref LL_HRTIM_TIMER_E
8231 * @retval State of SETx2 bit in HRTIM_TIMxISR register (1 or 0).
8233 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8235 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8236 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8237 REG_OFFSET_TAB_TIMER
[iTimer
]));
8239 return ((READ_BIT(*pReg
, HRTIM_TIMISR_SET2
) == (HRTIM_TIMISR_SET2
)) ? 1UL : 0UL);
8243 * @brief Clear the output 2reset interrupt flag for a given timer.
8244 * @rmtoll TIMxICR RST2C LL_HRTIM_ClearFlag_RST2
8245 * @param HRTIMx High Resolution Timer instance
8246 * @param Timer This parameter can be one of the following values:
8247 * @arg @ref LL_HRTIM_TIMER_A
8248 * @arg @ref LL_HRTIM_TIMER_B
8249 * @arg @ref LL_HRTIM_TIMER_C
8250 * @arg @ref LL_HRTIM_TIMER_D
8251 * @arg @ref LL_HRTIM_TIMER_E
8254 __STATIC_INLINE
void LL_HRTIM_ClearFlag_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8256 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8257 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8258 REG_OFFSET_TAB_TIMER
[iTimer
]));
8259 SET_BIT(*pReg
, HRTIM_TIMICR_RST2C
);
8263 * @brief Indicate whether the output 2 reset interrupt occurred for a given timer.
8264 * @rmtoll TIMxISR RST2 LL_HRTIM_IsActiveFlag_RST2
8265 * @param HRTIMx High Resolution Timer instance
8266 * @param Timer This parameter can be one of the following values:
8267 * @arg @ref LL_HRTIM_TIMER_A
8268 * @arg @ref LL_HRTIM_TIMER_B
8269 * @arg @ref LL_HRTIM_TIMER_C
8270 * @arg @ref LL_HRTIM_TIMER_D
8271 * @arg @ref LL_HRTIM_TIMER_E
8272 * @retval State of RSTx2 bit in HRTIM_TIMxISR register (1 or 0).
8274 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8276 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8277 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8278 REG_OFFSET_TAB_TIMER
[iTimer
]));
8280 return ((READ_BIT(*pReg
, HRTIM_TIMISR_RST2
) == (HRTIM_TIMISR_RST2
)) ? 1UL : 0UL);
8284 * @brief Clear the reset and/or roll-over interrupt flag for a given timer.
8285 * @rmtoll TIMxICR RSTC LL_HRTIM_ClearFlag_RST
8286 * @param HRTIMx High Resolution Timer instance
8287 * @param Timer This parameter can be one of the following values:
8288 * @arg @ref LL_HRTIM_TIMER_A
8289 * @arg @ref LL_HRTIM_TIMER_B
8290 * @arg @ref LL_HRTIM_TIMER_C
8291 * @arg @ref LL_HRTIM_TIMER_D
8292 * @arg @ref LL_HRTIM_TIMER_E
8295 __STATIC_INLINE
void LL_HRTIM_ClearFlag_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8297 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8298 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8299 REG_OFFSET_TAB_TIMER
[iTimer
]));
8300 SET_BIT(*pReg
, HRTIM_TIMICR_RSTC
);
8304 * @brief Indicate whether the reset and/or roll-over interrupt occurred for a given timer.
8305 * @rmtoll TIMxISR RST LL_HRTIM_IsActiveFlag_RST
8306 * @param HRTIMx High Resolution Timer instance
8307 * @param Timer This parameter can be one of the following values:
8308 * @arg @ref LL_HRTIM_TIMER_A
8309 * @arg @ref LL_HRTIM_TIMER_B
8310 * @arg @ref LL_HRTIM_TIMER_C
8311 * @arg @ref LL_HRTIM_TIMER_D
8312 * @arg @ref LL_HRTIM_TIMER_E
8313 * @retval State of RST bit in HRTIM_TIMxISR register (1 or 0).
8315 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8317 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8318 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8319 REG_OFFSET_TAB_TIMER
[iTimer
]));
8321 return ((READ_BIT(*pReg
, HRTIM_TIMISR_RST
) == (HRTIM_TIMISR_RST
)) ? 1UL : 0UL);
8325 * @brief Clear the delayed protection interrupt flag for a given timer.
8326 * @rmtoll TIMxICR DLYPRTC LL_HRTIM_ClearFlag_DLYPRT
8327 * @param HRTIMx High Resolution Timer instance
8328 * @param Timer This parameter can be one of the following values:
8329 * @arg @ref LL_HRTIM_TIMER_A
8330 * @arg @ref LL_HRTIM_TIMER_B
8331 * @arg @ref LL_HRTIM_TIMER_C
8332 * @arg @ref LL_HRTIM_TIMER_D
8333 * @arg @ref LL_HRTIM_TIMER_E
8336 __STATIC_INLINE
void LL_HRTIM_ClearFlag_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8338 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8339 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MICR
) +
8340 REG_OFFSET_TAB_TIMER
[iTimer
]));
8341 SET_BIT(*pReg
, HRTIM_TIMICR_DLYPRTC
);
8345 * @brief Indicate whether the delayed protection interrupt occurred for a given timer.
8346 * @rmtoll TIMxISR DLYPRT LL_HRTIM_IsActiveFlag_DLYPRT
8347 * @param HRTIMx High Resolution Timer instance
8348 * @param Timer This parameter can be one of the following values:
8349 * @arg @ref LL_HRTIM_TIMER_A
8350 * @arg @ref LL_HRTIM_TIMER_B
8351 * @arg @ref LL_HRTIM_TIMER_C
8352 * @arg @ref LL_HRTIM_TIMER_D
8353 * @arg @ref LL_HRTIM_TIMER_E
8354 * @retval State of DLYPRT bit in HRTIM_TIMxISR register (1 or 0).
8356 __STATIC_INLINE
uint32_t LL_HRTIM_IsActiveFlag_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8358 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8359 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MISR
) +
8360 REG_OFFSET_TAB_TIMER
[iTimer
]));
8362 return ((READ_BIT(*pReg
, HRTIM_TIMISR_DLYPRT
) == (HRTIM_TIMISR_DLYPRT
)) ? 1UL : 0UL);
8369 /** @defgroup HRTIM_LL_EF_IT_Management IT_Management
8374 * @brief Enable the fault 1 interrupt.
8375 * @rmtoll IER FLT1IE LL_HRTIM_EnableIT_FLT1
8376 * @param HRTIMx High Resolution Timer instance
8379 __STATIC_INLINE
void LL_HRTIM_EnableIT_FLT1(HRTIM_TypeDef
*HRTIMx
)
8381 SET_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT1
);
8385 * @brief Disable the fault 1 interrupt.
8386 * @rmtoll IER FLT1IE LL_HRTIM_DisableIT_FLT1
8387 * @param HRTIMx High Resolution Timer instance
8390 __STATIC_INLINE
void LL_HRTIM_DisableIT_FLT1(HRTIM_TypeDef
*HRTIMx
)
8392 CLEAR_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT1
);
8396 * @brief Indicate whether the fault 1 interrupt is enabled.
8397 * @rmtoll IER FLT1IE LL_HRTIM_IsEnabledIT_FLT1
8398 * @param HRTIMx High Resolution Timer instance
8399 * @retval State of FLT1IE bit in HRTIM_IER register (1 or 0).
8401 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_FLT1(HRTIM_TypeDef
*HRTIMx
)
8403 return ((READ_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT1
) == (HRTIM_IER_FLT1
)) ? 1UL : 0UL);
8407 * @brief Enable the fault 2 interrupt.
8408 * @rmtoll IER FLT2IE LL_HRTIM_EnableIT_FLT2
8409 * @param HRTIMx High Resolution Timer instance
8412 __STATIC_INLINE
void LL_HRTIM_EnableIT_FLT2(HRTIM_TypeDef
*HRTIMx
)
8414 SET_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT2
);
8418 * @brief Disable the fault 2 interrupt.
8419 * @rmtoll IER FLT2IE LL_HRTIM_DisableIT_FLT2
8420 * @param HRTIMx High Resolution Timer instance
8423 __STATIC_INLINE
void LL_HRTIM_DisableIT_FLT2(HRTIM_TypeDef
*HRTIMx
)
8425 CLEAR_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT2
);
8429 * @brief Indicate whether the fault 2 interrupt is enabled.
8430 * @rmtoll IER FLT2IE LL_HRTIM_IsEnabledIT_FLT2
8431 * @param HRTIMx High Resolution Timer instance
8432 * @retval State of FLT2IE bit in HRTIM_IER register (1 or 0).
8434 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_FLT2(HRTIM_TypeDef
*HRTIMx
)
8436 return ((READ_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT2
) == (HRTIM_IER_FLT2
)) ? 1UL : 0UL);
8440 * @brief Enable the fault 3 interrupt.
8441 * @rmtoll IER FLT3IE LL_HRTIM_EnableIT_FLT3
8442 * @param HRTIMx High Resolution Timer instance
8445 __STATIC_INLINE
void LL_HRTIM_EnableIT_FLT3(HRTIM_TypeDef
*HRTIMx
)
8447 SET_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT3
);
8451 * @brief Disable the fault 3 interrupt.
8452 * @rmtoll IER FLT3IE LL_HRTIM_DisableIT_FLT3
8453 * @param HRTIMx High Resolution Timer instance
8456 __STATIC_INLINE
void LL_HRTIM_DisableIT_FLT3(HRTIM_TypeDef
*HRTIMx
)
8458 CLEAR_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT3
);
8462 * @brief Indicate whether the fault 3 interrupt is enabled.
8463 * @rmtoll IER FLT3IE LL_HRTIM_IsEnabledIT_FLT3
8464 * @param HRTIMx High Resolution Timer instance
8465 * @retval State of FLT3IE bit in HRTIM_IER register (1 or 0).
8467 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_FLT3(HRTIM_TypeDef
*HRTIMx
)
8469 return ((READ_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT3
) == (HRTIM_IER_FLT3
)) ? 1UL : 0UL);
8473 * @brief Enable the fault 4 interrupt.
8474 * @rmtoll IER FLT4IE LL_HRTIM_EnableIT_FLT4
8475 * @param HRTIMx High Resolution Timer instance
8478 __STATIC_INLINE
void LL_HRTIM_EnableIT_FLT4(HRTIM_TypeDef
*HRTIMx
)
8480 SET_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT4
);
8484 * @brief Disable the fault 4 interrupt.
8485 * @rmtoll IER FLT4IE LL_HRTIM_DisableIT_FLT4
8486 * @param HRTIMx High Resolution Timer instance
8489 __STATIC_INLINE
void LL_HRTIM_DisableIT_FLT4(HRTIM_TypeDef
*HRTIMx
)
8491 CLEAR_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT4
);
8495 * @brief Indicate whether the fault 4 interrupt is enabled.
8496 * @rmtoll IER FLT4IE LL_HRTIM_IsEnabledIT_FLT4
8497 * @param HRTIMx High Resolution Timer instance
8498 * @retval State of FLT4IE bit in HRTIM_IER register (1 or 0).
8500 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_FLT4(HRTIM_TypeDef
*HRTIMx
)
8502 return ((READ_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT4
) == (HRTIM_IER_FLT4
)) ? 1UL : 0UL);
8506 * @brief Enable the fault 5 interrupt.
8507 * @rmtoll IER FLT5IE LL_HRTIM_EnableIT_FLT5
8508 * @param HRTIMx High Resolution Timer instance
8511 __STATIC_INLINE
void LL_HRTIM_EnableIT_FLT5(HRTIM_TypeDef
*HRTIMx
)
8513 SET_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT5
);
8517 * @brief Disable the fault 5 interrupt.
8518 * @rmtoll IER FLT5IE LL_HRTIM_DisableIT_FLT5
8519 * @param HRTIMx High Resolution Timer instance
8522 __STATIC_INLINE
void LL_HRTIM_DisableIT_FLT5(HRTIM_TypeDef
*HRTIMx
)
8524 CLEAR_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT5
);
8528 * @brief Indicate whether the fault 5 interrupt is enabled.
8529 * @rmtoll IER FLT5IE LL_HRTIM_IsEnabledIT_FLT5
8530 * @param HRTIMx High Resolution Timer instance
8531 * @retval State of FLT5IE bit in HRTIM_IER register (1 or 0).
8533 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_FLT5(HRTIM_TypeDef
*HRTIMx
)
8535 return ((READ_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_FLT5
) == (HRTIM_IER_FLT5
)) ? 1UL : 0UL);
8539 * @brief Enable the system fault interrupt.
8540 * @rmtoll IER SYSFLTIE LL_HRTIM_EnableIT_SYSFLT
8541 * @param HRTIMx High Resolution Timer instance
8544 __STATIC_INLINE
void LL_HRTIM_EnableIT_SYSFLT(HRTIM_TypeDef
*HRTIMx
)
8546 SET_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_SYSFLT
);
8550 * @brief Disable the system fault interrupt.
8551 * @rmtoll IER SYSFLTIE LL_HRTIM_DisableIT_SYSFLT
8552 * @param HRTIMx High Resolution Timer instance
8555 __STATIC_INLINE
void LL_HRTIM_DisableIT_SYSFLT(HRTIM_TypeDef
*HRTIMx
)
8557 CLEAR_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_SYSFLT
);
8561 * @brief Indicate whether the system fault interrupt is enabled.
8562 * @rmtoll IER SYSFLTIE LL_HRTIM_IsEnabledIT_SYSFLT
8563 * @param HRTIMx High Resolution Timer instance
8564 * @retval State of SYSFLTIE bit in HRTIM_IER register (1 or 0).
8566 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_SYSFLT(HRTIM_TypeDef
*HRTIMx
)
8568 return ((READ_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_SYSFLT
) == (HRTIM_IER_SYSFLT
)) ? 1UL : 0UL);
8572 * @brief Enable the burst mode period interrupt.
8573 * @rmtoll IER BMPERIE LL_HRTIM_EnableIT_BMPER
8574 * @param HRTIMx High Resolution Timer instance
8577 __STATIC_INLINE
void LL_HRTIM_EnableIT_BMPER(HRTIM_TypeDef
*HRTIMx
)
8579 SET_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_BMPER
);
8583 * @brief Disable the burst mode period interrupt.
8584 * @rmtoll IER BMPERIE LL_HRTIM_DisableIT_BMPER
8585 * @param HRTIMx High Resolution Timer instance
8588 __STATIC_INLINE
void LL_HRTIM_DisableIT_BMPER(HRTIM_TypeDef
*HRTIMx
)
8590 CLEAR_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_BMPER
);
8594 * @brief Indicate whether the burst mode period interrupt is enabled.
8595 * @rmtoll IER BMPERIE LL_HRTIM_IsEnabledIT_BMPER
8596 * @param HRTIMx High Resolution Timer instance
8597 * @retval State of BMPERIE bit in HRTIM_IER register (1 or 0).
8599 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_BMPER(HRTIM_TypeDef
*HRTIMx
)
8601 return ((READ_BIT(HRTIMx
->sCommonRegs
.IER
, HRTIM_IER_BMPER
) == (HRTIM_IER_BMPER
)) ? 1UL : 0UL);
8605 * @brief Enable the synchronization input interrupt.
8606 * @rmtoll MDIER SYNCIE LL_HRTIM_EnableIT_SYNC
8607 * @param HRTIMx High Resolution Timer instance
8610 __STATIC_INLINE
void LL_HRTIM_EnableIT_SYNC(HRTIM_TypeDef
*HRTIMx
)
8612 SET_BIT(HRTIMx
->sMasterRegs
.MDIER
, HRTIM_MDIER_SYNCIE
);
8616 * @brief Disable the synchronization input interrupt.
8617 * @rmtoll MDIER SYNCIE LL_HRTIM_DisableIT_SYNC
8618 * @param HRTIMx High Resolution Timer instance
8621 __STATIC_INLINE
void LL_HRTIM_DisableIT_SYNC(HRTIM_TypeDef
*HRTIMx
)
8623 CLEAR_BIT(HRTIMx
->sMasterRegs
.MDIER
, HRTIM_MDIER_SYNCIE
);
8627 * @brief Indicate whether the synchronization input interrupt is enabled.
8628 * @rmtoll MDIER SYNCIE LL_HRTIM_IsEnabledIT_SYNC
8629 * @param HRTIMx High Resolution Timer instance
8630 * @retval State of SYNCIE bit in HRTIM_MDIER register (1 or 0).
8632 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_SYNC(HRTIM_TypeDef
*HRTIMx
)
8634 return ((READ_BIT(HRTIMx
->sMasterRegs
.MDIER
, HRTIM_MDIER_SYNCIE
) == (HRTIM_MDIER_SYNCIE
)) ? 1UL : 0UL);
8638 * @brief Enable the update interrupt for a given timer.
8639 * @rmtoll MDIER MUPDIE LL_HRTIM_EnableIT_UPDATE\n
8640 * TIMxDIER UPDIE LL_HRTIM_EnableIT_UPDATE
8641 * @param HRTIMx High Resolution Timer instance
8642 * @param Timer This parameter can be one of the following values:
8643 * @arg @ref LL_HRTIM_TIMER_MASTER
8644 * @arg @ref LL_HRTIM_TIMER_A
8645 * @arg @ref LL_HRTIM_TIMER_B
8646 * @arg @ref LL_HRTIM_TIMER_C
8647 * @arg @ref LL_HRTIM_TIMER_D
8648 * @arg @ref LL_HRTIM_TIMER_E
8651 __STATIC_INLINE
void LL_HRTIM_EnableIT_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8653 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8654 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8655 REG_OFFSET_TAB_TIMER
[iTimer
]));
8656 SET_BIT(*pReg
, HRTIM_MDIER_MUPDIE
);
8660 * @brief Disable the update interrupt for a given timer.
8661 * @rmtoll MDIER MUPDIE LL_HRTIM_DisableIT_UPDATE\n
8662 * TIMxDIER UPDIE LL_HRTIM_DisableIT_UPDATE
8663 * @param HRTIMx High Resolution Timer instance
8664 * @param Timer This parameter can be one of the following values:
8665 * @arg @ref LL_HRTIM_TIMER_MASTER
8666 * @arg @ref LL_HRTIM_TIMER_A
8667 * @arg @ref LL_HRTIM_TIMER_B
8668 * @arg @ref LL_HRTIM_TIMER_C
8669 * @arg @ref LL_HRTIM_TIMER_D
8670 * @arg @ref LL_HRTIM_TIMER_E
8673 __STATIC_INLINE
void LL_HRTIM_DisableIT_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8675 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8676 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8677 REG_OFFSET_TAB_TIMER
[iTimer
]));
8678 CLEAR_BIT(*pReg
, HRTIM_MDIER_MUPDIE
);
8682 * @brief Indicate whether the update interrupt is enabled for a given timer.
8683 * @rmtoll MDIER MUPDIE LL_HRTIM_IsEnabledIT_UPDATE\n
8684 * TIMxDIER UPDIE LL_HRTIM_IsEnabledIT_UPDATE
8685 * @param HRTIMx High Resolution Timer instance
8686 * @param Timer This parameter can be one of the following values:
8687 * @arg @ref LL_HRTIM_TIMER_MASTER
8688 * @arg @ref LL_HRTIM_TIMER_A
8689 * @arg @ref LL_HRTIM_TIMER_B
8690 * @arg @ref LL_HRTIM_TIMER_C
8691 * @arg @ref LL_HRTIM_TIMER_D
8692 * @arg @ref LL_HRTIM_TIMER_E
8693 * @retval State of MUPDIE/UPDIE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
8695 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8697 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8698 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8699 REG_OFFSET_TAB_TIMER
[iTimer
]));
8701 return ((READ_BIT(*pReg
, HRTIM_MDIER_MUPDIE
) == (HRTIM_MDIER_MUPDIE
)) ? 1UL : 0UL);
8705 * @brief Enable the repetition interrupt for a given timer.
8706 * @rmtoll MDIER MREPIE LL_HRTIM_EnableIT_REP\n
8707 * TIMxDIER REPIE LL_HRTIM_EnableIT_REP
8708 * @param HRTIMx High Resolution Timer instance
8709 * @param Timer This parameter can be one of the following values:
8710 * @arg @ref LL_HRTIM_TIMER_MASTER
8711 * @arg @ref LL_HRTIM_TIMER_A
8712 * @arg @ref LL_HRTIM_TIMER_B
8713 * @arg @ref LL_HRTIM_TIMER_C
8714 * @arg @ref LL_HRTIM_TIMER_D
8715 * @arg @ref LL_HRTIM_TIMER_E
8718 __STATIC_INLINE
void LL_HRTIM_EnableIT_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8720 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8721 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8722 REG_OFFSET_TAB_TIMER
[iTimer
]));
8723 SET_BIT(*pReg
, HRTIM_MDIER_MREPIE
);
8727 * @brief Disable the repetition interrupt for a given timer.
8728 * @rmtoll MDIER MREPIE LL_HRTIM_DisableIT_REP\n
8729 * TIMxDIER REPIE LL_HRTIM_DisableIT_REP
8730 * @param HRTIMx High Resolution Timer instance
8731 * @param Timer This parameter can be one of the following values:
8732 * @arg @ref LL_HRTIM_TIMER_MASTER
8733 * @arg @ref LL_HRTIM_TIMER_A
8734 * @arg @ref LL_HRTIM_TIMER_B
8735 * @arg @ref LL_HRTIM_TIMER_C
8736 * @arg @ref LL_HRTIM_TIMER_D
8737 * @arg @ref LL_HRTIM_TIMER_E
8740 __STATIC_INLINE
void LL_HRTIM_DisableIT_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8742 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8743 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8744 REG_OFFSET_TAB_TIMER
[iTimer
]));
8745 CLEAR_BIT(*pReg
, HRTIM_MDIER_MREPIE
);
8749 * @brief Indicate whether the repetition interrupt is enabled for a given timer.
8750 * @rmtoll MDIER MREPIE LL_HRTIM_IsEnabledIT_REP\n
8751 * TIMxDIER REPIE LL_HRTIM_IsEnabledIT_REP
8752 * @param HRTIMx High Resolution Timer instance
8753 * @param Timer This parameter can be one of the following values:
8754 * @arg @ref LL_HRTIM_TIMER_MASTER
8755 * @arg @ref LL_HRTIM_TIMER_A
8756 * @arg @ref LL_HRTIM_TIMER_B
8757 * @arg @ref LL_HRTIM_TIMER_C
8758 * @arg @ref LL_HRTIM_TIMER_D
8759 * @arg @ref LL_HRTIM_TIMER_E
8760 * @retval State of MREPIE/REPIE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
8762 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8764 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8765 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8766 REG_OFFSET_TAB_TIMER
[iTimer
]));
8768 return ((READ_BIT(*pReg
, HRTIM_MDIER_MREPIE
) == (HRTIM_MDIER_MREPIE
)) ? 1UL : 0UL);
8772 * @brief Enable the compare 1 interrupt for a given timer.
8773 * @rmtoll MDIER MCMP1IE LL_HRTIM_EnableIT_CMP1\n
8774 * TIMxDIER CMP1IE LL_HRTIM_EnableIT_CMP1
8775 * @param HRTIMx High Resolution Timer instance
8776 * @param Timer This parameter can be one of the following values:
8777 * @arg @ref LL_HRTIM_TIMER_MASTER
8778 * @arg @ref LL_HRTIM_TIMER_A
8779 * @arg @ref LL_HRTIM_TIMER_B
8780 * @arg @ref LL_HRTIM_TIMER_C
8781 * @arg @ref LL_HRTIM_TIMER_D
8782 * @arg @ref LL_HRTIM_TIMER_E
8785 __STATIC_INLINE
void LL_HRTIM_EnableIT_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8787 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8788 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8789 REG_OFFSET_TAB_TIMER
[iTimer
]));
8790 SET_BIT(*pReg
, HRTIM_MDIER_MCMP1IE
);
8794 * @brief Disable the compare 1 interrupt for a given timer.
8795 * @rmtoll MDIER MCMP1IE LL_HRTIM_DisableIT_CMP1\n
8796 * TIMxDIER CMP1IE LL_HRTIM_DisableIT_CMP1
8797 * @param HRTIMx High Resolution Timer instance
8798 * @param Timer This parameter can be one of the following values:
8799 * @arg @ref LL_HRTIM_TIMER_MASTER
8800 * @arg @ref LL_HRTIM_TIMER_A
8801 * @arg @ref LL_HRTIM_TIMER_B
8802 * @arg @ref LL_HRTIM_TIMER_C
8803 * @arg @ref LL_HRTIM_TIMER_D
8804 * @arg @ref LL_HRTIM_TIMER_E
8807 __STATIC_INLINE
void LL_HRTIM_DisableIT_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8809 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8810 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8811 REG_OFFSET_TAB_TIMER
[iTimer
]));
8812 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP1IE
);
8816 * @brief Indicate whether the compare 1 interrupt is enabled for a given timer.
8817 * @rmtoll MDIER MCMP1IE LL_HRTIM_IsEnabledIT_CMP1\n
8818 * TIMxDIER CMP1IE LL_HRTIM_IsEnabledIT_CMP1
8819 * @param HRTIMx High Resolution Timer instance
8820 * @param Timer This parameter can be one of the following values:
8821 * @arg @ref LL_HRTIM_TIMER_MASTER
8822 * @arg @ref LL_HRTIM_TIMER_A
8823 * @arg @ref LL_HRTIM_TIMER_B
8824 * @arg @ref LL_HRTIM_TIMER_C
8825 * @arg @ref LL_HRTIM_TIMER_D
8826 * @arg @ref LL_HRTIM_TIMER_E
8827 * @retval State of MCMP1IE/CMP1IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
8829 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8831 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8832 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8833 REG_OFFSET_TAB_TIMER
[iTimer
]));
8835 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP1IE
) == (HRTIM_MDIER_MCMP1IE
)) ? 1UL : 0UL);
8839 * @brief Enable the compare 2 interrupt for a given timer.
8840 * @rmtoll MDIER MCMP2IE LL_HRTIM_EnableIT_CMP2\n
8841 * TIMxDIER CMP2IE LL_HRTIM_EnableIT_CMP2
8842 * @param HRTIMx High Resolution Timer instance
8843 * @param Timer This parameter can be one of the following values:
8844 * @arg @ref LL_HRTIM_TIMER_MASTER
8845 * @arg @ref LL_HRTIM_TIMER_A
8846 * @arg @ref LL_HRTIM_TIMER_B
8847 * @arg @ref LL_HRTIM_TIMER_C
8848 * @arg @ref LL_HRTIM_TIMER_D
8849 * @arg @ref LL_HRTIM_TIMER_E
8852 __STATIC_INLINE
void LL_HRTIM_EnableIT_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8854 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8855 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8856 REG_OFFSET_TAB_TIMER
[iTimer
]));
8857 SET_BIT(*pReg
, HRTIM_MDIER_MCMP2IE
);
8861 * @brief Disable the compare 2 interrupt for a given timer.
8862 * @rmtoll MDIER MCMP2IE LL_HRTIM_DisableIT_CMP2\n
8863 * TIMxDIER CMP2IE LL_HRTIM_DisableIT_CMP2
8864 * @param HRTIMx High Resolution Timer instance
8865 * @param Timer This parameter can be one of the following values:
8866 * @arg @ref LL_HRTIM_TIMER_MASTER
8867 * @arg @ref LL_HRTIM_TIMER_A
8868 * @arg @ref LL_HRTIM_TIMER_B
8869 * @arg @ref LL_HRTIM_TIMER_C
8870 * @arg @ref LL_HRTIM_TIMER_D
8871 * @arg @ref LL_HRTIM_TIMER_E
8874 __STATIC_INLINE
void LL_HRTIM_DisableIT_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8876 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8877 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8878 REG_OFFSET_TAB_TIMER
[iTimer
]));
8879 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP2IE
);
8883 * @brief Indicate whether the compare 2 interrupt is enabled for a given timer.
8884 * @rmtoll MDIER MCMP2IE LL_HRTIM_IsEnabledIT_CMP2\n
8885 * TIMxDIER CMP2IE LL_HRTIM_IsEnabledIT_CMP2
8886 * @param HRTIMx High Resolution Timer instance
8887 * @param Timer This parameter can be one of the following values:
8888 * @arg @ref LL_HRTIM_TIMER_MASTER
8889 * @arg @ref LL_HRTIM_TIMER_A
8890 * @arg @ref LL_HRTIM_TIMER_B
8891 * @arg @ref LL_HRTIM_TIMER_C
8892 * @arg @ref LL_HRTIM_TIMER_D
8893 * @arg @ref LL_HRTIM_TIMER_E
8894 * @retval State of MCMP2IE/CMP2IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
8896 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8898 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8899 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8900 REG_OFFSET_TAB_TIMER
[iTimer
]));
8902 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP2IE
) == (HRTIM_MDIER_MCMP2IE
)) ? 1UL : 0UL);
8906 * @brief Enable the compare 3 interrupt for a given timer.
8907 * @rmtoll MDIER MCMP3IE LL_HRTIM_EnableIT_CMP3\n
8908 * TIMxDIER CMP3IE LL_HRTIM_EnableIT_CMP3
8909 * @param HRTIMx High Resolution Timer instance
8910 * @param Timer This parameter can be one of the following values:
8911 * @arg @ref LL_HRTIM_TIMER_MASTER
8912 * @arg @ref LL_HRTIM_TIMER_A
8913 * @arg @ref LL_HRTIM_TIMER_B
8914 * @arg @ref LL_HRTIM_TIMER_C
8915 * @arg @ref LL_HRTIM_TIMER_D
8916 * @arg @ref LL_HRTIM_TIMER_E
8919 __STATIC_INLINE
void LL_HRTIM_EnableIT_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8921 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8922 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8923 REG_OFFSET_TAB_TIMER
[iTimer
]));
8924 SET_BIT(*pReg
, HRTIM_MDIER_MCMP3IE
);
8928 * @brief Disable the compare 3 interrupt for a given timer.
8929 * @rmtoll MDIER MCMP3IE LL_HRTIM_DisableIT_CMP3\n
8930 * TIMxDIER CMP3IE LL_HRTIM_DisableIT_CMP3
8931 * @param HRTIMx High Resolution Timer instance
8932 * @param Timer This parameter can be one of the following values:
8933 * @arg @ref LL_HRTIM_TIMER_MASTER
8934 * @arg @ref LL_HRTIM_TIMER_A
8935 * @arg @ref LL_HRTIM_TIMER_B
8936 * @arg @ref LL_HRTIM_TIMER_C
8937 * @arg @ref LL_HRTIM_TIMER_D
8938 * @arg @ref LL_HRTIM_TIMER_E
8941 __STATIC_INLINE
void LL_HRTIM_DisableIT_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8943 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8944 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8945 REG_OFFSET_TAB_TIMER
[iTimer
]));
8946 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP3IE
);
8950 * @brief Indicate whether the compare 3 interrupt is enabled for a given timer.
8951 * @rmtoll MDIER MCMP3IE LL_HRTIM_IsEnabledIT_CMP3\n
8952 * TIMxDIER CMP3IE LL_HRTIM_IsEnabledIT_CMP3
8953 * @param HRTIMx High Resolution Timer instance
8954 * @param Timer This parameter can be one of the following values:
8955 * @arg @ref LL_HRTIM_TIMER_MASTER
8956 * @arg @ref LL_HRTIM_TIMER_A
8957 * @arg @ref LL_HRTIM_TIMER_B
8958 * @arg @ref LL_HRTIM_TIMER_C
8959 * @arg @ref LL_HRTIM_TIMER_D
8960 * @arg @ref LL_HRTIM_TIMER_E
8961 * @retval State of MCMP3IE/CMP3IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
8963 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8965 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8966 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8967 REG_OFFSET_TAB_TIMER
[iTimer
]));
8969 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP3IE
) == (HRTIM_MDIER_MCMP3IE
)) ? 1UL : 0UL);
8973 * @brief Enable the compare 4 interrupt for a given timer.
8974 * @rmtoll MDIER MCMP4IE LL_HRTIM_EnableIT_CMP4\n
8975 * TIMxDIER CMP4IE LL_HRTIM_EnableIT_CMP4
8976 * @param HRTIMx High Resolution Timer instance
8977 * @param Timer This parameter can be one of the following values:
8978 * @arg @ref LL_HRTIM_TIMER_MASTER
8979 * @arg @ref LL_HRTIM_TIMER_A
8980 * @arg @ref LL_HRTIM_TIMER_B
8981 * @arg @ref LL_HRTIM_TIMER_C
8982 * @arg @ref LL_HRTIM_TIMER_D
8983 * @arg @ref LL_HRTIM_TIMER_E
8986 __STATIC_INLINE
void LL_HRTIM_EnableIT_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
8988 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
8989 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
8990 REG_OFFSET_TAB_TIMER
[iTimer
]));
8991 SET_BIT(*pReg
, HRTIM_MDIER_MCMP4IE
);
8995 * @brief Disable the compare 4 interrupt for a given timer.
8996 * @rmtoll MDIER MCMP4IE LL_HRTIM_DisableIT_CMP4\n
8997 * TIMxDIER CMP4IE LL_HRTIM_DisableIT_CMP4
8998 * @param HRTIMx High Resolution Timer instance
8999 * @param Timer This parameter can be one of the following values:
9000 * @arg @ref LL_HRTIM_TIMER_MASTER
9001 * @arg @ref LL_HRTIM_TIMER_A
9002 * @arg @ref LL_HRTIM_TIMER_B
9003 * @arg @ref LL_HRTIM_TIMER_C
9004 * @arg @ref LL_HRTIM_TIMER_D
9005 * @arg @ref LL_HRTIM_TIMER_E
9008 __STATIC_INLINE
void LL_HRTIM_DisableIT_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9010 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9011 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9012 REG_OFFSET_TAB_TIMER
[iTimer
]));
9013 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP4IE
);
9017 * @brief Indicate whether the compare 4 interrupt is enabled for a given timer.
9018 * @rmtoll MDIER MCMP4IE LL_HRTIM_IsEnabledIT_CMP4\n
9019 * TIMxDIER CMP4IE LL_HRTIM_IsEnabledIT_CMP4
9020 * @param HRTIMx High Resolution Timer instance
9021 * @param Timer This parameter can be one of the following values:
9022 * @arg @ref LL_HRTIM_TIMER_MASTER
9023 * @arg @ref LL_HRTIM_TIMER_A
9024 * @arg @ref LL_HRTIM_TIMER_B
9025 * @arg @ref LL_HRTIM_TIMER_C
9026 * @arg @ref LL_HRTIM_TIMER_D
9027 * @arg @ref LL_HRTIM_TIMER_E
9028 * @retval State of MCMP4IE/CMP4IE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
9030 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9032 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9033 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9034 REG_OFFSET_TAB_TIMER
[iTimer
]));
9036 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP4IE
) == (HRTIM_MDIER_MCMP4IE
)) ? 1UL : 0UL);
9040 * @brief Enable the capture 1 interrupt for a given timer.
9041 * @rmtoll TIMxDIER CPT1IE LL_HRTIM_EnableIT_CPT1
9042 * @param HRTIMx High Resolution Timer instance
9043 * @param Timer This parameter can be one of the following values:
9044 * @arg @ref LL_HRTIM_TIMER_A
9045 * @arg @ref LL_HRTIM_TIMER_B
9046 * @arg @ref LL_HRTIM_TIMER_C
9047 * @arg @ref LL_HRTIM_TIMER_D
9048 * @arg @ref LL_HRTIM_TIMER_E
9051 __STATIC_INLINE
void LL_HRTIM_EnableIT_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9053 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9054 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9055 REG_OFFSET_TAB_TIMER
[iTimer
]));
9056 SET_BIT(*pReg
, HRTIM_TIMDIER_CPT1IE
);
9060 * @brief Enable the capture 1 interrupt for a given timer.
9061 * @rmtoll TIMxDIER CPT1IE LL_HRTIM_DisableIT_CPT1
9062 * @param HRTIMx High Resolution Timer instance
9063 * @param Timer This parameter can be one of the following values:
9064 * @arg @ref LL_HRTIM_TIMER_A
9065 * @arg @ref LL_HRTIM_TIMER_B
9066 * @arg @ref LL_HRTIM_TIMER_C
9067 * @arg @ref LL_HRTIM_TIMER_D
9068 * @arg @ref LL_HRTIM_TIMER_E
9071 __STATIC_INLINE
void LL_HRTIM_DisableIT_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9073 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9074 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9075 REG_OFFSET_TAB_TIMER
[iTimer
]));
9076 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_CPT1IE
);
9080 * @brief Indicate whether the capture 1 interrupt is enabled for a given timer.
9081 * @rmtoll TIMxDIER CPT1IE LL_HRTIM_IsEnabledIT_CPT1
9082 * @param HRTIMx High Resolution Timer instance
9083 * @param Timer This parameter can be one of the following values:
9084 * @arg @ref LL_HRTIM_TIMER_A
9085 * @arg @ref LL_HRTIM_TIMER_B
9086 * @arg @ref LL_HRTIM_TIMER_C
9087 * @arg @ref LL_HRTIM_TIMER_D
9088 * @arg @ref LL_HRTIM_TIMER_E
9089 * @retval State of CPT1IE bit in HRTIM_TIMxDIER register (1 or 0).
9091 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9093 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9094 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9095 REG_OFFSET_TAB_TIMER
[iTimer
]));
9097 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_CPT1IE
) == (HRTIM_TIMDIER_CPT1IE
)) ? 1UL : 0UL);
9101 * @brief Enable the capture 2 interrupt for a given timer.
9102 * @rmtoll TIMxDIER CPT2IE LL_HRTIM_EnableIT_CPT2
9103 * @param HRTIMx High Resolution Timer instance
9104 * @param Timer This parameter can be one of the following values:
9105 * @arg @ref LL_HRTIM_TIMER_A
9106 * @arg @ref LL_HRTIM_TIMER_B
9107 * @arg @ref LL_HRTIM_TIMER_C
9108 * @arg @ref LL_HRTIM_TIMER_D
9109 * @arg @ref LL_HRTIM_TIMER_E
9112 __STATIC_INLINE
void LL_HRTIM_EnableIT_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9114 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9115 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9116 REG_OFFSET_TAB_TIMER
[iTimer
]));
9117 SET_BIT(*pReg
, HRTIM_TIMDIER_CPT2IE
);
9121 * @brief Enable the capture 2 interrupt for a given timer.
9122 * @rmtoll TIMxDIER CPT2IE LL_HRTIM_DisableIT_CPT2
9123 * @param HRTIMx High Resolution Timer instance
9124 * @param Timer This parameter can be one of the following values:
9125 * @arg @ref LL_HRTIM_TIMER_A
9126 * @arg @ref LL_HRTIM_TIMER_B
9127 * @arg @ref LL_HRTIM_TIMER_C
9128 * @arg @ref LL_HRTIM_TIMER_D
9129 * @arg @ref LL_HRTIM_TIMER_E
9132 __STATIC_INLINE
void LL_HRTIM_DisableIT_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9134 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9135 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9136 REG_OFFSET_TAB_TIMER
[iTimer
]));
9137 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_CPT2IE
);
9141 * @brief Indicate whether the capture 2 interrupt is enabled for a given timer.
9142 * @rmtoll TIMxDIER CPT2IE LL_HRTIM_IsEnabledIT_CPT2
9143 * @param HRTIMx High Resolution Timer instance
9144 * @param Timer This parameter can be one of the following values:
9145 * @arg @ref LL_HRTIM_TIMER_A
9146 * @arg @ref LL_HRTIM_TIMER_B
9147 * @arg @ref LL_HRTIM_TIMER_C
9148 * @arg @ref LL_HRTIM_TIMER_D
9149 * @arg @ref LL_HRTIM_TIMER_E
9150 * @retval State of CPT2IE bit in HRTIM_TIMxDIER register (1 or 0).
9152 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9154 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9155 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9156 REG_OFFSET_TAB_TIMER
[iTimer
]));
9158 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_CPT2IE
) == (HRTIM_TIMDIER_CPT2IE
)) ? 1UL : 0UL);
9162 * @brief Enable the output 1 set interrupt for a given timer.
9163 * @rmtoll TIMxDIER SET1IE LL_HRTIM_EnableIT_SET1
9164 * @param HRTIMx High Resolution Timer instance
9165 * @param Timer This parameter can be one of the following values:
9166 * @arg @ref LL_HRTIM_TIMER_A
9167 * @arg @ref LL_HRTIM_TIMER_B
9168 * @arg @ref LL_HRTIM_TIMER_C
9169 * @arg @ref LL_HRTIM_TIMER_D
9170 * @arg @ref LL_HRTIM_TIMER_E
9173 __STATIC_INLINE
void LL_HRTIM_EnableIT_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9175 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9176 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9177 REG_OFFSET_TAB_TIMER
[iTimer
]));
9178 SET_BIT(*pReg
, HRTIM_TIMDIER_SET1IE
);
9182 * @brief Disable the output 1 set interrupt for a given timer.
9183 * @rmtoll TIMxDIER SET1IE LL_HRTIM_DisableIT_SET1
9184 * @param HRTIMx High Resolution Timer instance
9185 * @param Timer This parameter can be one of the following values:
9186 * @arg @ref LL_HRTIM_TIMER_A
9187 * @arg @ref LL_HRTIM_TIMER_B
9188 * @arg @ref LL_HRTIM_TIMER_C
9189 * @arg @ref LL_HRTIM_TIMER_D
9190 * @arg @ref LL_HRTIM_TIMER_E
9193 __STATIC_INLINE
void LL_HRTIM_DisableIT_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9195 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9196 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9197 REG_OFFSET_TAB_TIMER
[iTimer
]));
9198 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_SET1IE
);
9202 * @brief Indicate whether the output 1 set interrupt is enabled for a given timer.
9203 * @rmtoll TIMxDIER SET1IE LL_HRTIM_IsEnabledIT_SET1
9204 * @param HRTIMx High Resolution Timer instance
9205 * @param Timer This parameter can be one of the following values:
9206 * @arg @ref LL_HRTIM_TIMER_A
9207 * @arg @ref LL_HRTIM_TIMER_B
9208 * @arg @ref LL_HRTIM_TIMER_C
9209 * @arg @ref LL_HRTIM_TIMER_D
9210 * @arg @ref LL_HRTIM_TIMER_E
9211 * @retval State of SET1xIE bit in HRTIM_TIMxDIER register (1 or 0).
9213 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9215 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9216 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9217 REG_OFFSET_TAB_TIMER
[iTimer
]));
9219 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_SET1IE
) == (HRTIM_TIMDIER_SET1IE
)) ? 1UL : 0UL);
9223 * @brief Enable the output 1 reset interrupt for a given timer.
9224 * @rmtoll TIMxDIER RST1IE LL_HRTIM_EnableIT_RST1
9225 * @param HRTIMx High Resolution Timer instance
9226 * @param Timer This parameter can be one of the following values:
9227 * @arg @ref LL_HRTIM_TIMER_A
9228 * @arg @ref LL_HRTIM_TIMER_B
9229 * @arg @ref LL_HRTIM_TIMER_C
9230 * @arg @ref LL_HRTIM_TIMER_D
9231 * @arg @ref LL_HRTIM_TIMER_E
9234 __STATIC_INLINE
void LL_HRTIM_EnableIT_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9236 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9237 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9238 REG_OFFSET_TAB_TIMER
[iTimer
]));
9239 SET_BIT(*pReg
, HRTIM_TIMDIER_RST1IE
);
9243 * @brief Disable the output 1 reset interrupt for a given timer.
9244 * @rmtoll TIMxDIER RST1IE LL_HRTIM_DisableIT_RST1
9245 * @param HRTIMx High Resolution Timer instance
9246 * @param Timer This parameter can be one of the following values:
9247 * @arg @ref LL_HRTIM_TIMER_A
9248 * @arg @ref LL_HRTIM_TIMER_B
9249 * @arg @ref LL_HRTIM_TIMER_C
9250 * @arg @ref LL_HRTIM_TIMER_D
9251 * @arg @ref LL_HRTIM_TIMER_E
9254 __STATIC_INLINE
void LL_HRTIM_DisableIT_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9256 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9257 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9258 REG_OFFSET_TAB_TIMER
[iTimer
]));
9259 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_RST1IE
);
9263 * @brief Indicate whether the output 1 reset interrupt is enabled for a given timer.
9264 * @rmtoll TIMxDIER RST1IE LL_HRTIM_IsEnabledIT_RST1
9265 * @param HRTIMx High Resolution Timer instance
9266 * @param Timer This parameter can be one of the following values:
9267 * @arg @ref LL_HRTIM_TIMER_A
9268 * @arg @ref LL_HRTIM_TIMER_B
9269 * @arg @ref LL_HRTIM_TIMER_C
9270 * @arg @ref LL_HRTIM_TIMER_D
9271 * @arg @ref LL_HRTIM_TIMER_E
9272 * @retval State of RST1xIE bit in HRTIM_TIMxDIER register (1 or 0).
9274 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9276 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9277 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9278 REG_OFFSET_TAB_TIMER
[iTimer
]));
9280 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_RST1IE
) == (HRTIM_TIMDIER_RST1IE
)) ? 1UL : 0UL);
9284 * @brief Enable the output 2 set interrupt for a given timer.
9285 * @rmtoll TIMxDIER SET2IE LL_HRTIM_EnableIT_SET2
9286 * @param HRTIMx High Resolution Timer instance
9287 * @param Timer This parameter can be one of the following values:
9288 * @arg @ref LL_HRTIM_TIMER_A
9289 * @arg @ref LL_HRTIM_TIMER_B
9290 * @arg @ref LL_HRTIM_TIMER_C
9291 * @arg @ref LL_HRTIM_TIMER_D
9292 * @arg @ref LL_HRTIM_TIMER_E
9295 __STATIC_INLINE
void LL_HRTIM_EnableIT_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9297 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9298 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9299 REG_OFFSET_TAB_TIMER
[iTimer
]));
9300 SET_BIT(*pReg
, HRTIM_TIMDIER_SET2IE
);
9304 * @brief Disable the output 2 set interrupt for a given timer.
9305 * @rmtoll TIMxDIER SET2IE LL_HRTIM_DisableIT_SET2
9306 * @param HRTIMx High Resolution Timer instance
9307 * @param Timer This parameter can be one of the following values:
9308 * @arg @ref LL_HRTIM_TIMER_A
9309 * @arg @ref LL_HRTIM_TIMER_B
9310 * @arg @ref LL_HRTIM_TIMER_C
9311 * @arg @ref LL_HRTIM_TIMER_D
9312 * @arg @ref LL_HRTIM_TIMER_E
9315 __STATIC_INLINE
void LL_HRTIM_DisableIT_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9317 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9318 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9319 REG_OFFSET_TAB_TIMER
[iTimer
]));
9320 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_SET2IE
);
9324 * @brief Indicate whether the output 2 set interrupt is enabled for a given timer.
9325 * @rmtoll TIMxDIER SET2IE LL_HRTIM_IsEnabledIT_SET2
9326 * @param HRTIMx High Resolution Timer instance
9327 * @param Timer This parameter can be one of the following values:
9328 * @arg @ref LL_HRTIM_TIMER_A
9329 * @arg @ref LL_HRTIM_TIMER_B
9330 * @arg @ref LL_HRTIM_TIMER_C
9331 * @arg @ref LL_HRTIM_TIMER_D
9332 * @arg @ref LL_HRTIM_TIMER_E
9333 * @retval State of SET2xIE bit in HRTIM_TIMxDIER register (1 or 0).
9335 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9337 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9338 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9339 REG_OFFSET_TAB_TIMER
[iTimer
]));
9341 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_SET2IE
) == (HRTIM_TIMDIER_SET2IE
)) ? 1UL : 0UL);
9345 * @brief Enable the output 2 reset interrupt for a given timer.
9346 * @rmtoll TIMxDIER RST2IE LL_HRTIM_EnableIT_RST2
9347 * @param HRTIMx High Resolution Timer instance
9348 * @param Timer This parameter can be one of the following values:
9349 * @arg @ref LL_HRTIM_TIMER_A
9350 * @arg @ref LL_HRTIM_TIMER_B
9351 * @arg @ref LL_HRTIM_TIMER_C
9352 * @arg @ref LL_HRTIM_TIMER_D
9353 * @arg @ref LL_HRTIM_TIMER_E
9356 __STATIC_INLINE
void LL_HRTIM_EnableIT_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9358 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9359 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9360 REG_OFFSET_TAB_TIMER
[iTimer
]));
9361 SET_BIT(*pReg
, HRTIM_TIMDIER_RST2IE
);
9365 * @brief Disable the output 2 reset interrupt for a given timer.
9366 * @rmtoll TIMxDIER RST2IE LL_HRTIM_DisableIT_RST2
9367 * @param HRTIMx High Resolution Timer instance
9368 * @param Timer This parameter can be one of the following values:
9369 * @arg @ref LL_HRTIM_TIMER_A
9370 * @arg @ref LL_HRTIM_TIMER_B
9371 * @arg @ref LL_HRTIM_TIMER_C
9372 * @arg @ref LL_HRTIM_TIMER_D
9373 * @arg @ref LL_HRTIM_TIMER_E
9376 __STATIC_INLINE
void LL_HRTIM_DisableIT_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9378 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9379 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9380 REG_OFFSET_TAB_TIMER
[iTimer
]));
9381 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_RST2IE
);
9385 * @brief Indicate whether the output 2 reset LL_HRTIM_IsEnabledIT_RST2 is enabled for a given timer.
9386 * @rmtoll TIMxDIER RST2IE LL_HRTIM_DisableIT_RST2
9387 * @param HRTIMx High Resolution Timer instance
9388 * @param Timer This parameter can be one of the following values:
9389 * @arg @ref LL_HRTIM_TIMER_A
9390 * @arg @ref LL_HRTIM_TIMER_B
9391 * @arg @ref LL_HRTIM_TIMER_C
9392 * @arg @ref LL_HRTIM_TIMER_D
9393 * @arg @ref LL_HRTIM_TIMER_E
9394 * @retval State of RST2xIE bit in HRTIM_TIMxDIER register (1 or 0).
9396 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9398 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9399 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9400 REG_OFFSET_TAB_TIMER
[iTimer
]));
9402 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_RST2IE
) == (HRTIM_TIMDIER_RST2IE
)) ? 1UL : 0UL);
9406 * @brief Enable the reset/roll-over interrupt for a given timer.
9407 * @rmtoll TIMxDIER RSTIE LL_HRTIM_EnableIT_RST
9408 * @param HRTIMx High Resolution Timer instance
9409 * @param Timer This parameter can be one of the following values:
9410 * @arg @ref LL_HRTIM_TIMER_A
9411 * @arg @ref LL_HRTIM_TIMER_B
9412 * @arg @ref LL_HRTIM_TIMER_C
9413 * @arg @ref LL_HRTIM_TIMER_D
9414 * @arg @ref LL_HRTIM_TIMER_E
9417 __STATIC_INLINE
void LL_HRTIM_EnableIT_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9419 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9420 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9421 REG_OFFSET_TAB_TIMER
[iTimer
]));
9422 SET_BIT(*pReg
, HRTIM_TIMDIER_RSTIE
);
9426 * @brief Disable the reset/roll-over interrupt for a given timer.
9427 * @rmtoll TIMxDIER RSTIE LL_HRTIM_DisableIT_RST
9428 * @param HRTIMx High Resolution Timer instance
9429 * @param Timer This parameter can be one of the following values:
9430 * @arg @ref LL_HRTIM_TIMER_A
9431 * @arg @ref LL_HRTIM_TIMER_B
9432 * @arg @ref LL_HRTIM_TIMER_C
9433 * @arg @ref LL_HRTIM_TIMER_D
9434 * @arg @ref LL_HRTIM_TIMER_E
9437 __STATIC_INLINE
void LL_HRTIM_DisableIT_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9439 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9440 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9441 REG_OFFSET_TAB_TIMER
[iTimer
]));
9442 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_RSTIE
);
9446 * @brief Indicate whether the reset/roll-over interrupt is enabled for a given timer.
9447 * @rmtoll TIMxDIER RSTIE LL_HRTIM_IsEnabledIT_RST
9448 * @param HRTIMx High Resolution Timer instance
9449 * @param Timer This parameter can be one of the following values:
9450 * @arg @ref LL_HRTIM_TIMER_A
9451 * @arg @ref LL_HRTIM_TIMER_B
9452 * @arg @ref LL_HRTIM_TIMER_C
9453 * @arg @ref LL_HRTIM_TIMER_D
9454 * @arg @ref LL_HRTIM_TIMER_E
9455 * @retval State of RSTIE bit in HRTIM_TIMxDIER register (1 or 0).
9457 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9459 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9460 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9461 REG_OFFSET_TAB_TIMER
[iTimer
]));
9463 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_RSTIE
) == (HRTIM_TIMDIER_RSTIE
)) ? 1UL : 0UL);
9467 * @brief Enable the delayed protection interrupt for a given timer.
9468 * @rmtoll TIMxDIER DLYPRTIE LL_HRTIM_EnableIT_DLYPRT
9469 * @param HRTIMx High Resolution Timer instance
9470 * @param Timer This parameter can be one of the following values:
9471 * @arg @ref LL_HRTIM_TIMER_A
9472 * @arg @ref LL_HRTIM_TIMER_B
9473 * @arg @ref LL_HRTIM_TIMER_C
9474 * @arg @ref LL_HRTIM_TIMER_D
9475 * @arg @ref LL_HRTIM_TIMER_E
9478 __STATIC_INLINE
void LL_HRTIM_EnableIT_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9480 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9481 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9482 REG_OFFSET_TAB_TIMER
[iTimer
]));
9483 SET_BIT(*pReg
, HRTIM_TIMDIER_DLYPRTIE
);
9487 * @brief Disable the delayed protection interrupt for a given timer.
9488 * @rmtoll TIMxDIER DLYPRTIE LL_HRTIM_DisableIT_DLYPRT
9489 * @param HRTIMx High Resolution Timer instance
9490 * @param Timer This parameter can be one of the following values:
9491 * @arg @ref LL_HRTIM_TIMER_A
9492 * @arg @ref LL_HRTIM_TIMER_B
9493 * @arg @ref LL_HRTIM_TIMER_C
9494 * @arg @ref LL_HRTIM_TIMER_D
9495 * @arg @ref LL_HRTIM_TIMER_E
9498 __STATIC_INLINE
void LL_HRTIM_DisableIT_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9500 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9501 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9502 REG_OFFSET_TAB_TIMER
[iTimer
]));
9503 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_DLYPRTIE
);
9507 * @brief Indicate whether the delayed protection interrupt is enabled for a given timer.
9508 * @rmtoll TIMxDIER DLYPRTIE LL_HRTIM_IsEnabledIT_DLYPRT
9509 * @param HRTIMx High Resolution Timer instance
9510 * @param Timer This parameter can be one of the following values:
9511 * @arg @ref LL_HRTIM_TIMER_A
9512 * @arg @ref LL_HRTIM_TIMER_B
9513 * @arg @ref LL_HRTIM_TIMER_C
9514 * @arg @ref LL_HRTIM_TIMER_D
9515 * @arg @ref LL_HRTIM_TIMER_E
9516 * @retval State of DLYPRTIE bit in HRTIM_TIMxDIER register (1 or 0).
9518 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledIT_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9520 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9521 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9522 REG_OFFSET_TAB_TIMER
[iTimer
]));
9524 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_DLYPRTIE
) == (HRTIM_TIMDIER_DLYPRTIE
)) ? 1UL : 0UL);
9531 /** @defgroup HRTIM_LL_EF_DMA_Management DMA_Management
9536 * @brief Enable the synchronization input DMA request.
9537 * @rmtoll MDIER SYNCDE LL_HRTIM_EnableDMAReq_SYNC
9538 * @param HRTIMx High Resolution Timer instance
9541 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_SYNC(HRTIM_TypeDef
*HRTIMx
)
9543 SET_BIT(HRTIMx
->sMasterRegs
.MDIER
, HRTIM_MDIER_SYNCDE
);
9547 * @brief Disable the synchronization input DMA request
9548 * @rmtoll MDIER SYNCDE LL_HRTIM_DisableDMAReq_SYNC
9549 * @param HRTIMx High Resolution Timer instance
9552 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_SYNC(HRTIM_TypeDef
*HRTIMx
)
9554 CLEAR_BIT(HRTIMx
->sMasterRegs
.MDIER
, HRTIM_MDIER_SYNCDE
);
9558 * @brief Indicate whether the synchronization input DMA request is enabled.
9559 * @rmtoll MDIER SYNCDE LL_HRTIM_IsEnabledDMAReq_SYNC
9560 * @param HRTIMx High Resolution Timer instance
9561 * @retval State of SYNCDE bit in HRTIM_MDIER register (1 or 0).
9563 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_SYNC(HRTIM_TypeDef
*HRTIMx
)
9565 return ((READ_BIT(HRTIMx
->sMasterRegs
.MDIER
, HRTIM_MDIER_SYNCDE
) == (HRTIM_MDIER_SYNCDE
)) ? 1UL : 0UL);
9569 * @brief Enable the update DMA request for a given timer.
9570 * @rmtoll MDIER MUPDDE LL_HRTIM_EnableDMAReq_UPDATE\n
9571 * TIMxDIER UPDDE LL_HRTIM_EnableDMAReq_UPDATE
9572 * @param HRTIMx High Resolution Timer instance
9573 * @param Timer This parameter can be one of the following values:
9574 * @arg @ref LL_HRTIM_TIMER_MASTER
9575 * @arg @ref LL_HRTIM_TIMER_A
9576 * @arg @ref LL_HRTIM_TIMER_B
9577 * @arg @ref LL_HRTIM_TIMER_C
9578 * @arg @ref LL_HRTIM_TIMER_D
9579 * @arg @ref LL_HRTIM_TIMER_E
9582 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9584 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9585 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9586 REG_OFFSET_TAB_TIMER
[iTimer
]));
9587 SET_BIT(*pReg
, HRTIM_MDIER_MUPDDE
);
9591 * @brief Disable the update DMA request for a given timer.
9592 * @rmtoll MDIER MUPDDE LL_HRTIM_DisableDMAReq_UPDATE\n
9593 * TIMxDIER UPDDE LL_HRTIM_DisableDMAReq_UPDATE
9594 * @param HRTIMx High Resolution Timer instance
9595 * @param Timer This parameter can be one of the following values:
9596 * @arg @ref LL_HRTIM_TIMER_MASTER
9597 * @arg @ref LL_HRTIM_TIMER_A
9598 * @arg @ref LL_HRTIM_TIMER_B
9599 * @arg @ref LL_HRTIM_TIMER_C
9600 * @arg @ref LL_HRTIM_TIMER_D
9601 * @arg @ref LL_HRTIM_TIMER_E
9604 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9606 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9607 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9608 REG_OFFSET_TAB_TIMER
[iTimer
]));
9609 CLEAR_BIT(*pReg
, HRTIM_MDIER_MUPDDE
);
9613 * @brief Indicate whether the update DMA request is enabled for a given timer.
9614 * @rmtoll MDIER MUPDDE LL_HRTIM_IsEnabledDMAReq_UPDATE\n
9615 * TIMxDIER UPDDE LL_HRTIM_IsEnabledDMAReq_UPDATE
9616 * @param HRTIMx High Resolution Timer instance
9617 * @param Timer This parameter can be one of the following values:
9618 * @arg @ref LL_HRTIM_TIMER_MASTER
9619 * @arg @ref LL_HRTIM_TIMER_A
9620 * @arg @ref LL_HRTIM_TIMER_B
9621 * @arg @ref LL_HRTIM_TIMER_C
9622 * @arg @ref LL_HRTIM_TIMER_D
9623 * @arg @ref LL_HRTIM_TIMER_E
9624 * @retval State of MUPDDE/UPDDE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
9626 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_UPDATE(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9628 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9629 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9630 REG_OFFSET_TAB_TIMER
[iTimer
]));
9632 return ((READ_BIT(*pReg
, HRTIM_MDIER_MUPDDE
) == (HRTIM_MDIER_MUPDDE
)) ? 1UL : 0UL);
9636 * @brief Enable the repetition DMA request for a given timer.
9637 * @rmtoll MDIER MREPDE LL_HRTIM_EnableDMAReq_REP\n
9638 * TIMxDIER REPDE LL_HRTIM_EnableDMAReq_REP
9639 * @param HRTIMx High Resolution Timer instance
9640 * @param Timer This parameter can be one of the following values:
9641 * @arg @ref LL_HRTIM_TIMER_MASTER
9642 * @arg @ref LL_HRTIM_TIMER_A
9643 * @arg @ref LL_HRTIM_TIMER_B
9644 * @arg @ref LL_HRTIM_TIMER_C
9645 * @arg @ref LL_HRTIM_TIMER_D
9646 * @arg @ref LL_HRTIM_TIMER_E
9649 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9651 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9652 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9653 REG_OFFSET_TAB_TIMER
[iTimer
]));
9654 SET_BIT(*pReg
, HRTIM_MDIER_MREPDE
);
9658 * @brief Disable the repetition DMA request for a given timer.
9659 * @rmtoll MDIER MREPDE LL_HRTIM_DisableDMAReq_REP\n
9660 * TIMxDIER REPDE LL_HRTIM_DisableDMAReq_REP
9661 * @param HRTIMx High Resolution Timer instance
9662 * @param Timer This parameter can be one of the following values:
9663 * @arg @ref LL_HRTIM_TIMER_MASTER
9664 * @arg @ref LL_HRTIM_TIMER_A
9665 * @arg @ref LL_HRTIM_TIMER_B
9666 * @arg @ref LL_HRTIM_TIMER_C
9667 * @arg @ref LL_HRTIM_TIMER_D
9668 * @arg @ref LL_HRTIM_TIMER_E
9671 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9673 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9674 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9675 REG_OFFSET_TAB_TIMER
[iTimer
]));
9676 CLEAR_BIT(*pReg
, HRTIM_MDIER_MREPDE
);
9680 * @brief Indicate whether the repetition DMA request is enabled for a given timer.
9681 * @rmtoll MDIER MREPDE LL_HRTIM_IsEnabledDMAReq_REP\n
9682 * TIMxDIER REPDE LL_HRTIM_IsEnabledDMAReq_REP
9683 * @param HRTIMx High Resolution Timer instance
9684 * @param Timer This parameter can be one of the following values:
9685 * @arg @ref LL_HRTIM_TIMER_MASTER
9686 * @arg @ref LL_HRTIM_TIMER_A
9687 * @arg @ref LL_HRTIM_TIMER_B
9688 * @arg @ref LL_HRTIM_TIMER_C
9689 * @arg @ref LL_HRTIM_TIMER_D
9690 * @arg @ref LL_HRTIM_TIMER_E
9691 * @retval State of MREPDE/REPDE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
9693 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_REP(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9695 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9696 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9697 REG_OFFSET_TAB_TIMER
[iTimer
]));
9699 return ((READ_BIT(*pReg
, HRTIM_MDIER_MREPDE
) == (HRTIM_MDIER_MREPDE
)) ? 1UL : 0UL);
9703 * @brief Enable the compare 1 DMA request for a given timer.
9704 * @rmtoll MDIER MCMP1DE LL_HRTIM_EnableDMAReq_CMP1\n
9705 * TIMxDIER CMP1DE LL_HRTIM_EnableDMAReq_CMP1
9706 * @param HRTIMx High Resolution Timer instance
9707 * @param Timer This parameter can be one of the following values:
9708 * @arg @ref LL_HRTIM_TIMER_MASTER
9709 * @arg @ref LL_HRTIM_TIMER_A
9710 * @arg @ref LL_HRTIM_TIMER_B
9711 * @arg @ref LL_HRTIM_TIMER_C
9712 * @arg @ref LL_HRTIM_TIMER_D
9713 * @arg @ref LL_HRTIM_TIMER_E
9716 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9718 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9719 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9720 REG_OFFSET_TAB_TIMER
[iTimer
]));
9721 SET_BIT(*pReg
, HRTIM_MDIER_MCMP1DE
);
9725 * @brief Disable the compare 1 DMA request for a given timer.
9726 * @rmtoll MDIER MCMP1DE LL_HRTIM_DisableDMAReq_CMP1\n
9727 * TIMxDIER CMP1DE LL_HRTIM_DisableDMAReq_CMP1
9728 * @param HRTIMx High Resolution Timer instance
9729 * @param Timer This parameter can be one of the following values:
9730 * @arg @ref LL_HRTIM_TIMER_MASTER
9731 * @arg @ref LL_HRTIM_TIMER_A
9732 * @arg @ref LL_HRTIM_TIMER_B
9733 * @arg @ref LL_HRTIM_TIMER_C
9734 * @arg @ref LL_HRTIM_TIMER_D
9735 * @arg @ref LL_HRTIM_TIMER_E
9738 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9740 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9741 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9742 REG_OFFSET_TAB_TIMER
[iTimer
]));
9743 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP1DE
);
9747 * @brief Indicate whether the compare 1 DMA request is enabled for a given timer.
9748 * @rmtoll MDIER MCMP1DE LL_HRTIM_IsEnabledDMAReq_CMP1\n
9749 * TIMxDIER CMP1DE LL_HRTIM_IsEnabledDMAReq_CMP1
9750 * @param HRTIMx High Resolution Timer instance
9751 * @param Timer This parameter can be one of the following values:
9752 * @arg @ref LL_HRTIM_TIMER_MASTER
9753 * @arg @ref LL_HRTIM_TIMER_A
9754 * @arg @ref LL_HRTIM_TIMER_B
9755 * @arg @ref LL_HRTIM_TIMER_C
9756 * @arg @ref LL_HRTIM_TIMER_D
9757 * @arg @ref LL_HRTIM_TIMER_E
9758 * @retval State of MCMP1DE/CMP1DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
9760 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_CMP1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9762 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9763 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9764 REG_OFFSET_TAB_TIMER
[iTimer
]));
9766 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP1DE
) == (HRTIM_MDIER_MCMP1DE
)) ? 1UL : 0UL);
9770 * @brief Enable the compare 2 DMA request for a given timer.
9771 * @rmtoll MDIER MCMP2DE LL_HRTIM_EnableDMAReq_CMP2\n
9772 * TIMxDIER CMP2DE LL_HRTIM_EnableDMAReq_CMP2
9773 * @param HRTIMx High Resolution Timer instance
9774 * @param Timer This parameter can be one of the following values:
9775 * @arg @ref LL_HRTIM_TIMER_MASTER
9776 * @arg @ref LL_HRTIM_TIMER_A
9777 * @arg @ref LL_HRTIM_TIMER_B
9778 * @arg @ref LL_HRTIM_TIMER_C
9779 * @arg @ref LL_HRTIM_TIMER_D
9780 * @arg @ref LL_HRTIM_TIMER_E
9783 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9785 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9786 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9787 REG_OFFSET_TAB_TIMER
[iTimer
]));
9788 SET_BIT(*pReg
, HRTIM_MDIER_MCMP2DE
);
9792 * @brief Disable the compare 2 DMA request for a given timer.
9793 * @rmtoll MDIER MCMP2DE LL_HRTIM_DisableDMAReq_CMP2\n
9794 * TIMxDIER CMP2DE LL_HRTIM_DisableDMAReq_CMP2
9795 * @param HRTIMx High Resolution Timer instance
9796 * @param Timer This parameter can be one of the following values:
9797 * @arg @ref LL_HRTIM_TIMER_MASTER
9798 * @arg @ref LL_HRTIM_TIMER_A
9799 * @arg @ref LL_HRTIM_TIMER_B
9800 * @arg @ref LL_HRTIM_TIMER_C
9801 * @arg @ref LL_HRTIM_TIMER_D
9802 * @arg @ref LL_HRTIM_TIMER_E
9805 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9807 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9808 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9809 REG_OFFSET_TAB_TIMER
[iTimer
]));
9810 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP2DE
);
9814 * @brief Indicate whether the compare 2 DMA request is enabled for a given timer.
9815 * @rmtoll MDIER MCMP2DE LL_HRTIM_IsEnabledDMAReq_CMP2\n
9816 * TIMxDIER CMP2DE LL_HRTIM_IsEnabledDMAReq_CMP2
9817 * @param HRTIMx High Resolution Timer instance
9818 * @param Timer This parameter can be one of the following values:
9819 * @arg @ref LL_HRTIM_TIMER_MASTER
9820 * @arg @ref LL_HRTIM_TIMER_A
9821 * @arg @ref LL_HRTIM_TIMER_B
9822 * @arg @ref LL_HRTIM_TIMER_C
9823 * @arg @ref LL_HRTIM_TIMER_D
9824 * @arg @ref LL_HRTIM_TIMER_E
9825 * @retval State of MCMP2DE/CMP2DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
9827 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_CMP2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9829 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9830 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9831 REG_OFFSET_TAB_TIMER
[iTimer
]));
9833 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP2DE
) == (HRTIM_MDIER_MCMP2DE
)) ? 1UL : 0UL);
9837 * @brief Enable the compare 3 DMA request for a given timer.
9838 * @rmtoll MDIER MCMP3DE LL_HRTIM_EnableDMAReq_CMP3\n
9839 * TIMxDIER CMP3DE LL_HRTIM_EnableDMAReq_CMP3
9840 * @param HRTIMx High Resolution Timer instance
9841 * @param Timer This parameter can be one of the following values:
9842 * @arg @ref LL_HRTIM_TIMER_MASTER
9843 * @arg @ref LL_HRTIM_TIMER_A
9844 * @arg @ref LL_HRTIM_TIMER_B
9845 * @arg @ref LL_HRTIM_TIMER_C
9846 * @arg @ref LL_HRTIM_TIMER_D
9847 * @arg @ref LL_HRTIM_TIMER_E
9850 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9852 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9853 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9854 REG_OFFSET_TAB_TIMER
[iTimer
]));
9855 SET_BIT(*pReg
, HRTIM_MDIER_MCMP3DE
);
9859 * @brief Disable the compare 3 DMA request for a given timer.
9860 * @rmtoll MDIER MCMP3DE LL_HRTIM_DisableDMAReq_CMP3\n
9861 * TIMxDIER CMP3DE LL_HRTIM_DisableDMAReq_CMP3
9862 * @param HRTIMx High Resolution Timer instance
9863 * @param Timer This parameter can be one of the following values:
9864 * @arg @ref LL_HRTIM_TIMER_MASTER
9865 * @arg @ref LL_HRTIM_TIMER_A
9866 * @arg @ref LL_HRTIM_TIMER_B
9867 * @arg @ref LL_HRTIM_TIMER_C
9868 * @arg @ref LL_HRTIM_TIMER_D
9869 * @arg @ref LL_HRTIM_TIMER_E
9872 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9874 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9875 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9876 REG_OFFSET_TAB_TIMER
[iTimer
]));
9877 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP3DE
);
9881 * @brief Indicate whether the compare 3 DMA request is enabled for a given timer.
9882 * @rmtoll MDIER MCMP3DE LL_HRTIM_IsEnabledDMAReq_CMP3\n
9883 * TIMxDIER CMP3DE LL_HRTIM_IsEnabledDMAReq_CMP3
9884 * @param HRTIMx High Resolution Timer instance
9885 * @param Timer This parameter can be one of the following values:
9886 * @arg @ref LL_HRTIM_TIMER_MASTER
9887 * @arg @ref LL_HRTIM_TIMER_A
9888 * @arg @ref LL_HRTIM_TIMER_B
9889 * @arg @ref LL_HRTIM_TIMER_C
9890 * @arg @ref LL_HRTIM_TIMER_D
9891 * @arg @ref LL_HRTIM_TIMER_E
9892 * @retval State of MCMP3DE/CMP3DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
9894 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_CMP3(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9896 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9897 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9898 REG_OFFSET_TAB_TIMER
[iTimer
]));
9900 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP3DE
) == (HRTIM_MDIER_MCMP3DE
)) ? 1UL : 0UL);
9904 * @brief Enable the compare 4 DMA request for a given timer.
9905 * @rmtoll MDIER MCMP4DE LL_HRTIM_EnableDMAReq_CMP4\n
9906 * TIMxDIER CMP4DE LL_HRTIM_EnableDMAReq_CMP4
9907 * @param HRTIMx High Resolution Timer instance
9908 * @param Timer This parameter can be one of the following values:
9909 * @arg @ref LL_HRTIM_TIMER_MASTER
9910 * @arg @ref LL_HRTIM_TIMER_A
9911 * @arg @ref LL_HRTIM_TIMER_B
9912 * @arg @ref LL_HRTIM_TIMER_C
9913 * @arg @ref LL_HRTIM_TIMER_D
9914 * @arg @ref LL_HRTIM_TIMER_E
9917 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9919 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9920 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9921 REG_OFFSET_TAB_TIMER
[iTimer
]));
9922 SET_BIT(*pReg
, HRTIM_MDIER_MCMP4DE
);
9926 * @brief Disable the compare 4 DMA request for a given timer.
9927 * @rmtoll MDIER MCMP4DE LL_HRTIM_DisableDMAReq_CMP4\n
9928 * TIMxDIER CMP4DE LL_HRTIM_DisableDMAReq_CMP4
9929 * @param HRTIMx High Resolution Timer instance
9930 * @param Timer This parameter can be one of the following values:
9931 * @arg @ref LL_HRTIM_TIMER_MASTER
9932 * @arg @ref LL_HRTIM_TIMER_A
9933 * @arg @ref LL_HRTIM_TIMER_B
9934 * @arg @ref LL_HRTIM_TIMER_C
9935 * @arg @ref LL_HRTIM_TIMER_D
9936 * @arg @ref LL_HRTIM_TIMER_E
9939 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9941 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9942 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9943 REG_OFFSET_TAB_TIMER
[iTimer
]));
9944 CLEAR_BIT(*pReg
, HRTIM_MDIER_MCMP4DE
);
9948 * @brief Indicate whether the compare 4 DMA request is enabled for a given timer.
9949 * @rmtoll MDIER MCMP4DE LL_HRTIM_IsEnabledDMAReq_CMP4\n
9950 * TIMxDIER CMP4DE LL_HRTIM_IsEnabledDMAReq_CMP4
9951 * @param HRTIMx High Resolution Timer instance
9952 * @param Timer This parameter can be one of the following values:
9953 * @arg @ref LL_HRTIM_TIMER_MASTER
9954 * @arg @ref LL_HRTIM_TIMER_A
9955 * @arg @ref LL_HRTIM_TIMER_B
9956 * @arg @ref LL_HRTIM_TIMER_C
9957 * @arg @ref LL_HRTIM_TIMER_D
9958 * @arg @ref LL_HRTIM_TIMER_E
9959 * @retval State of MCMP4DE/CMP4DE bit in HRTIM_MDIER/HRTIM_TIMxDIER register (1 or 0).
9961 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_CMP4(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9963 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9964 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9965 REG_OFFSET_TAB_TIMER
[iTimer
]));
9967 return ((READ_BIT(*pReg
, HRTIM_MDIER_MCMP4DE
) == (HRTIM_MDIER_MCMP4DE
)) ? 1UL : 0UL);
9971 * @brief Enable the capture 1 DMA request for a given timer.
9972 * @rmtoll TIMxDIER CPT1DE LL_HRTIM_EnableDMAReq_CPT1
9973 * @param HRTIMx High Resolution Timer instance
9974 * @param Timer This parameter can be one of the following values:
9975 * @arg @ref LL_HRTIM_TIMER_A
9976 * @arg @ref LL_HRTIM_TIMER_B
9977 * @arg @ref LL_HRTIM_TIMER_C
9978 * @arg @ref LL_HRTIM_TIMER_D
9979 * @arg @ref LL_HRTIM_TIMER_E
9982 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
9984 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
9985 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
9986 REG_OFFSET_TAB_TIMER
[iTimer
]));
9987 SET_BIT(*pReg
, HRTIM_TIMDIER_CPT1DE
);
9991 * @brief Disable the capture 1 DMA request for a given timer.
9992 * @rmtoll TIMxDIER CPT1DE LL_HRTIM_DisableDMAReq_CPT1
9993 * @param HRTIMx High Resolution Timer instance
9994 * @param Timer This parameter can be one of the following values:
9995 * @arg @ref LL_HRTIM_TIMER_A
9996 * @arg @ref LL_HRTIM_TIMER_B
9997 * @arg @ref LL_HRTIM_TIMER_C
9998 * @arg @ref LL_HRTIM_TIMER_D
9999 * @arg @ref LL_HRTIM_TIMER_E
10002 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10004 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10005 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10006 REG_OFFSET_TAB_TIMER
[iTimer
]));
10007 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_CPT1DE
);
10011 * @brief Indicate whether the capture 1 DMA request is enabled for a given timer.
10012 * @rmtoll TIMxDIER CPT1DE LL_HRTIM_IsEnabledDMAReq_CPT1
10013 * @param HRTIMx High Resolution Timer instance
10014 * @param Timer This parameter can be one of the following values:
10015 * @arg @ref LL_HRTIM_TIMER_A
10016 * @arg @ref LL_HRTIM_TIMER_B
10017 * @arg @ref LL_HRTIM_TIMER_C
10018 * @arg @ref LL_HRTIM_TIMER_D
10019 * @arg @ref LL_HRTIM_TIMER_E
10020 * @retval State of CPT1DE bit in HRTIM_TIMxDIER register (1 or 0).
10022 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_CPT1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10024 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10025 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10026 REG_OFFSET_TAB_TIMER
[iTimer
]));
10028 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_CPT1DE
) == (HRTIM_TIMDIER_CPT1DE
)) ? 1UL : 0UL);
10032 * @brief Enable the capture 2 DMA request for a given timer.
10033 * @rmtoll TIMxDIER CPT2DE LL_HRTIM_EnableDMAReq_CPT2
10034 * @param HRTIMx High Resolution Timer instance
10035 * @param Timer This parameter can be one of the following values:
10036 * @arg @ref LL_HRTIM_TIMER_A
10037 * @arg @ref LL_HRTIM_TIMER_B
10038 * @arg @ref LL_HRTIM_TIMER_C
10039 * @arg @ref LL_HRTIM_TIMER_D
10040 * @arg @ref LL_HRTIM_TIMER_E
10043 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10045 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10046 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10047 REG_OFFSET_TAB_TIMER
[iTimer
]));
10048 SET_BIT(*pReg
, HRTIM_TIMDIER_CPT2DE
);
10052 * @brief Disable the capture 2 DMA request for a given timer.
10053 * @rmtoll TIMxDIER CPT2DE LL_HRTIM_DisableDMAReq_CPT2
10054 * @param HRTIMx High Resolution Timer instance
10055 * @param Timer This parameter can be one of the following values:
10056 * @arg @ref LL_HRTIM_TIMER_A
10057 * @arg @ref LL_HRTIM_TIMER_B
10058 * @arg @ref LL_HRTIM_TIMER_C
10059 * @arg @ref LL_HRTIM_TIMER_D
10060 * @arg @ref LL_HRTIM_TIMER_E
10063 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10065 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10066 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10067 REG_OFFSET_TAB_TIMER
[iTimer
]));
10068 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_CPT2DE
);
10072 * @brief Indicate whether the capture 2 DMA request is enabled for a given timer.
10073 * @rmtoll TIMxDIER CPT2DE LL_HRTIM_IsEnabledDMAReq_CPT2
10074 * @param HRTIMx High Resolution Timer instance
10075 * @param Timer This parameter can be one of the following values:
10076 * @arg @ref LL_HRTIM_TIMER_A
10077 * @arg @ref LL_HRTIM_TIMER_B
10078 * @arg @ref LL_HRTIM_TIMER_C
10079 * @arg @ref LL_HRTIM_TIMER_D
10080 * @arg @ref LL_HRTIM_TIMER_E
10081 * @retval State of CPT2DE bit in HRTIM_TIMxDIER register (1 or 0).
10083 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_CPT2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10085 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10086 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10087 REG_OFFSET_TAB_TIMER
[iTimer
]));
10089 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_CPT2DE
) == (HRTIM_TIMDIER_CPT2DE
)) ? 1UL : 0UL);
10093 * @brief Enable the output 1 set DMA request for a given timer.
10094 * @rmtoll TIMxDIER SET1DE LL_HRTIM_EnableDMAReq_SET1
10095 * @param HRTIMx High Resolution Timer instance
10096 * @param Timer This parameter can be one of the following values:
10097 * @arg @ref LL_HRTIM_TIMER_A
10098 * @arg @ref LL_HRTIM_TIMER_B
10099 * @arg @ref LL_HRTIM_TIMER_C
10100 * @arg @ref LL_HRTIM_TIMER_D
10101 * @arg @ref LL_HRTIM_TIMER_E
10104 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10106 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10107 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10108 REG_OFFSET_TAB_TIMER
[iTimer
]));
10109 SET_BIT(*pReg
, HRTIM_TIMDIER_SET1DE
);
10113 * @brief Disable the output 1 set DMA request for a given timer.
10114 * @rmtoll TIMxDIER SET1DE LL_HRTIM_DisableDMAReq_SET1
10115 * @param HRTIMx High Resolution Timer instance
10116 * @param Timer This parameter can be one of the following values:
10117 * @arg @ref LL_HRTIM_TIMER_A
10118 * @arg @ref LL_HRTIM_TIMER_B
10119 * @arg @ref LL_HRTIM_TIMER_C
10120 * @arg @ref LL_HRTIM_TIMER_D
10121 * @arg @ref LL_HRTIM_TIMER_E
10124 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10126 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10127 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10128 REG_OFFSET_TAB_TIMER
[iTimer
]));
10129 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_SET1DE
);
10133 * @brief Indicate whether the output 1 set DMA request is enabled for a given timer.
10134 * @rmtoll TIMxDIER SET1DE LL_HRTIM_IsEnabledDMAReq_SET1
10135 * @param HRTIMx High Resolution Timer instance
10136 * @param Timer This parameter can be one of the following values:
10137 * @arg @ref LL_HRTIM_TIMER_A
10138 * @arg @ref LL_HRTIM_TIMER_B
10139 * @arg @ref LL_HRTIM_TIMER_C
10140 * @arg @ref LL_HRTIM_TIMER_D
10141 * @arg @ref LL_HRTIM_TIMER_E
10142 * @retval State of SET1xDE bit in HRTIM_TIMxDIER register (1 or 0).
10144 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_SET1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10146 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10147 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10148 REG_OFFSET_TAB_TIMER
[iTimer
]));
10150 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_SET1DE
) == (HRTIM_TIMDIER_SET1DE
)) ? 1UL : 0UL);
10154 * @brief Enable the output 1 reset DMA request for a given timer.
10155 * @rmtoll TIMxDIER RST1DE LL_HRTIM_EnableDMAReq_RST1
10156 * @param HRTIMx High Resolution Timer instance
10157 * @param Timer This parameter can be one of the following values:
10158 * @arg @ref LL_HRTIM_TIMER_A
10159 * @arg @ref LL_HRTIM_TIMER_B
10160 * @arg @ref LL_HRTIM_TIMER_C
10161 * @arg @ref LL_HRTIM_TIMER_D
10162 * @arg @ref LL_HRTIM_TIMER_E
10165 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10167 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10168 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10169 REG_OFFSET_TAB_TIMER
[iTimer
]));
10170 SET_BIT(*pReg
, HRTIM_TIMDIER_RST1DE
);
10174 * @brief Disable the output 1 reset DMA request for a given timer.
10175 * @rmtoll TIMxDIER RST1DE LL_HRTIM_DisableDMAReq_RST1
10176 * @param HRTIMx High Resolution Timer instance
10177 * @param Timer This parameter can be one of the following values:
10178 * @arg @ref LL_HRTIM_TIMER_A
10179 * @arg @ref LL_HRTIM_TIMER_B
10180 * @arg @ref LL_HRTIM_TIMER_C
10181 * @arg @ref LL_HRTIM_TIMER_D
10182 * @arg @ref LL_HRTIM_TIMER_E
10185 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10187 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10188 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10189 REG_OFFSET_TAB_TIMER
[iTimer
]));
10190 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_RST1DE
);
10194 * @brief Indicate whether the output 1 reset interrupt is enabled for a given timer.
10195 * @rmtoll TIMxDIER RST1DE LL_HRTIM_IsEnabledDMAReq_RST1
10196 * @param HRTIMx High Resolution Timer instance
10197 * @param Timer This parameter can be one of the following values:
10198 * @arg @ref LL_HRTIM_TIMER_A
10199 * @arg @ref LL_HRTIM_TIMER_B
10200 * @arg @ref LL_HRTIM_TIMER_C
10201 * @arg @ref LL_HRTIM_TIMER_D
10202 * @arg @ref LL_HRTIM_TIMER_E
10203 * @retval State of RST1xDE bit in HRTIM_TIMxDIER register (1 or 0).
10205 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_RST1(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10207 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10208 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10209 REG_OFFSET_TAB_TIMER
[iTimer
]));
10211 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_RST1DE
) == (HRTIM_TIMDIER_RST1DE
)) ? 1UL : 0UL);
10215 * @brief Enable the output 2 set DMA request for a given timer.
10216 * @rmtoll TIMxDIER SET2DE LL_HRTIM_EnableDMAReq_SET2
10217 * @param HRTIMx High Resolution Timer instance
10218 * @param Timer This parameter can be one of the following values:
10219 * @arg @ref LL_HRTIM_TIMER_A
10220 * @arg @ref LL_HRTIM_TIMER_B
10221 * @arg @ref LL_HRTIM_TIMER_C
10222 * @arg @ref LL_HRTIM_TIMER_D
10223 * @arg @ref LL_HRTIM_TIMER_E
10226 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10228 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10229 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10230 REG_OFFSET_TAB_TIMER
[iTimer
]));
10231 SET_BIT(*pReg
, HRTIM_TIMDIER_SET2DE
);
10235 * @brief Disable the output 2 set DMA request for a given timer.
10236 * @rmtoll TIMxDIER SET2DE LL_HRTIM_DisableDMAReq_SET2
10237 * @param HRTIMx High Resolution Timer instance
10238 * @param Timer This parameter can be one of the following values:
10239 * @arg @ref LL_HRTIM_TIMER_A
10240 * @arg @ref LL_HRTIM_TIMER_B
10241 * @arg @ref LL_HRTIM_TIMER_C
10242 * @arg @ref LL_HRTIM_TIMER_D
10243 * @arg @ref LL_HRTIM_TIMER_E
10246 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10248 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10249 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10250 REG_OFFSET_TAB_TIMER
[iTimer
]));
10251 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_SET2DE
);
10255 * @brief Indicate whether the output 2 set DMA request is enabled for a given timer.
10256 * @rmtoll TIMxDIER SET2DE LL_HRTIM_IsEnabledDMAReq_SET2
10257 * @param HRTIMx High Resolution Timer instance
10258 * @param Timer This parameter can be one of the following values:
10259 * @arg @ref LL_HRTIM_TIMER_A
10260 * @arg @ref LL_HRTIM_TIMER_B
10261 * @arg @ref LL_HRTIM_TIMER_C
10262 * @arg @ref LL_HRTIM_TIMER_D
10263 * @arg @ref LL_HRTIM_TIMER_E
10264 * @retval State of SET2xDE bit in HRTIM_TIMxDIER register (1 or 0).
10266 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_SET2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10268 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10269 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10270 REG_OFFSET_TAB_TIMER
[iTimer
]));
10272 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_SET2DE
) == (HRTIM_TIMDIER_SET2DE
)) ? 1UL : 0UL);
10276 * @brief Enable the output 2 reset DMA request for a given timer.
10277 * @rmtoll TIMxDIER RST2DE LL_HRTIM_EnableDMAReq_RST2
10278 * @param HRTIMx High Resolution Timer instance
10279 * @param Timer This parameter can be one of the following values:
10280 * @arg @ref LL_HRTIM_TIMER_A
10281 * @arg @ref LL_HRTIM_TIMER_B
10282 * @arg @ref LL_HRTIM_TIMER_C
10283 * @arg @ref LL_HRTIM_TIMER_D
10284 * @arg @ref LL_HRTIM_TIMER_E
10287 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10289 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10290 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10291 REG_OFFSET_TAB_TIMER
[iTimer
]));
10292 SET_BIT(*pReg
, HRTIM_TIMDIER_RST2DE
);
10296 * @brief Disable the output 2 reset DMA request for a given timer.
10297 * @rmtoll TIMxDIER RST2DE LL_HRTIM_DisableDMAReq_RST2
10298 * @param HRTIMx High Resolution Timer instance
10299 * @param Timer This parameter can be one of the following values:
10300 * @arg @ref LL_HRTIM_TIMER_A
10301 * @arg @ref LL_HRTIM_TIMER_B
10302 * @arg @ref LL_HRTIM_TIMER_C
10303 * @arg @ref LL_HRTIM_TIMER_D
10304 * @arg @ref LL_HRTIM_TIMER_E
10307 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10309 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10310 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10311 REG_OFFSET_TAB_TIMER
[iTimer
]));
10312 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_RST2DE
);
10316 * @brief Indicate whether the output 2 reset DMA request is enabled for a given timer.
10317 * @rmtoll TIMxDIER RST2DE LL_HRTIM_IsEnabledDMAReq_RST2
10318 * @param HRTIMx High Resolution Timer instance
10319 * @param Timer This parameter can be one of the following values:
10320 * @arg @ref LL_HRTIM_TIMER_A
10321 * @arg @ref LL_HRTIM_TIMER_B
10322 * @arg @ref LL_HRTIM_TIMER_C
10323 * @arg @ref LL_HRTIM_TIMER_D
10324 * @arg @ref LL_HRTIM_TIMER_E
10325 * @retval State of RST2xDE bit in HRTIM_TIMxDIER register (1 or 0).
10327 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_RST2(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10329 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10330 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10331 REG_OFFSET_TAB_TIMER
[iTimer
]));
10333 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_RST2DE
) == (HRTIM_TIMDIER_RST2DE
)) ? 1UL : 0UL);
10337 * @brief Enable the reset/roll-over DMA request for a given timer.
10338 * @rmtoll TIMxDIER RSTDE LL_HRTIM_EnableDMAReq_RST
10339 * @param HRTIMx High Resolution Timer instance
10340 * @param Timer This parameter can be one of the following values:
10341 * @arg @ref LL_HRTIM_TIMER_A
10342 * @arg @ref LL_HRTIM_TIMER_B
10343 * @arg @ref LL_HRTIM_TIMER_C
10344 * @arg @ref LL_HRTIM_TIMER_D
10345 * @arg @ref LL_HRTIM_TIMER_E
10348 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10350 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10351 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10352 REG_OFFSET_TAB_TIMER
[iTimer
]));
10353 SET_BIT(*pReg
, HRTIM_TIMDIER_RSTDE
);
10357 * @brief Disable the reset/roll-over DMA request for a given timer.
10358 * @rmtoll TIMxDIER RSTDE LL_HRTIM_DisableDMAReq_RST
10359 * @param HRTIMx High Resolution Timer instance
10360 * @param Timer This parameter can be one of the following values:
10361 * @arg @ref LL_HRTIM_TIMER_A
10362 * @arg @ref LL_HRTIM_TIMER_B
10363 * @arg @ref LL_HRTIM_TIMER_C
10364 * @arg @ref LL_HRTIM_TIMER_D
10365 * @arg @ref LL_HRTIM_TIMER_E
10368 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10370 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10371 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10372 REG_OFFSET_TAB_TIMER
[iTimer
]));
10373 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_RSTDE
);
10377 * @brief Indicate whether the reset/roll-over DMA request is enabled for a given timer.
10378 * @rmtoll TIMxDIER RSTDE LL_HRTIM_IsEnabledDMAReq_RST
10379 * @param HRTIMx High Resolution Timer instance
10380 * @param Timer This parameter can be one of the following values:
10381 * @arg @ref LL_HRTIM_TIMER_A
10382 * @arg @ref LL_HRTIM_TIMER_B
10383 * @arg @ref LL_HRTIM_TIMER_C
10384 * @arg @ref LL_HRTIM_TIMER_D
10385 * @arg @ref LL_HRTIM_TIMER_E
10386 * @retval State of RSTDE bit in HRTIM_TIMxDIER register (1 or 0).
10388 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_RST(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10390 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10391 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10392 REG_OFFSET_TAB_TIMER
[iTimer
]));
10394 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_RSTDE
) == (HRTIM_TIMDIER_RSTDE
)) ? 1UL : 0UL);
10398 * @brief Enable the delayed protection DMA request for a given timer.
10399 * @rmtoll TIMxDIER DLYPRTDE LL_HRTIM_EnableDMAReq_DLYPRT
10400 * @param HRTIMx High Resolution Timer instance
10401 * @param Timer This parameter can be one of the following values:
10402 * @arg @ref LL_HRTIM_TIMER_A
10403 * @arg @ref LL_HRTIM_TIMER_B
10404 * @arg @ref LL_HRTIM_TIMER_C
10405 * @arg @ref LL_HRTIM_TIMER_D
10406 * @arg @ref LL_HRTIM_TIMER_E
10409 __STATIC_INLINE
void LL_HRTIM_EnableDMAReq_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10411 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10412 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10413 REG_OFFSET_TAB_TIMER
[iTimer
]));
10414 SET_BIT(*pReg
, HRTIM_TIMDIER_DLYPRTDE
);
10418 * @brief Disable the delayed protection DMA request for a given timer.
10419 * @rmtoll TIMxDIER DLYPRTDE LL_HRTIM_DisableDMAReq_DLYPRT
10420 * @param HRTIMx High Resolution Timer instance
10421 * @param Timer This parameter can be one of the following values:
10422 * @arg @ref LL_HRTIM_TIMER_A
10423 * @arg @ref LL_HRTIM_TIMER_B
10424 * @arg @ref LL_HRTIM_TIMER_C
10425 * @arg @ref LL_HRTIM_TIMER_D
10426 * @arg @ref LL_HRTIM_TIMER_E
10429 __STATIC_INLINE
void LL_HRTIM_DisableDMAReq_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10431 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10432 register __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10433 REG_OFFSET_TAB_TIMER
[iTimer
]));
10434 CLEAR_BIT(*pReg
, HRTIM_TIMDIER_DLYPRTDE
);
10438 * @brief Indicate whether the delayed protection DMA request is enabled for a given timer.
10439 * @rmtoll TIMxDIER DLYPRTDE LL_HRTIM_IsEnabledDMAReq_DLYPRT
10440 * @param HRTIMx High Resolution Timer instance
10441 * @param Timer This parameter can be one of the following values:
10442 * @arg @ref LL_HRTIM_TIMER_A
10443 * @arg @ref LL_HRTIM_TIMER_B
10444 * @arg @ref LL_HRTIM_TIMER_C
10445 * @arg @ref LL_HRTIM_TIMER_D
10446 * @arg @ref LL_HRTIM_TIMER_E
10447 * @retval State of DLYPRTDE bit in HRTIM_TIMxDIER register (1 or 0).
10449 __STATIC_INLINE
uint32_t LL_HRTIM_IsEnabledDMAReq_DLYPRT(HRTIM_TypeDef
*HRTIMx
, uint32_t Timer
)
10451 register uint32_t iTimer
= (uint8_t)(POSITION_VAL(Timer
) - HRTIM_MCR_MCEN_Pos
);
10452 register const __IO
uint32_t *pReg
= (__IO
uint32_t *)((uint32_t)((uint32_t)(&HRTIMx
->sMasterRegs
.MDIER
) +
10453 REG_OFFSET_TAB_TIMER
[iTimer
]));
10455 return ((READ_BIT(*pReg
, HRTIM_TIMDIER_DLYPRTDE
) == (HRTIM_TIMDIER_DLYPRTDE
)) ? 1UL : 0UL);
10462 #if defined(USE_FULL_LL_DRIVER)
10463 /** @defgroup HRTIM_LL_LL_EF_Init In-initialization and de-initialization functions
10466 ErrorStatus
LL_HRTIM_DeInit(HRTIM_TypeDef
* HRTIMx
);
10470 #endif /* USE_FULL_LL_DRIVER */
10480 #endif /* HRTIM1 */
10490 #endif /* STM32H7xx_LL_HRTIM_H */
10492 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/