RTEMS 6.1-rc1
stm32h7xx_ll_tim.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef __STM32H7xx_LL_TIM_H
21#define __STM32H7xx_LL_TIM_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32h7xx.h"
29
34#if defined (TIM1) || defined (TIM2) || defined (TIM3) || defined (TIM4) || defined (TIM5) || defined (TIM6) || defined (TIM7) || defined (TIM8) || defined (TIM12) || defined (TIM13) || defined (TIM14) || defined (TIM15) || defined (TIM16) || defined (TIM17) || defined (TIM23) || defined (TIM24)
35
41/* Private types -------------------------------------------------------------*/
42/* Private variables ---------------------------------------------------------*/
47static const uint8_t OFFSET_TAB_CCMRx[] =
48{
49 0x00U, /* 0: TIMx_CH1 */
50 0x00U, /* 1: TIMx_CH1N */
51 0x00U, /* 2: TIMx_CH2 */
52 0x00U, /* 3: TIMx_CH2N */
53 0x04U, /* 4: TIMx_CH3 */
54 0x04U, /* 5: TIMx_CH3N */
55 0x04U, /* 6: TIMx_CH4 */
56 0x3CU, /* 7: TIMx_CH5 */
57 0x3CU /* 8: TIMx_CH6 */
58};
59
60static const uint8_t SHIFT_TAB_OCxx[] =
61{
62 0U, /* 0: OC1M, OC1FE, OC1PE */
63 0U, /* 1: - NA */
64 8U, /* 2: OC2M, OC2FE, OC2PE */
65 0U, /* 3: - NA */
66 0U, /* 4: OC3M, OC3FE, OC3PE */
67 0U, /* 5: - NA */
68 8U, /* 6: OC4M, OC4FE, OC4PE */
69 0U, /* 7: OC5M, OC5FE, OC5PE */
70 8U /* 8: OC6M, OC6FE, OC6PE */
71};
72
73static const uint8_t SHIFT_TAB_ICxx[] =
74{
75 0U, /* 0: CC1S, IC1PSC, IC1F */
76 0U, /* 1: - NA */
77 8U, /* 2: CC2S, IC2PSC, IC2F */
78 0U, /* 3: - NA */
79 0U, /* 4: CC3S, IC3PSC, IC3F */
80 0U, /* 5: - NA */
81 8U, /* 6: CC4S, IC4PSC, IC4F */
82 0U, /* 7: - NA */
83 0U /* 8: - NA */
84};
85
86static const uint8_t SHIFT_TAB_CCxP[] =
87{
88 0U, /* 0: CC1P */
89 2U, /* 1: CC1NP */
90 4U, /* 2: CC2P */
91 6U, /* 3: CC2NP */
92 8U, /* 4: CC3P */
93 10U, /* 5: CC3NP */
94 12U, /* 6: CC4P */
95 16U, /* 7: CC5P */
96 20U /* 8: CC6P */
97};
98
99static const uint8_t SHIFT_TAB_OISx[] =
100{
101 0U, /* 0: OIS1 */
102 1U, /* 1: OIS1N */
103 2U, /* 2: OIS2 */
104 3U, /* 3: OIS2N */
105 4U, /* 4: OIS3 */
106 5U, /* 5: OIS3N */
107 6U, /* 6: OIS4 */
108 8U, /* 7: OIS5 */
109 10U /* 8: OIS6 */
110};
115/* Private constants ---------------------------------------------------------*/
121#if defined(TIM_BREAK_INPUT_SUPPORT)
122/* Defines used for the bit position in the register and perform offsets */
123#define TIM_POSITION_BRK_SOURCE (POSITION_VAL(Source) & 0x1FUL)
124
125/* Generic bit definitions for TIMx_AF1 register */
126#define TIMx_AF1_BKINP TIM1_AF1_BKINP
127#define TIMx_AF1_ETRSEL TIM1_AF1_ETRSEL
128#endif /* TIM_BREAK_INPUT_SUPPORT */
129
130
131/* Mask used to set the TDG[x:0] of the DTG bits of the TIMx_BDTR register */
132#define DT_DELAY_1 ((uint8_t)0x7F)
133#define DT_DELAY_2 ((uint8_t)0x3F)
134#define DT_DELAY_3 ((uint8_t)0x1F)
135#define DT_DELAY_4 ((uint8_t)0x1F)
136
137/* Mask used to set the DTG[7:5] bits of the DTG bits of the TIMx_BDTR register */
138#define DT_RANGE_1 ((uint8_t)0x00)
139#define DT_RANGE_2 ((uint8_t)0x80)
140#define DT_RANGE_3 ((uint8_t)0xC0)
141#define DT_RANGE_4 ((uint8_t)0xE0)
142
143
148/* Private macros ------------------------------------------------------------*/
166#define TIM_GET_CHANNEL_INDEX( __CHANNEL__) \
167 (((__CHANNEL__) == LL_TIM_CHANNEL_CH1) ? 0U :\
168 ((__CHANNEL__) == LL_TIM_CHANNEL_CH1N) ? 1U :\
169 ((__CHANNEL__) == LL_TIM_CHANNEL_CH2) ? 2U :\
170 ((__CHANNEL__) == LL_TIM_CHANNEL_CH2N) ? 3U :\
171 ((__CHANNEL__) == LL_TIM_CHANNEL_CH3) ? 4U :\
172 ((__CHANNEL__) == LL_TIM_CHANNEL_CH3N) ? 5U :\
173 ((__CHANNEL__) == LL_TIM_CHANNEL_CH4) ? 6U :\
174 ((__CHANNEL__) == LL_TIM_CHANNEL_CH5) ? 7U : 8U)
175
184#define TIM_CALC_DTS(__TIMCLK__, __CKD__) \
185 (((__CKD__) == LL_TIM_CLOCKDIVISION_DIV1) ? ((uint64_t)1000000000000U/(__TIMCLK__)) : \
186 ((__CKD__) == LL_TIM_CLOCKDIVISION_DIV2) ? ((uint64_t)1000000000000U/((__TIMCLK__) >> 1U)) : \
187 ((uint64_t)1000000000000U/((__TIMCLK__) >> 2U)))
193/* Exported types ------------------------------------------------------------*/
194#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
203typedef struct
204{
205 uint16_t Prescaler;
211 uint32_t CounterMode;
217 uint32_t Autoreload;
226 uint32_t ClockDivision;
232 uint32_t RepetitionCounter;
245} LL_TIM_InitTypeDef;
246
250typedef struct
251{
252 uint32_t OCMode;
258 uint32_t OCState;
264 uint32_t OCNState;
270 uint32_t CompareValue;
276 uint32_t OCPolarity;
282 uint32_t OCNPolarity;
289 uint32_t OCIdleState;
295 uint32_t OCNIdleState;
300} LL_TIM_OC_InitTypeDef;
301
306typedef struct
307{
308
309 uint32_t ICPolarity;
315 uint32_t ICActiveInput;
321 uint32_t ICPrescaler;
327 uint32_t ICFilter;
332} LL_TIM_IC_InitTypeDef;
333
334
338typedef struct
339{
340 uint32_t EncoderMode;
346 uint32_t IC1Polarity;
352 uint32_t IC1ActiveInput;
358 uint32_t IC1Prescaler;
364 uint32_t IC1Filter;
370 uint32_t IC2Polarity;
376 uint32_t IC2ActiveInput;
382 uint32_t IC2Prescaler;
388 uint32_t IC2Filter;
394} LL_TIM_ENCODER_InitTypeDef;
395
399typedef struct
400{
401
402 uint32_t IC1Polarity;
408 uint32_t IC1Prescaler;
416 uint32_t IC1Filter;
423 uint32_t CommutationDelay;
430} LL_TIM_HALLSENSOR_InitTypeDef;
431
435typedef struct
436{
437 uint32_t OSSRState;
446 uint32_t OSSIState;
455 uint32_t LockLevel;
461 uint8_t DeadTime;
471 uint16_t BreakState;
480 uint32_t BreakPolarity;
489 uint32_t BreakFilter;
498#if defined(TIM_BDTR_BKBID)
499 uint32_t BreakAFMode;
510#endif /*TIM_BDTR_BKBID */
511 uint32_t Break2State;
520 uint32_t Break2Polarity;
529 uint32_t Break2Filter;
538#if defined(TIM_BDTR_BKBID)
539 uint32_t Break2AFMode;
550#endif /*TIM_BDTR_BKBID */
551 uint32_t AutomaticOutput;
559} LL_TIM_BDTR_InitTypeDef;
560
564#endif /* USE_FULL_LL_DRIVER */
565
566/* Exported constants --------------------------------------------------------*/
577#define LL_TIM_SR_UIF TIM_SR_UIF
578#define LL_TIM_SR_CC1IF TIM_SR_CC1IF
579#define LL_TIM_SR_CC2IF TIM_SR_CC2IF
580#define LL_TIM_SR_CC3IF TIM_SR_CC3IF
581#define LL_TIM_SR_CC4IF TIM_SR_CC4IF
582#define LL_TIM_SR_CC5IF TIM_SR_CC5IF
583#define LL_TIM_SR_CC6IF TIM_SR_CC6IF
584#define LL_TIM_SR_COMIF TIM_SR_COMIF
585#define LL_TIM_SR_TIF TIM_SR_TIF
586#define LL_TIM_SR_BIF TIM_SR_BIF
587#define LL_TIM_SR_B2IF TIM_SR_B2IF
588#define LL_TIM_SR_CC1OF TIM_SR_CC1OF
589#define LL_TIM_SR_CC2OF TIM_SR_CC2OF
590#define LL_TIM_SR_CC3OF TIM_SR_CC3OF
591#define LL_TIM_SR_CC4OF TIM_SR_CC4OF
592#define LL_TIM_SR_SBIF TIM_SR_SBIF
597#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
602#define LL_TIM_BREAK_DISABLE 0x00000000U
603#define LL_TIM_BREAK_ENABLE TIM_BDTR_BKE
612#define LL_TIM_BREAK2_DISABLE 0x00000000U
613#define LL_TIM_BREAK2_ENABLE TIM_BDTR_BK2E
622#define LL_TIM_AUTOMATICOUTPUT_DISABLE 0x00000000U
623#define LL_TIM_AUTOMATICOUTPUT_ENABLE TIM_BDTR_AOE
627#endif /* USE_FULL_LL_DRIVER */
628
634#define LL_TIM_DIER_UIE TIM_DIER_UIE
635#define LL_TIM_DIER_CC1IE TIM_DIER_CC1IE
636#define LL_TIM_DIER_CC2IE TIM_DIER_CC2IE
637#define LL_TIM_DIER_CC3IE TIM_DIER_CC3IE
638#define LL_TIM_DIER_CC4IE TIM_DIER_CC4IE
639#define LL_TIM_DIER_COMIE TIM_DIER_COMIE
640#define LL_TIM_DIER_TIE TIM_DIER_TIE
641#define LL_TIM_DIER_BIE TIM_DIER_BIE
650#define LL_TIM_UPDATESOURCE_REGULAR 0x00000000U
651#define LL_TIM_UPDATESOURCE_COUNTER TIM_CR1_URS
660#define LL_TIM_ONEPULSEMODE_SINGLE TIM_CR1_OPM
661#define LL_TIM_ONEPULSEMODE_REPETITIVE 0x00000000U
670#define LL_TIM_COUNTERMODE_UP 0x00000000U
671#define LL_TIM_COUNTERMODE_DOWN TIM_CR1_DIR
672#define LL_TIM_COUNTERMODE_CENTER_DOWN TIM_CR1_CMS_0
673#define LL_TIM_COUNTERMODE_CENTER_UP TIM_CR1_CMS_1
674#define LL_TIM_COUNTERMODE_CENTER_UP_DOWN TIM_CR1_CMS
683#define LL_TIM_CLOCKDIVISION_DIV1 0x00000000U
684#define LL_TIM_CLOCKDIVISION_DIV2 TIM_CR1_CKD_0
685#define LL_TIM_CLOCKDIVISION_DIV4 TIM_CR1_CKD_1
694#define LL_TIM_COUNTERDIRECTION_UP 0x00000000U
695#define LL_TIM_COUNTERDIRECTION_DOWN TIM_CR1_DIR
704#define LL_TIM_CCUPDATESOURCE_COMG_ONLY 0x00000000U
705#define LL_TIM_CCUPDATESOURCE_COMG_AND_TRGI TIM_CR2_CCUS
714#define LL_TIM_CCDMAREQUEST_CC 0x00000000U
715#define LL_TIM_CCDMAREQUEST_UPDATE TIM_CR2_CCDS
724#define LL_TIM_LOCKLEVEL_OFF 0x00000000U
725#define LL_TIM_LOCKLEVEL_1 TIM_BDTR_LOCK_0
726#define LL_TIM_LOCKLEVEL_2 TIM_BDTR_LOCK_1
727#define LL_TIM_LOCKLEVEL_3 TIM_BDTR_LOCK
736#define LL_TIM_CHANNEL_CH1 TIM_CCER_CC1E
737#define LL_TIM_CHANNEL_CH1N TIM_CCER_CC1NE
738#define LL_TIM_CHANNEL_CH2 TIM_CCER_CC2E
739#define LL_TIM_CHANNEL_CH2N TIM_CCER_CC2NE
740#define LL_TIM_CHANNEL_CH3 TIM_CCER_CC3E
741#define LL_TIM_CHANNEL_CH3N TIM_CCER_CC3NE
742#define LL_TIM_CHANNEL_CH4 TIM_CCER_CC4E
743#define LL_TIM_CHANNEL_CH5 TIM_CCER_CC5E
744#define LL_TIM_CHANNEL_CH6 TIM_CCER_CC6E
749#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
754#define LL_TIM_OCSTATE_DISABLE 0x00000000U
755#define LL_TIM_OCSTATE_ENABLE TIM_CCER_CC1E
759#endif /* USE_FULL_LL_DRIVER */
760
765#define LL_TIM_OCMODE_FROZEN 0x00000000U
766#define LL_TIM_OCMODE_ACTIVE TIM_CCMR1_OC1M_0
767#define LL_TIM_OCMODE_INACTIVE TIM_CCMR1_OC1M_1
768#define LL_TIM_OCMODE_TOGGLE (TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0)
769#define LL_TIM_OCMODE_FORCED_INACTIVE TIM_CCMR1_OC1M_2
770#define LL_TIM_OCMODE_FORCED_ACTIVE (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0)
771#define LL_TIM_OCMODE_PWM1 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1)
772#define LL_TIM_OCMODE_PWM2 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0)
773#define LL_TIM_OCMODE_RETRIG_OPM1 TIM_CCMR1_OC1M_3
774#define LL_TIM_OCMODE_RETRIG_OPM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0)
775#define LL_TIM_OCMODE_COMBINED_PWM1 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_2)
776#define LL_TIM_OCMODE_COMBINED_PWM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0 | TIM_CCMR1_OC1M_2)
777#define LL_TIM_OCMODE_ASSYMETRIC_PWM1 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_2)
778#define LL_TIM_OCMODE_ASSYMETRIC_PWM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M)
787#define LL_TIM_OCPOLARITY_HIGH 0x00000000U
788#define LL_TIM_OCPOLARITY_LOW TIM_CCER_CC1P
797#define LL_TIM_OCIDLESTATE_LOW 0x00000000U
798#define LL_TIM_OCIDLESTATE_HIGH TIM_CR2_OIS1
807#define LL_TIM_GROUPCH5_NONE 0x00000000U
808#define LL_TIM_GROUPCH5_OC1REFC TIM_CCR5_GC5C1
809#define LL_TIM_GROUPCH5_OC2REFC TIM_CCR5_GC5C2
810#define LL_TIM_GROUPCH5_OC3REFC TIM_CCR5_GC5C3
819#define LL_TIM_ACTIVEINPUT_DIRECTTI (TIM_CCMR1_CC1S_0 << 16U)
820#define LL_TIM_ACTIVEINPUT_INDIRECTTI (TIM_CCMR1_CC1S_1 << 16U)
821#define LL_TIM_ACTIVEINPUT_TRC (TIM_CCMR1_CC1S << 16U)
830#define LL_TIM_ICPSC_DIV1 0x00000000U
831#define LL_TIM_ICPSC_DIV2 (TIM_CCMR1_IC1PSC_0 << 16U)
832#define LL_TIM_ICPSC_DIV4 (TIM_CCMR1_IC1PSC_1 << 16U)
833#define LL_TIM_ICPSC_DIV8 (TIM_CCMR1_IC1PSC << 16U)
842#define LL_TIM_IC_FILTER_FDIV1 0x00000000U
843#define LL_TIM_IC_FILTER_FDIV1_N2 (TIM_CCMR1_IC1F_0 << 16U)
844#define LL_TIM_IC_FILTER_FDIV1_N4 (TIM_CCMR1_IC1F_1 << 16U)
845#define LL_TIM_IC_FILTER_FDIV1_N8 ((TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U)
846#define LL_TIM_IC_FILTER_FDIV2_N6 (TIM_CCMR1_IC1F_2 << 16U)
847#define LL_TIM_IC_FILTER_FDIV2_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U)
848#define LL_TIM_IC_FILTER_FDIV4_N6 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U)
849#define LL_TIM_IC_FILTER_FDIV4_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U)
850#define LL_TIM_IC_FILTER_FDIV8_N6 (TIM_CCMR1_IC1F_3 << 16U)
851#define LL_TIM_IC_FILTER_FDIV8_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_0) << 16U)
852#define LL_TIM_IC_FILTER_FDIV16_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1) << 16U)
853#define LL_TIM_IC_FILTER_FDIV16_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U)
854#define LL_TIM_IC_FILTER_FDIV16_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2) << 16U)
855#define LL_TIM_IC_FILTER_FDIV32_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U)
856#define LL_TIM_IC_FILTER_FDIV32_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U)
857#define LL_TIM_IC_FILTER_FDIV32_N8 (TIM_CCMR1_IC1F << 16U)
866#define LL_TIM_IC_POLARITY_RISING 0x00000000U
867#define LL_TIM_IC_POLARITY_FALLING TIM_CCER_CC1P
868#define LL_TIM_IC_POLARITY_BOTHEDGE (TIM_CCER_CC1P | TIM_CCER_CC1NP)
877#define LL_TIM_CLOCKSOURCE_INTERNAL 0x00000000U
878#define LL_TIM_CLOCKSOURCE_EXT_MODE1 (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0)
879#define LL_TIM_CLOCKSOURCE_EXT_MODE2 TIM_SMCR_ECE
888#define LL_TIM_ENCODERMODE_X2_TI1 TIM_SMCR_SMS_0
889#define LL_TIM_ENCODERMODE_X2_TI2 TIM_SMCR_SMS_1
890#define LL_TIM_ENCODERMODE_X4_TI12 (TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0)
899#define LL_TIM_TRGO_RESET 0x00000000U
900#define LL_TIM_TRGO_ENABLE TIM_CR2_MMS_0
901#define LL_TIM_TRGO_UPDATE TIM_CR2_MMS_1
902#define LL_TIM_TRGO_CC1IF (TIM_CR2_MMS_1 | TIM_CR2_MMS_0)
903#define LL_TIM_TRGO_OC1REF TIM_CR2_MMS_2
904#define LL_TIM_TRGO_OC2REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_0)
905#define LL_TIM_TRGO_OC3REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_1)
906#define LL_TIM_TRGO_OC4REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_1 | TIM_CR2_MMS_0)
915#define LL_TIM_TRGO2_RESET 0x00000000U
916#define LL_TIM_TRGO2_ENABLE TIM_CR2_MMS2_0
917#define LL_TIM_TRGO2_UPDATE TIM_CR2_MMS2_1
918#define LL_TIM_TRGO2_CC1F (TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
919#define LL_TIM_TRGO2_OC1 TIM_CR2_MMS2_2
920#define LL_TIM_TRGO2_OC2 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0)
921#define LL_TIM_TRGO2_OC3 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1)
922#define LL_TIM_TRGO2_OC4 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
923#define LL_TIM_TRGO2_OC5 TIM_CR2_MMS2_3
924#define LL_TIM_TRGO2_OC6 (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_0)
925#define LL_TIM_TRGO2_OC4_RISINGFALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1)
926#define LL_TIM_TRGO2_OC6_RISINGFALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
927#define LL_TIM_TRGO2_OC4_RISING_OC6_RISING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2)
928#define LL_TIM_TRGO2_OC4_RISING_OC6_FALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0)
929#define LL_TIM_TRGO2_OC5_RISING_OC6_RISING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 |TIM_CR2_MMS2_1)
930#define LL_TIM_TRGO2_OC5_RISING_OC6_FALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
939#define LL_TIM_SLAVEMODE_DISABLED 0x00000000U
940#define LL_TIM_SLAVEMODE_RESET TIM_SMCR_SMS_2
941#define LL_TIM_SLAVEMODE_GATED (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_0)
942#define LL_TIM_SLAVEMODE_TRIGGER (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1)
943#define LL_TIM_SLAVEMODE_COMBINED_RESETTRIGGER TIM_SMCR_SMS_3
952#define LL_TIM_TS_ITR0 0x00000000U
953#define LL_TIM_TS_ITR1 TIM_SMCR_TS_0
954#define LL_TIM_TS_ITR2 TIM_SMCR_TS_1
955#define LL_TIM_TS_ITR3 (TIM_SMCR_TS_0 | TIM_SMCR_TS_1)
956#define LL_TIM_TS_ITR4 (TIM_SMCR_TS_3)
957#define LL_TIM_TS_ITR5 (TIM_SMCR_TS_0 | TIM_SMCR_TS_3)
958#define LL_TIM_TS_ITR6 (TIM_SMCR_TS_1 | TIM_SMCR_TS_3)
959#define LL_TIM_TS_ITR7 (TIM_SMCR_TS_0 | TIM_SMCR_TS_1 | TIM_SMCR_TS_3)
960#define LL_TIM_TS_ITR8 (TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
961#define LL_TIM_TS_ITR9 (TIM_SMCR_TS_0 | TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
962#define LL_TIM_TS_ITR10 (TIM_SMCR_TS_1 | TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
963#define LL_TIM_TS_ITR11 (TIM_SMCR_TS_0 | TIM_SMCR_TS_1 | TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
964#define LL_TIM_TS_ITR12 (TIM_SMCR_TS_4)
965#define LL_TIM_TS_ITR13 (TIM_SMCR_TS_0 | TIM_SMCR_TS_4)
966#define LL_TIM_TS_TI1F_ED TIM_SMCR_TS_2
967#define LL_TIM_TS_TI1FP1 (TIM_SMCR_TS_2 | TIM_SMCR_TS_0)
968#define LL_TIM_TS_TI2FP2 (TIM_SMCR_TS_2 | TIM_SMCR_TS_1)
969#define LL_TIM_TS_ETRF (TIM_SMCR_TS_2 | TIM_SMCR_TS_1 | TIM_SMCR_TS_0)
978#define LL_TIM_ETR_POLARITY_NONINVERTED 0x00000000U
979#define LL_TIM_ETR_POLARITY_INVERTED TIM_SMCR_ETP
988#define LL_TIM_ETR_PRESCALER_DIV1 0x00000000U
989#define LL_TIM_ETR_PRESCALER_DIV2 TIM_SMCR_ETPS_0
990#define LL_TIM_ETR_PRESCALER_DIV4 TIM_SMCR_ETPS_1
991#define LL_TIM_ETR_PRESCALER_DIV8 TIM_SMCR_ETPS
1000#define LL_TIM_ETR_FILTER_FDIV1 0x00000000U
1001#define LL_TIM_ETR_FILTER_FDIV1_N2 TIM_SMCR_ETF_0
1002#define LL_TIM_ETR_FILTER_FDIV1_N4 TIM_SMCR_ETF_1
1003#define LL_TIM_ETR_FILTER_FDIV1_N8 (TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0)
1004#define LL_TIM_ETR_FILTER_FDIV2_N6 TIM_SMCR_ETF_2
1005#define LL_TIM_ETR_FILTER_FDIV2_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0)
1006#define LL_TIM_ETR_FILTER_FDIV4_N6 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1)
1007#define LL_TIM_ETR_FILTER_FDIV4_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0)
1008#define LL_TIM_ETR_FILTER_FDIV8_N6 TIM_SMCR_ETF_3
1009#define LL_TIM_ETR_FILTER_FDIV8_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_0)
1010#define LL_TIM_ETR_FILTER_FDIV16_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1)
1011#define LL_TIM_ETR_FILTER_FDIV16_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0)
1012#define LL_TIM_ETR_FILTER_FDIV16_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2)
1013#define LL_TIM_ETR_FILTER_FDIV32_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0)
1014#define LL_TIM_ETR_FILTER_FDIV32_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1)
1015#define LL_TIM_ETR_FILTER_FDIV32_N8 TIM_SMCR_ETF
1020#define LL_TIM_TIM1_ETRSOURCE_GPIO 0x00000000U
1021#define LL_TIM_TIM1_ETRSOURCE_COMP1 TIM1_AF1_ETRSEL_0
1022#define LL_TIM_TIM1_ETRSOURCE_COMP2 TIM1_AF1_ETRSEL_1
1023#define LL_TIM_TIM1_ETRSOURCE_ADC1_AWD1 (TIM1_AF1_ETRSEL_1 | TIM1_AF1_ETRSEL_0)
1024#define LL_TIM_TIM1_ETRSOURCE_ADC1_AWD2 (TIM1_AF1_ETRSEL_2)
1025#define LL_TIM_TIM1_ETRSOURCE_ADC1_AWD3 (TIM1_AF1_ETRSEL_2 | TIM1_AF1_ETRSEL_0)
1026#define LL_TIM_TIM1_ETRSOURCE_ADC3_AWD1 (TIM1_AF1_ETRSEL_2 | TIM1_AF1_ETRSEL_1)
1027#define LL_TIM_TIM1_ETRSOURCE_ADC3_AWD2 (TIM1_AF1_ETRSEL_2 | TIM1_AF1_ETRSEL_1 | TIM1_AF1_ETRSEL_0)
1028#define LL_TIM_TIM1_ETRSOURCE_ADC3_AWD3 TIM1_AF1_ETRSEL_3
1030#define LL_TIM_TIM8_ETRSOURCE_GPIO 0x00000000U
1031#define LL_TIM_TIM8_ETRSOURCE_COMP1 TIM8_AF1_ETRSEL_0
1032#define LL_TIM_TIM8_ETRSOURCE_COMP2 TIM8_AF1_ETRSEL_1
1033#define LL_TIM_TIM8_ETRSOURCE_ADC2_AWD1 (TIM8_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1034#define LL_TIM_TIM8_ETRSOURCE_ADC2_AWD2 (TIM8_AF1_ETRSEL_2)
1035#define LL_TIM_TIM8_ETRSOURCE_ADC2_AWD3 (TIM8_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_0)
1036#define LL_TIM_TIM8_ETRSOURCE_ADC3_AWD1 (TIM8_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_1)
1037#define LL_TIM_TIM8_ETRSOURCE_ADC3_AWD2 (TIM8_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1038#define LL_TIM_TIM8_ETRSOURCE_ADC3_AWD3 TIM8_AF1_ETRSEL_3
1040#define LL_TIM_TIM2_ETRSOURCE_GPIO 0x00000000U
1041#define LL_TIM_TIM2_ETRSOURCE_COMP1 (TIM2_AF1_ETRSEL_0)
1042#define LL_TIM_TIM2_ETRSOURCE_COMP2 (TIM2_AF1_ETRSEL_1)
1043#define LL_TIM_TIM2_ETRSOURCE_RCC_LSE (TIM2_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1044#define LL_TIM_TIM2_ETRSOURCE_SAI1_FSA TIM2_AF1_ETRSEL_2
1045#define LL_TIM_TIM2_ETRSOURCE_SAI1_FSB (TIM2_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_0)
1047#define LL_TIM_TIM3_ETRSOURCE_GPIO 0x00000000U
1048#define LL_TIM_TIM3_ETRSOURCE_COMP1 TIM3_AF1_ETRSEL_0
1050#define LL_TIM_TIM5_ETRSOURCE_GPIO 0x00000000U
1051#define LL_TIM_TIM5_ETRSOURCE_SAI2_FSA TIM5_AF1_ETRSEL_0
1052#define LL_TIM_TIM5_ETRSOURCE_SAI2_FSB TIM5_AF1_ETRSEL_1
1053#define LL_TIM_TIM5_ETRSOURCE_SAI4_FSA TIM5_AF1_ETRSEL_0
1054#define LL_TIM_TIM5_ETRSOURCE_SAI4_FSB TIM5_AF1_ETRSEL_1
1056#define LL_TIM_TIM23_ETRSOURCE_GPIO 0x00000000U
1057#define LL_TIM_TIM23_ETRSOURCE_COMP1 (TIM2_AF1_ETRSEL_0)
1058#define LL_TIM_TIM23_ETRSOURCE_COMP2 (TIM2_AF1_ETRSEL_1)
1060#define LL_TIM_TIM24_ETRSOURCE_GPIO 0x00000000U
1061#define LL_TIM_TIM24_ETRSOURCE_SAI4_FSA TIM5_AF1_ETRSEL_0
1062#define LL_TIM_TIM24_ETRSOURCE_SAI4_FSB TIM5_AF1_ETRSEL_1
1063#define LL_TIM_TIM24_ETRSOURCE_SAI1_FSA (TIM2_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1064#define LL_TIM_TIM24_ETRSOURCE_SAI1_FSB TIM2_AF1_ETRSEL_2
1070#define LL_TIM_BREAK_POLARITY_LOW 0x00000000U
1071#define LL_TIM_BREAK_POLARITY_HIGH TIM_BDTR_BKP
1080#define LL_TIM_BREAK_FILTER_FDIV1 0x00000000U
1081#define LL_TIM_BREAK_FILTER_FDIV1_N2 0x00010000U
1082#define LL_TIM_BREAK_FILTER_FDIV1_N4 0x00020000U
1083#define LL_TIM_BREAK_FILTER_FDIV1_N8 0x00030000U
1084#define LL_TIM_BREAK_FILTER_FDIV2_N6 0x00040000U
1085#define LL_TIM_BREAK_FILTER_FDIV2_N8 0x00050000U
1086#define LL_TIM_BREAK_FILTER_FDIV4_N6 0x00060000U
1087#define LL_TIM_BREAK_FILTER_FDIV4_N8 0x00070000U
1088#define LL_TIM_BREAK_FILTER_FDIV8_N6 0x00080000U
1089#define LL_TIM_BREAK_FILTER_FDIV8_N8 0x00090000U
1090#define LL_TIM_BREAK_FILTER_FDIV16_N5 0x000A0000U
1091#define LL_TIM_BREAK_FILTER_FDIV16_N6 0x000B0000U
1092#define LL_TIM_BREAK_FILTER_FDIV16_N8 0x000C0000U
1093#define LL_TIM_BREAK_FILTER_FDIV32_N5 0x000D0000U
1094#define LL_TIM_BREAK_FILTER_FDIV32_N6 0x000E0000U
1095#define LL_TIM_BREAK_FILTER_FDIV32_N8 0x000F0000U
1104#define LL_TIM_BREAK2_POLARITY_LOW 0x00000000U
1105#define LL_TIM_BREAK2_POLARITY_HIGH TIM_BDTR_BK2P
1114#define LL_TIM_BREAK2_FILTER_FDIV1 0x00000000U
1115#define LL_TIM_BREAK2_FILTER_FDIV1_N2 0x00100000U
1116#define LL_TIM_BREAK2_FILTER_FDIV1_N4 0x00200000U
1117#define LL_TIM_BREAK2_FILTER_FDIV1_N8 0x00300000U
1118#define LL_TIM_BREAK2_FILTER_FDIV2_N6 0x00400000U
1119#define LL_TIM_BREAK2_FILTER_FDIV2_N8 0x00500000U
1120#define LL_TIM_BREAK2_FILTER_FDIV4_N6 0x00600000U
1121#define LL_TIM_BREAK2_FILTER_FDIV4_N8 0x00700000U
1122#define LL_TIM_BREAK2_FILTER_FDIV8_N6 0x00800000U
1123#define LL_TIM_BREAK2_FILTER_FDIV8_N8 0x00900000U
1124#define LL_TIM_BREAK2_FILTER_FDIV16_N5 0x00A00000U
1125#define LL_TIM_BREAK2_FILTER_FDIV16_N6 0x00B00000U
1126#define LL_TIM_BREAK2_FILTER_FDIV16_N8 0x00C00000U
1127#define LL_TIM_BREAK2_FILTER_FDIV32_N5 0x00D00000U
1128#define LL_TIM_BREAK2_FILTER_FDIV32_N6 0x00E00000U
1129#define LL_TIM_BREAK2_FILTER_FDIV32_N8 0x00F00000U
1138#define LL_TIM_OSSI_DISABLE 0x00000000U
1139#define LL_TIM_OSSI_ENABLE TIM_BDTR_OSSI
1148#define LL_TIM_OSSR_DISABLE 0x00000000U
1149#define LL_TIM_OSSR_ENABLE TIM_BDTR_OSSR
1154#if defined(TIM_BREAK_INPUT_SUPPORT)
1159#define LL_TIM_BREAK_INPUT_BKIN 0x00000000U
1160#define LL_TIM_BREAK_INPUT_BKIN2 0x00000004U
1169#define LL_TIM_BKIN_SOURCE_BKIN TIM1_AF1_BKINE
1170#define LL_TIM_BKIN_SOURCE_BKCOMP1 TIM1_AF1_BKCMP1E
1171#define LL_TIM_BKIN_SOURCE_BKCOMP2 TIM1_AF1_BKCMP2E
1172#define LL_TIM_BKIN_SOURCE_DF1BK TIM1_AF1_BKDF1BK0E
1181#define LL_TIM_BKIN_POLARITY_LOW TIM1_AF1_BKINP
1182#define LL_TIM_BKIN_POLARITY_HIGH 0x00000000U
1186#endif /* TIM_BREAK_INPUT_SUPPORT */
1187
1188#if defined(TIM_BDTR_BKBID)
1193#define LL_TIM_BREAK_AFMODE_INPUT 0x00000000U
1194#define LL_TIM_BREAK_AFMODE_BIDIRECTIONAL TIM_BDTR_BKBID
1203#define LL_TIM_BREAK2_AFMODE_INPUT 0x00000000U
1204#define LL_TIM_BREAK2_AFMODE_BIDIRECTIONAL TIM_BDTR_BK2BID
1209#endif /*TIM_BDTR_BKBID */
1214#define LL_TIM_DMABURST_BASEADDR_CR1 0x00000000U
1215#define LL_TIM_DMABURST_BASEADDR_CR2 TIM_DCR_DBA_0
1216#define LL_TIM_DMABURST_BASEADDR_SMCR TIM_DCR_DBA_1
1217#define LL_TIM_DMABURST_BASEADDR_DIER (TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1218#define LL_TIM_DMABURST_BASEADDR_SR TIM_DCR_DBA_2
1219#define LL_TIM_DMABURST_BASEADDR_EGR (TIM_DCR_DBA_2 | TIM_DCR_DBA_0)
1220#define LL_TIM_DMABURST_BASEADDR_CCMR1 (TIM_DCR_DBA_2 | TIM_DCR_DBA_1)
1221#define LL_TIM_DMABURST_BASEADDR_CCMR2 (TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1222#define LL_TIM_DMABURST_BASEADDR_CCER TIM_DCR_DBA_3
1223#define LL_TIM_DMABURST_BASEADDR_CNT (TIM_DCR_DBA_3 | TIM_DCR_DBA_0)
1224#define LL_TIM_DMABURST_BASEADDR_PSC (TIM_DCR_DBA_3 | TIM_DCR_DBA_1)
1225#define LL_TIM_DMABURST_BASEADDR_ARR (TIM_DCR_DBA_3 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1226#define LL_TIM_DMABURST_BASEADDR_RCR (TIM_DCR_DBA_3 | TIM_DCR_DBA_2)
1227#define LL_TIM_DMABURST_BASEADDR_CCR1 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0)
1228#define LL_TIM_DMABURST_BASEADDR_CCR2 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1)
1229#define LL_TIM_DMABURST_BASEADDR_CCR3 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1230#define LL_TIM_DMABURST_BASEADDR_CCR4 TIM_DCR_DBA_4
1231#define LL_TIM_DMABURST_BASEADDR_BDTR (TIM_DCR_DBA_4 | TIM_DCR_DBA_0)
1232#define LL_TIM_DMABURST_BASEADDR_CCMR3 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0)
1233#define LL_TIM_DMABURST_BASEADDR_CCR5 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1)
1234#define LL_TIM_DMABURST_BASEADDR_CCR6 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1235#if defined(TIM1_AF1_BKINE)&&defined(TIM1_AF2_BKINE)
1236#define LL_TIM_DMABURST_BASEADDR_AF1 (TIM_DCR_DBA_4 | TIM_DCR_DBA_3)
1237#define LL_TIM_DMABURST_BASEADDR_AF2 (TIM_DCR_DBA_4 | TIM_DCR_DBA_3 | TIM_DCR_DBA_0)
1238#endif /* TIM1_AF1_BKINE && TIM1_AF2_BKINE */
1239#define LL_TIM_DMABURST_BASEADDR_TISEL (TIM_DCR_DBA_4 | TIM_DCR_DBA_3 | TIM_DCR_DBA_1)
1248#define LL_TIM_DMABURST_LENGTH_1TRANSFER 0x00000000U
1249#define LL_TIM_DMABURST_LENGTH_2TRANSFERS TIM_DCR_DBL_0
1250#define LL_TIM_DMABURST_LENGTH_3TRANSFERS TIM_DCR_DBL_1
1251#define LL_TIM_DMABURST_LENGTH_4TRANSFERS (TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1252#define LL_TIM_DMABURST_LENGTH_5TRANSFERS TIM_DCR_DBL_2
1253#define LL_TIM_DMABURST_LENGTH_6TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_0)
1254#define LL_TIM_DMABURST_LENGTH_7TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_1)
1255#define LL_TIM_DMABURST_LENGTH_8TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1256#define LL_TIM_DMABURST_LENGTH_9TRANSFERS TIM_DCR_DBL_3
1257#define LL_TIM_DMABURST_LENGTH_10TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_0)
1258#define LL_TIM_DMABURST_LENGTH_11TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_1)
1259#define LL_TIM_DMABURST_LENGTH_12TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1260#define LL_TIM_DMABURST_LENGTH_13TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2)
1261#define LL_TIM_DMABURST_LENGTH_14TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_0)
1262#define LL_TIM_DMABURST_LENGTH_15TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_1)
1263#define LL_TIM_DMABURST_LENGTH_16TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1264#define LL_TIM_DMABURST_LENGTH_17TRANSFERS TIM_DCR_DBL_4
1265#define LL_TIM_DMABURST_LENGTH_18TRANSFERS (TIM_DCR_DBL_4 | TIM_DCR_DBL_0)
1274#define LL_TIM_TIM1_TI1_RMP_GPIO 0x00000000U
1275#define LL_TIM_TIM1_TI1_RMP_COMP1 TIM_TISEL_TI1SEL_0
1284#define LL_TIM_TIM8_TI1_RMP_GPIO 0x00000000U
1285#define LL_TIM_TIM8_TI1_RMP_COMP2 TIM_TISEL_TI1SEL_0
1294#define LL_TIM_TIM2_TI4_RMP_GPIO 0x00000000U
1295#define LL_TIM_TIM2_TI4_RMP_COMP1 TIM_TISEL_TI4SEL_0
1296#define LL_TIM_TIM2_TI4_RMP_COMP2 TIM_TISEL_TI4SEL_1
1297#define LL_TIM_TIM2_TI4_RMP_COMP1_COMP2 (TIM_TISEL_TI4SEL_0 | TIM_TISEL_TI4SEL_1)
1306#define LL_TIM_TIM3_TI1_RMP_GPIO 0x00000000U
1307#define LL_TIM_TIM3_TI1_RMP_COMP1 TIM_TISEL_TI1SEL_0
1308#define LL_TIM_TIM3_TI1_RMP_COMP2 TIM_TISEL_TI1SEL_1
1309#define LL_TIM_TIM3_TI1_RMP_COMP1_COMP2 (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1318#define LL_TIM_TIM5_TI1_RMP_GPIO 0x00000000U
1319#define LL_TIM_TIM5_TI1_RMP_CAN_TMP TIM_TISEL_TI1SEL_0
1320#define LL_TIM_TIM5_TI1_RMP_CAN_RTP TIM_TISEL_TI1SEL_1
1329#define LL_TIM_TIM12_TI1_RMP_GPIO 0x00000000U
1330#define LL_TIM_TIM12_TI1_RMP_SPDIF_FS TIM_TISEL_TI1SEL_0
1339#define LL_TIM_TIM15_TI1_RMP_GPIO 0x00000000U
1340#define LL_TIM_TIM15_TI1_RMP_TIM2_CH1 TIM_TISEL_TI1SEL_0
1341#define LL_TIM_TIM15_TI1_RMP_TIM3_CH1 TIM_TISEL_TI1SEL_1
1342#define LL_TIM_TIM15_TI1_RMP_TIM4_CH1 (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1343#define LL_TIM_TIM15_TI1_RMP_RCC_LSE (TIM_TISEL_TI1SEL_2)
1344#define LL_TIM_TIM15_TI1_RMP_RCC_CSI (TIM_TISEL_TI1SEL_2 | TIM_TISEL_TI1SEL_0)
1345#define LL_TIM_TIM15_TI1_RMP_RCC_MCO2 (TIM_TISEL_TI1SEL_2 | TIM_TISEL_TI1SEL_1)
1354#define LL_TIM_TIM15_TI2_RMP_GPIO 0x00000000U
1355#define LL_TIM_TIM15_TI2_RMP_TIM2_CH2 (TIM_TISEL_TI2SEL_0)
1356#define LL_TIM_TIM15_TI2_RMP_TIM3_CH2 (TIM_TISEL_TI2SEL_1)
1357#define LL_TIM_TIM15_TI2_RMP_TIM4_CH2 (TIM_TISEL_TI2SEL_0 | TIM_TISEL_TI2SEL_1)
1366#define LL_TIM_TIM16_TI1_RMP_GPIO 0x00000000U
1367#define LL_TIM_TIM16_TI1_RMP_RCC_LSI TIM_TISEL_TI1SEL_0
1368#define LL_TIM_TIM16_TI1_RMP_RCC_LSE TIM_TISEL_TI1SEL_1
1369#define LL_TIM_TIM16_TI1_RMP_WKUP_IT (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1378#define LL_TIM_TIM17_TI1_RMP_GPIO 0x00000000U
1379#define LL_TIM_TIM17_TI1_RMP_SPDIF_FS TIM_TISEL_TI1SEL_0
1380#define LL_TIM_TIM17_TI1_RMP_RCC_HSE1MHZ TIM_TISEL_TI1SEL_1
1381#define LL_TIM_TIM17_TI1_RMP_RCC_MCO1 (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1390#define LL_TIM_TIM23_TI4_RMP_GPIO 0x00000000U
1391#define LL_TIM_TIM23_TI4_RMP_COMP1 TIM_TISEL_TI4SEL_0
1392#define LL_TIM_TIM23_TI4_RMP_COMP2 TIM_TISEL_TI4SEL_1
1393#define LL_TIM_TIM23_TI4_RMP_COMP1_COMP2 (TIM_TISEL_TI4SEL_0 | TIM_TISEL_TI4SEL_1)
1402#define LL_TIM_TIM24_TI1_RMP_GPIO 0x00000000U
1403#define LL_TIM_TIM24_TI1_RMP_CAN_TMP TIM_TISEL_TI1SEL_0
1404#define LL_TIM_TIM24_TI1_RMP_CAN_RTP TIM_TISEL_TI1SEL_1
1405#define LL_TIM_TIM24_TI1_RMP_CAN_SOC (TIM_TISEL_TI4SEL_0 | TIM_TISEL_TI4SEL_1)
1407#if defined(TIM_BREAK_INPUT_SUPPORT)
1411#define LL_TIM_BKIN_SOURCE_DFBK LL_TIM_BKIN_SOURCE_DF1BK
1415#endif /* TIM_BREAK_INPUT_SUPPORT */
1420/* Exported macro ------------------------------------------------------------*/
1437#define LL_TIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
1438
1445#define LL_TIM_ReadReg(__INSTANCE__, __REG__) READ_REG((__INSTANCE__)->__REG__)
1458#define __LL_TIM_GETFLAG_UIFCPY(__CNT__) \
1459 (READ_BIT((__CNT__), TIM_CNT_UIFCPY) >> TIM_CNT_UIFCPY_Pos)
1460
1472#define __LL_TIM_CALC_DEADTIME(__TIMCLK__, __CKD__, __DT__) \
1473 ( (((uint64_t)((__DT__)*1000U)) < ((DT_DELAY_1+1U) * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1474 (uint8_t)(((uint64_t)((__DT__)*1000U) / TIM_CALC_DTS((__TIMCLK__), (__CKD__))) & DT_DELAY_1) : \
1475 (((uint64_t)((__DT__)*1000U)) < ((64U + (DT_DELAY_2+1U)) * 2U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1476 (uint8_t)(DT_RANGE_2 | ((uint8_t)((uint8_t)((((uint64_t)((__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), \
1477 (__CKD__))) >> 1U) - (uint8_t) 64) & DT_DELAY_2)) :\
1478 (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_3+1U)) * 8U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1479 (uint8_t)(DT_RANGE_3 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), \
1480 (__CKD__))) >> 3U) - (uint8_t) 32) & DT_DELAY_3)) :\
1481 (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_4+1U)) * 16U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1482 (uint8_t)(DT_RANGE_4 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), \
1483 (__CKD__))) >> 4U) - (uint8_t) 32) & DT_DELAY_4)) :\
1484 0U)
1485
1493#define __LL_TIM_CALC_PSC(__TIMCLK__, __CNTCLK__) \
1494 (((__TIMCLK__) >= (__CNTCLK__)) ? (uint32_t)((((__TIMCLK__) + (__CNTCLK__)/2U)/(__CNTCLK__)) - 1U) : 0U)
1495
1504#define __LL_TIM_CALC_ARR(__TIMCLK__, __PSC__, __FREQ__) \
1505 ((((__TIMCLK__)/((__PSC__) + 1U)) >= (__FREQ__)) ? (((__TIMCLK__)/((__FREQ__) * ((__PSC__) + 1U))) - 1U) : 0U)
1506
1516#define __LL_TIM_CALC_DELAY(__TIMCLK__, __PSC__, __DELAY__) \
1517 ((uint32_t)(((uint64_t)(__TIMCLK__) * (uint64_t)(__DELAY__)) \
1518 / ((uint64_t)1000000U * (uint64_t)((__PSC__) + 1U))))
1519
1530#define __LL_TIM_CALC_PULSE(__TIMCLK__, __PSC__, __DELAY__, __PULSE__) \
1531 ((uint32_t)(__LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__PULSE__)) \
1532 + __LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__DELAY__))))
1533
1544#define __LL_TIM_GET_ICPSC_RATIO(__ICPSC__) \
1545 ((uint32_t)(0x01U << (((__ICPSC__) >> 16U) >> TIM_CCMR1_IC1PSC_Pos)))
1546
1547
1557/* Exported functions --------------------------------------------------------*/
1573__STATIC_INLINE void LL_TIM_EnableCounter(TIM_TypeDef *TIMx)
1574{
1575 SET_BIT(TIMx->CR1, TIM_CR1_CEN);
1576}
1577
1584__STATIC_INLINE void LL_TIM_DisableCounter(TIM_TypeDef *TIMx)
1585{
1586 CLEAR_BIT(TIMx->CR1, TIM_CR1_CEN);
1587}
1588
1595__STATIC_INLINE uint32_t LL_TIM_IsEnabledCounter(const TIM_TypeDef *TIMx)
1596{
1597 return ((READ_BIT(TIMx->CR1, TIM_CR1_CEN) == (TIM_CR1_CEN)) ? 1UL : 0UL);
1598}
1599
1606__STATIC_INLINE void LL_TIM_EnableUpdateEvent(TIM_TypeDef *TIMx)
1607{
1608 CLEAR_BIT(TIMx->CR1, TIM_CR1_UDIS);
1609}
1610
1617__STATIC_INLINE void LL_TIM_DisableUpdateEvent(TIM_TypeDef *TIMx)
1618{
1619 SET_BIT(TIMx->CR1, TIM_CR1_UDIS);
1620}
1621
1628__STATIC_INLINE uint32_t LL_TIM_IsEnabledUpdateEvent(const TIM_TypeDef *TIMx)
1629{
1630 return ((READ_BIT(TIMx->CR1, TIM_CR1_UDIS) == (uint32_t)RESET) ? 1UL : 0UL);
1631}
1632
1649__STATIC_INLINE void LL_TIM_SetUpdateSource(TIM_TypeDef *TIMx, uint32_t UpdateSource)
1650{
1651 MODIFY_REG(TIMx->CR1, TIM_CR1_URS, UpdateSource);
1652}
1653
1662__STATIC_INLINE uint32_t LL_TIM_GetUpdateSource(const TIM_TypeDef *TIMx)
1663{
1664 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_URS));
1665}
1666
1676__STATIC_INLINE void LL_TIM_SetOnePulseMode(TIM_TypeDef *TIMx, uint32_t OnePulseMode)
1677{
1678 MODIFY_REG(TIMx->CR1, TIM_CR1_OPM, OnePulseMode);
1679}
1680
1689__STATIC_INLINE uint32_t LL_TIM_GetOnePulseMode(const TIM_TypeDef *TIMx)
1690{
1691 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_OPM));
1692}
1693
1713__STATIC_INLINE void LL_TIM_SetCounterMode(TIM_TypeDef *TIMx, uint32_t CounterMode)
1714{
1715 MODIFY_REG(TIMx->CR1, (TIM_CR1_DIR | TIM_CR1_CMS), CounterMode);
1716}
1717
1733__STATIC_INLINE uint32_t LL_TIM_GetCounterMode(const TIM_TypeDef *TIMx)
1734{
1735 uint32_t counter_mode;
1736
1737 counter_mode = (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_CMS));
1738
1739 if (counter_mode == 0U)
1740 {
1741 counter_mode = (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR));
1742 }
1743
1744 return counter_mode;
1745}
1746
1753__STATIC_INLINE void LL_TIM_EnableARRPreload(TIM_TypeDef *TIMx)
1754{
1755 SET_BIT(TIMx->CR1, TIM_CR1_ARPE);
1756}
1757
1764__STATIC_INLINE void LL_TIM_DisableARRPreload(TIM_TypeDef *TIMx)
1765{
1766 CLEAR_BIT(TIMx->CR1, TIM_CR1_ARPE);
1767}
1768
1775__STATIC_INLINE uint32_t LL_TIM_IsEnabledARRPreload(const TIM_TypeDef *TIMx)
1776{
1777 return ((READ_BIT(TIMx->CR1, TIM_CR1_ARPE) == (TIM_CR1_ARPE)) ? 1UL : 0UL);
1778}
1779
1794__STATIC_INLINE void LL_TIM_SetClockDivision(TIM_TypeDef *TIMx, uint32_t ClockDivision)
1795{
1796 MODIFY_REG(TIMx->CR1, TIM_CR1_CKD, ClockDivision);
1797}
1798
1812__STATIC_INLINE uint32_t LL_TIM_GetClockDivision(const TIM_TypeDef *TIMx)
1813{
1814 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_CKD));
1815}
1816
1826__STATIC_INLINE void LL_TIM_SetCounter(TIM_TypeDef *TIMx, uint32_t Counter)
1827{
1828 WRITE_REG(TIMx->CNT, Counter);
1829}
1830
1839__STATIC_INLINE uint32_t LL_TIM_GetCounter(const TIM_TypeDef *TIMx)
1840{
1841 return (uint32_t)(READ_REG(TIMx->CNT));
1842}
1843
1852__STATIC_INLINE uint32_t LL_TIM_GetDirection(const TIM_TypeDef *TIMx)
1853{
1854 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR));
1855}
1856
1868__STATIC_INLINE void LL_TIM_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Prescaler)
1869{
1870 WRITE_REG(TIMx->PSC, Prescaler);
1871}
1872
1879__STATIC_INLINE uint32_t LL_TIM_GetPrescaler(const TIM_TypeDef *TIMx)
1880{
1881 return (uint32_t)(READ_REG(TIMx->PSC));
1882}
1883
1895__STATIC_INLINE void LL_TIM_SetAutoReload(TIM_TypeDef *TIMx, uint32_t AutoReload)
1896{
1897 WRITE_REG(TIMx->ARR, AutoReload);
1898}
1899
1908__STATIC_INLINE uint32_t LL_TIM_GetAutoReload(const TIM_TypeDef *TIMx)
1909{
1910 return (uint32_t)(READ_REG(TIMx->ARR));
1911}
1912
1923__STATIC_INLINE void LL_TIM_SetRepetitionCounter(TIM_TypeDef *TIMx, uint32_t RepetitionCounter)
1924{
1925 WRITE_REG(TIMx->RCR, RepetitionCounter);
1926}
1927
1936__STATIC_INLINE uint32_t LL_TIM_GetRepetitionCounter(const TIM_TypeDef *TIMx)
1937{
1938 return (uint32_t)(READ_REG(TIMx->RCR));
1939}
1940
1949__STATIC_INLINE void LL_TIM_EnableUIFRemap(TIM_TypeDef *TIMx)
1950{
1951 SET_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
1952}
1953
1960__STATIC_INLINE void LL_TIM_DisableUIFRemap(TIM_TypeDef *TIMx)
1961{
1962 CLEAR_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
1963}
1964
1970__STATIC_INLINE uint32_t LL_TIM_IsActiveUIFCPY(const uint32_t Counter)
1971{
1972 return (((Counter & TIM_CNT_UIFCPY) == (TIM_CNT_UIFCPY)) ? 1UL : 0UL);
1973}
1974
1994__STATIC_INLINE void LL_TIM_CC_EnablePreload(TIM_TypeDef *TIMx)
1995{
1996 SET_BIT(TIMx->CR2, TIM_CR2_CCPC);
1997}
1998
2007__STATIC_INLINE void LL_TIM_CC_DisablePreload(TIM_TypeDef *TIMx)
2008{
2009 CLEAR_BIT(TIMx->CR2, TIM_CR2_CCPC);
2010}
2011
2023__STATIC_INLINE void LL_TIM_CC_SetUpdate(TIM_TypeDef *TIMx, uint32_t CCUpdateSource)
2024{
2025 MODIFY_REG(TIMx->CR2, TIM_CR2_CCUS, CCUpdateSource);
2026}
2027
2037__STATIC_INLINE void LL_TIM_CC_SetDMAReqTrigger(TIM_TypeDef *TIMx, uint32_t DMAReqTrigger)
2038{
2039 MODIFY_REG(TIMx->CR2, TIM_CR2_CCDS, DMAReqTrigger);
2040}
2041
2050__STATIC_INLINE uint32_t LL_TIM_CC_GetDMAReqTrigger(const TIM_TypeDef *TIMx)
2051{
2052 return (uint32_t)(READ_BIT(TIMx->CR2, TIM_CR2_CCDS));
2053}
2054
2069__STATIC_INLINE void LL_TIM_CC_SetLockLevel(TIM_TypeDef *TIMx, uint32_t LockLevel)
2070{
2071 MODIFY_REG(TIMx->BDTR, TIM_BDTR_LOCK, LockLevel);
2072}
2073
2098__STATIC_INLINE void LL_TIM_CC_EnableChannel(TIM_TypeDef *TIMx, uint32_t Channels)
2099{
2100 SET_BIT(TIMx->CCER, Channels);
2101}
2102
2127__STATIC_INLINE void LL_TIM_CC_DisableChannel(TIM_TypeDef *TIMx, uint32_t Channels)
2128{
2129 CLEAR_BIT(TIMx->CCER, Channels);
2130}
2131
2156__STATIC_INLINE uint32_t LL_TIM_CC_IsEnabledChannel(TIM_TypeDef *TIMx, uint32_t Channels)
2157{
2158 return ((READ_BIT(TIMx->CCER, Channels) == (Channels)) ? 1UL : 0UL);
2159}
2160
2202__STATIC_INLINE void LL_TIM_OC_ConfigOutput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
2203{
2204 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2205 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2206 CLEAR_BIT(*pReg, (TIM_CCMR1_CC1S << SHIFT_TAB_OCxx[iChannel]));
2207 MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]),
2208 (Configuration & TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]);
2209 MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]),
2210 (Configuration & TIM_CR2_OIS1) << SHIFT_TAB_OISx[iChannel]);
2211}
2212
2247__STATIC_INLINE void LL_TIM_OC_SetMode(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Mode)
2248{
2249 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2250 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2251 MODIFY_REG(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel]), Mode << SHIFT_TAB_OCxx[iChannel]);
2252}
2253
2286__STATIC_INLINE uint32_t LL_TIM_OC_GetMode(const TIM_TypeDef *TIMx, uint32_t Channel)
2287{
2288 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2289 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2290 return (READ_BIT(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel])) >> SHIFT_TAB_OCxx[iChannel]);
2291}
2292
2320__STATIC_INLINE void LL_TIM_OC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Polarity)
2321{
2322 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2323 MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]), Polarity << SHIFT_TAB_CCxP[iChannel]);
2324}
2325
2352__STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(const TIM_TypeDef *TIMx, uint32_t Channel)
2353{
2354 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2355 return (READ_BIT(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel])) >> SHIFT_TAB_CCxP[iChannel]);
2356}
2357
2389__STATIC_INLINE void LL_TIM_OC_SetIdleState(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t IdleState)
2390{
2391 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2392 MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]), IdleState << SHIFT_TAB_OISx[iChannel]);
2393}
2394
2421__STATIC_INLINE uint32_t LL_TIM_OC_GetIdleState(const TIM_TypeDef *TIMx, uint32_t Channel)
2422{
2423 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2424 return (READ_BIT(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel])) >> SHIFT_TAB_OISx[iChannel]);
2425}
2426
2446__STATIC_INLINE void LL_TIM_OC_EnableFast(TIM_TypeDef *TIMx, uint32_t Channel)
2447{
2448 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2449 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2450 SET_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
2451
2452}
2453
2472__STATIC_INLINE void LL_TIM_OC_DisableFast(TIM_TypeDef *TIMx, uint32_t Channel)
2473{
2474 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2475 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2476 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
2477
2478}
2479
2498__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast(TIM_TypeDef *TIMx, uint32_t Channel)
2499{
2500 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2501 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2502 uint32_t bitfield = TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel];
2503 return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
2504}
2505
2524__STATIC_INLINE void LL_TIM_OC_EnablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
2525{
2526 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2527 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2528 SET_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
2529}
2530
2549__STATIC_INLINE void LL_TIM_OC_DisablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
2550{
2551 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2552 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2553 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
2554}
2555
2574__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(TIM_TypeDef *TIMx, uint32_t Channel)
2575{
2576 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2577 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2578 uint32_t bitfield = TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel];
2579 return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
2580}
2581
2603__STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel)
2604{
2605 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2606 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2607 SET_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
2608}
2609
2630__STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel)
2631{
2632 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2633 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2634 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
2635}
2636
2659__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledClear(TIM_TypeDef *TIMx, uint32_t Channel)
2660{
2661 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2662 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2663 uint32_t bitfield = TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel];
2664 return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
2665}
2666
2678__STATIC_INLINE void LL_TIM_OC_SetDeadTime(TIM_TypeDef *TIMx, uint32_t DeadTime)
2679{
2680 MODIFY_REG(TIMx->BDTR, TIM_BDTR_DTG, DeadTime);
2681}
2682
2695__STATIC_INLINE void LL_TIM_OC_SetCompareCH1(TIM_TypeDef *TIMx, uint32_t CompareValue)
2696{
2697 WRITE_REG(TIMx->CCR1, CompareValue);
2698}
2699
2712__STATIC_INLINE void LL_TIM_OC_SetCompareCH2(TIM_TypeDef *TIMx, uint32_t CompareValue)
2713{
2714 WRITE_REG(TIMx->CCR2, CompareValue);
2715}
2716
2729__STATIC_INLINE void LL_TIM_OC_SetCompareCH3(TIM_TypeDef *TIMx, uint32_t CompareValue)
2730{
2731 WRITE_REG(TIMx->CCR3, CompareValue);
2732}
2733
2746__STATIC_INLINE void LL_TIM_OC_SetCompareCH4(TIM_TypeDef *TIMx, uint32_t CompareValue)
2747{
2748 WRITE_REG(TIMx->CCR4, CompareValue);
2749}
2750
2760__STATIC_INLINE void LL_TIM_OC_SetCompareCH5(TIM_TypeDef *TIMx, uint32_t CompareValue)
2761{
2762 MODIFY_REG(TIMx->CCR5, TIM_CCR5_CCR5, CompareValue);
2763}
2764
2774__STATIC_INLINE void LL_TIM_OC_SetCompareCH6(TIM_TypeDef *TIMx, uint32_t CompareValue)
2775{
2776 WRITE_REG(TIMx->CCR6, CompareValue);
2777}
2778
2790__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH1(const TIM_TypeDef *TIMx)
2791{
2792 return (uint32_t)(READ_REG(TIMx->CCR1));
2793}
2794
2806__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH2(const TIM_TypeDef *TIMx)
2807{
2808 return (uint32_t)(READ_REG(TIMx->CCR2));
2809}
2810
2822__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH3(const TIM_TypeDef *TIMx)
2823{
2824 return (uint32_t)(READ_REG(TIMx->CCR3));
2825}
2826
2838__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH4(const TIM_TypeDef *TIMx)
2839{
2840 return (uint32_t)(READ_REG(TIMx->CCR4));
2841}
2842
2851__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH5(const TIM_TypeDef *TIMx)
2852{
2853 return (uint32_t)(READ_BIT(TIMx->CCR5, TIM_CCR5_CCR5));
2854}
2855
2864__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH6(const TIM_TypeDef *TIMx)
2865{
2866 return (uint32_t)(READ_REG(TIMx->CCR6));
2867}
2868
2884__STATIC_INLINE void LL_TIM_SetCH5CombinedChannels(TIM_TypeDef *TIMx, uint32_t GroupCH5)
2885{
2886 MODIFY_REG(TIMx->CCR5, (TIM_CCR5_GC5C3 | TIM_CCR5_GC5C2 | TIM_CCR5_GC5C1), GroupCH5);
2887}
2888
2932__STATIC_INLINE void LL_TIM_IC_Config(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
2933{
2934 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2935 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2936 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]),
2937 ((Configuration >> 16U) & (TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S)) \
2938 << SHIFT_TAB_ICxx[iChannel]);
2939 MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
2940 (Configuration & (TIM_CCER_CC1NP | TIM_CCER_CC1P)) << SHIFT_TAB_CCxP[iChannel]);
2941}
2942
2961__STATIC_INLINE void LL_TIM_IC_SetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICActiveInput)
2962{
2963 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2964 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2965 MODIFY_REG(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]), (ICActiveInput >> 16U) << SHIFT_TAB_ICxx[iChannel]);
2966}
2967
2985__STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput(const TIM_TypeDef *TIMx, uint32_t Channel)
2986{
2987 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2988 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2989 return ((READ_BIT(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
2990}
2991
3011__STATIC_INLINE void LL_TIM_IC_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPrescaler)
3012{
3013 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3014 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3015 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel]), (ICPrescaler >> 16U) << SHIFT_TAB_ICxx[iChannel]);
3016}
3017
3036__STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler(const TIM_TypeDef *TIMx, uint32_t Channel)
3037{
3038 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3039 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3040 return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
3041}
3042
3074__STATIC_INLINE void LL_TIM_IC_SetFilter(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICFilter)
3075{
3076 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3077 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3078 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel]), (ICFilter >> 16U) << SHIFT_TAB_ICxx[iChannel]);
3079}
3080
3111__STATIC_INLINE uint32_t LL_TIM_IC_GetFilter(const TIM_TypeDef *TIMx, uint32_t Channel)
3112{
3113 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3114 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3115 return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
3116}
3117
3140__STATIC_INLINE void LL_TIM_IC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPolarity)
3141{
3142 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3143 MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
3144 ICPolarity << SHIFT_TAB_CCxP[iChannel]);
3145}
3146
3168__STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity(const TIM_TypeDef *TIMx, uint32_t Channel)
3169{
3170 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3171 return (READ_BIT(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel])) >>
3172 SHIFT_TAB_CCxP[iChannel]);
3173}
3174
3183__STATIC_INLINE void LL_TIM_IC_EnableXORCombination(TIM_TypeDef *TIMx)
3184{
3185 SET_BIT(TIMx->CR2, TIM_CR2_TI1S);
3186}
3187
3196__STATIC_INLINE void LL_TIM_IC_DisableXORCombination(TIM_TypeDef *TIMx)
3197{
3198 CLEAR_BIT(TIMx->CR2, TIM_CR2_TI1S);
3199}
3200
3209__STATIC_INLINE uint32_t LL_TIM_IC_IsEnabledXORCombination(TIM_TypeDef *TIMx)
3210{
3211 return ((READ_BIT(TIMx->CR2, TIM_CR2_TI1S) == (TIM_CR2_TI1S)) ? 1UL : 0UL);
3212}
3213
3225__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH1(const TIM_TypeDef *TIMx)
3226{
3227 return (uint32_t)(READ_REG(TIMx->CCR1));
3228}
3229
3241__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH2(const TIM_TypeDef *TIMx)
3242{
3243 return (uint32_t)(READ_REG(TIMx->CCR2));
3244}
3245
3257__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH3(const TIM_TypeDef *TIMx)
3258{
3259 return (uint32_t)(READ_REG(TIMx->CCR3));
3260}
3261
3273__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH4(const TIM_TypeDef *TIMx)
3274{
3275 return (uint32_t)(READ_REG(TIMx->CCR4));
3276}
3277
3295__STATIC_INLINE void LL_TIM_EnableExternalClock(TIM_TypeDef *TIMx)
3296{
3297 SET_BIT(TIMx->SMCR, TIM_SMCR_ECE);
3298}
3299
3308__STATIC_INLINE void LL_TIM_DisableExternalClock(TIM_TypeDef *TIMx)
3309{
3310 CLEAR_BIT(TIMx->SMCR, TIM_SMCR_ECE);
3311}
3312
3321__STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock(const TIM_TypeDef *TIMx)
3322{
3323 return ((READ_BIT(TIMx->SMCR, TIM_SMCR_ECE) == (TIM_SMCR_ECE)) ? 1UL : 0UL);
3324}
3325
3345__STATIC_INLINE void LL_TIM_SetClockSource(TIM_TypeDef *TIMx, uint32_t ClockSource)
3346{
3347 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS | TIM_SMCR_ECE, ClockSource);
3348}
3349
3362__STATIC_INLINE void LL_TIM_SetEncoderMode(TIM_TypeDef *TIMx, uint32_t EncoderMode)
3363{
3364 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS, EncoderMode);
3365}
3366
3392__STATIC_INLINE void LL_TIM_SetTriggerOutput(TIM_TypeDef *TIMx, uint32_t TimerSynchronization)
3393{
3394 MODIFY_REG(TIMx->CR2, TIM_CR2_MMS, TimerSynchronization);
3395}
3396
3422__STATIC_INLINE void LL_TIM_SetTriggerOutput2(TIM_TypeDef *TIMx, uint32_t ADCSynchronization)
3423{
3424 MODIFY_REG(TIMx->CR2, TIM_CR2_MMS2, ADCSynchronization);
3425}
3426
3441__STATIC_INLINE void LL_TIM_SetSlaveMode(TIM_TypeDef *TIMx, uint32_t SlaveMode)
3442{
3443 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS, SlaveMode);
3444}
3445
3475__STATIC_INLINE void LL_TIM_SetTriggerInput(TIM_TypeDef *TIMx, uint32_t TriggerInput)
3476{
3477 MODIFY_REG(TIMx->SMCR, TIM_SMCR_TS, TriggerInput);
3478}
3479
3488__STATIC_INLINE void LL_TIM_EnableMasterSlaveMode(TIM_TypeDef *TIMx)
3489{
3490 SET_BIT(TIMx->SMCR, TIM_SMCR_MSM);
3491}
3492
3501__STATIC_INLINE void LL_TIM_DisableMasterSlaveMode(TIM_TypeDef *TIMx)
3502{
3503 CLEAR_BIT(TIMx->SMCR, TIM_SMCR_MSM);
3504}
3505
3514__STATIC_INLINE uint32_t LL_TIM_IsEnabledMasterSlaveMode(const TIM_TypeDef *TIMx)
3515{
3516 return ((READ_BIT(TIMx->SMCR, TIM_SMCR_MSM) == (TIM_SMCR_MSM)) ? 1UL : 0UL);
3517}
3518
3554__STATIC_INLINE void LL_TIM_ConfigETR(TIM_TypeDef *TIMx, uint32_t ETRPolarity, uint32_t ETRPrescaler,
3555 uint32_t ETRFilter)
3556{
3557 MODIFY_REG(TIMx->SMCR, TIM_SMCR_ETP | TIM_SMCR_ETPS | TIM_SMCR_ETF, ETRPolarity | ETRPrescaler | ETRFilter);
3558}
3559
3623__STATIC_INLINE void LL_TIM_SetETRSource(TIM_TypeDef *TIMx, uint32_t ETRSource)
3624{
3625 MODIFY_REG(TIMx->AF1, TIMx_AF1_ETRSEL, ETRSource);
3626}
3627
3644__STATIC_INLINE void LL_TIM_EnableBRK(TIM_TypeDef *TIMx)
3645{
3646 SET_BIT(TIMx->BDTR, TIM_BDTR_BKE);
3647}
3648
3657__STATIC_INLINE void LL_TIM_DisableBRK(TIM_TypeDef *TIMx)
3658{
3659 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BKE);
3660}
3661
3662#if defined(TIM_BDTR_BKBID)
3705__STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity, uint32_t BreakFilter,
3706 uint32_t BreakAFMode)
3707{
3708 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP | TIM_BDTR_BKF | TIM_BDTR_BKBID, BreakPolarity | BreakFilter | BreakAFMode);
3709}
3710
3711#else
3741__STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity,
3742 uint32_t BreakFilter)
3743{
3744 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP | TIM_BDTR_BKF, BreakPolarity | BreakFilter);
3745}
3746
3747#endif /* TIM_BDTR_BKBID */
3748#if defined(TIM_BDTR_BKBID)
3759__STATIC_INLINE void LL_TIM_DisarmBRK(TIM_TypeDef *TIMx)
3760{
3761 SET_BIT(TIMx->BDTR, TIM_BDTR_BKDSRM);
3762}
3763
3771__STATIC_INLINE void LL_TIM_ReArmBRK(TIM_TypeDef *TIMx)
3772{
3773 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BKDSRM);
3774}
3775
3776#endif /*TIM_BDTR_BKBID */
3785__STATIC_INLINE void LL_TIM_EnableBRK2(TIM_TypeDef *TIMx)
3786{
3787 SET_BIT(TIMx->BDTR, TIM_BDTR_BK2E);
3788}
3789
3798__STATIC_INLINE void LL_TIM_DisableBRK2(TIM_TypeDef *TIMx)
3799{
3800 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BK2E);
3801}
3802
3803#if defined(TIM_BDTR_BKBID)
3846__STATIC_INLINE void LL_TIM_ConfigBRK2(TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter,
3847 uint32_t Break2AFMode)
3848{
3849 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BK2P | TIM_BDTR_BK2F | TIM_BDTR_BK2BID, Break2Polarity | Break2Filter | Break2AFMode);
3850}
3851
3852#else
3882__STATIC_INLINE void LL_TIM_ConfigBRK2(TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter)
3883{
3884 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BK2P | TIM_BDTR_BK2F, Break2Polarity | Break2Filter);
3885}
3886
3887#endif /*TIM_BDTR_BKBID */
3888#if defined(TIM_BDTR_BKBID)
3899__STATIC_INLINE void LL_TIM_DisarmBRK2(TIM_TypeDef *TIMx)
3900{
3901 SET_BIT(TIMx->BDTR, TIM_BDTR_BK2DSRM);
3902}
3903
3911__STATIC_INLINE void LL_TIM_ReArmBRK2(TIM_TypeDef *TIMx)
3912{
3913 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BK2DSRM);
3914}
3915
3916#endif /*TIM_BDTR_BKBID */
3932__STATIC_INLINE void LL_TIM_SetOffStates(TIM_TypeDef *TIMx, uint32_t OffStateIdle, uint32_t OffStateRun)
3933{
3934 MODIFY_REG(TIMx->BDTR, TIM_BDTR_OSSI | TIM_BDTR_OSSR, OffStateIdle | OffStateRun);
3935}
3936
3945__STATIC_INLINE void LL_TIM_EnableAutomaticOutput(TIM_TypeDef *TIMx)
3946{
3947 SET_BIT(TIMx->BDTR, TIM_BDTR_AOE);
3948}
3949
3958__STATIC_INLINE void LL_TIM_DisableAutomaticOutput(TIM_TypeDef *TIMx)
3959{
3960 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_AOE);
3961}
3962
3971__STATIC_INLINE uint32_t LL_TIM_IsEnabledAutomaticOutput(const TIM_TypeDef *TIMx)
3972{
3973 return ((READ_BIT(TIMx->BDTR, TIM_BDTR_AOE) == (TIM_BDTR_AOE)) ? 1UL : 0UL);
3974}
3975
3986__STATIC_INLINE void LL_TIM_EnableAllOutputs(TIM_TypeDef *TIMx)
3987{
3988 SET_BIT(TIMx->BDTR, TIM_BDTR_MOE);
3989}
3990
4001__STATIC_INLINE void LL_TIM_DisableAllOutputs(TIM_TypeDef *TIMx)
4002{
4003 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_MOE);
4004}
4005
4014__STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs(const TIM_TypeDef *TIMx)
4015{
4016 return ((READ_BIT(TIMx->BDTR, TIM_BDTR_MOE) == (TIM_BDTR_MOE)) ? 1UL : 0UL);
4017}
4018
4019#if defined(TIM_BREAK_INPUT_SUPPORT)
4043__STATIC_INLINE void LL_TIM_EnableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
4044{
4045 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
4046 SET_BIT(*pReg, Source);
4047}
4048
4072__STATIC_INLINE void LL_TIM_DisableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
4073{
4074 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
4075 CLEAR_BIT(*pReg, Source);
4076}
4077
4101__STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source,
4102 uint32_t Polarity)
4103{
4104 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
4105 MODIFY_REG(*pReg, (TIMx_AF1_BKINP << TIM_POSITION_BRK_SOURCE), (Polarity << TIM_POSITION_BRK_SOURCE));
4106}
4107#endif /* TIM_BREAK_INPUT_SUPPORT */
4170__STATIC_INLINE void LL_TIM_ConfigDMABurst(TIM_TypeDef *TIMx, uint32_t DMABurstBaseAddress, uint32_t DMABurstLength)
4171{
4172 MODIFY_REG(TIMx->DCR, (TIM_DCR_DBL | TIM_DCR_DBA), (DMABurstBaseAddress | DMABurstLength));
4173}
4174
4256__STATIC_INLINE void LL_TIM_SetRemap(TIM_TypeDef *TIMx, uint32_t Remap)
4257{
4259}
4260
4275__STATIC_INLINE void LL_TIM_ClearFlag_UPDATE(TIM_TypeDef *TIMx)
4276{
4277 WRITE_REG(TIMx->SR, ~(TIM_SR_UIF));
4278}
4279
4286__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_UPDATE(const TIM_TypeDef *TIMx)
4287{
4288 return ((READ_BIT(TIMx->SR, TIM_SR_UIF) == (TIM_SR_UIF)) ? 1UL : 0UL);
4289}
4290
4297__STATIC_INLINE void LL_TIM_ClearFlag_CC1(TIM_TypeDef *TIMx)
4298{
4299 WRITE_REG(TIMx->SR, ~(TIM_SR_CC1IF));
4300}
4301
4308__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1(const TIM_TypeDef *TIMx)
4309{
4310 return ((READ_BIT(TIMx->SR, TIM_SR_CC1IF) == (TIM_SR_CC1IF)) ? 1UL : 0UL);
4311}
4312
4319__STATIC_INLINE void LL_TIM_ClearFlag_CC2(TIM_TypeDef *TIMx)
4320{
4321 WRITE_REG(TIMx->SR, ~(TIM_SR_CC2IF));
4322}
4323
4330__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2(const TIM_TypeDef *TIMx)
4331{
4332 return ((READ_BIT(TIMx->SR, TIM_SR_CC2IF) == (TIM_SR_CC2IF)) ? 1UL : 0UL);
4333}
4334
4341__STATIC_INLINE void LL_TIM_ClearFlag_CC3(TIM_TypeDef *TIMx)
4342{
4343 WRITE_REG(TIMx->SR, ~(TIM_SR_CC3IF));
4344}
4345
4352__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3(const TIM_TypeDef *TIMx)
4353{
4354 return ((READ_BIT(TIMx->SR, TIM_SR_CC3IF) == (TIM_SR_CC3IF)) ? 1UL : 0UL);
4355}
4356
4363__STATIC_INLINE void LL_TIM_ClearFlag_CC4(TIM_TypeDef *TIMx)
4364{
4365 WRITE_REG(TIMx->SR, ~(TIM_SR_CC4IF));
4366}
4367
4374__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4(const TIM_TypeDef *TIMx)
4375{
4376 return ((READ_BIT(TIMx->SR, TIM_SR_CC4IF) == (TIM_SR_CC4IF)) ? 1UL : 0UL);
4377}
4378
4385__STATIC_INLINE void LL_TIM_ClearFlag_CC5(TIM_TypeDef *TIMx)
4386{
4387 WRITE_REG(TIMx->SR, ~(TIM_SR_CC5IF));
4388}
4389
4396__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC5(const TIM_TypeDef *TIMx)
4397{
4398 return ((READ_BIT(TIMx->SR, TIM_SR_CC5IF) == (TIM_SR_CC5IF)) ? 1UL : 0UL);
4399}
4400
4407__STATIC_INLINE void LL_TIM_ClearFlag_CC6(TIM_TypeDef *TIMx)
4408{
4409 WRITE_REG(TIMx->SR, ~(TIM_SR_CC6IF));
4410}
4411
4418__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC6(const TIM_TypeDef *TIMx)
4419{
4420 return ((READ_BIT(TIMx->SR, TIM_SR_CC6IF) == (TIM_SR_CC6IF)) ? 1UL : 0UL);
4421}
4422
4429__STATIC_INLINE void LL_TIM_ClearFlag_COM(TIM_TypeDef *TIMx)
4430{
4431 WRITE_REG(TIMx->SR, ~(TIM_SR_COMIF));
4432}
4433
4440__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_COM(const TIM_TypeDef *TIMx)
4441{
4442 return ((READ_BIT(TIMx->SR, TIM_SR_COMIF) == (TIM_SR_COMIF)) ? 1UL : 0UL);
4443}
4444
4451__STATIC_INLINE void LL_TIM_ClearFlag_TRIG(TIM_TypeDef *TIMx)
4452{
4453 WRITE_REG(TIMx->SR, ~(TIM_SR_TIF));
4454}
4455
4462__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_TRIG(const TIM_TypeDef *TIMx)
4463{
4464 return ((READ_BIT(TIMx->SR, TIM_SR_TIF) == (TIM_SR_TIF)) ? 1UL : 0UL);
4465}
4466
4473__STATIC_INLINE void LL_TIM_ClearFlag_BRK(TIM_TypeDef *TIMx)
4474{
4475 WRITE_REG(TIMx->SR, ~(TIM_SR_BIF));
4476}
4477
4484__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_BRK(const TIM_TypeDef *TIMx)
4485{
4486 return ((READ_BIT(TIMx->SR, TIM_SR_BIF) == (TIM_SR_BIF)) ? 1UL : 0UL);
4487}
4488
4495__STATIC_INLINE void LL_TIM_ClearFlag_BRK2(TIM_TypeDef *TIMx)
4496{
4497 WRITE_REG(TIMx->SR, ~(TIM_SR_B2IF));
4498}
4499
4506__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_BRK2(const TIM_TypeDef *TIMx)
4507{
4508 return ((READ_BIT(TIMx->SR, TIM_SR_B2IF) == (TIM_SR_B2IF)) ? 1UL : 0UL);
4509}
4510
4517__STATIC_INLINE void LL_TIM_ClearFlag_CC1OVR(TIM_TypeDef *TIMx)
4518{
4519 WRITE_REG(TIMx->SR, ~(TIM_SR_CC1OF));
4520}
4521
4529__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1OVR(const TIM_TypeDef *TIMx)
4530{
4531 return ((READ_BIT(TIMx->SR, TIM_SR_CC1OF) == (TIM_SR_CC1OF)) ? 1UL : 0UL);
4532}
4533
4540__STATIC_INLINE void LL_TIM_ClearFlag_CC2OVR(TIM_TypeDef *TIMx)
4541{
4542 WRITE_REG(TIMx->SR, ~(TIM_SR_CC2OF));
4543}
4544
4552__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2OVR(const TIM_TypeDef *TIMx)
4553{
4554 return ((READ_BIT(TIMx->SR, TIM_SR_CC2OF) == (TIM_SR_CC2OF)) ? 1UL : 0UL);
4555}
4556
4563__STATIC_INLINE void LL_TIM_ClearFlag_CC3OVR(TIM_TypeDef *TIMx)
4564{
4565 WRITE_REG(TIMx->SR, ~(TIM_SR_CC3OF));
4566}
4567
4575__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3OVR(const TIM_TypeDef *TIMx)
4576{
4577 return ((READ_BIT(TIMx->SR, TIM_SR_CC3OF) == (TIM_SR_CC3OF)) ? 1UL : 0UL);
4578}
4579
4586__STATIC_INLINE void LL_TIM_ClearFlag_CC4OVR(TIM_TypeDef *TIMx)
4587{
4588 WRITE_REG(TIMx->SR, ~(TIM_SR_CC4OF));
4589}
4590
4598__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4OVR(const TIM_TypeDef *TIMx)
4599{
4600 return ((READ_BIT(TIMx->SR, TIM_SR_CC4OF) == (TIM_SR_CC4OF)) ? 1UL : 0UL);
4601}
4602
4609__STATIC_INLINE void LL_TIM_ClearFlag_SYSBRK(TIM_TypeDef *TIMx)
4610{
4611 WRITE_REG(TIMx->SR, ~(TIM_SR_SBIF));
4612}
4613
4620__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_SYSBRK(const TIM_TypeDef *TIMx)
4621{
4622 return ((READ_BIT(TIMx->SR, TIM_SR_SBIF) == (TIM_SR_SBIF)) ? 1UL : 0UL);
4623}
4624
4639__STATIC_INLINE void LL_TIM_EnableIT_UPDATE(TIM_TypeDef *TIMx)
4640{
4641 SET_BIT(TIMx->DIER, TIM_DIER_UIE);
4642}
4643
4650__STATIC_INLINE void LL_TIM_DisableIT_UPDATE(TIM_TypeDef *TIMx)
4651{
4652 CLEAR_BIT(TIMx->DIER, TIM_DIER_UIE);
4653}
4654
4661__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_UPDATE(const TIM_TypeDef *TIMx)
4662{
4663 return ((READ_BIT(TIMx->DIER, TIM_DIER_UIE) == (TIM_DIER_UIE)) ? 1UL : 0UL);
4664}
4665
4672__STATIC_INLINE void LL_TIM_EnableIT_CC1(TIM_TypeDef *TIMx)
4673{
4674 SET_BIT(TIMx->DIER, TIM_DIER_CC1IE);
4675}
4676
4683__STATIC_INLINE void LL_TIM_DisableIT_CC1(TIM_TypeDef *TIMx)
4684{
4685 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC1IE);
4686}
4687
4694__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC1(const TIM_TypeDef *TIMx)
4695{
4696 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC1IE) == (TIM_DIER_CC1IE)) ? 1UL : 0UL);
4697}
4698
4705__STATIC_INLINE void LL_TIM_EnableIT_CC2(TIM_TypeDef *TIMx)
4706{
4707 SET_BIT(TIMx->DIER, TIM_DIER_CC2IE);
4708}
4709
4716__STATIC_INLINE void LL_TIM_DisableIT_CC2(TIM_TypeDef *TIMx)
4717{
4718 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC2IE);
4719}
4720
4727__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC2(const TIM_TypeDef *TIMx)
4728{
4729 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC2IE) == (TIM_DIER_CC2IE)) ? 1UL : 0UL);
4730}
4731
4738__STATIC_INLINE void LL_TIM_EnableIT_CC3(TIM_TypeDef *TIMx)
4739{
4740 SET_BIT(TIMx->DIER, TIM_DIER_CC3IE);
4741}
4742
4749__STATIC_INLINE void LL_TIM_DisableIT_CC3(TIM_TypeDef *TIMx)
4750{
4751 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC3IE);
4752}
4753
4760__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC3(const TIM_TypeDef *TIMx)
4761{
4762 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC3IE) == (TIM_DIER_CC3IE)) ? 1UL : 0UL);
4763}
4764
4771__STATIC_INLINE void LL_TIM_EnableIT_CC4(TIM_TypeDef *TIMx)
4772{
4773 SET_BIT(TIMx->DIER, TIM_DIER_CC4IE);
4774}
4775
4782__STATIC_INLINE void LL_TIM_DisableIT_CC4(TIM_TypeDef *TIMx)
4783{
4784 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC4IE);
4785}
4786
4793__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC4(const TIM_TypeDef *TIMx)
4794{
4795 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC4IE) == (TIM_DIER_CC4IE)) ? 1UL : 0UL);
4796}
4797
4804__STATIC_INLINE void LL_TIM_EnableIT_COM(TIM_TypeDef *TIMx)
4805{
4806 SET_BIT(TIMx->DIER, TIM_DIER_COMIE);
4807}
4808
4815__STATIC_INLINE void LL_TIM_DisableIT_COM(TIM_TypeDef *TIMx)
4816{
4817 CLEAR_BIT(TIMx->DIER, TIM_DIER_COMIE);
4818}
4819
4826__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_COM(const TIM_TypeDef *TIMx)
4827{
4828 return ((READ_BIT(TIMx->DIER, TIM_DIER_COMIE) == (TIM_DIER_COMIE)) ? 1UL : 0UL);
4829}
4830
4837__STATIC_INLINE void LL_TIM_EnableIT_TRIG(TIM_TypeDef *TIMx)
4838{
4839 SET_BIT(TIMx->DIER, TIM_DIER_TIE);
4840}
4841
4848__STATIC_INLINE void LL_TIM_DisableIT_TRIG(TIM_TypeDef *TIMx)
4849{
4850 CLEAR_BIT(TIMx->DIER, TIM_DIER_TIE);
4851}
4852
4859__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_TRIG(const TIM_TypeDef *TIMx)
4860{
4861 return ((READ_BIT(TIMx->DIER, TIM_DIER_TIE) == (TIM_DIER_TIE)) ? 1UL : 0UL);
4862}
4863
4870__STATIC_INLINE void LL_TIM_EnableIT_BRK(TIM_TypeDef *TIMx)
4871{
4872 SET_BIT(TIMx->DIER, TIM_DIER_BIE);
4873}
4874
4881__STATIC_INLINE void LL_TIM_DisableIT_BRK(TIM_TypeDef *TIMx)
4882{
4883 CLEAR_BIT(TIMx->DIER, TIM_DIER_BIE);
4884}
4885
4892__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_BRK(const TIM_TypeDef *TIMx)
4893{
4894 return ((READ_BIT(TIMx->DIER, TIM_DIER_BIE) == (TIM_DIER_BIE)) ? 1UL : 0UL);
4895}
4896
4911__STATIC_INLINE void LL_TIM_EnableDMAReq_UPDATE(TIM_TypeDef *TIMx)
4912{
4913 SET_BIT(TIMx->DIER, TIM_DIER_UDE);
4914}
4915
4922__STATIC_INLINE void LL_TIM_DisableDMAReq_UPDATE(TIM_TypeDef *TIMx)
4923{
4924 CLEAR_BIT(TIMx->DIER, TIM_DIER_UDE);
4925}
4926
4933__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_UPDATE(const TIM_TypeDef *TIMx)
4934{
4935 return ((READ_BIT(TIMx->DIER, TIM_DIER_UDE) == (TIM_DIER_UDE)) ? 1UL : 0UL);
4936}
4937
4944__STATIC_INLINE void LL_TIM_EnableDMAReq_CC1(TIM_TypeDef *TIMx)
4945{
4946 SET_BIT(TIMx->DIER, TIM_DIER_CC1DE);
4947}
4948
4955__STATIC_INLINE void LL_TIM_DisableDMAReq_CC1(TIM_TypeDef *TIMx)
4956{
4957 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC1DE);
4958}
4959
4966__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC1(const TIM_TypeDef *TIMx)
4967{
4968 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC1DE) == (TIM_DIER_CC1DE)) ? 1UL : 0UL);
4969}
4970
4977__STATIC_INLINE void LL_TIM_EnableDMAReq_CC2(TIM_TypeDef *TIMx)
4978{
4979 SET_BIT(TIMx->DIER, TIM_DIER_CC2DE);
4980}
4981
4988__STATIC_INLINE void LL_TIM_DisableDMAReq_CC2(TIM_TypeDef *TIMx)
4989{
4990 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC2DE);
4991}
4992
4999__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC2(const TIM_TypeDef *TIMx)
5000{
5001 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC2DE) == (TIM_DIER_CC2DE)) ? 1UL : 0UL);
5002}
5003
5010__STATIC_INLINE void LL_TIM_EnableDMAReq_CC3(TIM_TypeDef *TIMx)
5011{
5012 SET_BIT(TIMx->DIER, TIM_DIER_CC3DE);
5013}
5014
5021__STATIC_INLINE void LL_TIM_DisableDMAReq_CC3(TIM_TypeDef *TIMx)
5022{
5023 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC3DE);
5024}
5025
5032__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC3(const TIM_TypeDef *TIMx)
5033{
5034 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC3DE) == (TIM_DIER_CC3DE)) ? 1UL : 0UL);
5035}
5036
5043__STATIC_INLINE void LL_TIM_EnableDMAReq_CC4(TIM_TypeDef *TIMx)
5044{
5045 SET_BIT(TIMx->DIER, TIM_DIER_CC4DE);
5046}
5047
5054__STATIC_INLINE void LL_TIM_DisableDMAReq_CC4(TIM_TypeDef *TIMx)
5055{
5056 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC4DE);
5057}
5058
5065__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC4(const TIM_TypeDef *TIMx)
5066{
5067 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC4DE) == (TIM_DIER_CC4DE)) ? 1UL : 0UL);
5068}
5069
5076__STATIC_INLINE void LL_TIM_EnableDMAReq_COM(TIM_TypeDef *TIMx)
5077{
5078 SET_BIT(TIMx->DIER, TIM_DIER_COMDE);
5079}
5080
5087__STATIC_INLINE void LL_TIM_DisableDMAReq_COM(TIM_TypeDef *TIMx)
5088{
5089 CLEAR_BIT(TIMx->DIER, TIM_DIER_COMDE);
5090}
5091
5098__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_COM(const TIM_TypeDef *TIMx)
5099{
5100 return ((READ_BIT(TIMx->DIER, TIM_DIER_COMDE) == (TIM_DIER_COMDE)) ? 1UL : 0UL);
5101}
5102
5109__STATIC_INLINE void LL_TIM_EnableDMAReq_TRIG(TIM_TypeDef *TIMx)
5110{
5111 SET_BIT(TIMx->DIER, TIM_DIER_TDE);
5112}
5113
5120__STATIC_INLINE void LL_TIM_DisableDMAReq_TRIG(TIM_TypeDef *TIMx)
5121{
5122 CLEAR_BIT(TIMx->DIER, TIM_DIER_TDE);
5123}
5124
5131__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_TRIG(const TIM_TypeDef *TIMx)
5132{
5133 return ((READ_BIT(TIMx->DIER, TIM_DIER_TDE) == (TIM_DIER_TDE)) ? 1UL : 0UL);
5134}
5135
5150__STATIC_INLINE void LL_TIM_GenerateEvent_UPDATE(TIM_TypeDef *TIMx)
5151{
5152 SET_BIT(TIMx->EGR, TIM_EGR_UG);
5153}
5154
5161__STATIC_INLINE void LL_TIM_GenerateEvent_CC1(TIM_TypeDef *TIMx)
5162{
5163 SET_BIT(TIMx->EGR, TIM_EGR_CC1G);
5164}
5165
5172__STATIC_INLINE void LL_TIM_GenerateEvent_CC2(TIM_TypeDef *TIMx)
5173{
5174 SET_BIT(TIMx->EGR, TIM_EGR_CC2G);
5175}
5176
5183__STATIC_INLINE void LL_TIM_GenerateEvent_CC3(TIM_TypeDef *TIMx)
5184{
5185 SET_BIT(TIMx->EGR, TIM_EGR_CC3G);
5186}
5187
5194__STATIC_INLINE void LL_TIM_GenerateEvent_CC4(TIM_TypeDef *TIMx)
5195{
5196 SET_BIT(TIMx->EGR, TIM_EGR_CC4G);
5197}
5198
5205__STATIC_INLINE void LL_TIM_GenerateEvent_COM(TIM_TypeDef *TIMx)
5206{
5207 SET_BIT(TIMx->EGR, TIM_EGR_COMG);
5208}
5209
5216__STATIC_INLINE void LL_TIM_GenerateEvent_TRIG(TIM_TypeDef *TIMx)
5217{
5218 SET_BIT(TIMx->EGR, TIM_EGR_TG);
5219}
5220
5227__STATIC_INLINE void LL_TIM_GenerateEvent_BRK(TIM_TypeDef *TIMx)
5228{
5229 SET_BIT(TIMx->EGR, TIM_EGR_BG);
5230}
5231
5238__STATIC_INLINE void LL_TIM_GenerateEvent_BRK2(TIM_TypeDef *TIMx)
5239{
5240 SET_BIT(TIMx->EGR, TIM_EGR_B2G);
5241}
5242
5247#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
5253ErrorStatus LL_TIM_DeInit(TIM_TypeDef *TIMx);
5254void LL_TIM_StructInit(LL_TIM_InitTypeDef *TIM_InitStruct);
5255ErrorStatus LL_TIM_Init(TIM_TypeDef *TIMx, const LL_TIM_InitTypeDef *TIM_InitStruct);
5256void LL_TIM_OC_StructInit(LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct);
5257ErrorStatus LL_TIM_OC_Init(TIM_TypeDef *TIMx, uint32_t Channel, const LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct);
5258void LL_TIM_IC_StructInit(LL_TIM_IC_InitTypeDef *TIM_ICInitStruct);
5259ErrorStatus LL_TIM_IC_Init(TIM_TypeDef *TIMx, uint32_t Channel, const LL_TIM_IC_InitTypeDef *TIM_IC_InitStruct);
5260void LL_TIM_ENCODER_StructInit(LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct);
5261ErrorStatus LL_TIM_ENCODER_Init(TIM_TypeDef *TIMx, const LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct);
5262void LL_TIM_HALLSENSOR_StructInit(LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct);
5263ErrorStatus LL_TIM_HALLSENSOR_Init(TIM_TypeDef *TIMx, const LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct);
5264void LL_TIM_BDTR_StructInit(LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct);
5265ErrorStatus LL_TIM_BDTR_Init(TIM_TypeDef *TIMx, const LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct);
5269#endif /* USE_FULL_LL_DRIVER */
5270
5279#endif /* TIM1 || TIM2 || TIM3 || TIM4 || TIM5 || TIM6 || TIM7 || TIM8 || TIM12 || TIM13 ||TIM14 || TIM15 || TIM16 || TIM17 || TIM23 || TIM24 */
5280
5285#ifdef __cplusplus
5286}
5287#endif
5288
5289#endif /* __STM32H7xx_LL_TIM_H */
#define __IO
Definition: core_cm4.h:239
@ RESET
Definition: xnandpsu_onfi.h:172
#define TIM_EGR_CC3G
Definition: stm32h723xx.h:19448
#define TIM_CR1_URS
Definition: stm32h723xx.h:19211
#define TIM_EGR_BG
Definition: stm32h723xx.h:19460
#define TIM_EGR_CC1G
Definition: stm32h723xx.h:19442
#define TIM_CCER_CC1P
Definition: stm32h723xx.h:19634
#define TIM_SMCR_ETPS
Definition: stm32h723xx.h:19328
#define TIM_DIER_CC3DE
Definition: stm32h723xx.h:19375
#define TIM_EGR_UG
Definition: stm32h723xx.h:19439
#define TIM_CCMR1_OC1PE
Definition: stm32h723xx.h:19478
#define TIM_DIER_CC1IE
Definition: stm32h723xx.h:19345
#define TIM_EGR_CC4G
Definition: stm32h723xx.h:19451
#define TIM_DIER_BIE
Definition: stm32h723xx.h:19363
#define TIM_SR_CC5IF
Definition: stm32h723xx.h:19428
#define TIM_SR_CC2IF
Definition: stm32h723xx.h:19395
#define TIM_BDTR_MOE
Definition: stm32h723xx.h:19783
#define TIM_SMCR_ETP
Definition: stm32h723xx.h:19337
#define TIM_EGR_TG
Definition: stm32h723xx.h:19457
#define TIM_BDTR_BKDSRM
Definition: stm32h723xx.h:19800
#define TIM_CR2_OIS1
Definition: stm32h723xx.h:19262
#define TIM_BDTR_BKP
Definition: stm32h723xx.h:19777
#define TIM_SMCR_ECE
Definition: stm32h723xx.h:19334
#define TIM_CR1_CMS
Definition: stm32h723xx.h:19221
#define TIM_SR_CC2OF
Definition: stm32h723xx.h:19419
#define TIM_CCER_CC1NP
Definition: stm32h723xx.h:19640
#define TIM_EGR_B2G
Definition: stm32h723xx.h:19463
#define TIM_SR_CC1IF
Definition: stm32h723xx.h:19392
#define TIM_CR1_ARPE
Definition: stm32h723xx.h:19227
#define TIM_DIER_CC3IE
Definition: stm32h723xx.h:19351
#define TIM_BDTR_BK2E
Definition: stm32h723xx.h:19794
#define TIM_TISEL_TI1SEL
Definition: stm32h723xx.h:19930
#define TIM_SMCR_MSM
Definition: stm32h723xx.h:19316
#define TIM_EGR_CC2G
Definition: stm32h723xx.h:19445
#define TIM_CCR5_CCR5
Definition: stm32h723xx.h:19731
#define TIM_BDTR_BKBID
Definition: stm32h723xx.h:19806
#define TIM_DIER_CC2DE
Definition: stm32h723xx.h:19372
#define TIM_BDTR_AOE
Definition: stm32h723xx.h:19780
#define TIM_DIER_TDE
Definition: stm32h723xx.h:19384
#define TIM_DIER_UIE
Definition: stm32h723xx.h:19342
#define TIM_CCR5_GC5C2
Definition: stm32h723xx.h:19737
#define TIM_DIER_CC4IE
Definition: stm32h723xx.h:19354
#define TIM_CR1_OPM
Definition: stm32h723xx.h:19214
#define TIM_SR_BIF
Definition: stm32h723xx.h:19410
#define TIM_CCMR1_OC1M
Definition: stm32h723xx.h:19482
#define TIM_BDTR_BKE
Definition: stm32h723xx.h:19774
#define TIM_DIER_CC2IE
Definition: stm32h723xx.h:19348
#define TIM_BDTR_BK2DSRM
Definition: stm32h723xx.h:19803
#define TIM_DIER_COMDE
Definition: stm32h723xx.h:19381
#define TIM_TISEL_TI3SEL
Definition: stm32h723xx.h:19946
#define TIM_SR_TIF
Definition: stm32h723xx.h:19407
#define TIM_BDTR_LOCK
Definition: stm32h723xx.h:19762
#define TIM_TISEL_TI4SEL
Definition: stm32h723xx.h:19954
#define TIM_SR_CC1OF
Definition: stm32h723xx.h:19416
#define TIM_SR_CC4OF
Definition: stm32h723xx.h:19425
#define TIM_SMCR_TS
Definition: stm32h723xx.h:19307
#define TIM_CCMR1_OC1CE
Definition: stm32h723xx.h:19490
#define TIM_CNT_UIFCPY
Definition: stm32h723xx.h:19692
#define TIM_SR_COMIF
Definition: stm32h723xx.h:19404
#define TIM_CR1_CEN
Definition: stm32h723xx.h:19205
#define TIM_BDTR_BK2P
Definition: stm32h723xx.h:19797
#define TIM_CCMR1_CC1S
Definition: stm32h723xx.h:19469
#define TIM_CR1_UDIS
Definition: stm32h723xx.h:19208
#define TIM_DIER_TIE
Definition: stm32h723xx.h:19360
#define TIM_CR2_MMS
Definition: stm32h723xx.h:19252
#define TIM_CCR5_GC5C3
Definition: stm32h723xx.h:19740
#define TIM_DIER_CC4DE
Definition: stm32h723xx.h:19378
#define TIM_CR2_CCPC
Definition: stm32h723xx.h:19242
#define TIM_CCMR1_IC1F
Definition: stm32h723xx.h:19527
#define TIM_BDTR_OSSI
Definition: stm32h723xx.h:19768
#define TIM_BDTR_BK2BID
Definition: stm32h723xx.h:19809
#define TIM_CCMR1_IC1PSC
Definition: stm32h723xx.h:19521
#define TIM_CCMR1_OC1FE
Definition: stm32h723xx.h:19475
#define TIM_DCR_DBL
Definition: stm32h723xx.h:19823
#define TIM_DIER_UDE
Definition: stm32h723xx.h:19366
#define TIM_BDTR_DTG
Definition: stm32h723xx.h:19750
#define TIM_DCR_DBA
Definition: stm32h723xx.h:19814
#define TIM_SR_UIF
Definition: stm32h723xx.h:19389
#define TIM_CR1_CKD
Definition: stm32h723xx.h:19231
#define TIM_SR_CC4IF
Definition: stm32h723xx.h:19401
#define TIM_BDTR_BK2F
Definition: stm32h723xx.h:19790
#define TIM_CR1_DIR
Definition: stm32h723xx.h:19217
#define TIM_CR2_TI1S
Definition: stm32h723xx.h:19259
#define TIM_SR_CC6IF
Definition: stm32h723xx.h:19431
#define TIM_SR_CC3IF
Definition: stm32h723xx.h:19398
#define TIM_EGR_COMG
Definition: stm32h723xx.h:19454
#define TIM_CCR5_GC5C1
Definition: stm32h723xx.h:19734
#define TIM_CR2_CCDS
Definition: stm32h723xx.h:19248
#define TIM_DIER_COMIE
Definition: stm32h723xx.h:19357
#define TIM_DIER_CC1DE
Definition: stm32h723xx.h:19369
#define TIM_CR2_MMS2
Definition: stm32h723xx.h:19290
#define TIM_BDTR_BKF
Definition: stm32h723xx.h:19787
#define TIM_SMCR_ETF
Definition: stm32h723xx.h:19320
#define TIM_SR_SBIF
Definition: stm32h723xx.h:19434
#define TIM_SMCR_SMS
Definition: stm32h723xx.h:19299
#define TIM_SR_B2IF
Definition: stm32h723xx.h:19413
#define TIM_CR2_CCUS
Definition: stm32h723xx.h:19245
#define TIM_CR1_UIFREMAP
Definition: stm32h723xx.h:19237
#define TIM_SR_CC3OF
Definition: stm32h723xx.h:19422
#define TIM_BDTR_OSSR
Definition: stm32h723xx.h:19771
#define TIM_TISEL_TI2SEL
Definition: stm32h723xx.h:19938
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
TIM.
Definition: stm32h723xx.h:1525
__IO uint32_t EGR
Definition: stm32h723xx.h:1531
__IO uint32_t CCR1
Definition: stm32h723xx.h:1539
__IO uint32_t CCMR1
Definition: stm32h723xx.h:1532
__IO uint32_t BDTR
Definition: stm32h723xx.h:1543
__IO uint32_t DIER
Definition: stm32h723xx.h:1529
__IO uint32_t CCR6
Definition: stm32h723xx.h:1549
__IO uint32_t TISEL
Definition: stm32h723xx.h:1552
__IO uint32_t CCR2
Definition: stm32h723xx.h:1540
__IO uint32_t CCR4
Definition: stm32h723xx.h:1542
__IO uint32_t SMCR
Definition: stm32h723xx.h:1528
__IO uint32_t ARR
Definition: stm32h723xx.h:1537
__IO uint32_t CR2
Definition: stm32h723xx.h:1527
__IO uint32_t CNT
Definition: stm32h723xx.h:1535
__IO uint32_t AF1
Definition: stm32h723xx.h:1550
__IO uint32_t DCR
Definition: stm32h723xx.h:1544
__IO uint32_t CR1
Definition: stm32h723xx.h:1526
__IO uint32_t CCR3
Definition: stm32h723xx.h:1541
__IO uint32_t SR
Definition: stm32h723xx.h:1530
__IO uint32_t PSC
Definition: stm32h723xx.h:1536
__IO uint32_t RCR
Definition: stm32h723xx.h:1538
__IO uint32_t CCER
Definition: stm32h723xx.h:1534
__IO uint32_t CCR5
Definition: stm32h723xx.h:1548