|
@@ -6,11 +6,11 @@
|
|
|
******************************************************************************
|
|
|
* @attention
|
|
|
*
|
|
|
- * <h2><center>© Copyright (c) 2018 STMicroelectronics.
|
|
|
+ * <h2><center>© Copyright (c) 2018 STMicroelectronics.
|
|
|
* All rights reserved.</center></h2>
|
|
|
*
|
|
|
* This software component is licensed by ST under BSD 3-Clause license,
|
|
|
- * the "License"; You may not use this file except in compliance with the
|
|
|
+ * the "License"; You may not use this file except in compliance with the
|
|
|
* License. You may obtain a copy of the License at:
|
|
|
* opensource.org/licenses/BSD-3-Clause
|
|
|
*
|
|
@@ -117,7 +117,7 @@ static const uint8_t SHIFT_TAB_OISx[] =
|
|
|
*/
|
|
|
|
|
|
/* Defines used for the bit position in the register and perform offsets */
|
|
|
-#define TIM_POSITION_BRK_SOURCE ((Source >> 1U) & 0x1FU)
|
|
|
+#define TIM_POSITION_BRK_SOURCE ((Source >> 1U) & 0x1FUL)
|
|
|
|
|
|
/* Generic bit definitions for TIMx_AF1 register */
|
|
|
#define TIMx_AF1_BKINE TIM1_AF1_BKINE /*!< BRK BKIN input enable */
|
|
@@ -160,7 +160,7 @@ static const uint8_t SHIFT_TAB_OISx[] =
|
|
|
|
|
|
/** Legacy definitions for compatibility purpose
|
|
|
@cond 0
|
|
|
-*/
|
|
|
+ */
|
|
|
/**
|
|
|
@endcond
|
|
|
*/
|
|
@@ -189,14 +189,14 @@ static const uint8_t SHIFT_TAB_OISx[] =
|
|
|
* @retval none
|
|
|
*/
|
|
|
#define TIM_GET_CHANNEL_INDEX( __CHANNEL__) \
|
|
|
-(((__CHANNEL__) == LL_TIM_CHANNEL_CH1) ? 0U :\
|
|
|
-((__CHANNEL__) == LL_TIM_CHANNEL_CH1N) ? 1U :\
|
|
|
-((__CHANNEL__) == LL_TIM_CHANNEL_CH2) ? 2U :\
|
|
|
-((__CHANNEL__) == LL_TIM_CHANNEL_CH2N) ? 3U :\
|
|
|
-((__CHANNEL__) == LL_TIM_CHANNEL_CH3) ? 4U :\
|
|
|
-((__CHANNEL__) == LL_TIM_CHANNEL_CH3N) ? 5U :\
|
|
|
-((__CHANNEL__) == LL_TIM_CHANNEL_CH4) ? 6U :\
|
|
|
-((__CHANNEL__) == LL_TIM_CHANNEL_CH5) ? 7U : 8U)
|
|
|
+ (((__CHANNEL__) == LL_TIM_CHANNEL_CH1) ? 0U :\
|
|
|
+ ((__CHANNEL__) == LL_TIM_CHANNEL_CH1N) ? 1U :\
|
|
|
+ ((__CHANNEL__) == LL_TIM_CHANNEL_CH2) ? 2U :\
|
|
|
+ ((__CHANNEL__) == LL_TIM_CHANNEL_CH2N) ? 3U :\
|
|
|
+ ((__CHANNEL__) == LL_TIM_CHANNEL_CH3) ? 4U :\
|
|
|
+ ((__CHANNEL__) == LL_TIM_CHANNEL_CH3N) ? 5U :\
|
|
|
+ ((__CHANNEL__) == LL_TIM_CHANNEL_CH4) ? 6U :\
|
|
|
+ ((__CHANNEL__) == LL_TIM_CHANNEL_CH5) ? 7U : 8U)
|
|
|
|
|
|
/** @brief Calculate the deadtime sampling period(in ps).
|
|
|
* @param __TIMCLK__ timer input clock frequency (in Hz).
|
|
@@ -207,9 +207,9 @@ static const uint8_t SHIFT_TAB_OISx[] =
|
|
|
* @retval none
|
|
|
*/
|
|
|
#define TIM_CALC_DTS(__TIMCLK__, __CKD__) \
|
|
|
- (((__CKD__) == LL_TIM_CLOCKDIVISION_DIV1) ? ((uint64_t)1000000000000U/(__TIMCLK__)) : \
|
|
|
- ((__CKD__) == LL_TIM_CLOCKDIVISION_DIV2) ? ((uint64_t)1000000000000U/((__TIMCLK__) >> 1U)) : \
|
|
|
- ((uint64_t)1000000000000U/((__TIMCLK__) >> 2U)))
|
|
|
+ (((__CKD__) == LL_TIM_CLOCKDIVISION_DIV1) ? ((uint64_t)1000000000000U/(__TIMCLK__)) : \
|
|
|
+ ((__CKD__) == LL_TIM_CLOCKDIVISION_DIV2) ? ((uint64_t)1000000000000U/((__TIMCLK__) >> 1U)) : \
|
|
|
+ ((uint64_t)1000000000000U/((__TIMCLK__) >> 2U)))
|
|
|
/**
|
|
|
* @}
|
|
|
*/
|
|
@@ -710,7 +710,7 @@ typedef struct
|
|
|
#define LL_TIM_OCMODE_ACTIVE TIM_CCMR1_OC1M_0 /*!<OCyREF is forced high on compare match*/
|
|
|
#define LL_TIM_OCMODE_INACTIVE TIM_CCMR1_OC1M_1 /*!<OCyREF is forced low on compare match*/
|
|
|
#define LL_TIM_OCMODE_TOGGLE (TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0) /*!<OCyREF toggles on compare match*/
|
|
|
-#define LL_TIM_OCMODE_FORCED_INACTIVE TIM_CCMR1_OC1M_2 /*!<OCyREF is forced low*/
|
|
|
+#define LL_TIM_OCMODE_FORCED_INACTIVE TIM_CCMR1_OC1M_2 /*!<OCyREF is forced low*/
|
|
|
#define LL_TIM_OCMODE_FORCED_ACTIVE (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0) /*!<OCyREF is forced high*/
|
|
|
#define LL_TIM_OCMODE_PWM1 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1) /*!<In upcounting, channel y is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel y is inactive as long as TIMx_CNT>TIMx_CCRy else active.*/
|
|
|
#define LL_TIM_OCMODE_PWM2 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0) /*!<In upcounting, channel y is inactive as long as TIMx_CNT<TIMx_CCRy else active. In downcounting, channel y is active as long as TIMx_CNT>TIMx_CCRy else inactive*/
|
|
@@ -766,7 +766,7 @@ typedef struct
|
|
|
/** @defgroup TIM_LL_EC_ICPSC Input Configuration Prescaler
|
|
|
* @{
|
|
|
*/
|
|
|
-#define LL_TIM_ICPSC_DIV1 0x00000000U /*!< No prescaler, capture is done each time an edge is detected on the capture input */
|
|
|
+#define LL_TIM_ICPSC_DIV1 0x00000000U /*!< No prescaler, capture is done each time an edge is detected on the capture input */
|
|
|
#define LL_TIM_ICPSC_DIV2 (TIM_CCMR1_IC1PSC_0 << 16U) /*!< Capture is done once every 2 events */
|
|
|
#define LL_TIM_ICPSC_DIV4 (TIM_CCMR1_IC1PSC_1 << 16U) /*!< Capture is done once every 4 events */
|
|
|
#define LL_TIM_ICPSC_DIV8 (TIM_CCMR1_IC1PSC << 16U) /*!< Capture is done once every 8 events */
|
|
@@ -938,13 +938,13 @@ typedef struct
|
|
|
/** @defgroup TIM_LL_EC_ETRSOURCE External Trigger Source
|
|
|
* @{
|
|
|
*/
|
|
|
-#define LL_TIM_ETRSOURCE_GPIO 0x00000000U /*!< ETR input is connected to GPIO */
|
|
|
+#define LL_TIM_ETRSOURCE_GPIO 0x00000000U /*!< ETR input is connected to GPIO */
|
|
|
#if defined(COMP1) && defined(COMP2)
|
|
|
-#define LL_TIM_ETRSOURCE_COMP1 TIM1_AF1_ETRSEL_0 /*!< ETR input is connected to COMP1_OUT */
|
|
|
-#define LL_TIM_ETRSOURCE_COMP2 TIM1_AF1_ETRSEL_1 /*!< ETR input is connected to COMP2_OUT */
|
|
|
+#define LL_TIM_ETRSOURCE_COMP1 TIM1_AF1_ETRSEL_0 /*!< ETR input is connected to COMP1_OUT */
|
|
|
+#define LL_TIM_ETRSOURCE_COMP2 TIM1_AF1_ETRSEL_1 /*!< ETR input is connected to COMP2_OUT */
|
|
|
#endif /* COMP1 && COMP2 */
|
|
|
#define LL_TIM_ETRSOURCE_ADC1_AWD1 (TIM1_AF1_ETRSEL_1 | TIM1_AF1_ETRSEL_0) /*!< ETR input is connected to ADC1 analog watchdog 1 */
|
|
|
-#define LL_TIM_ETRSOURCE_ADC1_AWD2 TIM1_AF1_ETRSEL_2 /*!< ETR input is connected to ADC1 analog watchdog 2 */
|
|
|
+#define LL_TIM_ETRSOURCE_ADC1_AWD2 TIM1_AF1_ETRSEL_2 /*!< ETR input is connected to ADC1 analog watchdog 2 */
|
|
|
#define LL_TIM_ETRSOURCE_ADC1_AWD3 (TIM1_AF1_ETRSEL_2 | TIM1_AF1_ETRSEL_0) /*!< ETR input is connected to ADC1 analog watchdog 3 */
|
|
|
#define LL_TIM_ETRSOURCE_LSE (TIM1_AF1_ETRSEL_1 | TIM1_AF1_ETRSEL_0) /*!< ETR input is connected to LSE */
|
|
|
/**
|
|
@@ -1057,7 +1057,7 @@ typedef struct
|
|
|
/** @defgroup TIM_LL_EC_BKIN_POLARITY BKIN POLARITY
|
|
|
* @{
|
|
|
*/
|
|
|
-#define LL_TIM_BKIN_POLARITY_LOW TIM1_AF1_BKINP /*!< BRK BKIN input is active low */
|
|
|
+#define LL_TIM_BKIN_POLARITY_LOW TIM1_AF1_BKINP /*!< BRK BKIN input is active low */
|
|
|
#define LL_TIM_BKIN_POLARITY_HIGH 0x00000000U /*!< BRK BKIN input is active high */
|
|
|
/**
|
|
|
* @}
|
|
@@ -1072,7 +1072,7 @@ typedef struct
|
|
|
* @}
|
|
|
*/
|
|
|
|
|
|
- /** @defgroup TIM_LL_EC_BREAK2_AFMODE BREAK2 AF MODE
|
|
|
+/** @defgroup TIM_LL_EC_BREAK2_AFMODE BREAK2 AF MODE
|
|
|
* @{
|
|
|
*/
|
|
|
#define LL_TIM_BREAK2_AFMODE_INPUT 0x00000000U /*!< Break2 input BRK2 in input mode */
|
|
@@ -1102,12 +1102,13 @@ typedef struct
|
|
|
#define LL_TIM_DMABURST_BASEADDR_CCR3 (TIM_DCR_DBA_3 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_CCR3 register is the DMA base address for DMA burst */
|
|
|
#define LL_TIM_DMABURST_BASEADDR_CCR4 TIM_DCR_DBA_4 /*!< TIMx_CCR4 register is the DMA base address for DMA burst */
|
|
|
#define LL_TIM_DMABURST_BASEADDR_BDTR (TIM_DCR_DBA_4 | TIM_DCR_DBA_0) /*!< TIMx_BDTR register is the DMA base address for DMA burst */
|
|
|
-#define LL_TIM_DMABURST_BASEADDR_CCMR3 (TIM_DCR_DBA_4 | TIM_DCR_DBA_1) /*!< TIMx_CCMR3 register is the DMA base address for DMA burst */
|
|
|
-#define LL_TIM_DMABURST_BASEADDR_CCR5 (TIM_DCR_DBA_4 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_CCR5 register is the DMA base address for DMA burst */
|
|
|
-#define LL_TIM_DMABURST_BASEADDR_CCR6 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2) /*!< TIMx_CCR6 register is the DMA base address for DMA burst */
|
|
|
-#define LL_TIM_DMABURST_BASEADDR_OR1 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0) /*!< TIMx_OR1 register is the DMA base address for DMA burst */
|
|
|
-#define LL_TIM_DMABURST_BASEADDR_AF1 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1) /*!< TIMx_AF1 register is the DMA base address for DMA burst */
|
|
|
-#define LL_TIM_DMABURST_BASEADDR_AF2 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_AF2 register is the DMA base address for DMA burst */
|
|
|
+#define LL_TIM_DMABURST_BASEADDR_OR1 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2) /*!< TIMx_OR1 register is the DMA base address for DMA burst */
|
|
|
+#define LL_TIM_DMABURST_BASEADDR_CCMR3 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_0) /*!< TIMx_CCMR3 register is the DMA base address for DMA burst */
|
|
|
+#define LL_TIM_DMABURST_BASEADDR_CCR5 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1) /*!< TIMx_CCR5 register is the DMA base address for DMA burst */
|
|
|
+#define LL_TIM_DMABURST_BASEADDR_CCR6 (TIM_DCR_DBA_4 | TIM_DCR_DBA_2 | TIM_DCR_DBA_1 | TIM_DCR_DBA_0) /*!< TIMx_CCR6 register is the DMA base address for DMA burst */
|
|
|
+#define LL_TIM_DMABURST_BASEADDR_AF1 (TIM_DCR_DBA_4 | TIM_DCR_DBA_3) /*!< TIMx_AF1 register is the DMA base address for DMA burst */
|
|
|
+#define LL_TIM_DMABURST_BASEADDR_AF2 (TIM_DCR_DBA_4 | TIM_DCR_DBA_3 | TIM_DCR_DBA_0) /*!< TIMx_AF2 register is the DMA base address for DMA burst */
|
|
|
+#define LL_TIM_DMABURST_BASEADDR_TISEL (TIM_DCR_DBA_4 | TIM_DCR_DBA_3 | TIM_DCR_DBA_1) /*!< TIMx_TISEL register is the DMA base address for DMA burst */
|
|
|
/**
|
|
|
* @}
|
|
|
*/
|
|
@@ -1279,7 +1280,7 @@ typedef struct
|
|
|
|
|
|
/** Legacy definitions for compatibility purpose
|
|
|
@cond 0
|
|
|
-*/
|
|
|
+ */
|
|
|
#define LL_TIM_BKIN_SOURCE_DFBK LL_TIM_BKIN_SOURCE_DF1BK
|
|
|
/**
|
|
|
@endcond
|
|
@@ -1329,7 +1330,7 @@ typedef struct
|
|
|
* @retval UIF status bit
|
|
|
*/
|
|
|
#define __LL_TIM_GETFLAG_UIFCPY(__CNT__) \
|
|
|
- (READ_BIT((__CNT__), TIM_CNT_UIFCPY) >> TIM_CNT_UIFCPY_Pos)
|
|
|
+ (READ_BIT((__CNT__), TIM_CNT_UIFCPY) >> TIM_CNT_UIFCPY_Pos)
|
|
|
|
|
|
/**
|
|
|
* @brief HELPER macro calculating DTG[0:7] in the TIMx_BDTR register to achieve the requested dead time duration.
|
|
@@ -1343,11 +1344,11 @@ typedef struct
|
|
|
* @retval DTG[0:7]
|
|
|
*/
|
|
|
#define __LL_TIM_CALC_DEADTIME(__TIMCLK__, __CKD__, __DT__) \
|
|
|
- ( (((uint64_t)((__DT__)*1000U)) < ((DT_DELAY_1+1U) * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(((uint64_t)((__DT__)*1000U) / TIM_CALC_DTS((__TIMCLK__), (__CKD__))) & DT_DELAY_1) : \
|
|
|
- (((uint64_t)((__DT__)*1000U)) < ((64U + (DT_DELAY_2+1U)) * 2U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(DT_RANGE_2 | ((uint8_t)((uint8_t)((((uint64_t)((__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 1U) - (uint8_t) 64) & DT_DELAY_2)) :\
|
|
|
- (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_3+1U)) * 8U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(DT_RANGE_3 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 3U) - (uint8_t) 32) & DT_DELAY_3)) :\
|
|
|
- (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_4+1U)) * 16U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(DT_RANGE_4 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 4U) - (uint8_t) 32) & DT_DELAY_4)) :\
|
|
|
- 0U)
|
|
|
+ ( (((uint64_t)((__DT__)*1000U)) < ((DT_DELAY_1+1U) * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(((uint64_t)((__DT__)*1000U) / TIM_CALC_DTS((__TIMCLK__), (__CKD__))) & DT_DELAY_1) : \
|
|
|
+ (((uint64_t)((__DT__)*1000U)) < ((64U + (DT_DELAY_2+1U)) * 2U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(DT_RANGE_2 | ((uint8_t)((uint8_t)((((uint64_t)((__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 1U) - (uint8_t) 64) & DT_DELAY_2)) :\
|
|
|
+ (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_3+1U)) * 8U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(DT_RANGE_3 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 3U) - (uint8_t) 32) & DT_DELAY_3)) :\
|
|
|
+ (((uint64_t)((__DT__)*1000U)) < ((32U + (DT_DELAY_4+1U)) * 16U * TIM_CALC_DTS((__TIMCLK__), (__CKD__)))) ? (uint8_t)(DT_RANGE_4 | ((uint8_t)((uint8_t)(((((uint64_t)(__DT__)*1000U))/ TIM_CALC_DTS((__TIMCLK__), (__CKD__))) >> 4U) - (uint8_t) 32) & DT_DELAY_4)) :\
|
|
|
+ 0U)
|
|
|
|
|
|
/**
|
|
|
* @brief HELPER macro calculating the prescaler value to achieve the required counter clock frequency.
|
|
@@ -1357,7 +1358,7 @@ typedef struct
|
|
|
* @retval Prescaler value (between Min_Data=0 and Max_Data=65535)
|
|
|
*/
|
|
|
#define __LL_TIM_CALC_PSC(__TIMCLK__, __CNTCLK__) \
|
|
|
- (((__TIMCLK__) >= (__CNTCLK__)) ? (uint32_t)(((__TIMCLK__)/(__CNTCLK__)) - 1U) : 0U)
|
|
|
+ (((__TIMCLK__) >= (__CNTCLK__)) ? (uint32_t)(((__TIMCLK__)/(__CNTCLK__)) - 1U) : 0U)
|
|
|
|
|
|
/**
|
|
|
* @brief HELPER macro calculating the auto-reload value to achieve the required output signal frequency.
|
|
@@ -1368,7 +1369,7 @@ typedef struct
|
|
|
* @retval Auto-reload value (between Min_Data=0 and Max_Data=65535)
|
|
|
*/
|
|
|
#define __LL_TIM_CALC_ARR(__TIMCLK__, __PSC__, __FREQ__) \
|
|
|
- ((((__TIMCLK__)/((__PSC__) + 1U)) >= (__FREQ__)) ? (((__TIMCLK__)/((__FREQ__) * ((__PSC__) + 1U))) - 1U) : 0U)
|
|
|
+ ((((__TIMCLK__)/((__PSC__) + 1U)) >= (__FREQ__)) ? (((__TIMCLK__)/((__FREQ__) * ((__PSC__) + 1U))) - 1U) : 0U)
|
|
|
|
|
|
/**
|
|
|
* @brief HELPER macro calculating the compare value required to achieve the required timer output compare active/inactive delay.
|
|
@@ -1379,8 +1380,8 @@ typedef struct
|
|
|
* @retval Compare value (between Min_Data=0 and Max_Data=65535)
|
|
|
*/
|
|
|
#define __LL_TIM_CALC_DELAY(__TIMCLK__, __PSC__, __DELAY__) \
|
|
|
-((uint32_t)(((uint64_t)(__TIMCLK__) * (uint64_t)(__DELAY__)) \
|
|
|
- / ((uint64_t)1000000U * (uint64_t)((__PSC__) + 1U))))
|
|
|
+ ((uint32_t)(((uint64_t)(__TIMCLK__) * (uint64_t)(__DELAY__)) \
|
|
|
+ / ((uint64_t)1000000U * (uint64_t)((__PSC__) + 1U))))
|
|
|
|
|
|
/**
|
|
|
* @brief HELPER macro calculating the auto-reload value to achieve the required pulse duration (when the timer operates in one pulse mode).
|
|
@@ -1392,8 +1393,8 @@ typedef struct
|
|
|
* @retval Auto-reload value (between Min_Data=0 and Max_Data=65535)
|
|
|
*/
|
|
|
#define __LL_TIM_CALC_PULSE(__TIMCLK__, __PSC__, __DELAY__, __PULSE__) \
|
|
|
- ((uint32_t)(__LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__PULSE__)) \
|
|
|
- + __LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__DELAY__))))
|
|
|
+ ((uint32_t)(__LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__PULSE__)) \
|
|
|
+ + __LL_TIM_CALC_DELAY((__TIMCLK__), (__PSC__), (__DELAY__))))
|
|
|
|
|
|
/**
|
|
|
* @brief HELPER macro retrieving the ratio of the input capture prescaler
|
|
@@ -1406,7 +1407,7 @@ typedef struct
|
|
|
* @retval Input capture prescaler ratio (1, 2, 4 or 8)
|
|
|
*/
|
|
|
#define __LL_TIM_GET_ICPSC_RATIO(__ICPSC__) \
|
|
|
- ((uint32_t)(0x01U << (((__ICPSC__) >> 16U) >> TIM_CCMR1_IC1PSC_Pos)))
|
|
|
+ ((uint32_t)(0x01U << (((__ICPSC__) >> 16U) >> TIM_CCMR1_IC1PSC_Pos)))
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -1555,7 +1556,7 @@ __STATIC_INLINE uint32_t LL_TIM_GetOnePulseMode(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Set the timer counter counting mode.
|
|
|
- * @note Macro @ref IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to
|
|
|
+ * @note Macro IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to
|
|
|
* check whether or not the counter mode selection feature is supported
|
|
|
* by a timer instance.
|
|
|
* @note Switching from Center Aligned counter mode to Edge counter mode (or reverse)
|
|
@@ -1579,7 +1580,7 @@ __STATIC_INLINE void LL_TIM_SetCounterMode(TIM_TypeDef *TIMx, uint32_t CounterMo
|
|
|
|
|
|
/**
|
|
|
* @brief Get actual counter mode.
|
|
|
- * @note Macro @ref IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to
|
|
|
+ * @note Macro IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to
|
|
|
* check whether or not the counter mode selection feature is supported
|
|
|
* by a timer instance.
|
|
|
* @rmtoll CR1 DIR LL_TIM_GetCounterMode\n
|
|
@@ -1632,7 +1633,7 @@ __STATIC_INLINE uint32_t LL_TIM_IsEnabledARRPreload(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Set the division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters.
|
|
|
- * @note Macro @ref IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not the clock division feature is supported by the timer
|
|
|
* instance.
|
|
|
* @rmtoll CR1 CKD LL_TIM_SetClockDivision
|
|
@@ -1650,7 +1651,7 @@ __STATIC_INLINE void LL_TIM_SetClockDivision(TIM_TypeDef *TIMx, uint32_t ClockDi
|
|
|
|
|
|
/**
|
|
|
* @brief Get the actual division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters.
|
|
|
- * @note Macro @ref IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not the clock division feature is supported by the timer
|
|
|
* instance.
|
|
|
* @rmtoll CR1 CKD LL_TIM_GetClockDivision
|
|
@@ -1667,7 +1668,7 @@ __STATIC_INLINE uint32_t LL_TIM_GetClockDivision(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Set the counter value.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
* @rmtoll CNT CNT LL_TIM_SetCounter
|
|
|
* @param TIMx Timer instance
|
|
@@ -1681,7 +1682,7 @@ __STATIC_INLINE void LL_TIM_SetCounter(TIM_TypeDef *TIMx, uint32_t Counter)
|
|
|
|
|
|
/**
|
|
|
* @brief Get the counter value.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
* @rmtoll CNT CNT LL_TIM_GetCounter
|
|
|
* @param TIMx Timer instance
|
|
@@ -1735,7 +1736,7 @@ __STATIC_INLINE uint32_t LL_TIM_GetPrescaler(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Set the auto-reload value.
|
|
|
* @note The counter is blocked while the auto-reload value is null.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
* @note Helper macro @ref __LL_TIM_CALC_ARR can be used to calculate the AutoReload parameter
|
|
|
* @rmtoll ARR ARR LL_TIM_SetAutoReload
|
|
@@ -1751,7 +1752,7 @@ __STATIC_INLINE void LL_TIM_SetAutoReload(TIM_TypeDef *TIMx, uint32_t AutoReload
|
|
|
/**
|
|
|
* @brief Get the auto-reload value.
|
|
|
* @rmtoll ARR ARR LL_TIM_GetAutoReload
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
* @param TIMx Timer instance
|
|
|
* @retval Auto-reload value
|
|
@@ -1764,7 +1765,7 @@ __STATIC_INLINE uint32_t LL_TIM_GetAutoReload(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Set the repetition counter value.
|
|
|
* @note For advanced timer instances RepetitionCounter can be up to 65535.
|
|
|
- * @note Macro @ref IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a repetition counter.
|
|
|
* @rmtoll RCR REP LL_TIM_SetRepetitionCounter
|
|
|
* @param TIMx Timer instance
|
|
@@ -1778,7 +1779,7 @@ __STATIC_INLINE void LL_TIM_SetRepetitionCounter(TIM_TypeDef *TIMx, uint32_t Rep
|
|
|
|
|
|
/**
|
|
|
* @brief Get the repetition counter value.
|
|
|
- * @note Macro @ref IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a repetition counter.
|
|
|
* @rmtoll RCR REP LL_TIM_GetRepetitionCounter
|
|
|
* @param TIMx Timer instance
|
|
@@ -1824,7 +1825,7 @@ __STATIC_INLINE void LL_TIM_DisableUIFRemap(TIM_TypeDef *TIMx)
|
|
|
* @note CCxE, CCxNE and OCxM bits are preloaded, after having been written,
|
|
|
* they are updated only when a commutation event (COM) occurs.
|
|
|
* @note Only on channels that have a complementary output.
|
|
|
- * @note Macro @ref IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance is able to generate a commutation event.
|
|
|
* @rmtoll CR2 CCPC LL_TIM_CC_EnablePreload
|
|
|
* @param TIMx Timer instance
|
|
@@ -1837,7 +1838,7 @@ __STATIC_INLINE void LL_TIM_CC_EnablePreload(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Disable the capture/compare control bits (CCxE, CCxNE and OCxM) preload.
|
|
|
- * @note Macro @ref IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance is able to generate a commutation event.
|
|
|
* @rmtoll CR2 CCPC LL_TIM_CC_DisablePreload
|
|
|
* @param TIMx Timer instance
|
|
@@ -1850,7 +1851,7 @@ __STATIC_INLINE void LL_TIM_CC_DisablePreload(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Set the updated source of the capture/compare control bits (CCxE, CCxNE and OCxM).
|
|
|
- * @note Macro @ref IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance is able to generate a commutation event.
|
|
|
* @rmtoll CR2 CCUS LL_TIM_CC_SetUpdate
|
|
|
* @param TIMx Timer instance
|
|
@@ -1894,7 +1895,7 @@ __STATIC_INLINE uint32_t LL_TIM_CC_GetDMAReqTrigger(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Set the lock level to freeze the
|
|
|
* configuration of several capture/compare parameters.
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* the lock mechanism is supported by a timer instance.
|
|
|
* @rmtoll BDTR LOCK LL_TIM_CC_SetLockLevel
|
|
|
* @param TIMx Timer instance
|
|
@@ -2196,7 +2197,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Chann
|
|
|
/**
|
|
|
* @brief Set the IDLE state of an output channel
|
|
|
* @note This function is significant only for the timer instances
|
|
|
- * supporting the break feature. Macro @ref IS_TIM_BREAK_INSTANCE(TIMx)
|
|
|
+ * supporting the break feature. Macro IS_TIM_BREAK_INSTANCE(TIMx)
|
|
|
* can be used to check whether or not a timer instance provides
|
|
|
* a break input.
|
|
|
* @rmtoll CR2 OIS1 LL_TIM_OC_SetIdleState\n
|
|
@@ -2420,7 +2421,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledPreload(TIM_TypeDef *TIMx, uint32_t
|
|
|
/**
|
|
|
* @brief Enable clearing the output channel on an external event.
|
|
|
* @note This function can only be used in Output compare and PWM modes. It does not work in Forced mode.
|
|
|
- * @note Macro @ref IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
|
|
|
+ * @note Macro IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
|
|
|
* or not a timer instance can clear the OCxREF signal on an external event.
|
|
|
* @rmtoll CCMR1 OC1CE LL_TIM_OC_EnableClear\n
|
|
|
* CCMR1 OC2CE LL_TIM_OC_EnableClear\n
|
|
@@ -2447,7 +2448,7 @@ __STATIC_INLINE void LL_TIM_OC_EnableClear(TIM_TypeDef *TIMx, uint32_t Channel)
|
|
|
|
|
|
/**
|
|
|
* @brief Disable clearing the output channel on an external event.
|
|
|
- * @note Macro @ref IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
|
|
|
+ * @note Macro IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
|
|
|
* or not a timer instance can clear the OCxREF signal on an external event.
|
|
|
* @rmtoll CCMR1 OC1CE LL_TIM_OC_DisableClear\n
|
|
|
* CCMR1 OC2CE LL_TIM_OC_DisableClear\n
|
|
@@ -2476,7 +2477,7 @@ __STATIC_INLINE void LL_TIM_OC_DisableClear(TIM_TypeDef *TIMx, uint32_t Channel)
|
|
|
* @brief Indicates clearing the output channel on an external event is enabled for the output channel.
|
|
|
* @note This function enables clearing the output channel on an external event.
|
|
|
* @note This function can only be used in Output compare and PWM modes. It does not work in Forced mode.
|
|
|
- * @note Macro @ref IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
|
|
|
+ * @note Macro IS_TIM_OCXREF_CLEAR_INSTANCE(TIMx) can be used to check whether
|
|
|
* or not a timer instance can clear the OCxREF signal on an external event.
|
|
|
* @rmtoll CCMR1 OC1CE LL_TIM_OC_IsEnabledClear\n
|
|
|
* CCMR1 OC2CE LL_TIM_OC_IsEnabledClear\n
|
|
@@ -2504,7 +2505,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_IsEnabledClear(TIM_TypeDef *TIMx, uint32_t Ch
|
|
|
|
|
|
/**
|
|
|
* @brief Set the dead-time delay (delay inserted between the rising edge of the OCxREF signal and the rising edge of the Ocx and OCxN signals).
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* dead-time insertion feature is supported by a timer instance.
|
|
|
* @note Helper macro @ref __LL_TIM_CALC_DEADTIME can be used to calculate the DeadTime parameter
|
|
|
* @rmtoll BDTR DTG LL_TIM_OC_SetDeadTime
|
|
@@ -2520,9 +2521,9 @@ __STATIC_INLINE void LL_TIM_OC_SetDeadTime(TIM_TypeDef *TIMx, uint32_t DeadTime)
|
|
|
/**
|
|
|
* @brief Set compare value for output channel 1 (TIMx_CCR1).
|
|
|
* @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 1 is supported by a timer instance.
|
|
|
* @rmtoll CCR1 CCR1 LL_TIM_OC_SetCompareCH1
|
|
|
* @param TIMx Timer instance
|
|
@@ -2537,9 +2538,9 @@ __STATIC_INLINE void LL_TIM_OC_SetCompareCH1(TIM_TypeDef *TIMx, uint32_t Compare
|
|
|
/**
|
|
|
* @brief Set compare value for output channel 2 (TIMx_CCR2).
|
|
|
* @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 2 is supported by a timer instance.
|
|
|
* @rmtoll CCR2 CCR2 LL_TIM_OC_SetCompareCH2
|
|
|
* @param TIMx Timer instance
|
|
@@ -2554,9 +2555,9 @@ __STATIC_INLINE void LL_TIM_OC_SetCompareCH2(TIM_TypeDef *TIMx, uint32_t Compare
|
|
|
/**
|
|
|
* @brief Set compare value for output channel 3 (TIMx_CCR3).
|
|
|
* @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel is supported by a timer instance.
|
|
|
* @rmtoll CCR3 CCR3 LL_TIM_OC_SetCompareCH3
|
|
|
* @param TIMx Timer instance
|
|
@@ -2571,9 +2572,9 @@ __STATIC_INLINE void LL_TIM_OC_SetCompareCH3(TIM_TypeDef *TIMx, uint32_t Compare
|
|
|
/**
|
|
|
* @brief Set compare value for output channel 4 (TIMx_CCR4).
|
|
|
* @note In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 4 is supported by a timer instance.
|
|
|
* @rmtoll CCR4 CCR4 LL_TIM_OC_SetCompareCH4
|
|
|
* @param TIMx Timer instance
|
|
@@ -2587,7 +2588,7 @@ __STATIC_INLINE void LL_TIM_OC_SetCompareCH4(TIM_TypeDef *TIMx, uint32_t Compare
|
|
|
|
|
|
/**
|
|
|
* @brief Set compare value for output channel 5 (TIMx_CCR5).
|
|
|
- * @note Macro @ref IS_TIM_CC5_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC5_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 5 is supported by a timer instance.
|
|
|
* @rmtoll CCR5 CCR5 LL_TIM_OC_SetCompareCH5
|
|
|
* @param TIMx Timer instance
|
|
@@ -2596,12 +2597,12 @@ __STATIC_INLINE void LL_TIM_OC_SetCompareCH4(TIM_TypeDef *TIMx, uint32_t Compare
|
|
|
*/
|
|
|
__STATIC_INLINE void LL_TIM_OC_SetCompareCH5(TIM_TypeDef *TIMx, uint32_t CompareValue)
|
|
|
{
|
|
|
- WRITE_REG(TIMx->CCR5, CompareValue);
|
|
|
+ MODIFY_REG(TIMx->CCR5, TIM_CCR5_CCR5, CompareValue);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @brief Set compare value for output channel 6 (TIMx_CCR6).
|
|
|
- * @note Macro @ref IS_TIM_CC6_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC6_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 6 is supported by a timer instance.
|
|
|
* @rmtoll CCR6 CCR6 LL_TIM_OC_SetCompareCH6
|
|
|
* @param TIMx Timer instance
|
|
@@ -2616,9 +2617,9 @@ __STATIC_INLINE void LL_TIM_OC_SetCompareCH6(TIM_TypeDef *TIMx, uint32_t Compare
|
|
|
/**
|
|
|
* @brief Get compare value (TIMx_CCR1) set for output channel 1.
|
|
|
* @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 1 is supported by a timer instance.
|
|
|
* @rmtoll CCR1 CCR1 LL_TIM_OC_GetCompareCH1
|
|
|
* @param TIMx Timer instance
|
|
@@ -2632,9 +2633,9 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH1(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Get compare value (TIMx_CCR2) set for output channel 2.
|
|
|
* @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 2 is supported by a timer instance.
|
|
|
* @rmtoll CCR2 CCR2 LL_TIM_OC_GetCompareCH2
|
|
|
* @param TIMx Timer instance
|
|
@@ -2648,9 +2649,9 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH2(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Get compare value (TIMx_CCR3) set for output channel 3.
|
|
|
* @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 3 is supported by a timer instance.
|
|
|
* @rmtoll CCR3 CCR3 LL_TIM_OC_GetCompareCH3
|
|
|
* @param TIMx Timer instance
|
|
@@ -2664,9 +2665,9 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH3(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Get compare value (TIMx_CCR4) set for output channel 4.
|
|
|
* @note In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 4 is supported by a timer instance.
|
|
|
* @rmtoll CCR4 CCR4 LL_TIM_OC_GetCompareCH4
|
|
|
* @param TIMx Timer instance
|
|
@@ -2679,7 +2680,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH4(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Get compare value (TIMx_CCR5) set for output channel 5.
|
|
|
- * @note Macro @ref IS_TIM_CC5_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC5_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 5 is supported by a timer instance.
|
|
|
* @rmtoll CCR5 CCR5 LL_TIM_OC_GetCompareCH5
|
|
|
* @param TIMx Timer instance
|
|
@@ -2687,12 +2688,12 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH4(TIM_TypeDef *TIMx)
|
|
|
*/
|
|
|
__STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH5(TIM_TypeDef *TIMx)
|
|
|
{
|
|
|
- return (uint32_t)(READ_REG(TIMx->CCR5));
|
|
|
+ return (uint32_t)(READ_BIT(TIMx->CCR5, TIM_CCR5_CCR5));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @brief Get compare value (TIMx_CCR6) set for output channel 6.
|
|
|
- * @note Macro @ref IS_TIM_CC6_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC6_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* output channel 6 is supported by a timer instance.
|
|
|
* @rmtoll CCR6 CCR6 LL_TIM_OC_GetCompareCH6
|
|
|
* @param TIMx Timer instance
|
|
@@ -2705,13 +2706,13 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH6(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Select on which reference signal the OC5REF is combined to.
|
|
|
- * @note Macro @ref IS_TIM_COMBINED3PHASEPWM_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_COMBINED3PHASEPWM_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports the combined 3-phase PWM mode.
|
|
|
* @rmtoll CCR5 GC5C3 LL_TIM_SetCH5CombinedChannels\n
|
|
|
* CCR5 GC5C2 LL_TIM_SetCH5CombinedChannels\n
|
|
|
* CCR5 GC5C1 LL_TIM_SetCH5CombinedChannels
|
|
|
* @param TIMx Timer instance
|
|
|
- * @param GroupCH5 This parameter can be one of the following values:
|
|
|
+ * @param GroupCH5 This parameter can be a combination of the following values:
|
|
|
* @arg @ref LL_TIM_GROUPCH5_NONE
|
|
|
* @arg @ref LL_TIM_GROUPCH5_OC1REFC
|
|
|
* @arg @ref LL_TIM_GROUPCH5_OC2REFC
|
|
@@ -2720,7 +2721,7 @@ __STATIC_INLINE uint32_t LL_TIM_OC_GetCompareCH6(TIM_TypeDef *TIMx)
|
|
|
*/
|
|
|
__STATIC_INLINE void LL_TIM_SetCH5CombinedChannels(TIM_TypeDef *TIMx, uint32_t GroupCH5)
|
|
|
{
|
|
|
- MODIFY_REG(TIMx->CCR5, TIM_CCR5_CCR5, GroupCH5);
|
|
|
+ MODIFY_REG(TIMx->CCR5, (TIM_CCR5_GC5C3 | TIM_CCR5_GC5C2 | TIM_CCR5_GC5C1), GroupCH5);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3009,7 +3010,7 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity(TIM_TypeDef *TIMx, uint32_t Chann
|
|
|
|
|
|
/**
|
|
|
* @brief Connect the TIMx_CH1, CH2 and CH3 pins to the TI1 input (XOR combination).
|
|
|
- * @note Macro @ref IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides an XOR input.
|
|
|
* @rmtoll CR2 TI1S LL_TIM_IC_EnableXORCombination
|
|
|
* @param TIMx Timer instance
|
|
@@ -3022,7 +3023,7 @@ __STATIC_INLINE void LL_TIM_IC_EnableXORCombination(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Disconnect the TIMx_CH1, CH2 and CH3 pins from the TI1 input.
|
|
|
- * @note Macro @ref IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides an XOR input.
|
|
|
* @rmtoll CR2 TI1S LL_TIM_IC_DisableXORCombination
|
|
|
* @param TIMx Timer instance
|
|
@@ -3035,7 +3036,7 @@ __STATIC_INLINE void LL_TIM_IC_DisableXORCombination(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Indicates whether the TIMx_CH1, CH2 and CH3 pins are connectected to the TI1 input.
|
|
|
- * @note Macro @ref IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides an XOR input.
|
|
|
* @rmtoll CR2 TI1S LL_TIM_IC_IsEnabledXORCombination
|
|
|
* @param TIMx Timer instance
|
|
@@ -3049,9 +3050,9 @@ __STATIC_INLINE uint32_t LL_TIM_IC_IsEnabledXORCombination(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Get captured value for input channel 1.
|
|
|
* @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* input channel 1 is supported by a timer instance.
|
|
|
* @rmtoll CCR1 CCR1 LL_TIM_IC_GetCaptureCH1
|
|
|
* @param TIMx Timer instance
|
|
@@ -3065,9 +3066,9 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH1(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Get captured value for input channel 2.
|
|
|
* @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* input channel 2 is supported by a timer instance.
|
|
|
* @rmtoll CCR2 CCR2 LL_TIM_IC_GetCaptureCH2
|
|
|
* @param TIMx Timer instance
|
|
@@ -3081,9 +3082,9 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH2(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Get captured value for input channel 3.
|
|
|
* @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* input channel 3 is supported by a timer instance.
|
|
|
* @rmtoll CCR3 CCR3 LL_TIM_IC_GetCaptureCH3
|
|
|
* @param TIMx Timer instance
|
|
@@ -3097,9 +3098,9 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH3(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Get captured value for input channel 4.
|
|
|
* @note In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
|
|
|
- * @note Macro @ref IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports a 32 bits counter.
|
|
|
- * @note Macro @ref IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* input channel 4 is supported by a timer instance.
|
|
|
* @rmtoll CCR4 CCR4 LL_TIM_IC_GetCaptureCH4
|
|
|
* @param TIMx Timer instance
|
|
@@ -3120,7 +3121,7 @@ __STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH4(TIM_TypeDef *TIMx)
|
|
|
/**
|
|
|
* @brief Enable external clock mode 2.
|
|
|
* @note When external clock mode 2 is enabled the counter is clocked by any active edge on the ETRF signal.
|
|
|
- * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports external clock mode2.
|
|
|
* @rmtoll SMCR ECE LL_TIM_EnableExternalClock
|
|
|
* @param TIMx Timer instance
|
|
@@ -3133,7 +3134,7 @@ __STATIC_INLINE void LL_TIM_EnableExternalClock(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Disable external clock mode 2.
|
|
|
- * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports external clock mode2.
|
|
|
* @rmtoll SMCR ECE LL_TIM_DisableExternalClock
|
|
|
* @param TIMx Timer instance
|
|
@@ -3146,7 +3147,7 @@ __STATIC_INLINE void LL_TIM_DisableExternalClock(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Indicate whether external clock mode 2 is enabled.
|
|
|
- * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports external clock mode2.
|
|
|
* @rmtoll SMCR ECE LL_TIM_IsEnabledExternalClock
|
|
|
* @param TIMx Timer instance
|
|
@@ -3163,9 +3164,9 @@ __STATIC_INLINE uint32_t LL_TIM_IsEnabledExternalClock(TIM_TypeDef *TIMx)
|
|
|
* the external clock is applied is selected by calling the @ref LL_TIM_SetTriggerInput()
|
|
|
* function. This timer input must be configured by calling
|
|
|
* the @ref LL_TIM_IC_Config() function.
|
|
|
- * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports external clock mode1.
|
|
|
- * @note Macro @ref IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports external clock mode2.
|
|
|
* @rmtoll SMCR SMS LL_TIM_SetClockSource\n
|
|
|
* SMCR ECE LL_TIM_SetClockSource
|
|
@@ -3183,7 +3184,7 @@ __STATIC_INLINE void LL_TIM_SetClockSource(TIM_TypeDef *TIMx, uint32_t ClockSour
|
|
|
|
|
|
/**
|
|
|
* @brief Set the encoder interface mode.
|
|
|
- * @note Macro @ref IS_TIM_ENCODER_INTERFACE_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_ENCODER_INTERFACE_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance supports the encoder mode.
|
|
|
* @rmtoll SMCR SMS LL_TIM_SetEncoderMode
|
|
|
* @param TIMx Timer instance
|
|
@@ -3207,7 +3208,7 @@ __STATIC_INLINE void LL_TIM_SetEncoderMode(TIM_TypeDef *TIMx, uint32_t EncoderMo
|
|
|
*/
|
|
|
/**
|
|
|
* @brief Set the trigger output (TRGO) used for timer synchronization .
|
|
|
- * @note Macro @ref IS_TIM_MASTER_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_MASTER_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance can operate as a master timer.
|
|
|
* @rmtoll CR2 MMS LL_TIM_SetTriggerOutput
|
|
|
* @param TIMx Timer instance
|
|
@@ -3229,7 +3230,7 @@ __STATIC_INLINE void LL_TIM_SetTriggerOutput(TIM_TypeDef *TIMx, uint32_t TimerSy
|
|
|
|
|
|
/**
|
|
|
* @brief Set the trigger output 2 (TRGO2) used for ADC synchronization .
|
|
|
- * @note Macro @ref IS_TIM_TRGO2_INSTANCE(TIMx) can be used to check
|
|
|
+ * @note Macro IS_TIM_TRGO2_INSTANCE(TIMx) can be used to check
|
|
|
* whether or not a timer instance can be used for ADC synchronization.
|
|
|
* @rmtoll CR2 MMS2 LL_TIM_SetTriggerOutput2
|
|
|
* @param TIMx Timer Instance
|
|
@@ -3259,7 +3260,7 @@ __STATIC_INLINE void LL_TIM_SetTriggerOutput2(TIM_TypeDef *TIMx, uint32_t ADCSyn
|
|
|
|
|
|
/**
|
|
|
* @brief Set the synchronization mode of a slave timer.
|
|
|
- * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance can operate as a slave timer.
|
|
|
* @rmtoll SMCR SMS LL_TIM_SetSlaveMode
|
|
|
* @param TIMx Timer instance
|
|
@@ -3278,7 +3279,7 @@ __STATIC_INLINE void LL_TIM_SetSlaveMode(TIM_TypeDef *TIMx, uint32_t SlaveMode)
|
|
|
|
|
|
/**
|
|
|
* @brief Set the selects the trigger input to be used to synchronize the counter.
|
|
|
- * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance can operate as a slave timer.
|
|
|
* @rmtoll SMCR TS LL_TIM_SetTriggerInput
|
|
|
* @param TIMx Timer instance
|
|
@@ -3300,7 +3301,7 @@ __STATIC_INLINE void LL_TIM_SetTriggerInput(TIM_TypeDef *TIMx, uint32_t TriggerI
|
|
|
|
|
|
/**
|
|
|
* @brief Enable the Master/Slave mode.
|
|
|
- * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance can operate as a slave timer.
|
|
|
* @rmtoll SMCR MSM LL_TIM_EnableMasterSlaveMode
|
|
|
* @param TIMx Timer instance
|
|
@@ -3313,7 +3314,7 @@ __STATIC_INLINE void LL_TIM_EnableMasterSlaveMode(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Disable the Master/Slave mode.
|
|
|
- * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance can operate as a slave timer.
|
|
|
* @rmtoll SMCR MSM LL_TIM_DisableMasterSlaveMode
|
|
|
* @param TIMx Timer instance
|
|
@@ -3326,7 +3327,7 @@ __STATIC_INLINE void LL_TIM_DisableMasterSlaveMode(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Indicates whether the Master/Slave mode is enabled.
|
|
|
- * @note Macro @ref IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance can operate as a slave timer.
|
|
|
* @rmtoll SMCR MSM LL_TIM_IsEnabledMasterSlaveMode
|
|
|
* @param TIMx Timer instance
|
|
@@ -3339,7 +3340,7 @@ __STATIC_INLINE uint32_t LL_TIM_IsEnabledMasterSlaveMode(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Configure the external trigger (ETR) input.
|
|
|
- * @note Macro @ref IS_TIM_ETR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_ETR_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides an external trigger input.
|
|
|
* @rmtoll SMCR ETP LL_TIM_ConfigETR\n
|
|
|
* SMCR ETPS LL_TIM_ConfigETR\n
|
|
@@ -3380,7 +3381,7 @@ __STATIC_INLINE void LL_TIM_ConfigETR(TIM_TypeDef *TIMx, uint32_t ETRPolarity, u
|
|
|
|
|
|
/**
|
|
|
* @brief Select the external trigger (ETR) input source.
|
|
|
- * @note Macro @ref IS_TIM_ETRSEL_INSTANCE(TIMx) can be used to check whether or
|
|
|
+ * @note Macro IS_TIM_ETRSEL_INSTANCE(TIMx) can be used to check whether or
|
|
|
* not a timer instance supports ETR source selection.
|
|
|
* @rmtoll AF1 ETRSEL LL_TIM_SetETRSource
|
|
|
* @param TIMx Timer instance
|
|
@@ -3429,7 +3430,7 @@ __STATIC_INLINE void LL_TIM_SetETRSource(TIM_TypeDef *TIMx, uint32_t ETRSource)
|
|
|
*/
|
|
|
/**
|
|
|
* @brief Enable the break function.
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR BKE LL_TIM_EnableBRK
|
|
|
* @param TIMx Timer instance
|
|
@@ -3444,7 +3445,7 @@ __STATIC_INLINE void LL_TIM_EnableBRK(TIM_TypeDef *TIMx)
|
|
|
* @brief Disable the break function.
|
|
|
* @rmtoll BDTR BKE LL_TIM_DisableBRK
|
|
|
* @param TIMx Timer instance
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @retval None
|
|
|
*/
|
|
@@ -3455,16 +3456,16 @@ __STATIC_INLINE void LL_TIM_DisableBRK(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Configure the break input.
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @note Bidirectional mode is only supported by advanced timer instances.
|
|
|
- * Macro @ref IS_TIM_ADVANCED_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * Macro IS_TIM_ADVANCED_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance is an advanced-control timer.
|
|
|
- * @note In bidirectional mode (BKBID bit set), the Break input is configured both
|
|
|
+ * @note In bidirectional mode (BKBID bit set), the Break input is configured both
|
|
|
* in input mode and in open drain output mode. Any active Break event will
|
|
|
* assert a low logic level on the Break input to indicate an internal break
|
|
|
* event to external devices.
|
|
|
- * @note When bidirectional mode isn't supported, BreakAFMode must be set to
|
|
|
+ * @note When bidirectional mode isn't supported, BreakAFMode must be set to
|
|
|
* LL_TIM_BREAK_AFMODE_INPUT.
|
|
|
* @rmtoll BDTR BKP LL_TIM_ConfigBRK\n
|
|
|
* BDTR BKF LL_TIM_ConfigBRK\n
|
|
@@ -3495,9 +3496,10 @@ __STATIC_INLINE void LL_TIM_DisableBRK(TIM_TypeDef *TIMx)
|
|
|
* @arg @ref LL_TIM_BREAK_AFMODE_BIDIRECTIONAL
|
|
|
* @retval None
|
|
|
*/
|
|
|
-__STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity, uint32_t BreakFilter, uint32_t BreakAFMode)
|
|
|
+__STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity, uint32_t BreakFilter,
|
|
|
+ uint32_t BreakAFMode)
|
|
|
{
|
|
|
- MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP | TIM_BDTR_BKF | TIM_BDTR_BKBID , BreakPolarity | BreakFilter | BreakAFMode);
|
|
|
+ MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP | TIM_BDTR_BKF | TIM_BDTR_BKBID, BreakPolarity | BreakFilter | BreakAFMode);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3529,7 +3531,7 @@ __STATIC_INLINE void LL_TIM_ReArmBRK(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Enable the break 2 function.
|
|
|
- * @note Macro @ref IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a second break input.
|
|
|
* @rmtoll BDTR BK2E LL_TIM_EnableBRK2
|
|
|
* @param TIMx Timer instance
|
|
@@ -3542,7 +3544,7 @@ __STATIC_INLINE void LL_TIM_EnableBRK2(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Disable the break 2 function.
|
|
|
- * @note Macro @ref IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a second break input.
|
|
|
* @rmtoll BDTR BK2E LL_TIM_DisableBRK2
|
|
|
* @param TIMx Timer instance
|
|
@@ -3555,16 +3557,16 @@ __STATIC_INLINE void LL_TIM_DisableBRK2(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Configure the break 2 input.
|
|
|
- * @note Macro @ref IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BKIN2_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a second break input.
|
|
|
* @note Bidirectional mode is only supported by advanced timer instances.
|
|
|
- * Macro @ref IS_TIM_ADVANCED_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * Macro IS_TIM_ADVANCED_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance is an advanced-control timer.
|
|
|
- * @note In bidirectional mode (BK2BID bit set), the Break 2 input is configured both
|
|
|
+ * @note In bidirectional mode (BK2BID bit set), the Break 2 input is configured both
|
|
|
* in input mode and in open drain output mode. Any active Break event will
|
|
|
* assert a low logic level on the Break 2 input to indicate an internal break
|
|
|
* event to external devices.
|
|
|
- * @note When bidirectional mode isn't supported, Break2AFMode must be set to
|
|
|
+ * @note When bidirectional mode isn't supported, Break2AFMode must be set to
|
|
|
* LL_TIM_BREAK2_AFMODE_INPUT.
|
|
|
* @rmtoll BDTR BK2P LL_TIM_ConfigBRK2\n
|
|
|
* BDTR BK2F LL_TIM_ConfigBRK2\n
|
|
@@ -3595,7 +3597,8 @@ __STATIC_INLINE void LL_TIM_DisableBRK2(TIM_TypeDef *TIMx)
|
|
|
* @arg @ref LL_TIM_BREAK2_AFMODE_BIDIRECTIONAL
|
|
|
* @retval None
|
|
|
*/
|
|
|
-__STATIC_INLINE void LL_TIM_ConfigBRK2(TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter, uint32_t Break2AFMode)
|
|
|
+__STATIC_INLINE void LL_TIM_ConfigBRK2(TIM_TypeDef *TIMx, uint32_t Break2Polarity, uint32_t Break2Filter,
|
|
|
+ uint32_t Break2AFMode)
|
|
|
{
|
|
|
MODIFY_REG(TIMx->BDTR, TIM_BDTR_BK2P | TIM_BDTR_BK2F | TIM_BDTR_BK2BID, Break2Polarity | Break2Filter | Break2AFMode);
|
|
|
}
|
|
@@ -3629,7 +3632,7 @@ __STATIC_INLINE void LL_TIM_ReArmBRK2(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Select the outputs off state (enabled v.s. disabled) in Idle and Run modes.
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR OSSI LL_TIM_SetOffStates\n
|
|
|
* BDTR OSSR LL_TIM_SetOffStates
|
|
@@ -3649,7 +3652,7 @@ __STATIC_INLINE void LL_TIM_SetOffStates(TIM_TypeDef *TIMx, uint32_t OffStateIdl
|
|
|
|
|
|
/**
|
|
|
* @brief Enable automatic output (MOE can be set by software or automatically when a break input is active).
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR AOE LL_TIM_EnableAutomaticOutput
|
|
|
* @param TIMx Timer instance
|
|
@@ -3662,7 +3665,7 @@ __STATIC_INLINE void LL_TIM_EnableAutomaticOutput(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Disable automatic output (MOE can be set only by software).
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR AOE LL_TIM_DisableAutomaticOutput
|
|
|
* @param TIMx Timer instance
|
|
@@ -3675,7 +3678,7 @@ __STATIC_INLINE void LL_TIM_DisableAutomaticOutput(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Indicate whether automatic output is enabled.
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR AOE LL_TIM_IsEnabledAutomaticOutput
|
|
|
* @param TIMx Timer instance
|
|
@@ -3690,7 +3693,7 @@ __STATIC_INLINE uint32_t LL_TIM_IsEnabledAutomaticOutput(TIM_TypeDef *TIMx)
|
|
|
* @brief Enable the outputs (set the MOE bit in TIMx_BDTR register).
|
|
|
* @note The MOE bit in TIMx_BDTR register allows to enable /disable the outputs by
|
|
|
* software and is reset in case of break or break2 event
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR MOE LL_TIM_EnableAllOutputs
|
|
|
* @param TIMx Timer instance
|
|
@@ -3705,7 +3708,7 @@ __STATIC_INLINE void LL_TIM_EnableAllOutputs(TIM_TypeDef *TIMx)
|
|
|
* @brief Disable the outputs (reset the MOE bit in TIMx_BDTR register).
|
|
|
* @note The MOE bit in TIMx_BDTR register allows to enable /disable the outputs by
|
|
|
* software and is reset in case of break or break2 event.
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR MOE LL_TIM_DisableAllOutputs
|
|
|
* @param TIMx Timer instance
|
|
@@ -3718,7 +3721,7 @@ __STATIC_INLINE void LL_TIM_DisableAllOutputs(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Indicates whether outputs are enabled.
|
|
|
- * @note Macro @ref IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a timer instance provides a break input.
|
|
|
* @rmtoll BDTR MOE LL_TIM_IsEnabledAllOutputs
|
|
|
* @param TIMx Timer instance
|
|
@@ -3731,7 +3734,7 @@ __STATIC_INLINE uint32_t LL_TIM_IsEnabledAllOutputs(TIM_TypeDef *TIMx)
|
|
|
|
|
|
/**
|
|
|
* @brief Enable the signals connected to the designated timer break input.
|
|
|
- * @note Macro @ref IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
|
|
|
+ * @note Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
|
|
|
* or not a timer instance allows for break input selection.
|
|
|
* @rmtoll AF1 BKINE LL_TIM_EnableBreakInputSource\n
|
|
|
* @if STM32G081xx
|
|
@@ -3763,7 +3766,7 @@ __STATIC_INLINE void LL_TIM_EnableBreakInputSource(TIM_TypeDef *TIMx, uint32_t B
|
|
|
|
|
|
/**
|
|
|
* @brief Disable the signals connected to the designated timer break input.
|
|
|
- * @note Macro @ref IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
|
|
|
+ * @note Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
|
|
|
* or not a timer instance allows for break input selection.
|
|
|
* @rmtoll AF1 BKINE LL_TIM_DisableBreakInputSource\n
|
|
|
* @if STM32G081xx
|
|
@@ -3795,7 +3798,7 @@ __STATIC_INLINE void LL_TIM_DisableBreakInputSource(TIM_TypeDef *TIMx, uint32_t
|
|
|
|
|
|
/**
|
|
|
* @brief Set the polarity of the break signal for the timer break input.
|
|
|
- * @note Macro @ref IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
|
|
|
+ * @note Macro IS_TIM_BREAKSOURCE_INSTANCE(TIMx) can be used to check whether
|
|
|
* or not a timer instance allows for break input selection.
|
|
|
* @rmtoll AF1 BKINP LL_TIM_SetBreakInputSourcePolarity\n
|
|
|
* @if STM32G081xx
|
|
@@ -3826,7 +3829,7 @@ __STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity(TIM_TypeDef *TIMx, uint3
|
|
|
uint32_t Polarity)
|
|
|
{
|
|
|
register __IO uint32_t *pReg = (__IO uint32_t *)((uint32_t)((uint32_t)(&TIMx->AF1) + BreakInput));
|
|
|
- MODIFY_REG(*pReg, (TIMx_AF1_BKINP << TIM_POSITION_BRK_SOURCE) , (Polarity << TIM_POSITION_BRK_SOURCE));
|
|
|
+ MODIFY_REG(*pReg, (TIMx_AF1_BKINP << TIM_POSITION_BRK_SOURCE), (Polarity << TIM_POSITION_BRK_SOURCE));
|
|
|
}
|
|
|
/**
|
|
|
* @}
|
|
@@ -3837,7 +3840,7 @@ __STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity(TIM_TypeDef *TIMx, uint3
|
|
|
*/
|
|
|
/**
|
|
|
* @brief Configures the timer DMA burst feature.
|
|
|
- * @note Macro @ref IS_TIM_DMABURST_INSTANCE(TIMx) can be used to check whether or
|
|
|
+ * @note Macro IS_TIM_DMABURST_INSTANCE(TIMx) can be used to check whether or
|
|
|
* not a timer instance supports the DMA burst mode.
|
|
|
* @rmtoll DCR DBL LL_TIM_ConfigDMABurst\n
|
|
|
* DCR DBA LL_TIM_ConfigDMABurst
|
|
@@ -3861,12 +3864,13 @@ __STATIC_INLINE void LL_TIM_SetBreakInputSourcePolarity(TIM_TypeDef *TIMx, uint3
|
|
|
* @arg @ref LL_TIM_DMABURST_BASEADDR_CCR3
|
|
|
* @arg @ref LL_TIM_DMABURST_BASEADDR_CCR4
|
|
|
* @arg @ref LL_TIM_DMABURST_BASEADDR_BDTR
|
|
|
- * @arg @ref LL_TIM_DMABURST_BASEADDR_CCMR3
|
|
|
- * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR5
|
|
|
- * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR6
|
|
|
* @arg @ref LL_TIM_DMABURST_BASEADDR_OR1
|
|
|
- * @arg @ref LL_TIM_DMABURST_BASEADDR_AF1
|
|
|
- * @arg @ref LL_TIM_DMABURST_BASEADDR_AF2
|
|
|
+ * @arg @ref LL_TIM_DMABURST_BASEADDR_CCMR3
|
|
|
+ * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR5
|
|
|
+ * @arg @ref LL_TIM_DMABURST_BASEADDR_CCR6
|
|
|
+ * @arg @ref LL_TIM_DMABURST_BASEADDR_AF1
|
|
|
+ * @arg @ref LL_TIM_DMABURST_BASEADDR_AF2
|
|
|
+ * @arg @ref LL_TIM_DMABURST_BASEADDR_TISEL
|
|
|
* @param DMABurstLength This parameter can be one of the following values:
|
|
|
* @arg @ref LL_TIM_DMABURST_LENGTH_1TRANSFER
|
|
|
* @arg @ref LL_TIM_DMABURST_LENGTH_2TRANSFERS
|
|
@@ -3902,7 +3906,7 @@ __STATIC_INLINE void LL_TIM_ConfigDMABurst(TIM_TypeDef *TIMx, uint32_t DMABurstB
|
|
|
*/
|
|
|
/**
|
|
|
* @brief Remap TIM inputs (input channel, internal/external triggers).
|
|
|
- * @note Macro @ref IS_TIM_REMAP_INSTANCE(TIMx) can be used to check whether or not
|
|
|
+ * @note Macro IS_TIM_REMAP_INSTANCE(TIMx) can be used to check whether or not
|
|
|
* a some timer inputs can be remapped.
|
|
|
* @rmtoll TIM1_TISEL TI1SEL LL_TIM_SetRemap\n
|
|
|
* TIM1_TISEL TI2SEL LL_TIM_SetRemap\n
|