RTEMS 6.1-rc4
Loading...
Searching...
No Matches
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
764#define LL_TIM_OCMODE_ASSYMETRIC_PWM1 LL_TIM_OCMODE_ASYMMETRIC_PWM1
765#define LL_TIM_OCMODE_ASSYMETRIC_PWM2 LL_TIM_OCMODE_ASYMMETRIC_PWM2
774#define LL_TIM_OCMODE_FROZEN 0x00000000U
775#define LL_TIM_OCMODE_ACTIVE TIM_CCMR1_OC1M_0
776#define LL_TIM_OCMODE_INACTIVE TIM_CCMR1_OC1M_1
777#define LL_TIM_OCMODE_TOGGLE (TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0)
778#define LL_TIM_OCMODE_FORCED_INACTIVE TIM_CCMR1_OC1M_2
779#define LL_TIM_OCMODE_FORCED_ACTIVE (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0)
780#define LL_TIM_OCMODE_PWM1 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1)
781#define LL_TIM_OCMODE_PWM2 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0)
782#define LL_TIM_OCMODE_RETRIG_OPM1 TIM_CCMR1_OC1M_3
783#define LL_TIM_OCMODE_RETRIG_OPM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0)
784#define LL_TIM_OCMODE_COMBINED_PWM1 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_2)
785#define LL_TIM_OCMODE_COMBINED_PWM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0 | TIM_CCMR1_OC1M_2)
786#define LL_TIM_OCMODE_ASYMMETRIC_PWM1 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_2)
787#define LL_TIM_OCMODE_ASYMMETRIC_PWM2 (TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M)
796#define LL_TIM_OCPOLARITY_HIGH 0x00000000U
797#define LL_TIM_OCPOLARITY_LOW TIM_CCER_CC1P
806#define LL_TIM_OCIDLESTATE_LOW 0x00000000U
807#define LL_TIM_OCIDLESTATE_HIGH TIM_CR2_OIS1
816#define LL_TIM_GROUPCH5_NONE 0x00000000U
817#define LL_TIM_GROUPCH5_OC1REFC TIM_CCR5_GC5C1
818#define LL_TIM_GROUPCH5_OC2REFC TIM_CCR5_GC5C2
819#define LL_TIM_GROUPCH5_OC3REFC TIM_CCR5_GC5C3
828#define LL_TIM_ACTIVEINPUT_DIRECTTI (TIM_CCMR1_CC1S_0 << 16U)
829#define LL_TIM_ACTIVEINPUT_INDIRECTTI (TIM_CCMR1_CC1S_1 << 16U)
830#define LL_TIM_ACTIVEINPUT_TRC (TIM_CCMR1_CC1S << 16U)
839#define LL_TIM_ICPSC_DIV1 0x00000000U
840#define LL_TIM_ICPSC_DIV2 (TIM_CCMR1_IC1PSC_0 << 16U)
841#define LL_TIM_ICPSC_DIV4 (TIM_CCMR1_IC1PSC_1 << 16U)
842#define LL_TIM_ICPSC_DIV8 (TIM_CCMR1_IC1PSC << 16U)
851#define LL_TIM_IC_FILTER_FDIV1 0x00000000U
852#define LL_TIM_IC_FILTER_FDIV1_N2 (TIM_CCMR1_IC1F_0 << 16U)
853#define LL_TIM_IC_FILTER_FDIV1_N4 (TIM_CCMR1_IC1F_1 << 16U)
854#define LL_TIM_IC_FILTER_FDIV1_N8 ((TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U)
855#define LL_TIM_IC_FILTER_FDIV2_N6 (TIM_CCMR1_IC1F_2 << 16U)
856#define LL_TIM_IC_FILTER_FDIV2_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U)
857#define LL_TIM_IC_FILTER_FDIV4_N6 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U)
858#define LL_TIM_IC_FILTER_FDIV4_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U)
859#define LL_TIM_IC_FILTER_FDIV8_N6 (TIM_CCMR1_IC1F_3 << 16U)
860#define LL_TIM_IC_FILTER_FDIV8_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_0) << 16U)
861#define LL_TIM_IC_FILTER_FDIV16_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1) << 16U)
862#define LL_TIM_IC_FILTER_FDIV16_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U)
863#define LL_TIM_IC_FILTER_FDIV16_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2) << 16U)
864#define LL_TIM_IC_FILTER_FDIV32_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U)
865#define LL_TIM_IC_FILTER_FDIV32_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U)
866#define LL_TIM_IC_FILTER_FDIV32_N8 (TIM_CCMR1_IC1F << 16U)
875#define LL_TIM_IC_POLARITY_RISING 0x00000000U
876#define LL_TIM_IC_POLARITY_FALLING TIM_CCER_CC1P
877#define LL_TIM_IC_POLARITY_BOTHEDGE (TIM_CCER_CC1P | TIM_CCER_CC1NP)
886#define LL_TIM_CLOCKSOURCE_INTERNAL 0x00000000U
887#define LL_TIM_CLOCKSOURCE_EXT_MODE1 (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0)
888#define LL_TIM_CLOCKSOURCE_EXT_MODE2 TIM_SMCR_ECE
897#define LL_TIM_ENCODERMODE_X2_TI1 TIM_SMCR_SMS_0
898#define LL_TIM_ENCODERMODE_X2_TI2 TIM_SMCR_SMS_1
899#define LL_TIM_ENCODERMODE_X4_TI12 (TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0)
908#define LL_TIM_TRGO_RESET 0x00000000U
909#define LL_TIM_TRGO_ENABLE TIM_CR2_MMS_0
910#define LL_TIM_TRGO_UPDATE TIM_CR2_MMS_1
911#define LL_TIM_TRGO_CC1IF (TIM_CR2_MMS_1 | TIM_CR2_MMS_0)
912#define LL_TIM_TRGO_OC1REF TIM_CR2_MMS_2
913#define LL_TIM_TRGO_OC2REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_0)
914#define LL_TIM_TRGO_OC3REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_1)
915#define LL_TIM_TRGO_OC4REF (TIM_CR2_MMS_2 | TIM_CR2_MMS_1 | TIM_CR2_MMS_0)
924#define LL_TIM_TRGO2_RESET 0x00000000U
925#define LL_TIM_TRGO2_ENABLE TIM_CR2_MMS2_0
926#define LL_TIM_TRGO2_UPDATE TIM_CR2_MMS2_1
927#define LL_TIM_TRGO2_CC1F (TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
928#define LL_TIM_TRGO2_OC1 TIM_CR2_MMS2_2
929#define LL_TIM_TRGO2_OC2 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0)
930#define LL_TIM_TRGO2_OC3 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1)
931#define LL_TIM_TRGO2_OC4 (TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
932#define LL_TIM_TRGO2_OC5 TIM_CR2_MMS2_3
933#define LL_TIM_TRGO2_OC6 (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_0)
934#define LL_TIM_TRGO2_OC4_RISINGFALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1)
935#define LL_TIM_TRGO2_OC6_RISINGFALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
936#define LL_TIM_TRGO2_OC4_RISING_OC6_RISING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2)
937#define LL_TIM_TRGO2_OC4_RISING_OC6_FALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0)
938#define LL_TIM_TRGO2_OC5_RISING_OC6_RISING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 |TIM_CR2_MMS2_1)
939#define LL_TIM_TRGO2_OC5_RISING_OC6_FALLING (TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0)
948#define LL_TIM_SLAVEMODE_DISABLED 0x00000000U
949#define LL_TIM_SLAVEMODE_RESET TIM_SMCR_SMS_2
950#define LL_TIM_SLAVEMODE_GATED (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_0)
951#define LL_TIM_SLAVEMODE_TRIGGER (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1)
952#define LL_TIM_SLAVEMODE_COMBINED_RESETTRIGGER TIM_SMCR_SMS_3
961#define LL_TIM_TS_ITR0 0x00000000U
962#define LL_TIM_TS_ITR1 TIM_SMCR_TS_0
963#define LL_TIM_TS_ITR2 TIM_SMCR_TS_1
964#define LL_TIM_TS_ITR3 (TIM_SMCR_TS_0 | TIM_SMCR_TS_1)
965#define LL_TIM_TS_ITR4 (TIM_SMCR_TS_3)
966#define LL_TIM_TS_ITR5 (TIM_SMCR_TS_0 | TIM_SMCR_TS_3)
967#define LL_TIM_TS_ITR6 (TIM_SMCR_TS_1 | TIM_SMCR_TS_3)
968#define LL_TIM_TS_ITR7 (TIM_SMCR_TS_0 | TIM_SMCR_TS_1 | TIM_SMCR_TS_3)
969#define LL_TIM_TS_ITR8 (TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
970#define LL_TIM_TS_ITR9 (TIM_SMCR_TS_0 | TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
971#define LL_TIM_TS_ITR10 (TIM_SMCR_TS_1 | TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
972#define LL_TIM_TS_ITR11 (TIM_SMCR_TS_0 | TIM_SMCR_TS_1 | TIM_SMCR_TS_2 | TIM_SMCR_TS_3)
973#define LL_TIM_TS_ITR12 (TIM_SMCR_TS_4)
974#define LL_TIM_TS_ITR13 (TIM_SMCR_TS_0 | TIM_SMCR_TS_4)
975#define LL_TIM_TS_TI1F_ED TIM_SMCR_TS_2
976#define LL_TIM_TS_TI1FP1 (TIM_SMCR_TS_2 | TIM_SMCR_TS_0)
977#define LL_TIM_TS_TI2FP2 (TIM_SMCR_TS_2 | TIM_SMCR_TS_1)
978#define LL_TIM_TS_ETRF (TIM_SMCR_TS_2 | TIM_SMCR_TS_1 | TIM_SMCR_TS_0)
987#define LL_TIM_ETR_POLARITY_NONINVERTED 0x00000000U
988#define LL_TIM_ETR_POLARITY_INVERTED TIM_SMCR_ETP
997#define LL_TIM_ETR_PRESCALER_DIV1 0x00000000U
998#define LL_TIM_ETR_PRESCALER_DIV2 TIM_SMCR_ETPS_0
999#define LL_TIM_ETR_PRESCALER_DIV4 TIM_SMCR_ETPS_1
1000#define LL_TIM_ETR_PRESCALER_DIV8 TIM_SMCR_ETPS
1009#define LL_TIM_ETR_FILTER_FDIV1 0x00000000U
1010#define LL_TIM_ETR_FILTER_FDIV1_N2 TIM_SMCR_ETF_0
1011#define LL_TIM_ETR_FILTER_FDIV1_N4 TIM_SMCR_ETF_1
1012#define LL_TIM_ETR_FILTER_FDIV1_N8 (TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0)
1013#define LL_TIM_ETR_FILTER_FDIV2_N6 TIM_SMCR_ETF_2
1014#define LL_TIM_ETR_FILTER_FDIV2_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0)
1015#define LL_TIM_ETR_FILTER_FDIV4_N6 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1)
1016#define LL_TIM_ETR_FILTER_FDIV4_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0)
1017#define LL_TIM_ETR_FILTER_FDIV8_N6 TIM_SMCR_ETF_3
1018#define LL_TIM_ETR_FILTER_FDIV8_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_0)
1019#define LL_TIM_ETR_FILTER_FDIV16_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1)
1020#define LL_TIM_ETR_FILTER_FDIV16_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0)
1021#define LL_TIM_ETR_FILTER_FDIV16_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2)
1022#define LL_TIM_ETR_FILTER_FDIV32_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0)
1023#define LL_TIM_ETR_FILTER_FDIV32_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1)
1024#define LL_TIM_ETR_FILTER_FDIV32_N8 TIM_SMCR_ETF
1029#define LL_TIM_TIM1_ETRSOURCE_GPIO 0x00000000U
1030#define LL_TIM_TIM1_ETRSOURCE_COMP1 TIM1_AF1_ETRSEL_0
1031#define LL_TIM_TIM1_ETRSOURCE_COMP2 TIM1_AF1_ETRSEL_1
1032#define LL_TIM_TIM1_ETRSOURCE_ADC1_AWD1 (TIM1_AF1_ETRSEL_1 | TIM1_AF1_ETRSEL_0)
1033#define LL_TIM_TIM1_ETRSOURCE_ADC1_AWD2 (TIM1_AF1_ETRSEL_2)
1034#define LL_TIM_TIM1_ETRSOURCE_ADC1_AWD3 (TIM1_AF1_ETRSEL_2 | TIM1_AF1_ETRSEL_0)
1035#define LL_TIM_TIM1_ETRSOURCE_ADC3_AWD1 (TIM1_AF1_ETRSEL_2 | TIM1_AF1_ETRSEL_1)
1036#define LL_TIM_TIM1_ETRSOURCE_ADC3_AWD2 (TIM1_AF1_ETRSEL_2 | TIM1_AF1_ETRSEL_1 | TIM1_AF1_ETRSEL_0)
1037#define LL_TIM_TIM1_ETRSOURCE_ADC3_AWD3 TIM1_AF1_ETRSEL_3
1039#define LL_TIM_TIM8_ETRSOURCE_GPIO 0x00000000U
1040#define LL_TIM_TIM8_ETRSOURCE_COMP1 TIM8_AF1_ETRSEL_0
1041#define LL_TIM_TIM8_ETRSOURCE_COMP2 TIM8_AF1_ETRSEL_1
1042#define LL_TIM_TIM8_ETRSOURCE_ADC2_AWD1 (TIM8_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1043#define LL_TIM_TIM8_ETRSOURCE_ADC2_AWD2 (TIM8_AF1_ETRSEL_2)
1044#define LL_TIM_TIM8_ETRSOURCE_ADC2_AWD3 (TIM8_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_0)
1045#define LL_TIM_TIM8_ETRSOURCE_ADC3_AWD1 (TIM8_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_1)
1046#define LL_TIM_TIM8_ETRSOURCE_ADC3_AWD2 (TIM8_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1047#define LL_TIM_TIM8_ETRSOURCE_ADC3_AWD3 TIM8_AF1_ETRSEL_3
1049#define LL_TIM_TIM2_ETRSOURCE_GPIO 0x00000000U
1050#define LL_TIM_TIM2_ETRSOURCE_COMP1 (TIM2_AF1_ETRSEL_0)
1051#define LL_TIM_TIM2_ETRSOURCE_COMP2 (TIM2_AF1_ETRSEL_1)
1052#define LL_TIM_TIM2_ETRSOURCE_RCC_LSE (TIM2_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1053#define LL_TIM_TIM2_ETRSOURCE_SAI1_FSA TIM2_AF1_ETRSEL_2
1054#define LL_TIM_TIM2_ETRSOURCE_SAI1_FSB (TIM2_AF1_ETRSEL_2 | TIM8_AF1_ETRSEL_0)
1056#define LL_TIM_TIM3_ETRSOURCE_GPIO 0x00000000U
1057#define LL_TIM_TIM3_ETRSOURCE_COMP1 TIM3_AF1_ETRSEL_0
1059#define LL_TIM_TIM5_ETRSOURCE_GPIO 0x00000000U
1060#define LL_TIM_TIM5_ETRSOURCE_SAI2_FSA TIM5_AF1_ETRSEL_0
1061#define LL_TIM_TIM5_ETRSOURCE_SAI2_FSB TIM5_AF1_ETRSEL_1
1062#define LL_TIM_TIM5_ETRSOURCE_SAI4_FSA TIM5_AF1_ETRSEL_0
1063#define LL_TIM_TIM5_ETRSOURCE_SAI4_FSB TIM5_AF1_ETRSEL_1
1065#define LL_TIM_TIM23_ETRSOURCE_GPIO 0x00000000U
1066#define LL_TIM_TIM23_ETRSOURCE_COMP1 (TIM2_AF1_ETRSEL_0)
1067#define LL_TIM_TIM23_ETRSOURCE_COMP2 (TIM2_AF1_ETRSEL_1)
1069#define LL_TIM_TIM24_ETRSOURCE_GPIO 0x00000000U
1070#define LL_TIM_TIM24_ETRSOURCE_SAI4_FSA TIM5_AF1_ETRSEL_0
1071#define LL_TIM_TIM24_ETRSOURCE_SAI4_FSB TIM5_AF1_ETRSEL_1
1072#define LL_TIM_TIM24_ETRSOURCE_SAI1_FSA (TIM2_AF1_ETRSEL_1 | TIM8_AF1_ETRSEL_0)
1073#define LL_TIM_TIM24_ETRSOURCE_SAI1_FSB TIM2_AF1_ETRSEL_2
1079#define LL_TIM_BREAK_POLARITY_LOW 0x00000000U
1080#define LL_TIM_BREAK_POLARITY_HIGH TIM_BDTR_BKP
1089#define LL_TIM_BREAK_FILTER_FDIV1 0x00000000U
1090#define LL_TIM_BREAK_FILTER_FDIV1_N2 0x00010000U
1091#define LL_TIM_BREAK_FILTER_FDIV1_N4 0x00020000U
1092#define LL_TIM_BREAK_FILTER_FDIV1_N8 0x00030000U
1093#define LL_TIM_BREAK_FILTER_FDIV2_N6 0x00040000U
1094#define LL_TIM_BREAK_FILTER_FDIV2_N8 0x00050000U
1095#define LL_TIM_BREAK_FILTER_FDIV4_N6 0x00060000U
1096#define LL_TIM_BREAK_FILTER_FDIV4_N8 0x00070000U
1097#define LL_TIM_BREAK_FILTER_FDIV8_N6 0x00080000U
1098#define LL_TIM_BREAK_FILTER_FDIV8_N8 0x00090000U
1099#define LL_TIM_BREAK_FILTER_FDIV16_N5 0x000A0000U
1100#define LL_TIM_BREAK_FILTER_FDIV16_N6 0x000B0000U
1101#define LL_TIM_BREAK_FILTER_FDIV16_N8 0x000C0000U
1102#define LL_TIM_BREAK_FILTER_FDIV32_N5 0x000D0000U
1103#define LL_TIM_BREAK_FILTER_FDIV32_N6 0x000E0000U
1104#define LL_TIM_BREAK_FILTER_FDIV32_N8 0x000F0000U
1113#define LL_TIM_BREAK2_POLARITY_LOW 0x00000000U
1114#define LL_TIM_BREAK2_POLARITY_HIGH TIM_BDTR_BK2P
1123#define LL_TIM_BREAK2_FILTER_FDIV1 0x00000000U
1124#define LL_TIM_BREAK2_FILTER_FDIV1_N2 0x00100000U
1125#define LL_TIM_BREAK2_FILTER_FDIV1_N4 0x00200000U
1126#define LL_TIM_BREAK2_FILTER_FDIV1_N8 0x00300000U
1127#define LL_TIM_BREAK2_FILTER_FDIV2_N6 0x00400000U
1128#define LL_TIM_BREAK2_FILTER_FDIV2_N8 0x00500000U
1129#define LL_TIM_BREAK2_FILTER_FDIV4_N6 0x00600000U
1130#define LL_TIM_BREAK2_FILTER_FDIV4_N8 0x00700000U
1131#define LL_TIM_BREAK2_FILTER_FDIV8_N6 0x00800000U
1132#define LL_TIM_BREAK2_FILTER_FDIV8_N8 0x00900000U
1133#define LL_TIM_BREAK2_FILTER_FDIV16_N5 0x00A00000U
1134#define LL_TIM_BREAK2_FILTER_FDIV16_N6 0x00B00000U
1135#define LL_TIM_BREAK2_FILTER_FDIV16_N8 0x00C00000U
1136#define LL_TIM_BREAK2_FILTER_FDIV32_N5 0x00D00000U
1137#define LL_TIM_BREAK2_FILTER_FDIV32_N6 0x00E00000U
1138#define LL_TIM_BREAK2_FILTER_FDIV32_N8 0x00F00000U
1147#define LL_TIM_OSSI_DISABLE 0x00000000U
1148#define LL_TIM_OSSI_ENABLE TIM_BDTR_OSSI
1157#define LL_TIM_OSSR_DISABLE 0x00000000U
1158#define LL_TIM_OSSR_ENABLE TIM_BDTR_OSSR
1163#if defined(TIM_BREAK_INPUT_SUPPORT)
1168#define LL_TIM_BREAK_INPUT_BKIN 0x00000000U
1169#define LL_TIM_BREAK_INPUT_BKIN2 0x00000004U
1178#define LL_TIM_BKIN_SOURCE_BKIN TIM1_AF1_BKINE
1179#define LL_TIM_BKIN_SOURCE_BKCOMP1 TIM1_AF1_BKCMP1E
1180#define LL_TIM_BKIN_SOURCE_BKCOMP2 TIM1_AF1_BKCMP2E
1181#define LL_TIM_BKIN_SOURCE_DF1BK TIM1_AF1_BKDF1BK0E
1190#define LL_TIM_BKIN_POLARITY_LOW TIM1_AF1_BKINP
1191#define LL_TIM_BKIN_POLARITY_HIGH 0x00000000U
1195#endif /* TIM_BREAK_INPUT_SUPPORT */
1196
1197#if defined(TIM_BDTR_BKBID)
1202#define LL_TIM_BREAK_AFMODE_INPUT 0x00000000U
1203#define LL_TIM_BREAK_AFMODE_BIDIRECTIONAL TIM_BDTR_BKBID
1212#define LL_TIM_BREAK2_AFMODE_INPUT 0x00000000U
1213#define LL_TIM_BREAK2_AFMODE_BIDIRECTIONAL TIM_BDTR_BK2BID
1221#define LL_TIM_ReArmBRK(_PARAM_)
1222#define LL_TIM_ReArmBRK2(_PARAM_)
1227#endif /*TIM_BDTR_BKBID */
1232#define LL_TIM_DMABURST_BASEADDR_CR1 0x00000000U
1233#define LL_TIM_DMABURST_BASEADDR_CR2 TIM_DCR_DBA_0
1234#define LL_TIM_DMABURST_BASEADDR_SMCR TIM_DCR_DBA_1
1235#define LL_TIM_DMABURST_BASEADDR_DIER (TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1236#define LL_TIM_DMABURST_BASEADDR_SR TIM_DCR_DBA_2
1237#define LL_TIM_DMABURST_BASEADDR_EGR (TIM_DCR_DBA_2 | TIM_DCR_DBA_0)
1238#define LL_TIM_DMABURST_BASEADDR_CCMR1 (TIM_DCR_DBA_2 | TIM_DCR_DBA_1)
1239#define LL_TIM_DMABURST_BASEADDR_CCMR2 (TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1240#define LL_TIM_DMABURST_BASEADDR_CCER TIM_DCR_DBA_3
1241#define LL_TIM_DMABURST_BASEADDR_CNT (TIM_DCR_DBA_3 | TIM_DCR_DBA_0)
1242#define LL_TIM_DMABURST_BASEADDR_PSC (TIM_DCR_DBA_3 | TIM_DCR_DBA_1)
1243#define LL_TIM_DMABURST_BASEADDR_ARR (TIM_DCR_DBA_3 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1244#define LL_TIM_DMABURST_BASEADDR_RCR (TIM_DCR_DBA_3 | TIM_DCR_DBA_2)
1245#define LL_TIM_DMABURST_BASEADDR_CCR1 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0)
1246#define LL_TIM_DMABURST_BASEADDR_CCR2 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1)
1247#define LL_TIM_DMABURST_BASEADDR_CCR3 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1248#define LL_TIM_DMABURST_BASEADDR_CCR4 TIM_DCR_DBA_4
1249#define LL_TIM_DMABURST_BASEADDR_BDTR (TIM_DCR_DBA_4 | TIM_DCR_DBA_0)
1250#define LL_TIM_DMABURST_BASEADDR_CCMR3 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0)
1251#define LL_TIM_DMABURST_BASEADDR_CCR5 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1)
1252#define LL_TIM_DMABURST_BASEADDR_CCR6 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0)
1253#if defined(TIM1_AF1_BKINE)&&defined(TIM1_AF2_BKINE)
1254#define LL_TIM_DMABURST_BASEADDR_AF1 (TIM_DCR_DBA_4 | TIM_DCR_DBA_3)
1255#define LL_TIM_DMABURST_BASEADDR_AF2 (TIM_DCR_DBA_4 | TIM_DCR_DBA_3 | TIM_DCR_DBA_0)
1256#endif /* TIM1_AF1_BKINE && TIM1_AF2_BKINE */
1257#define LL_TIM_DMABURST_BASEADDR_TISEL (TIM_DCR_DBA_4 | TIM_DCR_DBA_3 | TIM_DCR_DBA_1)
1266#define LL_TIM_DMABURST_LENGTH_1TRANSFER 0x00000000U
1267#define LL_TIM_DMABURST_LENGTH_2TRANSFERS TIM_DCR_DBL_0
1268#define LL_TIM_DMABURST_LENGTH_3TRANSFERS TIM_DCR_DBL_1
1269#define LL_TIM_DMABURST_LENGTH_4TRANSFERS (TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1270#define LL_TIM_DMABURST_LENGTH_5TRANSFERS TIM_DCR_DBL_2
1271#define LL_TIM_DMABURST_LENGTH_6TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_0)
1272#define LL_TIM_DMABURST_LENGTH_7TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_1)
1273#define LL_TIM_DMABURST_LENGTH_8TRANSFERS (TIM_DCR_DBL_2 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1274#define LL_TIM_DMABURST_LENGTH_9TRANSFERS TIM_DCR_DBL_3
1275#define LL_TIM_DMABURST_LENGTH_10TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_0)
1276#define LL_TIM_DMABURST_LENGTH_11TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_1)
1277#define LL_TIM_DMABURST_LENGTH_12TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1278#define LL_TIM_DMABURST_LENGTH_13TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2)
1279#define LL_TIM_DMABURST_LENGTH_14TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_0)
1280#define LL_TIM_DMABURST_LENGTH_15TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_1)
1281#define LL_TIM_DMABURST_LENGTH_16TRANSFERS (TIM_DCR_DBL_3 | TIM_DCR_DBL_2 | TIM_DCR_DBL_1 | TIM_DCR_DBL_0)
1282#define LL_TIM_DMABURST_LENGTH_17TRANSFERS TIM_DCR_DBL_4
1283#define LL_TIM_DMABURST_LENGTH_18TRANSFERS (TIM_DCR_DBL_4 | TIM_DCR_DBL_0)
1292#define LL_TIM_TIM1_TI1_RMP_GPIO 0x00000000U
1293#define LL_TIM_TIM1_TI1_RMP_COMP1 TIM_TISEL_TI1SEL_0
1302#define LL_TIM_TIM8_TI1_RMP_GPIO 0x00000000U
1303#define LL_TIM_TIM8_TI1_RMP_COMP2 TIM_TISEL_TI1SEL_0
1312#define LL_TIM_TIM2_TI4_RMP_GPIO 0x00000000U
1313#define LL_TIM_TIM2_TI4_RMP_COMP1 TIM_TISEL_TI4SEL_0
1314#define LL_TIM_TIM2_TI4_RMP_COMP2 TIM_TISEL_TI4SEL_1
1315#define LL_TIM_TIM2_TI4_RMP_COMP1_COMP2 (TIM_TISEL_TI4SEL_0 | TIM_TISEL_TI4SEL_1)
1324#define LL_TIM_TIM3_TI1_RMP_GPIO 0x00000000U
1325#define LL_TIM_TIM3_TI1_RMP_COMP1 TIM_TISEL_TI1SEL_0
1326#define LL_TIM_TIM3_TI1_RMP_COMP2 TIM_TISEL_TI1SEL_1
1327#define LL_TIM_TIM3_TI1_RMP_COMP1_COMP2 (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1336#define LL_TIM_TIM5_TI1_RMP_GPIO 0x00000000U
1337#define LL_TIM_TIM5_TI1_RMP_CAN_TMP TIM_TISEL_TI1SEL_0
1338#define LL_TIM_TIM5_TI1_RMP_CAN_RTP TIM_TISEL_TI1SEL_1
1347#define LL_TIM_TIM12_TI1_RMP_GPIO 0x00000000U
1348#define LL_TIM_TIM12_TI1_RMP_SPDIF_FS TIM_TISEL_TI1SEL_0
1357#define LL_TIM_TIM15_TI1_RMP_GPIO 0x00000000U
1358#define LL_TIM_TIM15_TI1_RMP_TIM2_CH1 TIM_TISEL_TI1SEL_0
1359#define LL_TIM_TIM15_TI1_RMP_TIM3_CH1 TIM_TISEL_TI1SEL_1
1360#define LL_TIM_TIM15_TI1_RMP_TIM4_CH1 (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1361#define LL_TIM_TIM15_TI1_RMP_RCC_LSE (TIM_TISEL_TI1SEL_2)
1362#define LL_TIM_TIM15_TI1_RMP_RCC_CSI (TIM_TISEL_TI1SEL_2 | TIM_TISEL_TI1SEL_0)
1363#define LL_TIM_TIM15_TI1_RMP_RCC_MCO2 (TIM_TISEL_TI1SEL_2 | TIM_TISEL_TI1SEL_1)
1372#define LL_TIM_TIM15_TI2_RMP_GPIO 0x00000000U
1373#define LL_TIM_TIM15_TI2_RMP_TIM2_CH2 (TIM_TISEL_TI2SEL_0)
1374#define LL_TIM_TIM15_TI2_RMP_TIM3_CH2 (TIM_TISEL_TI2SEL_1)
1375#define LL_TIM_TIM15_TI2_RMP_TIM4_CH2 (TIM_TISEL_TI2SEL_0 | TIM_TISEL_TI2SEL_1)
1384#define LL_TIM_TIM16_TI1_RMP_GPIO 0x00000000U
1385#define LL_TIM_TIM16_TI1_RMP_RCC_LSI TIM_TISEL_TI1SEL_0
1386#define LL_TIM_TIM16_TI1_RMP_RCC_LSE TIM_TISEL_TI1SEL_1
1387#define LL_TIM_TIM16_TI1_RMP_WKUP_IT (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1396#define LL_TIM_TIM17_TI1_RMP_GPIO 0x00000000U
1397#define LL_TIM_TIM17_TI1_RMP_SPDIF_FS TIM_TISEL_TI1SEL_0
1398#define LL_TIM_TIM17_TI1_RMP_RCC_HSE1MHZ TIM_TISEL_TI1SEL_1
1399#define LL_TIM_TIM17_TI1_RMP_RCC_MCO1 (TIM_TISEL_TI1SEL_0 | TIM_TISEL_TI1SEL_1)
1408#define LL_TIM_TIM23_TI4_RMP_GPIO 0x00000000U
1409#define LL_TIM_TIM23_TI4_RMP_COMP1 TIM_TISEL_TI4SEL_0
1410#define LL_TIM_TIM23_TI4_RMP_COMP2 TIM_TISEL_TI4SEL_1
1411#define LL_TIM_TIM23_TI4_RMP_COMP1_COMP2 (TIM_TISEL_TI4SEL_0 | TIM_TISEL_TI4SEL_1)
1420#define LL_TIM_TIM24_TI1_RMP_GPIO 0x00000000U
1421#define LL_TIM_TIM24_TI1_RMP_CAN_TMP TIM_TISEL_TI1SEL_0
1422#define LL_TIM_TIM24_TI1_RMP_CAN_RTP TIM_TISEL_TI1SEL_1
1423#define LL_TIM_TIM24_TI1_RMP_CAN_SOC (TIM_TISEL_TI4SEL_0 | TIM_TISEL_TI4SEL_1)
1428#if defined(TIM_BREAK_INPUT_SUPPORT)
1432#define LL_TIM_BKIN_SOURCE_DFBK LL_TIM_BKIN_SOURCE_DF1BK
1436#endif /* TIM_BREAK_INPUT_SUPPORT */
1437
1442/* Exported macro ------------------------------------------------------------*/
1459#define LL_TIM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
1460
1467#define LL_TIM_ReadReg(__INSTANCE__, __REG__) READ_REG((__INSTANCE__)->__REG__)
1480#define __LL_TIM_GETFLAG_UIFCPY(__CNT__) \
1481 (READ_BIT((__CNT__), TIM_CNT_UIFCPY) >> TIM_CNT_UIFCPY_Pos)
1482
1494#define __LL_TIM_CALC_DEADTIME(__TIMCLK__, __CKD__, __DT__) \
1495 ( (((uint64_t)((__DT__)*1000U)) < ((DT_DELAY_1+1U) * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1496 (uint8_t)(((uint64_t)((__DT__)*1000U) / TIM_CALC_DTS((__TIMCLK__), (__CKD__))) & DT_DELAY_1) : \
1497 (((uint64_t)((__DT__)*1000U)) < ((64U + (DT_DELAY_2+1U)) * 2U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1498 (uint8_t)(DT_RANGE_2 | ((uint8_t)((uint8_t)((((uint64_t)((__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), \
1499 (__CKD__))) >> 1U) - (uint8_t) 64) & DT_DELAY_2)) :\
1500 (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_3+1U)) * 8U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1501 (uint8_t)(DT_RANGE_3 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), \
1502 (__CKD__))) >> 3U) - (uint8_t) 32) & DT_DELAY_3)) :\
1503 (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_4+1U)) * 16U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? \
1504 (uint8_t)(DT_RANGE_4 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), \
1505 (__CKD__))) >> 4U) - (uint8_t) 32) & DT_DELAY_4)) :\
1506 0U)
1507
1515#define __LL_TIM_CALC_PSC(__TIMCLK__, __CNTCLK__) \
1516 (((__TIMCLK__) >= (__CNTCLK__)) ? (uint32_t)((((__TIMCLK__) + (__CNTCLK__)/2U)/(__CNTCLK__)) - 1U) : 0U)
1517
1526#define __LL_TIM_CALC_ARR(__TIMCLK__, __PSC__, __FREQ__) \
1527 ((((__TIMCLK__)/((__PSC__) + 1U)) >= (__FREQ__)) ? (((__TIMCLK__)/((__FREQ__) * ((__PSC__) + 1U))) - 1U) : 0U)
1528
1538#define __LL_TIM_CALC_DELAY(__TIMCLK__, __PSC__, __DELAY__) \
1539 ((uint32_t)(((uint64_t)(__TIMCLK__) * (uint64_t)(__DELAY__)) \
1540 / ((uint64_t)1000000U * (uint64_t)((__PSC__) + 1U))))
1541
1552#define __LL_TIM_CALC_PULSE(__TIMCLK__, __PSC__, __DELAY__, __PULSE__) \
1553 ((uint32_t)(__LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__PULSE__)) \
1554 + __LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__DELAY__))))
1555
1566#define __LL_TIM_GET_ICPSC_RATIO(__ICPSC__) \
1567 ((uint32_t)(0x01U << (((__ICPSC__) >> 16U) >> TIM_CCMR1_IC1PSC_Pos)))
1568
1569
1574/* Exported functions --------------------------------------------------------*/
1590__STATIC_INLINE void LL_TIM_EnableCounter(TIM_TypeDef *TIMx)
1591{
1592 SET_BIT(TIMx->CR1, TIM_CR1_CEN);
1593}
1594
1601__STATIC_INLINE void LL_TIM_DisableCounter(TIM_TypeDef *TIMx)
1602{
1603 CLEAR_BIT(TIMx->CR1, TIM_CR1_CEN);
1604}
1605
1612__STATIC_INLINE uint32_t LL_TIM_IsEnabledCounter(const TIM_TypeDef *TIMx)
1613{
1614 return ((READ_BIT(TIMx->CR1, TIM_CR1_CEN) == (TIM_CR1_CEN)) ? 1UL : 0UL);
1615}
1616
1623__STATIC_INLINE void LL_TIM_EnableUpdateEvent(TIM_TypeDef *TIMx)
1624{
1625 CLEAR_BIT(TIMx->CR1, TIM_CR1_UDIS);
1626}
1627
1634__STATIC_INLINE void LL_TIM_DisableUpdateEvent(TIM_TypeDef *TIMx)
1635{
1636 SET_BIT(TIMx->CR1, TIM_CR1_UDIS);
1637}
1638
1645__STATIC_INLINE uint32_t LL_TIM_IsEnabledUpdateEvent(const TIM_TypeDef *TIMx)
1646{
1647 return ((READ_BIT(TIMx->CR1, TIM_CR1_UDIS) == (uint32_t)RESET) ? 1UL : 0UL);
1648}
1649
1666__STATIC_INLINE void LL_TIM_SetUpdateSource(TIM_TypeDef *TIMx, uint32_t UpdateSource)
1667{
1668 MODIFY_REG(TIMx->CR1, TIM_CR1_URS, UpdateSource);
1669}
1670
1679__STATIC_INLINE uint32_t LL_TIM_GetUpdateSource(const TIM_TypeDef *TIMx)
1680{
1681 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_URS));
1682}
1683
1693__STATIC_INLINE void LL_TIM_SetOnePulseMode(TIM_TypeDef *TIMx, uint32_t OnePulseMode)
1694{
1695 MODIFY_REG(TIMx->CR1, TIM_CR1_OPM, OnePulseMode);
1696}
1697
1706__STATIC_INLINE uint32_t LL_TIM_GetOnePulseMode(const TIM_TypeDef *TIMx)
1707{
1708 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_OPM));
1709}
1710
1730__STATIC_INLINE void LL_TIM_SetCounterMode(TIM_TypeDef *TIMx, uint32_t CounterMode)
1731{
1732 MODIFY_REG(TIMx->CR1, (TIM_CR1_DIR | TIM_CR1_CMS), CounterMode);
1733}
1734
1750__STATIC_INLINE uint32_t LL_TIM_GetCounterMode(const TIM_TypeDef *TIMx)
1751{
1752 uint32_t counter_mode;
1753
1754 counter_mode = (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_CMS));
1755
1756 if (counter_mode == 0U)
1757 {
1758 counter_mode = (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR));
1759 }
1760
1761 return counter_mode;
1762}
1763
1770__STATIC_INLINE void LL_TIM_EnableARRPreload(TIM_TypeDef *TIMx)
1771{
1772 SET_BIT(TIMx->CR1, TIM_CR1_ARPE);
1773}
1774
1781__STATIC_INLINE void LL_TIM_DisableARRPreload(TIM_TypeDef *TIMx)
1782{
1783 CLEAR_BIT(TIMx->CR1, TIM_CR1_ARPE);
1784}
1785
1792__STATIC_INLINE uint32_t LL_TIM_IsEnabledARRPreload(const TIM_TypeDef *TIMx)
1793{
1794 return ((READ_BIT(TIMx->CR1, TIM_CR1_ARPE) == (TIM_CR1_ARPE)) ? 1UL : 0UL);
1795}
1796
1811__STATIC_INLINE void LL_TIM_SetClockDivision(TIM_TypeDef *TIMx, uint32_t ClockDivision)
1812{
1813 MODIFY_REG(TIMx->CR1, TIM_CR1_CKD, ClockDivision);
1814}
1815
1829__STATIC_INLINE uint32_t LL_TIM_GetClockDivision(const TIM_TypeDef *TIMx)
1830{
1831 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_CKD));
1832}
1833
1843__STATIC_INLINE void LL_TIM_SetCounter(TIM_TypeDef *TIMx, uint32_t Counter)
1844{
1845 WRITE_REG(TIMx->CNT, Counter);
1846}
1847
1856__STATIC_INLINE uint32_t LL_TIM_GetCounter(const TIM_TypeDef *TIMx)
1857{
1858 return (uint32_t)(READ_REG(TIMx->CNT));
1859}
1860
1869__STATIC_INLINE uint32_t LL_TIM_GetDirection(const TIM_TypeDef *TIMx)
1870{
1871 return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR));
1872}
1873
1885__STATIC_INLINE void LL_TIM_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Prescaler)
1886{
1887 WRITE_REG(TIMx->PSC, Prescaler);
1888}
1889
1896__STATIC_INLINE uint32_t LL_TIM_GetPrescaler(const TIM_TypeDef *TIMx)
1897{
1898 return (uint32_t)(READ_REG(TIMx->PSC));
1899}
1900
1912__STATIC_INLINE void LL_TIM_SetAutoReload(TIM_TypeDef *TIMx, uint32_t AutoReload)
1913{
1914 WRITE_REG(TIMx->ARR, AutoReload);
1915}
1916
1925__STATIC_INLINE uint32_t LL_TIM_GetAutoReload(const TIM_TypeDef *TIMx)
1926{
1927 return (uint32_t)(READ_REG(TIMx->ARR));
1928}
1929
1940__STATIC_INLINE void LL_TIM_SetRepetitionCounter(TIM_TypeDef *TIMx, uint32_t RepetitionCounter)
1941{
1942 WRITE_REG(TIMx->RCR, RepetitionCounter);
1943}
1944
1953__STATIC_INLINE uint32_t LL_TIM_GetRepetitionCounter(const TIM_TypeDef *TIMx)
1954{
1955 return (uint32_t)(READ_REG(TIMx->RCR));
1956}
1957
1966__STATIC_INLINE void LL_TIM_EnableUIFRemap(TIM_TypeDef *TIMx)
1967{
1968 SET_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
1969}
1970
1977__STATIC_INLINE void LL_TIM_DisableUIFRemap(TIM_TypeDef *TIMx)
1978{
1979 CLEAR_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
1980}
1981
1987__STATIC_INLINE uint32_t LL_TIM_IsActiveUIFCPY(const uint32_t Counter)
1988{
1989 return (((Counter & TIM_CNT_UIFCPY) == (TIM_CNT_UIFCPY)) ? 1UL : 0UL);
1990}
1991
2011__STATIC_INLINE void LL_TIM_CC_EnablePreload(TIM_TypeDef *TIMx)
2012{
2013 SET_BIT(TIMx->CR2, TIM_CR2_CCPC);
2014}
2015
2024__STATIC_INLINE void LL_TIM_CC_DisablePreload(TIM_TypeDef *TIMx)
2025{
2026 CLEAR_BIT(TIMx->CR2, TIM_CR2_CCPC);
2027}
2028
2035__STATIC_INLINE uint32_t LL_TIM_CC_IsEnabledPreload(const TIM_TypeDef *TIMx)
2036{
2037 return ((READ_BIT(TIMx->CR2, TIM_CR2_CCPC) == (TIM_CR2_CCPC)) ? 1UL : 0UL);
2038}
2039
2051__STATIC_INLINE void LL_TIM_CC_SetUpdate(TIM_TypeDef *TIMx, uint32_t CCUpdateSource)
2052{
2053 MODIFY_REG(TIMx->CR2, TIM_CR2_CCUS, CCUpdateSource);
2054}
2055
2065__STATIC_INLINE void LL_TIM_CC_SetDMAReqTrigger(TIM_TypeDef *TIMx, uint32_t DMAReqTrigger)
2066{
2067 MODIFY_REG(TIMx->CR2, TIM_CR2_CCDS, DMAReqTrigger);
2068}
2069
2078__STATIC_INLINE uint32_t LL_TIM_CC_GetDMAReqTrigger(const TIM_TypeDef *TIMx)
2079{
2080 return (uint32_t)(READ_BIT(TIMx->CR2, TIM_CR2_CCDS));
2081}
2082
2097__STATIC_INLINE void LL_TIM_CC_SetLockLevel(TIM_TypeDef *TIMx, uint32_t LockLevel)
2098{
2099 MODIFY_REG(TIMx->BDTR, TIM_BDTR_LOCK, LockLevel);
2100}
2101
2126__STATIC_INLINE void LL_TIM_CC_EnableChannel(TIM_TypeDef *TIMx, uint32_t Channels)
2127{
2128 SET_BIT(TIMx->CCER, Channels);
2129}
2130
2155__STATIC_INLINE void LL_TIM_CC_DisableChannel(TIM_TypeDef *TIMx, uint32_t Channels)
2156{
2157 CLEAR_BIT(TIMx->CCER, Channels);
2158}
2159
2184__STATIC_INLINE uint32_t LL_TIM_CC_IsEnabledChannel(const TIM_TypeDef *TIMx, uint32_t Channels)
2185{
2186 return ((READ_BIT(TIMx->CCER, Channels) == (Channels)) ? 1UL : 0UL);
2187}
2188
2230__STATIC_INLINE void LL_TIM_OC_ConfigOutput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
2231{
2232 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2233 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2234 CLEAR_BIT(*pReg, (TIM_CCMR1_CC1S << SHIFT_TAB_OCxx[iChannel]));
2235 MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]),
2236 (Configuration & TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]);
2237 MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]),
2238 (Configuration & TIM_CR2_OIS1) << SHIFT_TAB_OISx[iChannel]);
2239}
2240
2275__STATIC_INLINE void LL_TIM_OC_SetMode(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Mode)
2276{
2277 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2278 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2279 MODIFY_REG(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel]), Mode << SHIFT_TAB_OCxx[iChannel]);
2280}
2281
2314__STATIC_INLINE uint32_t LL_TIM_OC_GetMode(const TIM_TypeDef *TIMx, uint32_t Channel)
2315{
2316 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2317 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2318 return (READ_BIT(*pReg, ((TIM_CCMR1_OC1M | TIM_CCMR1_CC1S) << SHIFT_TAB_OCxx[iChannel])) >> SHIFT_TAB_OCxx[iChannel]);
2319}
2320
2348__STATIC_INLINE void LL_TIM_OC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Polarity)
2349{
2350 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2351 MODIFY_REG(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel]), Polarity << SHIFT_TAB_CCxP[iChannel]);
2352}
2353
2380__STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(const TIM_TypeDef *TIMx, uint32_t Channel)
2381{
2382 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2383 return (READ_BIT(TIMx->CCER, (TIM_CCER_CC1P << SHIFT_TAB_CCxP[iChannel])) >> SHIFT_TAB_CCxP[iChannel]);
2384}
2385
2417__STATIC_INLINE void LL_TIM_OC_SetIdleState(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t IdleState)
2418{
2419 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2420 MODIFY_REG(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel]), IdleState << SHIFT_TAB_OISx[iChannel]);
2421}
2422
2449__STATIC_INLINE uint32_t LL_TIM_OC_GetIdleState(const TIM_TypeDef *TIMx, uint32_t Channel)
2450{
2451 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2452 return (READ_BIT(TIMx->CR2, (TIM_CR2_OIS1 << SHIFT_TAB_OISx[iChannel])) >> SHIFT_TAB_OISx[iChannel]);
2453}
2454
2474__STATIC_INLINE void LL_TIM_OC_EnableFast(TIM_TypeDef *TIMx, uint32_t Channel)
2475{
2476 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2477 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2478 SET_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
2479
2480}
2481
2500__STATIC_INLINE void LL_TIM_OC_DisableFast(TIM_TypeDef *TIMx, uint32_t Channel)
2501{
2502 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2503 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2504 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel]));
2505
2506}
2507
2526__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledFast(const TIM_TypeDef *TIMx, uint32_t Channel)
2527{
2528 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2529 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2530 uint32_t bitfield = TIM_CCMR1_OC1FE << SHIFT_TAB_OCxx[iChannel];
2531 return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
2532}
2533
2552__STATIC_INLINE void LL_TIM_OC_EnablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
2553{
2554 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2555 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2556 SET_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
2557}
2558
2577__STATIC_INLINE void LL_TIM_OC_DisablePreload(TIM_TypeDef *TIMx, uint32_t Channel)
2578{
2579 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2580 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2581 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel]));
2582}
2583
2602__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(const TIM_TypeDef *TIMx, uint32_t Channel)
2603{
2604 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2605 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2606 uint32_t bitfield = TIM_CCMR1_OC1PE << SHIFT_TAB_OCxx[iChannel];
2607 return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
2608}
2609
2631__STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel)
2632{
2633 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2634 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2635 SET_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
2636}
2637
2658__STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel)
2659{
2660 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2661 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2662 CLEAR_BIT(*pReg, (TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel]));
2663}
2664
2687__STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledClear(const TIM_TypeDef *TIMx, uint32_t Channel)
2688{
2689 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2690 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2691 uint32_t bitfield = TIM_CCMR1_OC1CE << SHIFT_TAB_OCxx[iChannel];
2692 return ((READ_BIT(*pReg, bitfield) == bitfield) ? 1UL : 0UL);
2693}
2694
2706__STATIC_INLINE void LL_TIM_OC_SetDeadTime(TIM_TypeDef *TIMx, uint32_t DeadTime)
2707{
2708 MODIFY_REG(TIMx->BDTR, TIM_BDTR_DTG, DeadTime);
2709}
2710
2723__STATIC_INLINE void LL_TIM_OC_SetCompareCH1(TIM_TypeDef *TIMx, uint32_t CompareValue)
2724{
2725 WRITE_REG(TIMx->CCR1, CompareValue);
2726}
2727
2740__STATIC_INLINE void LL_TIM_OC_SetCompareCH2(TIM_TypeDef *TIMx, uint32_t CompareValue)
2741{
2742 WRITE_REG(TIMx->CCR2, CompareValue);
2743}
2744
2757__STATIC_INLINE void LL_TIM_OC_SetCompareCH3(TIM_TypeDef *TIMx, uint32_t CompareValue)
2758{
2759 WRITE_REG(TIMx->CCR3, CompareValue);
2760}
2761
2774__STATIC_INLINE void LL_TIM_OC_SetCompareCH4(TIM_TypeDef *TIMx, uint32_t CompareValue)
2775{
2776 WRITE_REG(TIMx->CCR4, CompareValue);
2777}
2778
2788__STATIC_INLINE void LL_TIM_OC_SetCompareCH5(TIM_TypeDef *TIMx, uint32_t CompareValue)
2789{
2790 MODIFY_REG(TIMx->CCR5, TIM_CCR5_CCR5, CompareValue);
2791}
2792
2802__STATIC_INLINE void LL_TIM_OC_SetCompareCH6(TIM_TypeDef *TIMx, uint32_t CompareValue)
2803{
2804 WRITE_REG(TIMx->CCR6, CompareValue);
2805}
2806
2818__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH1(const TIM_TypeDef *TIMx)
2819{
2820 return (uint32_t)(READ_REG(TIMx->CCR1));
2821}
2822
2834__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH2(const TIM_TypeDef *TIMx)
2835{
2836 return (uint32_t)(READ_REG(TIMx->CCR2));
2837}
2838
2850__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH3(const TIM_TypeDef *TIMx)
2851{
2852 return (uint32_t)(READ_REG(TIMx->CCR3));
2853}
2854
2866__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH4(const TIM_TypeDef *TIMx)
2867{
2868 return (uint32_t)(READ_REG(TIMx->CCR4));
2869}
2870
2879__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH5(const TIM_TypeDef *TIMx)
2880{
2881 return (uint32_t)(READ_BIT(TIMx->CCR5, TIM_CCR5_CCR5));
2882}
2883
2892__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH6(const TIM_TypeDef *TIMx)
2893{
2894 return (uint32_t)(READ_REG(TIMx->CCR6));
2895}
2896
2912__STATIC_INLINE void LL_TIM_SetCH5CombinedChannels(TIM_TypeDef *TIMx, uint32_t GroupCH5)
2913{
2914 MODIFY_REG(TIMx->CCR5, (TIM_CCR5_GC5C3 | TIM_CCR5_GC5C2 | TIM_CCR5_GC5C1), GroupCH5);
2915}
2916
2960__STATIC_INLINE void LL_TIM_IC_Config(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
2961{
2962 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2963 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2964 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]),
2965 ((Configuration >> 16U) & (TIM_CCMR1_IC1F | TIM_CCMR1_IC1PSC | TIM_CCMR1_CC1S)) \
2966 << SHIFT_TAB_ICxx[iChannel]);
2967 MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
2968 (Configuration & (TIM_CCER_CC1NP | TIM_CCER_CC1P)) << SHIFT_TAB_CCxP[iChannel]);
2969}
2970
2989__STATIC_INLINE void LL_TIM_IC_SetActiveInput(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICActiveInput)
2990{
2991 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
2992 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
2993 MODIFY_REG(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel]), (ICActiveInput >> 16U) << SHIFT_TAB_ICxx[iChannel]);
2994}
2995
3013__STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput(const TIM_TypeDef *TIMx, uint32_t Channel)
3014{
3015 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3016 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3017 return ((READ_BIT(*pReg, ((TIM_CCMR1_CC1S) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
3018}
3019
3039__STATIC_INLINE void LL_TIM_IC_SetPrescaler(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPrescaler)
3040{
3041 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3042 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3043 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel]), (ICPrescaler >> 16U) << SHIFT_TAB_ICxx[iChannel]);
3044}
3045
3064__STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler(const TIM_TypeDef *TIMx, uint32_t Channel)
3065{
3066 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3067 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3068 return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1PSC) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
3069}
3070
3102__STATIC_INLINE void LL_TIM_IC_SetFilter(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICFilter)
3103{
3104 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3105 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3106 MODIFY_REG(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel]), (ICFilter >> 16U) << SHIFT_TAB_ICxx[iChannel]);
3107}
3108
3139__STATIC_INLINE uint32_t LL_TIM_IC_GetFilter(const TIM_TypeDef *TIMx, uint32_t Channel)
3140{
3141 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3142 const __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->CCMR1) + OFFSET_TAB_CCMRx[iChannel]));
3143 return ((READ_BIT(*pReg, ((TIM_CCMR1_IC1F) << SHIFT_TAB_ICxx[iChannel])) >> SHIFT_TAB_ICxx[iChannel]) << 16U);
3144}
3145
3168__STATIC_INLINE void LL_TIM_IC_SetPolarity(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPolarity)
3169{
3170 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3171 MODIFY_REG(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel]),
3172 ICPolarity << SHIFT_TAB_CCxP[iChannel]);
3173}
3174
3196__STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity(const TIM_TypeDef *TIMx, uint32_t Channel)
3197{
3198 uint8_t iChannel = TIM_GET_CHANNEL_INDEX(Channel);
3199 return (READ_BIT(TIMx->CCER, ((TIM_CCER_CC1NP | TIM_CCER_CC1P) << SHIFT_TAB_CCxP[iChannel])) >>
3200 SHIFT_TAB_CCxP[iChannel]);
3201}
3202
3211__STATIC_INLINE void LL_TIM_IC_EnableXORCombination(TIM_TypeDef *TIMx)
3212{
3213 SET_BIT(TIMx->CR2, TIM_CR2_TI1S);
3214}
3215
3224__STATIC_INLINE void LL_TIM_IC_DisableXORCombination(TIM_TypeDef *TIMx)
3225{
3226 CLEAR_BIT(TIMx->CR2, TIM_CR2_TI1S);
3227}
3228
3237__STATIC_INLINE uint32_t LL_TIM_IC_IsEnabledXORCombination(const TIM_TypeDef *TIMx)
3238{
3239 return ((READ_BIT(TIMx->CR2, TIM_CR2_TI1S) == (TIM_CR2_TI1S)) ? 1UL : 0UL);
3240}
3241
3253__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH1(const TIM_TypeDef *TIMx)
3254{
3255 return (uint32_t)(READ_REG(TIMx->CCR1));
3256}
3257
3269__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH2(const TIM_TypeDef *TIMx)
3270{
3271 return (uint32_t)(READ_REG(TIMx->CCR2));
3272}
3273
3285__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH3(const TIM_TypeDef *TIMx)
3286{
3287 return (uint32_t)(READ_REG(TIMx->CCR3));
3288}
3289
3301__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH4(const TIM_TypeDef *TIMx)
3302{
3303 return (uint32_t)(READ_REG(TIMx->CCR4));
3304}
3305
3323__STATIC_INLINE void LL_TIM_EnableExternalClock(TIM_TypeDef *TIMx)
3324{
3325 SET_BIT(TIMx->SMCR, TIM_SMCR_ECE);
3326}
3327
3336__STATIC_INLINE void LL_TIM_DisableExternalClock(TIM_TypeDef *TIMx)
3337{
3338 CLEAR_BIT(TIMx->SMCR, TIM_SMCR_ECE);
3339}
3340
3349__STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock(const TIM_TypeDef *TIMx)
3350{
3351 return ((READ_BIT(TIMx->SMCR, TIM_SMCR_ECE) == (TIM_SMCR_ECE)) ? 1UL : 0UL);
3352}
3353
3373__STATIC_INLINE void LL_TIM_SetClockSource(TIM_TypeDef *TIMx, uint32_t ClockSource)
3374{
3375 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS | TIM_SMCR_ECE, ClockSource);
3376}
3377
3390__STATIC_INLINE void LL_TIM_SetEncoderMode(TIM_TypeDef *TIMx, uint32_t EncoderMode)
3391{
3392 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS, EncoderMode);
3393}
3394
3420__STATIC_INLINE void LL_TIM_SetTriggerOutput(TIM_TypeDef *TIMx, uint32_t TimerSynchronization)
3421{
3422 MODIFY_REG(TIMx->CR2, TIM_CR2_MMS, TimerSynchronization);
3423}
3424
3450__STATIC_INLINE void LL_TIM_SetTriggerOutput2(TIM_TypeDef *TIMx, uint32_t ADCSynchronization)
3451{
3452 MODIFY_REG(TIMx->CR2, TIM_CR2_MMS2, ADCSynchronization);
3453}
3454
3469__STATIC_INLINE void LL_TIM_SetSlaveMode(TIM_TypeDef *TIMx, uint32_t SlaveMode)
3470{
3471 MODIFY_REG(TIMx->SMCR, TIM_SMCR_SMS, SlaveMode);
3472}
3473
3503__STATIC_INLINE void LL_TIM_SetTriggerInput(TIM_TypeDef *TIMx, uint32_t TriggerInput)
3504{
3505 MODIFY_REG(TIMx->SMCR, TIM_SMCR_TS, TriggerInput);
3506}
3507
3516__STATIC_INLINE void LL_TIM_EnableMasterSlaveMode(TIM_TypeDef *TIMx)
3517{
3518 SET_BIT(TIMx->SMCR, TIM_SMCR_MSM);
3519}
3520
3529__STATIC_INLINE void LL_TIM_DisableMasterSlaveMode(TIM_TypeDef *TIMx)
3530{
3531 CLEAR_BIT(TIMx->SMCR, TIM_SMCR_MSM);
3532}
3533
3542__STATIC_INLINE uint32_t LL_TIM_IsEnabledMasterSlaveMode(const TIM_TypeDef *TIMx)
3543{
3544 return ((READ_BIT(TIMx->SMCR, TIM_SMCR_MSM) == (TIM_SMCR_MSM)) ? 1UL : 0UL);
3545}
3546
3582__STATIC_INLINE void LL_TIM_ConfigETR(TIM_TypeDef *TIMx, uint32_t ETRPolarity, uint32_t ETRPrescaler,
3583 uint32_t ETRFilter)
3584{
3585 MODIFY_REG(TIMx->SMCR, TIM_SMCR_ETP | TIM_SMCR_ETPS | TIM_SMCR_ETF, ETRPolarity | ETRPrescaler | ETRFilter);
3586}
3587
3651__STATIC_INLINE void LL_TIM_SetETRSource(TIM_TypeDef *TIMx, uint32_t ETRSource)
3652{
3653 MODIFY_REG(TIMx->AF1, TIMx_AF1_ETRSEL, ETRSource);
3654}
3655
3672__STATIC_INLINE void LL_TIM_EnableBRK(TIM_TypeDef *TIMx)
3673{
3674 SET_BIT(TIMx->BDTR, TIM_BDTR_BKE);
3675}
3676
3685__STATIC_INLINE void LL_TIM_DisableBRK(TIM_TypeDef *TIMx)
3686{
3687 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BKE);
3688}
3689
3690#if defined(TIM_BDTR_BKBID)
3733__STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity, uint32_t BreakFilter,
3734 uint32_t BreakAFMode)
3735{
3736 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP | TIM_BDTR_BKF | TIM_BDTR_BKBID, BreakPolarity | BreakFilter | BreakAFMode);
3737}
3738
3739#else
3769__STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity,
3770 uint32_t BreakFilter)
3771{
3772 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP | TIM_BDTR_BKF, BreakPolarity | BreakFilter);
3773}
3774
3775#endif /* TIM_BDTR_BKBID */
3776#if defined(TIM_BDTR_BKBID)
3787__STATIC_INLINE void LL_TIM_DisarmBRK(TIM_TypeDef *TIMx)
3788{
3789 SET_BIT(TIMx->BDTR, TIM_BDTR_BKDSRM);
3790}
3791
3792#endif /*TIM_BDTR_BKBID */
3801__STATIC_INLINE void LL_TIM_EnableBRK2(TIM_TypeDef *TIMx)
3802{
3803 SET_BIT(TIMx->BDTR, TIM_BDTR_BK2E);
3804}
3805
3814__STATIC_INLINE void LL_TIM_DisableBRK2(TIM_TypeDef *TIMx)
3815{
3816 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BK2E);
3817}
3818
3819#if defined(TIM_BDTR_BKBID)
3862__STATIC_INLINE void LL_TIM_ConfigBRK2(TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter,
3863 uint32_t Break2AFMode)
3864{
3865 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BK2P | TIM_BDTR_BK2F | TIM_BDTR_BK2BID, Break2Polarity | Break2Filter | Break2AFMode);
3866}
3867
3868#else
3898__STATIC_INLINE void LL_TIM_ConfigBRK2(TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter)
3899{
3900 MODIFY_REG(TIMx->BDTR, TIM_BDTR_BK2P | TIM_BDTR_BK2F, Break2Polarity | Break2Filter);
3901}
3902
3903#endif /*TIM_BDTR_BKBID */
3904#if defined(TIM_BDTR_BKBID)
3915__STATIC_INLINE void LL_TIM_DisarmBRK2(TIM_TypeDef *TIMx)
3916{
3917 SET_BIT(TIMx->BDTR, TIM_BDTR_BK2DSRM);
3918}
3919
3920#endif /*TIM_BDTR_BKBID */
3936__STATIC_INLINE void LL_TIM_SetOffStates(TIM_TypeDef *TIMx, uint32_t OffStateIdle, uint32_t OffStateRun)
3937{
3938 MODIFY_REG(TIMx->BDTR, TIM_BDTR_OSSI | TIM_BDTR_OSSR, OffStateIdle | OffStateRun);
3939}
3940
3949__STATIC_INLINE void LL_TIM_EnableAutomaticOutput(TIM_TypeDef *TIMx)
3950{
3951 SET_BIT(TIMx->BDTR, TIM_BDTR_AOE);
3952}
3953
3962__STATIC_INLINE void LL_TIM_DisableAutomaticOutput(TIM_TypeDef *TIMx)
3963{
3964 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_AOE);
3965}
3966
3975__STATIC_INLINE uint32_t LL_TIM_IsEnabledAutomaticOutput(const TIM_TypeDef *TIMx)
3976{
3977 return ((READ_BIT(TIMx->BDTR, TIM_BDTR_AOE) == (TIM_BDTR_AOE)) ? 1UL : 0UL);
3978}
3979
3990__STATIC_INLINE void LL_TIM_EnableAllOutputs(TIM_TypeDef *TIMx)
3991{
3992 SET_BIT(TIMx->BDTR, TIM_BDTR_MOE);
3993}
3994
4005__STATIC_INLINE void LL_TIM_DisableAllOutputs(TIM_TypeDef *TIMx)
4006{
4007 CLEAR_BIT(TIMx->BDTR, TIM_BDTR_MOE);
4008}
4009
4018__STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs(const TIM_TypeDef *TIMx)
4019{
4020 return ((READ_BIT(TIMx->BDTR, TIM_BDTR_MOE) == (TIM_BDTR_MOE)) ? 1UL : 0UL);
4021}
4022
4023#if defined(TIM_BREAK_INPUT_SUPPORT)
4047__STATIC_INLINE void LL_TIM_EnableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
4048{
4049 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
4050 SET_BIT(*pReg, Source);
4051}
4052
4076__STATIC_INLINE void LL_TIM_DisableBreakInputSource(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source)
4077{
4078 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
4079 CLEAR_BIT(*pReg, Source);
4080}
4081
4105__STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity(TIM_TypeDef *TIMx, uint32_t BreakInput, uint32_t Source,
4106 uint32_t Polarity)
4107{
4108 __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
4109 MODIFY_REG(*pReg, (TIMx_AF1_BKINP << TIM_POSITION_BRK_SOURCE), (Polarity << TIM_POSITION_BRK_SOURCE));
4110}
4111#endif /* TIM_BREAK_INPUT_SUPPORT */
4174__STATIC_INLINE void LL_TIM_ConfigDMABurst(TIM_TypeDef *TIMx, uint32_t DMABurstBaseAddress, uint32_t DMABurstLength)
4175{
4176 MODIFY_REG(TIMx->DCR, (TIM_DCR_DBL | TIM_DCR_DBA), (DMABurstBaseAddress | DMABurstLength));
4177}
4178
4260__STATIC_INLINE void LL_TIM_SetRemap(TIM_TypeDef *TIMx, uint32_t Remap)
4261{
4263}
4264
4279__STATIC_INLINE void LL_TIM_ClearFlag_UPDATE(TIM_TypeDef *TIMx)
4280{
4281 WRITE_REG(TIMx->SR, ~(TIM_SR_UIF));
4282}
4283
4290__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_UPDATE(const TIM_TypeDef *TIMx)
4291{
4292 return ((READ_BIT(TIMx->SR, TIM_SR_UIF) == (TIM_SR_UIF)) ? 1UL : 0UL);
4293}
4294
4301__STATIC_INLINE void LL_TIM_ClearFlag_CC1(TIM_TypeDef *TIMx)
4302{
4303 WRITE_REG(TIMx->SR, ~(TIM_SR_CC1IF));
4304}
4305
4312__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1(const TIM_TypeDef *TIMx)
4313{
4314 return ((READ_BIT(TIMx->SR, TIM_SR_CC1IF) == (TIM_SR_CC1IF)) ? 1UL : 0UL);
4315}
4316
4323__STATIC_INLINE void LL_TIM_ClearFlag_CC2(TIM_TypeDef *TIMx)
4324{
4325 WRITE_REG(TIMx->SR, ~(TIM_SR_CC2IF));
4326}
4327
4334__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2(const TIM_TypeDef *TIMx)
4335{
4336 return ((READ_BIT(TIMx->SR, TIM_SR_CC2IF) == (TIM_SR_CC2IF)) ? 1UL : 0UL);
4337}
4338
4345__STATIC_INLINE void LL_TIM_ClearFlag_CC3(TIM_TypeDef *TIMx)
4346{
4347 WRITE_REG(TIMx->SR, ~(TIM_SR_CC3IF));
4348}
4349
4356__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3(const TIM_TypeDef *TIMx)
4357{
4358 return ((READ_BIT(TIMx->SR, TIM_SR_CC3IF) == (TIM_SR_CC3IF)) ? 1UL : 0UL);
4359}
4360
4367__STATIC_INLINE void LL_TIM_ClearFlag_CC4(TIM_TypeDef *TIMx)
4368{
4369 WRITE_REG(TIMx->SR, ~(TIM_SR_CC4IF));
4370}
4371
4378__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4(const TIM_TypeDef *TIMx)
4379{
4380 return ((READ_BIT(TIMx->SR, TIM_SR_CC4IF) == (TIM_SR_CC4IF)) ? 1UL : 0UL);
4381}
4382
4389__STATIC_INLINE void LL_TIM_ClearFlag_CC5(TIM_TypeDef *TIMx)
4390{
4391 WRITE_REG(TIMx->SR, ~(TIM_SR_CC5IF));
4392}
4393
4400__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC5(const TIM_TypeDef *TIMx)
4401{
4402 return ((READ_BIT(TIMx->SR, TIM_SR_CC5IF) == (TIM_SR_CC5IF)) ? 1UL : 0UL);
4403}
4404
4411__STATIC_INLINE void LL_TIM_ClearFlag_CC6(TIM_TypeDef *TIMx)
4412{
4413 WRITE_REG(TIMx->SR, ~(TIM_SR_CC6IF));
4414}
4415
4422__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC6(const TIM_TypeDef *TIMx)
4423{
4424 return ((READ_BIT(TIMx->SR, TIM_SR_CC6IF) == (TIM_SR_CC6IF)) ? 1UL : 0UL);
4425}
4426
4433__STATIC_INLINE void LL_TIM_ClearFlag_COM(TIM_TypeDef *TIMx)
4434{
4435 WRITE_REG(TIMx->SR, ~(TIM_SR_COMIF));
4436}
4437
4444__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_COM(const TIM_TypeDef *TIMx)
4445{
4446 return ((READ_BIT(TIMx->SR, TIM_SR_COMIF) == (TIM_SR_COMIF)) ? 1UL : 0UL);
4447}
4448
4455__STATIC_INLINE void LL_TIM_ClearFlag_TRIG(TIM_TypeDef *TIMx)
4456{
4457 WRITE_REG(TIMx->SR, ~(TIM_SR_TIF));
4458}
4459
4466__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_TRIG(const TIM_TypeDef *TIMx)
4467{
4468 return ((READ_BIT(TIMx->SR, TIM_SR_TIF) == (TIM_SR_TIF)) ? 1UL : 0UL);
4469}
4470
4477__STATIC_INLINE void LL_TIM_ClearFlag_BRK(TIM_TypeDef *TIMx)
4478{
4479 WRITE_REG(TIMx->SR, ~(TIM_SR_BIF));
4480}
4481
4488__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_BRK(const TIM_TypeDef *TIMx)
4489{
4490 return ((READ_BIT(TIMx->SR, TIM_SR_BIF) == (TIM_SR_BIF)) ? 1UL : 0UL);
4491}
4492
4499__STATIC_INLINE void LL_TIM_ClearFlag_BRK2(TIM_TypeDef *TIMx)
4500{
4501 WRITE_REG(TIMx->SR, ~(TIM_SR_B2IF));
4502}
4503
4510__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_BRK2(const TIM_TypeDef *TIMx)
4511{
4512 return ((READ_BIT(TIMx->SR, TIM_SR_B2IF) == (TIM_SR_B2IF)) ? 1UL : 0UL);
4513}
4514
4521__STATIC_INLINE void LL_TIM_ClearFlag_CC1OVR(TIM_TypeDef *TIMx)
4522{
4523 WRITE_REG(TIMx->SR, ~(TIM_SR_CC1OF));
4524}
4525
4533__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC1OVR(const TIM_TypeDef *TIMx)
4534{
4535 return ((READ_BIT(TIMx->SR, TIM_SR_CC1OF) == (TIM_SR_CC1OF)) ? 1UL : 0UL);
4536}
4537
4544__STATIC_INLINE void LL_TIM_ClearFlag_CC2OVR(TIM_TypeDef *TIMx)
4545{
4546 WRITE_REG(TIMx->SR, ~(TIM_SR_CC2OF));
4547}
4548
4556__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC2OVR(const TIM_TypeDef *TIMx)
4557{
4558 return ((READ_BIT(TIMx->SR, TIM_SR_CC2OF) == (TIM_SR_CC2OF)) ? 1UL : 0UL);
4559}
4560
4567__STATIC_INLINE void LL_TIM_ClearFlag_CC3OVR(TIM_TypeDef *TIMx)
4568{
4569 WRITE_REG(TIMx->SR, ~(TIM_SR_CC3OF));
4570}
4571
4579__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC3OVR(const TIM_TypeDef *TIMx)
4580{
4581 return ((READ_BIT(TIMx->SR, TIM_SR_CC3OF) == (TIM_SR_CC3OF)) ? 1UL : 0UL);
4582}
4583
4590__STATIC_INLINE void LL_TIM_ClearFlag_CC4OVR(TIM_TypeDef *TIMx)
4591{
4592 WRITE_REG(TIMx->SR, ~(TIM_SR_CC4OF));
4593}
4594
4602__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_CC4OVR(const TIM_TypeDef *TIMx)
4603{
4604 return ((READ_BIT(TIMx->SR, TIM_SR_CC4OF) == (TIM_SR_CC4OF)) ? 1UL : 0UL);
4605}
4606
4613__STATIC_INLINE void LL_TIM_ClearFlag_SYSBRK(TIM_TypeDef *TIMx)
4614{
4615 WRITE_REG(TIMx->SR, ~(TIM_SR_SBIF));
4616}
4617
4624__STATIC_INLINE uint32_t LL_TIM_IsActiveFlag_SYSBRK(const TIM_TypeDef *TIMx)
4625{
4626 return ((READ_BIT(TIMx->SR, TIM_SR_SBIF) == (TIM_SR_SBIF)) ? 1UL : 0UL);
4627}
4628
4643__STATIC_INLINE void LL_TIM_EnableIT_UPDATE(TIM_TypeDef *TIMx)
4644{
4645 SET_BIT(TIMx->DIER, TIM_DIER_UIE);
4646}
4647
4654__STATIC_INLINE void LL_TIM_DisableIT_UPDATE(TIM_TypeDef *TIMx)
4655{
4656 CLEAR_BIT(TIMx->DIER, TIM_DIER_UIE);
4657}
4658
4665__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_UPDATE(const TIM_TypeDef *TIMx)
4666{
4667 return ((READ_BIT(TIMx->DIER, TIM_DIER_UIE) == (TIM_DIER_UIE)) ? 1UL : 0UL);
4668}
4669
4676__STATIC_INLINE void LL_TIM_EnableIT_CC1(TIM_TypeDef *TIMx)
4677{
4678 SET_BIT(TIMx->DIER, TIM_DIER_CC1IE);
4679}
4680
4687__STATIC_INLINE void LL_TIM_DisableIT_CC1(TIM_TypeDef *TIMx)
4688{
4689 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC1IE);
4690}
4691
4698__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC1(const TIM_TypeDef *TIMx)
4699{
4700 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC1IE) == (TIM_DIER_CC1IE)) ? 1UL : 0UL);
4701}
4702
4709__STATIC_INLINE void LL_TIM_EnableIT_CC2(TIM_TypeDef *TIMx)
4710{
4711 SET_BIT(TIMx->DIER, TIM_DIER_CC2IE);
4712}
4713
4720__STATIC_INLINE void LL_TIM_DisableIT_CC2(TIM_TypeDef *TIMx)
4721{
4722 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC2IE);
4723}
4724
4731__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC2(const TIM_TypeDef *TIMx)
4732{
4733 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC2IE) == (TIM_DIER_CC2IE)) ? 1UL : 0UL);
4734}
4735
4742__STATIC_INLINE void LL_TIM_EnableIT_CC3(TIM_TypeDef *TIMx)
4743{
4744 SET_BIT(TIMx->DIER, TIM_DIER_CC3IE);
4745}
4746
4753__STATIC_INLINE void LL_TIM_DisableIT_CC3(TIM_TypeDef *TIMx)
4754{
4755 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC3IE);
4756}
4757
4764__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC3(const TIM_TypeDef *TIMx)
4765{
4766 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC3IE) == (TIM_DIER_CC3IE)) ? 1UL : 0UL);
4767}
4768
4775__STATIC_INLINE void LL_TIM_EnableIT_CC4(TIM_TypeDef *TIMx)
4776{
4777 SET_BIT(TIMx->DIER, TIM_DIER_CC4IE);
4778}
4779
4786__STATIC_INLINE void LL_TIM_DisableIT_CC4(TIM_TypeDef *TIMx)
4787{
4788 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC4IE);
4789}
4790
4797__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_CC4(const TIM_TypeDef *TIMx)
4798{
4799 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC4IE) == (TIM_DIER_CC4IE)) ? 1UL : 0UL);
4800}
4801
4808__STATIC_INLINE void LL_TIM_EnableIT_COM(TIM_TypeDef *TIMx)
4809{
4810 SET_BIT(TIMx->DIER, TIM_DIER_COMIE);
4811}
4812
4819__STATIC_INLINE void LL_TIM_DisableIT_COM(TIM_TypeDef *TIMx)
4820{
4821 CLEAR_BIT(TIMx->DIER, TIM_DIER_COMIE);
4822}
4823
4830__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_COM(const TIM_TypeDef *TIMx)
4831{
4832 return ((READ_BIT(TIMx->DIER, TIM_DIER_COMIE) == (TIM_DIER_COMIE)) ? 1UL : 0UL);
4833}
4834
4841__STATIC_INLINE void LL_TIM_EnableIT_TRIG(TIM_TypeDef *TIMx)
4842{
4843 SET_BIT(TIMx->DIER, TIM_DIER_TIE);
4844}
4845
4852__STATIC_INLINE void LL_TIM_DisableIT_TRIG(TIM_TypeDef *TIMx)
4853{
4854 CLEAR_BIT(TIMx->DIER, TIM_DIER_TIE);
4855}
4856
4863__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_TRIG(const TIM_TypeDef *TIMx)
4864{
4865 return ((READ_BIT(TIMx->DIER, TIM_DIER_TIE) == (TIM_DIER_TIE)) ? 1UL : 0UL);
4866}
4867
4874__STATIC_INLINE void LL_TIM_EnableIT_BRK(TIM_TypeDef *TIMx)
4875{
4876 SET_BIT(TIMx->DIER, TIM_DIER_BIE);
4877}
4878
4885__STATIC_INLINE void LL_TIM_DisableIT_BRK(TIM_TypeDef *TIMx)
4886{
4887 CLEAR_BIT(TIMx->DIER, TIM_DIER_BIE);
4888}
4889
4896__STATIC_INLINE uint32_t LL_TIM_IsEnabledIT_BRK(const TIM_TypeDef *TIMx)
4897{
4898 return ((READ_BIT(TIMx->DIER, TIM_DIER_BIE) == (TIM_DIER_BIE)) ? 1UL : 0UL);
4899}
4900
4915__STATIC_INLINE void LL_TIM_EnableDMAReq_UPDATE(TIM_TypeDef *TIMx)
4916{
4917 SET_BIT(TIMx->DIER, TIM_DIER_UDE);
4918}
4919
4926__STATIC_INLINE void LL_TIM_DisableDMAReq_UPDATE(TIM_TypeDef *TIMx)
4927{
4928 CLEAR_BIT(TIMx->DIER, TIM_DIER_UDE);
4929}
4930
4937__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_UPDATE(const TIM_TypeDef *TIMx)
4938{
4939 return ((READ_BIT(TIMx->DIER, TIM_DIER_UDE) == (TIM_DIER_UDE)) ? 1UL : 0UL);
4940}
4941
4948__STATIC_INLINE void LL_TIM_EnableDMAReq_CC1(TIM_TypeDef *TIMx)
4949{
4950 SET_BIT(TIMx->DIER, TIM_DIER_CC1DE);
4951}
4952
4959__STATIC_INLINE void LL_TIM_DisableDMAReq_CC1(TIM_TypeDef *TIMx)
4960{
4961 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC1DE);
4962}
4963
4970__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC1(const TIM_TypeDef *TIMx)
4971{
4972 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC1DE) == (TIM_DIER_CC1DE)) ? 1UL : 0UL);
4973}
4974
4981__STATIC_INLINE void LL_TIM_EnableDMAReq_CC2(TIM_TypeDef *TIMx)
4982{
4983 SET_BIT(TIMx->DIER, TIM_DIER_CC2DE);
4984}
4985
4992__STATIC_INLINE void LL_TIM_DisableDMAReq_CC2(TIM_TypeDef *TIMx)
4993{
4994 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC2DE);
4995}
4996
5003__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC2(const TIM_TypeDef *TIMx)
5004{
5005 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC2DE) == (TIM_DIER_CC2DE)) ? 1UL : 0UL);
5006}
5007
5014__STATIC_INLINE void LL_TIM_EnableDMAReq_CC3(TIM_TypeDef *TIMx)
5015{
5016 SET_BIT(TIMx->DIER, TIM_DIER_CC3DE);
5017}
5018
5025__STATIC_INLINE void LL_TIM_DisableDMAReq_CC3(TIM_TypeDef *TIMx)
5026{
5027 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC3DE);
5028}
5029
5036__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC3(const TIM_TypeDef *TIMx)
5037{
5038 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC3DE) == (TIM_DIER_CC3DE)) ? 1UL : 0UL);
5039}
5040
5047__STATIC_INLINE void LL_TIM_EnableDMAReq_CC4(TIM_TypeDef *TIMx)
5048{
5049 SET_BIT(TIMx->DIER, TIM_DIER_CC4DE);
5050}
5051
5058__STATIC_INLINE void LL_TIM_DisableDMAReq_CC4(TIM_TypeDef *TIMx)
5059{
5060 CLEAR_BIT(TIMx->DIER, TIM_DIER_CC4DE);
5061}
5062
5069__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_CC4(const TIM_TypeDef *TIMx)
5070{
5071 return ((READ_BIT(TIMx->DIER, TIM_DIER_CC4DE) == (TIM_DIER_CC4DE)) ? 1UL : 0UL);
5072}
5073
5080__STATIC_INLINE void LL_TIM_EnableDMAReq_COM(TIM_TypeDef *TIMx)
5081{
5082 SET_BIT(TIMx->DIER, TIM_DIER_COMDE);
5083}
5084
5091__STATIC_INLINE void LL_TIM_DisableDMAReq_COM(TIM_TypeDef *TIMx)
5092{
5093 CLEAR_BIT(TIMx->DIER, TIM_DIER_COMDE);
5094}
5095
5102__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_COM(const TIM_TypeDef *TIMx)
5103{
5104 return ((READ_BIT(TIMx->DIER, TIM_DIER_COMDE) == (TIM_DIER_COMDE)) ? 1UL : 0UL);
5105}
5106
5113__STATIC_INLINE void LL_TIM_EnableDMAReq_TRIG(TIM_TypeDef *TIMx)
5114{
5115 SET_BIT(TIMx->DIER, TIM_DIER_TDE);
5116}
5117
5124__STATIC_INLINE void LL_TIM_DisableDMAReq_TRIG(TIM_TypeDef *TIMx)
5125{
5126 CLEAR_BIT(TIMx->DIER, TIM_DIER_TDE);
5127}
5128
5135__STATIC_INLINE uint32_t LL_TIM_IsEnabledDMAReq_TRIG(const TIM_TypeDef *TIMx)
5136{
5137 return ((READ_BIT(TIMx->DIER, TIM_DIER_TDE) == (TIM_DIER_TDE)) ? 1UL : 0UL);
5138}
5139
5154__STATIC_INLINE void LL_TIM_GenerateEvent_UPDATE(TIM_TypeDef *TIMx)
5155{
5156 SET_BIT(TIMx->EGR, TIM_EGR_UG);
5157}
5158
5165__STATIC_INLINE void LL_TIM_GenerateEvent_CC1(TIM_TypeDef *TIMx)
5166{
5167 SET_BIT(TIMx->EGR, TIM_EGR_CC1G);
5168}
5169
5176__STATIC_INLINE void LL_TIM_GenerateEvent_CC2(TIM_TypeDef *TIMx)
5177{
5178 SET_BIT(TIMx->EGR, TIM_EGR_CC2G);
5179}
5180
5187__STATIC_INLINE void LL_TIM_GenerateEvent_CC3(TIM_TypeDef *TIMx)
5188{
5189 SET_BIT(TIMx->EGR, TIM_EGR_CC3G);
5190}
5191
5198__STATIC_INLINE void LL_TIM_GenerateEvent_CC4(TIM_TypeDef *TIMx)
5199{
5200 SET_BIT(TIMx->EGR, TIM_EGR_CC4G);
5201}
5202
5209__STATIC_INLINE void LL_TIM_GenerateEvent_COM(TIM_TypeDef *TIMx)
5210{
5211 SET_BIT(TIMx->EGR, TIM_EGR_COMG);
5212}
5213
5220__STATIC_INLINE void LL_TIM_GenerateEvent_TRIG(TIM_TypeDef *TIMx)
5221{
5222 SET_BIT(TIMx->EGR, TIM_EGR_TG);
5223}
5224
5231__STATIC_INLINE void LL_TIM_GenerateEvent_BRK(TIM_TypeDef *TIMx)
5232{
5233 SET_BIT(TIMx->EGR, TIM_EGR_BG);
5234}
5235
5242__STATIC_INLINE void LL_TIM_GenerateEvent_BRK2(TIM_TypeDef *TIMx)
5243{
5244 SET_BIT(TIMx->EGR, TIM_EGR_B2G);
5245}
5246
5251#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
5257ErrorStatus LL_TIM_DeInit(const TIM_TypeDef *TIMx);
5258void LL_TIM_StructInit(LL_TIM_InitTypeDef *TIM_InitStruct);
5259ErrorStatus LL_TIM_Init(TIM_TypeDef *TIMx, const LL_TIM_InitTypeDef *TIM_InitStruct);
5260void LL_TIM_OC_StructInit(LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct);
5261ErrorStatus LL_TIM_OC_Init(TIM_TypeDef *TIMx, uint32_t Channel, const LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct);
5262void LL_TIM_IC_StructInit(LL_TIM_IC_InitTypeDef *TIM_ICInitStruct);
5263ErrorStatus LL_TIM_IC_Init(TIM_TypeDef *TIMx, uint32_t Channel, const LL_TIM_IC_InitTypeDef *TIM_IC_InitStruct);
5264void LL_TIM_ENCODER_StructInit(LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct);
5265ErrorStatus LL_TIM_ENCODER_Init(TIM_TypeDef *TIMx, const LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct);
5266void LL_TIM_HALLSENSOR_StructInit(LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct);
5267ErrorStatus LL_TIM_HALLSENSOR_Init(TIM_TypeDef *TIMx, const LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct);
5268void LL_TIM_BDTR_StructInit(LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct);
5269ErrorStatus LL_TIM_BDTR_Init(TIM_TypeDef *TIMx, const LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct);
5273#endif /* USE_FULL_LL_DRIVER */
5274
5283#endif /* TIM1 || TIM2 || TIM3 || TIM4 || TIM5 || TIM6 || TIM7 || TIM8 || TIM12 || TIM13 ||TIM14 || TIM15 || TIM16 || TIM17 || TIM23 || TIM24 */
5284
5289#ifdef __cplusplus
5290}
5291#endif
5292
5293#endif /* __STM32H7xx_LL_TIM_H */
#define __IO
Definition: core_cm4.h:239
#define TIM_EGR_CC3G
Definition: stm32h723xx.h:19457
#define TIM_CR1_URS
Definition: stm32h723xx.h:19220
#define TIM_EGR_BG
Definition: stm32h723xx.h:19469
#define TIM_EGR_CC1G
Definition: stm32h723xx.h:19451
#define TIM_CCER_CC1P
Definition: stm32h723xx.h:19643
#define TIM_SMCR_ETPS
Definition: stm32h723xx.h:19337
#define TIM_DIER_CC3DE
Definition: stm32h723xx.h:19384
#define TIM_EGR_UG
Definition: stm32h723xx.h:19448
#define TIM_CCMR1_OC1PE
Definition: stm32h723xx.h:19487
#define TIM_DIER_CC1IE
Definition: stm32h723xx.h:19354
#define TIM_EGR_CC4G
Definition: stm32h723xx.h:19460
#define TIM_DIER_BIE
Definition: stm32h723xx.h:19372
#define TIM_SR_CC5IF
Definition: stm32h723xx.h:19437
#define TIM_SR_CC2IF
Definition: stm32h723xx.h:19404
#define TIM_BDTR_MOE
Definition: stm32h723xx.h:19792
#define TIM_SMCR_ETP
Definition: stm32h723xx.h:19346
#define TIM_EGR_TG
Definition: stm32h723xx.h:19466
#define TIM_BDTR_BKDSRM
Definition: stm32h723xx.h:19809
#define TIM_CR2_OIS1
Definition: stm32h723xx.h:19271
#define TIM_BDTR_BKP
Definition: stm32h723xx.h:19786
#define TIM_SMCR_ECE
Definition: stm32h723xx.h:19343
#define TIM_CR1_CMS
Definition: stm32h723xx.h:19230
#define TIM_SR_CC2OF
Definition: stm32h723xx.h:19428
#define TIM_CCER_CC1NP
Definition: stm32h723xx.h:19649
#define TIM_EGR_B2G
Definition: stm32h723xx.h:19472
#define TIM_SR_CC1IF
Definition: stm32h723xx.h:19401
#define TIM_CR1_ARPE
Definition: stm32h723xx.h:19236
#define TIM_DIER_CC3IE
Definition: stm32h723xx.h:19360
#define TIM_BDTR_BK2E
Definition: stm32h723xx.h:19803
#define TIM_TISEL_TI1SEL
Definition: stm32h723xx.h:19939
#define TIM_SMCR_MSM
Definition: stm32h723xx.h:19325
#define TIM_EGR_CC2G
Definition: stm32h723xx.h:19454
#define TIM_CCR5_CCR5
Definition: stm32h723xx.h:19740
#define TIM_BDTR_BKBID
Definition: stm32h723xx.h:19815
#define TIM_DIER_CC2DE
Definition: stm32h723xx.h:19381
#define TIM_BDTR_AOE
Definition: stm32h723xx.h:19789
#define TIM_DIER_TDE
Definition: stm32h723xx.h:19393
#define TIM_DIER_UIE
Definition: stm32h723xx.h:19351
#define TIM_CCR5_GC5C2
Definition: stm32h723xx.h:19746
#define TIM_DIER_CC4IE
Definition: stm32h723xx.h:19363
#define TIM_CR1_OPM
Definition: stm32h723xx.h:19223
#define TIM_SR_BIF
Definition: stm32h723xx.h:19419
#define TIM_CCMR1_OC1M
Definition: stm32h723xx.h:19491
#define TIM_BDTR_BKE
Definition: stm32h723xx.h:19783
#define TIM_DIER_CC2IE
Definition: stm32h723xx.h:19357
#define TIM_BDTR_BK2DSRM
Definition: stm32h723xx.h:19812
#define TIM_DIER_COMDE
Definition: stm32h723xx.h:19390
#define TIM_TISEL_TI3SEL
Definition: stm32h723xx.h:19955
#define TIM_SR_TIF
Definition: stm32h723xx.h:19416
#define TIM_BDTR_LOCK
Definition: stm32h723xx.h:19771
#define TIM_TISEL_TI4SEL
Definition: stm32h723xx.h:19963
#define TIM_SR_CC1OF
Definition: stm32h723xx.h:19425
#define TIM_SR_CC4OF
Definition: stm32h723xx.h:19434
#define TIM_SMCR_TS
Definition: stm32h723xx.h:19316
#define TIM_CCMR1_OC1CE
Definition: stm32h723xx.h:19499
#define TIM_CNT_UIFCPY
Definition: stm32h723xx.h:19701
#define TIM_SR_COMIF
Definition: stm32h723xx.h:19413
#define TIM_CR1_CEN
Definition: stm32h723xx.h:19214
#define TIM_BDTR_BK2P
Definition: stm32h723xx.h:19806
#define TIM_CCMR1_CC1S
Definition: stm32h723xx.h:19478
#define TIM_CR1_UDIS
Definition: stm32h723xx.h:19217
#define TIM_DIER_TIE
Definition: stm32h723xx.h:19369
#define TIM_CR2_MMS
Definition: stm32h723xx.h:19261
#define TIM_CCR5_GC5C3
Definition: stm32h723xx.h:19749
#define TIM_DIER_CC4DE
Definition: stm32h723xx.h:19387
#define TIM_CR2_CCPC
Definition: stm32h723xx.h:19251
#define TIM_CCMR1_IC1F
Definition: stm32h723xx.h:19536
#define TIM_BDTR_OSSI
Definition: stm32h723xx.h:19777
#define TIM_BDTR_BK2BID
Definition: stm32h723xx.h:19818
#define TIM_CCMR1_IC1PSC
Definition: stm32h723xx.h:19530
#define TIM_CCMR1_OC1FE
Definition: stm32h723xx.h:19484
#define TIM_DCR_DBL
Definition: stm32h723xx.h:19832
#define TIM_DIER_UDE
Definition: stm32h723xx.h:19375
#define TIM_BDTR_DTG
Definition: stm32h723xx.h:19759
#define TIM_DCR_DBA
Definition: stm32h723xx.h:19823
#define TIM_SR_UIF
Definition: stm32h723xx.h:19398
#define TIM_CR1_CKD
Definition: stm32h723xx.h:19240
#define TIM_SR_CC4IF
Definition: stm32h723xx.h:19410
#define TIM_BDTR_BK2F
Definition: stm32h723xx.h:19799
#define TIM_CR1_DIR
Definition: stm32h723xx.h:19226
#define TIM_CR2_TI1S
Definition: stm32h723xx.h:19268
#define TIM_SR_CC6IF
Definition: stm32h723xx.h:19440
#define TIM_SR_CC3IF
Definition: stm32h723xx.h:19407
#define TIM_EGR_COMG
Definition: stm32h723xx.h:19463
#define TIM_CCR5_GC5C1
Definition: stm32h723xx.h:19743
#define TIM_CR2_CCDS
Definition: stm32h723xx.h:19257
#define TIM_DIER_COMIE
Definition: stm32h723xx.h:19366
#define TIM_DIER_CC1DE
Definition: stm32h723xx.h:19378
#define TIM_CR2_MMS2
Definition: stm32h723xx.h:19299
#define TIM_BDTR_BKF
Definition: stm32h723xx.h:19796
#define TIM_SMCR_ETF
Definition: stm32h723xx.h:19329
#define TIM_SR_SBIF
Definition: stm32h723xx.h:19443
#define TIM_SMCR_SMS
Definition: stm32h723xx.h:19308
#define TIM_SR_B2IF
Definition: stm32h723xx.h:19422
#define TIM_CR2_CCUS
Definition: stm32h723xx.h:19254
#define TIM_CR1_UIFREMAP
Definition: stm32h723xx.h:19246
#define TIM_SR_CC3OF
Definition: stm32h723xx.h:19431
#define TIM_BDTR_OSSR
Definition: stm32h723xx.h:19780
#define TIM_TISEL_TI2SEL
Definition: stm32h723xx.h:19947
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