43#if defined(USE_FULL_DDL_DRIVER)
52#define ASSERT_PARAM(_PARAM_) ((void)0U)
59#if defined (TMR1) || defined (TMR2) || defined (TMR3) || defined (TMR4)
72#define IS_DDL_TMR_COUNTERMODE(__VALUE__) (((__VALUE__) == DDL_TMR_COUNTERMODE_UP) \
73 || ((__VALUE__) == DDL_TMR_COUNTERMODE_DOWN) \
74 || ((__VALUE__) == DDL_TMR_COUNTERMODE_CENTER_UP) \
75 || ((__VALUE__) == DDL_TMR_COUNTERMODE_CENTER_DOWN) \
76 || ((__VALUE__) == DDL_TMR_COUNTERMODE_CENTER_UP_DOWN))
78#define IS_DDL_TMR_CLOCKDIVISION(__VALUE__) (((__VALUE__) == DDL_TMR_CLOCKDIVISION_DIV1) \
79 || ((__VALUE__) == DDL_TMR_CLOCKDIVISION_DIV2) \
80 || ((__VALUE__) == DDL_TMR_CLOCKDIVISION_DIV4))
82#define IS_DDL_TMR_OCMODE(__VALUE__) (((__VALUE__) == DDL_TMR_OCMODE_FROZEN) \
83 || ((__VALUE__) == DDL_TMR_OCMODE_ACTIVE) \
84 || ((__VALUE__) == DDL_TMR_OCMODE_INACTIVE) \
85 || ((__VALUE__) == DDL_TMR_OCMODE_TOGGLE) \
86 || ((__VALUE__) == DDL_TMR_OCMODE_FORCED_INACTIVE) \
87 || ((__VALUE__) == DDL_TMR_OCMODE_FORCED_ACTIVE) \
88 || ((__VALUE__) == DDL_TMR_OCMODE_PWM1) \
89 || ((__VALUE__) == DDL_TMR_OCMODE_PWM2))
91#define IS_DDL_TMR_OCSTATE(__VALUE__) (((__VALUE__) == DDL_TMR_OCSTATE_DISABLE) \
92 || ((__VALUE__) == DDL_TMR_OCSTATE_ENABLE))
94#define IS_DDL_TMR_OCPOLARITY(__VALUE__) (((__VALUE__) == DDL_TMR_OCPOLARITY_HIGH) \
95 || ((__VALUE__) == DDL_TMR_OCPOLARITY_LOW))
97#define IS_DDL_TMR_OCIDLESTATE(__VALUE__) (((__VALUE__) == DDL_TMR_OCIDLESTATE_LOW) \
98 || ((__VALUE__) == DDL_TMR_OCIDLESTATE_HIGH))
100#define IS_DDL_TMR_ACTIVEINPUT(__VALUE__) (((__VALUE__) == DDL_TMR_ACTIVEINPUT_DIRECTTI) \
101 || ((__VALUE__) == DDL_TMR_ACTIVEINPUT_INDIRECTTI) \
102 || ((__VALUE__) == DDL_TMR_ACTIVEINPUT_TRC))
104#define IS_DDL_TMR_ICPSC(__VALUE__) (((__VALUE__) == DDL_TMR_ICPSC_DIV1) \
105 || ((__VALUE__) == DDL_TMR_ICPSC_DIV2) \
106 || ((__VALUE__) == DDL_TMR_ICPSC_DIV4) \
107 || ((__VALUE__) == DDL_TMR_ICPSC_DIV8))
109#define IS_DDL_TMR_IC_FILTER(__VALUE__) (((__VALUE__) == DDL_TMR_IC_FILTER_FDIV1) \
110 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV1_N2) \
111 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV1_N4) \
112 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV1_N8) \
113 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV2_N6) \
114 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV2_N8) \
115 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV4_N6) \
116 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV4_N8) \
117 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV8_N6) \
118 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV8_N8) \
119 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV16_N5) \
120 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV16_N6) \
121 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV16_N8) \
122 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV32_N5) \
123 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV32_N6) \
124 || ((__VALUE__) == DDL_TMR_IC_FILTER_FDIV32_N8))
126#define IS_DDL_TMR_IC_POLARITY(__VALUE__) (((__VALUE__) == DDL_TMR_IC_POLARITY_RISING) \
127 || ((__VALUE__) == DDL_TMR_IC_POLARITY_FALLING) \
128 || ((__VALUE__) == DDL_TMR_IC_POLARITY_BOTHEDGE))
130#define IS_DDL_TMR_ENCODERMODE(__VALUE__) (((__VALUE__) == DDL_TMR_ENCODERMODE_X2_TI1) \
131 || ((__VALUE__) == DDL_TMR_ENCODERMODE_X2_TI2) \
132 || ((__VALUE__) == DDL_TMR_ENCODERMODE_X4_TI12))
134#define IS_DDL_TMR_IC_POLARITY_ENCODER(__VALUE__) (((__VALUE__) == DDL_TMR_IC_POLARITY_RISING) \
135 || ((__VALUE__) == DDL_TMR_IC_POLARITY_FALLING))
137#define IS_DDL_TMR_OSSR_STATE(__VALUE__) (((__VALUE__) == DDL_TMR_OSSR_DISABLE) \
138 || ((__VALUE__) == DDL_TMR_OSSR_ENABLE))
140#define IS_DDL_TMR_OSSI_STATE(__VALUE__) (((__VALUE__) == DDL_TMR_OSSI_DISABLE) \
141 || ((__VALUE__) == DDL_TMR_OSSI_ENABLE))
143#define IS_DDL_TMR_LOCK_LEVEL(__VALUE__) (((__VALUE__) == DDL_TMR_LOCKLEVEL_OFF) \
144 || ((__VALUE__) == DDL_TMR_LOCKLEVEL_1) \
145 || ((__VALUE__) == DDL_TMR_LOCKLEVEL_2) \
146 || ((__VALUE__) == DDL_TMR_LOCKLEVEL_3))
148#define IS_DDL_TMR_BREAK_STATE(__VALUE__) (((__VALUE__) == DDL_TMR_BREAK_DISABLE) \
149 || ((__VALUE__) == DDL_TMR_BREAK_ENABLE))
151#define IS_DDL_TMR_BREAK_POLARITY(__VALUE__) (((__VALUE__) == DDL_TMR_BREAK_POLARITY_LOW) \
152 || ((__VALUE__) == DDL_TMR_BREAK_POLARITY_HIGH))
154#define IS_DDL_TMR_AUTOMATIC_OUTPUT_STATE(__VALUE__) (((__VALUE__) == DDL_TMR_AUTOMATICOUTPUT_DISABLE) \
155 || ((__VALUE__) == DDL_TMR_AUTOMATICOUTPUT_ENABLE))
195 ErrorStatus result = SUCCESS;
216 else if (TMRx == TMR3)
223 else if (TMRx == TMR4)
246 TMR_InitStruct->
Prescaler = (uint16_t)0x0000;
273 if (IS_TMR_COUNTER_MODE_SELECT_INSTANCE(TMRx))
276 MODIFY_REG(tmpcr1, (TMR_CTRL1_CNTDIR | TMR_CTRL1_CAMSEL), TMR_InitStruct->
CounterMode);
279 if (IS_TMR_CLOCK_DIVISION_INSTANCE(TMRx))
282 MODIFY_REG(tmpcr1, TMR_CTRL1_CLKDIV, TMR_InitStruct->
ClockDivision);
294 if (IS_TMR_REPETITION_COUNTER_INSTANCE(TMRx))
343 ErrorStatus result = ERROR;
348 result =
OC1Config(TMRx, TMR_OC_InitStruct);
351 result =
OC2Config(TMRx, TMR_OC_InitStruct);
354 result =
OC3Config(TMRx, TMR_OC_InitStruct);
357 result =
OC4Config(TMRx, TMR_OC_InitStruct);
398 ErrorStatus result = ERROR;
403 result =
IC1Config(TMRx, TMR_IC_InitStruct);
406 result =
IC2Config(TMRx, TMR_IC_InitStruct);
409 result =
IC3Config(TMRx, TMR_IC_InitStruct);
412 result =
IC4Config(TMRx, TMR_IC_InitStruct);
468 TMRx->CCEN &= (uint32_t)~(TMR_CCEN_CC1EN | TMR_CCEN_CC2EN);
477 tmpccmr1 &= (uint32_t)~(TMR_CCM1_CC1SEL | TMR_CCM1_IC1F | TMR_CCM1_IC1PSC);
479 tmpccmr1 |= (uint32_t)(TMR_EncoderInitStruct->
IC1Filter);
480 tmpccmr1 |= (uint32_t)(TMR_EncoderInitStruct->
IC1Prescaler);
483 tmpccmr1 &= (uint32_t)~(TMR_CCM1_CC2SEL | TMR_CCM1_IC2F | TMR_CCM1_IC2PSC);
484 tmpccmr1 |= (uint32_t)(TMR_EncoderInitStruct->
IC2ActiveInput << 8U);
485 tmpccmr1 |= (uint32_t)(TMR_EncoderInitStruct->
IC2Filter << 8U);
486 tmpccmr1 |= (uint32_t)(TMR_EncoderInitStruct->
IC2Prescaler << 8U);
489 tmpccer &= (uint32_t)~(TMR_CCEN_CC1POL | TMR_CCEN_CC1NPOL | TMR_CCEN_CC2POL | TMR_CCEN_CC2NPOL);
490 tmpccer |= (uint32_t)(TMR_EncoderInitStruct->
IC1Polarity);
491 tmpccer |= (uint32_t)(TMR_EncoderInitStruct->
IC2Polarity << 4U);
492 tmpccer |= (uint32_t)(TMR_CCEN_CC1EN | TMR_CCEN_CC2EN);
551 ASSERT_PARAM(IS_TMR_HALL_SENSOR_INTERFACE_INSTANCE(TMRx));
557 TMRx->CCEN &= (uint32_t)~(TMR_CCEN_CC1EN | TMR_CCEN_CC2EN);
572 tmpcr2 |= TMR_CTRL2_TI1SEL;
578 tmpsmcr &= (uint32_t)~(TMR_SMCTRL_TRGSEL | TMR_SMCTRL_SMFSEL);
583 tmpccmr1 &= (uint32_t)~(TMR_CCM1_CC1SEL | TMR_CCM1_IC1F | TMR_CCM1_IC1PSC);
585 tmpccmr1 |= (uint32_t)(TMR_HallSensorInitStruct->
IC1Filter >> 16U);
586 tmpccmr1 |= (uint32_t)(TMR_HallSensorInitStruct->
IC1Prescaler >> 16U);
589 tmpccmr1 &= (uint32_t)~(TMR_CCM1_OC2MOD | TMR_CCM1_OC2FEN | TMR_CCM1_OC2PEN | TMR_CCM1_OC2CEN);
593 tmpccer &= (uint32_t)~(TMR_CCEN_CC1POL | TMR_CCEN_CC1NPOL | TMR_CCEN_CC2POL | TMR_CCEN_CC2NPOL);
594 tmpccer |= (uint32_t)(TMR_HallSensorInitStruct->
IC1Polarity);
595 tmpccer |= (uint32_t)(TMR_CCEN_CC1EN | TMR_CCEN_CC2EN);
628 TMR_BDTInitStruct->
DeadTime = (uint8_t)0x00;
650 uint32_t tmpbdtr = 0;
665 MODIFY_REG(tmpbdtr, TMR_BDT_DTS, TMR_BDTInitStruct->
DeadTime);
666 MODIFY_REG(tmpbdtr, TMR_BDT_LOCKCFG, TMR_BDTInitStruct->
LockLevel);
667 MODIFY_REG(tmpbdtr, TMR_BDT_IMOS, TMR_BDTInitStruct->
OSSIState);
668 MODIFY_REG(tmpbdtr, TMR_BDT_RMOS, TMR_BDTInitStruct->
OSSRState);
669 MODIFY_REG(tmpbdtr, TMR_BDT_BRKEN, TMR_BDTInitStruct->
BreakState);
670 MODIFY_REG(tmpbdtr, TMR_BDT_BRKPOL, TMR_BDTInitStruct->
BreakPolarity);
714 CLEAR_BIT(TMRx->CCEN, TMR_CCEN_CC1EN);
726 CLEAR_BIT(tmpccmr1, TMR_CCM1_CC1SEL);
729 MODIFY_REG(tmpccmr1, TMR_CCM1_OC1MOD, TMR_OCInitStruct->
OCMode);
732 MODIFY_REG(tmpccer, TMR_CCEN_CC1POL, TMR_OCInitStruct->
OCPolarity);
735 MODIFY_REG(tmpccer, TMR_CCEN_CC1EN, TMR_OCInitStruct->
OCState);
737 if (IS_TMR_BREAK_INSTANCE(TMRx))
743 MODIFY_REG(tmpccer, TMR_CCEN_CC1NPOL, TMR_OCInitStruct->
OCNPolarity << 2U);
746 MODIFY_REG(tmpccer, TMR_CCEN_CC1NEN, TMR_OCInitStruct->
OCNState << 2U);
749 MODIFY_REG(tmpcr2, TMR_CTRL2_OC1OIS, TMR_OCInitStruct->
OCIdleState);
752 MODIFY_REG(tmpcr2, TMR_CTRL2_OC1NOIS, TMR_OCInitStruct->
OCNIdleState << 1U);
793 CLEAR_BIT(TMRx->CCEN, TMR_CCEN_CC2EN);
805 CLEAR_BIT(tmpccmr1, TMR_CCM1_CC2SEL);
808 MODIFY_REG(tmpccmr1, TMR_CCM1_OC2MOD, TMR_OCInitStruct->
OCMode << 8U);
811 MODIFY_REG(tmpccer, TMR_CCEN_CC2POL, TMR_OCInitStruct->
OCPolarity << 4U);
814 MODIFY_REG(tmpccer, TMR_CCEN_CC2EN, TMR_OCInitStruct->
OCState << 4U);
816 if (IS_TMR_BREAK_INSTANCE(TMRx))
822 MODIFY_REG(tmpccer, TMR_CCEN_CC2NPOL, TMR_OCInitStruct->
OCNPolarity << 6U);
825 MODIFY_REG(tmpccer, TMR_CCEN_CC2NEN, TMR_OCInitStruct->
OCNState << 6U);
828 MODIFY_REG(tmpcr2, TMR_CTRL2_OC2OIS, TMR_OCInitStruct->
OCIdleState << 2U);
831 MODIFY_REG(tmpcr2, TMR_CTRL2_OC2NOIS, TMR_OCInitStruct->
OCNIdleState << 3U);
872 CLEAR_BIT(TMRx->CCEN, TMR_CCEN_CC3EN);
884 CLEAR_BIT(tmpccmr2, TMR_CCM2_CC3SEL);
887 MODIFY_REG(tmpccmr2, TMR_CCM2_OC3MOD, TMR_OCInitStruct->
OCMode);
890 MODIFY_REG(tmpccer, TMR_CCEN_CC3POL, TMR_OCInitStruct->
OCPolarity << 8U);
893 MODIFY_REG(tmpccer, TMR_CCEN_CC3EN, TMR_OCInitStruct->
OCState << 8U);
895 if (IS_TMR_BREAK_INSTANCE(TMRx))
901 MODIFY_REG(tmpccer, TMR_CCEN_CC3NPOL, TMR_OCInitStruct->
OCNPolarity << 10U);
904 MODIFY_REG(tmpccer, TMR_CCEN_CC3NEN, TMR_OCInitStruct->
OCNState << 10U);
907 MODIFY_REG(tmpcr2, TMR_CTRL2_OC3OIS, TMR_OCInitStruct->
OCIdleState << 4U);
910 MODIFY_REG(tmpcr2, TMR_CTRL2_OC3NOIS, TMR_OCInitStruct->
OCNIdleState << 5U);
951 CLEAR_BIT(TMRx->CCEN, TMR_CCEN_CC4EN);
963 CLEAR_BIT(tmpccmr2, TMR_CCM2_CC4SEL);
966 MODIFY_REG(tmpccmr2, TMR_CCM2_OC4MOD, TMR_OCInitStruct->
OCMode << 8U);
969 MODIFY_REG(tmpccer, TMR_CCEN_CC4POL, TMR_OCInitStruct->
OCPolarity << 12U);
972 MODIFY_REG(tmpccer, TMR_CCEN_CC4EN, TMR_OCInitStruct->
OCState << 12U);
974 if (IS_TMR_BREAK_INSTANCE(TMRx))
980 MODIFY_REG(tmpcr2, TMR_CTRL2_OC4OIS, TMR_OCInitStruct->
OCIdleState << 6U);
1017 TMRx->CCEN &= (uint32_t)~TMR_CCEN_CC1EN;
1020 MODIFY_REG(TMRx->CCM1,
1021 (TMR_CCM1_CC1SEL | TMR_CCM1_IC1F | TMR_CCM1_IC1PSC),
1025 MODIFY_REG(TMRx->CCEN,
1026 (TMR_CCEN_CC1POL | TMR_CCEN_CC1NPOL),
1027 (TMR_ICInitStruct->
ICPolarity | TMR_CCEN_CC1EN));
1050 TMRx->CCEN &= (uint32_t)~TMR_CCEN_CC2EN;
1053 MODIFY_REG(TMRx->CCM1,
1054 (TMR_CCM1_CC2SEL | TMR_CCM1_IC2F | TMR_CCM1_IC2PSC),
1058 MODIFY_REG(TMRx->CCEN,
1059 (TMR_CCEN_CC2POL | TMR_CCEN_CC2NPOL),
1060 ((TMR_ICInitStruct->
ICPolarity << 4U) | TMR_CCEN_CC2EN));
1083 TMRx->CCEN &= (uint32_t)~TMR_CCEN_CC3EN;
1086 MODIFY_REG(TMRx->CCM2,
1087 (TMR_CCM2_CC3SEL | TMR_CCM2_IC3F | TMR_CCM2_IC3PSC),
1091 MODIFY_REG(TMRx->CCEN,
1092 (TMR_CCEN_CC3POL | TMR_CCEN_CC3NPOL),
1093 ((TMR_ICInitStruct->
ICPolarity << 8U) | TMR_CCEN_CC3EN));
1116 TMRx->CCEN &= (uint32_t)~TMR_CCEN_CC4EN;
1119 MODIFY_REG(TMRx->CCM2,
1120 (TMR_CCM2_CC4SEL | TMR_CCM2_IC4F | TMR_CCM2_IC4PSC),
1124 MODIFY_REG(TMRx->CCEN,
1126 ((TMR_ICInitStruct->
ICPolarity << 12U) | TMR_CCEN_CC4EN));
G32 assert template file. This file should be copied to the application folder and renamed to g32_ass...
#define ASSERT_PARAM(_PARAM_)
Header file of RCM DDL module.
Header file of TMR DDL module.
#define DDL_RCM_APB_RESET_TMR2
#define DDL_RCM_APB_RESET_TMR3
#define DDL_RCM_APB_RESET_TMR4
#define DDL_RCM_APB_RESET_TMR1
__STATIC_INLINE void DDL_RCM_Unlock(void)
Unlock the RCM register.
__STATIC_INLINE void DDL_RCM_EnableAPBReset(uint32_t Peripheral)
Enable the APB peripheral reset.
__STATIC_INLINE void DDL_RCM_DisableAPBReset(uint32_t Peripheral)
Disable the APB peripheral reset.
#define DDL_TMR_AUTOMATICOUTPUT_DISABLE
#define DDL_TMR_BREAK_DISABLE
#define DDL_TMR_BREAK_POLARITY_LOW
#define DDL_TMR_CHANNEL_CH1
#define DDL_TMR_CHANNEL_CH2
#define DDL_TMR_CHANNEL_CH3
#define DDL_TMR_CHANNEL_CH4
#define DDL_TMR_CLOCKDIVISION_DIV1
#define DDL_TMR_COUNTERMODE_UP
#define DDL_TMR_ENCODERMODE_X2_TI1
#define DDL_TMR_ICPSC_DIV1
#define DDL_TMR_IC_FILTER_FDIV1
#define DDL_TMR_IC_POLARITY_RISING
#define DDL_TMR_LOCKLEVEL_OFF
#define DDL_TMR_OCIDLESTATE_LOW
#define DDL_TMR_OCMODE_PWM2
#define DDL_TMR_OCMODE_FROZEN
#define DDL_TMR_OCPOLARITY_HIGH
#define DDL_TMR_OCSTATE_DISABLE
#define DDL_TMR_OSSI_DISABLE
#define DDL_TMR_OSSR_DISABLE
#define DDL_TMR_SLAVEMODE_RESET
#define DDL_TMR_TRGO_OC2REF
#define DDL_TMR_TS_TI1F_ED
__STATIC_INLINE void DDL_TMR_SetEncoderMode(TMR_TypeDef *TMRx, uint32_t EncoderMode)
Set the encoder interface mode.
__STATIC_INLINE void DDL_TMR_GenerateEvent_UPDATE(TMR_TypeDef *TMRx)
Generate an update event.
void DDL_TMR_StructInit(DDL_TMR_InitTypeDef *TMR_InitStruct)
Set the fields of the time base unit configuration data structure to their default values.
ErrorStatus DDL_TMR_Init(TMR_TypeDef *TMRx, DDL_TMR_InitTypeDef *TMR_InitStruct)
Configure the TMRx time base unit.
ErrorStatus DDL_TMR_BDT_Init(TMR_TypeDef *TMRx, DDL_TMR_BDT_InitTypeDef *TMR_BDTInitStruct)
Configure the Break and Dead Time feature of the timer instance.
void DDL_TMR_OC_StructInit(DDL_TMR_OC_InitTypeDef *TMR_OC_InitStruct)
Set the fields of the TMRx output channel configuration data structure to their default values.
ErrorStatus DDL_TMR_ENCODER_Init(TMR_TypeDef *TMRx, DDL_TMR_ENCODER_InitTypeDef *TMR_EncoderInitStruct)
Configure the encoder interface of the timer instance.
void DDL_TMR_HALLSENSOR_StructInit(DDL_TMR_HALLSENSOR_InitTypeDef *TMR_HallSensorInitStruct)
Set the fields of the TMRx Hall sensor interface configuration data structure to their default values...
void DDL_TMR_ENCODER_StructInit(DDL_TMR_ENCODER_InitTypeDef *TMR_EncoderInitStruct)
Fills each TMR_EncoderInitStruct field with its default value.
ErrorStatus DDL_TMR_OC_Init(TMR_TypeDef *TMRx, uint32_t Channel, DDL_TMR_OC_InitTypeDef *TMR_OC_InitStruct)
Configure the TMRx output channel.
void DDL_TMR_IC_StructInit(DDL_TMR_IC_InitTypeDef *TMR_ICInitStruct)
Set the fields of the TMRx input channel configuration data structure to their default values.
ErrorStatus DDL_TMR_HALLSENSOR_Init(TMR_TypeDef *TMRx, DDL_TMR_HALLSENSOR_InitTypeDef *TMR_HallSensorInitStruct)
Configure the Hall sensor interface of the timer instance.
ErrorStatus DDL_TMR_DeInit(TMR_TypeDef *TMRx)
Set TMRx registers to their reset values.
ErrorStatus DDL_TMR_IC_Init(TMR_TypeDef *TMRx, uint32_t Channel, DDL_TMR_IC_InitTypeDef *TMR_IC_InitStruct)
Configure the TMRx input channel.
void DDL_TMR_BDT_StructInit(DDL_TMR_BDT_InitTypeDef *TMR_BDTInitStruct)
Set the fields of the Break and Dead Time configuration data structure to their default values.
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH2(TMR_TypeDef *TMRx, uint32_t CompareValue)
Set compare value for output channel 2 (TMRx_CC2).
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH3(TMR_TypeDef *TMRx, uint32_t CompareValue)
Set compare value for output channel 3 (TMRx_CC3).
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH1(TMR_TypeDef *TMRx, uint32_t CompareValue)
Set compare value for output channel 1 (TMRx_CC1).
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH4(TMR_TypeDef *TMRx, uint32_t CompareValue)
Set compare value for output channel 4 (TMRx_CC4).
__STATIC_INLINE void DDL_TMR_SetAutoReload(TMR_TypeDef *TMRx, uint32_t AutoReload)
Set the auto-reload value.
__STATIC_INLINE void DDL_TMR_SetPrescaler(TMR_TypeDef *TMRx, uint32_t Prescaler)
Set the prescaler value.
__STATIC_INLINE void DDL_TMR_SetRepetitionCounter(TMR_TypeDef *TMRx, uint32_t RepetitionCounter)
Set the repetition counter value.
#define DDL_TMR_WriteReg(__INSTANCE__, __REG__, __VALUE__)
Write a value in TMR register.
#define DDL_TMR_ReadReg(__INSTANCE__, __REG__)
Read a value in TMR register.
static ErrorStatus OC4Config(TMR_TypeDef *TMRx, DDL_TMR_OC_InitTypeDef *TMR_OCInitStruct)
Configure the TMRx output channel 4.
static ErrorStatus IC4Config(TMR_TypeDef *TMRx, DDL_TMR_IC_InitTypeDef *TMR_ICInitStruct)
Configure the TMRx input channel 4.
static ErrorStatus OC2Config(TMR_TypeDef *TMRx, DDL_TMR_OC_InitTypeDef *TMR_OCInitStruct)
Configure the TMRx output channel 2.
static ErrorStatus IC1Config(TMR_TypeDef *TMRx, DDL_TMR_IC_InitTypeDef *TMR_ICInitStruct)
Configure the TMRx input channel 1.
static ErrorStatus OC1Config(TMR_TypeDef *TMRx, DDL_TMR_OC_InitTypeDef *TMR_OCInitStruct)
Configure the TMRx output channel 1.
static ErrorStatus IC2Config(TMR_TypeDef *TMRx, DDL_TMR_IC_InitTypeDef *TMR_ICInitStruct)
Configure the TMRx input channel 2.
static ErrorStatus IC3Config(TMR_TypeDef *TMRx, DDL_TMR_IC_InitTypeDef *TMR_ICInitStruct)
Configure the TMRx input channel 3.
static ErrorStatus OC3Config(TMR_TypeDef *TMRx, DDL_TMR_OC_InitTypeDef *TMR_OCInitStruct)
Configure the TMRx output channel 3.
#define IS_DDL_TMR_IC_POLARITY_ENCODER(__VALUE__)
#define IS_DDL_TMR_OCPOLARITY(__VALUE__)
#define IS_DDL_TMR_OCMODE(__VALUE__)
#define IS_DDL_TMR_BREAK_POLARITY(__VALUE__)
#define IS_DDL_TMR_OSSI_STATE(__VALUE__)
#define IS_DDL_TMR_BREAK_STATE(__VALUE__)
#define IS_DDL_TMR_ACTIVEINPUT(__VALUE__)
#define IS_DDL_TMR_IC_FILTER(__VALUE__)
#define IS_DDL_TMR_AUTOMATIC_OUTPUT_STATE(__VALUE__)
#define IS_DDL_TMR_ENCODERMODE(__VALUE__)
#define IS_DDL_TMR_OCSTATE(__VALUE__)
#define IS_DDL_TMR_CLOCKDIVISION(__VALUE__)
#define IS_DDL_TMR_IC_POLARITY(__VALUE__)
#define IS_DDL_TMR_COUNTERMODE(__VALUE__)
#define IS_DDL_TMR_OSSR_STATE(__VALUE__)
#define IS_DDL_TMR_OCIDLESTATE(__VALUE__)
#define IS_DDL_TMR_ICPSC(__VALUE__)
#define IS_DDL_TMR_LOCK_LEVEL(__VALUE__)
BDTR (Break and Dead Time) structure definition.
TMR Encoder interface configuration structure definition.
TMR Hall sensor interface configuration structure definition.
uint32_t CommutationDelay
TMR Input Capture configuration structure definition.
TMR Time Base configuration structure definition.
uint32_t RepetitionCounter
TMR Output Compare configuration structure definition.