Subversion Repositories DashDisplay

Rev

Rev 50 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 50 Rev 61
Line 182... Line 182...
182
  uint32_t ClearInputSource;     /*!< TIM clear Input sources
182
  uint32_t ClearInputSource;     /*!< TIM clear Input sources
183
                                      This parameter can be a value of @ref TIM_ClearInput_Source */
183
                                      This parameter can be a value of @ref TIM_ClearInput_Source */
184
  uint32_t ClearInputPolarity;   /*!< TIM Clear Input polarity
184
  uint32_t ClearInputPolarity;   /*!< TIM Clear Input polarity
185
                                      This parameter can be a value of @ref TIM_ClearInput_Polarity */
185
                                      This parameter can be a value of @ref TIM_ClearInput_Polarity */
186
  uint32_t ClearInputPrescaler;  /*!< TIM Clear Input prescaler
186
  uint32_t ClearInputPrescaler;  /*!< TIM Clear Input prescaler
187
                                      This parameter must be 0: When OCRef clear feature is used with ETR source, ETR prescaler must be off */
187
                                      This parameter must be 0: When OCRef clear feature is used with ETR source,
-
 
188
                                      ETR prescaler must be off */
188
  uint32_t ClearInputFilter;     /*!< TIM Clear Input filter
189
  uint32_t ClearInputFilter;     /*!< TIM Clear Input filter
189
                                      This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
190
                                      This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */
190
} TIM_ClearInputConfigTypeDef;
191
} TIM_ClearInputConfigTypeDef;
191
 
192
 
192
/**
193
/**
Line 527... Line 528...
527
  */
528
  */
528
 
529
 
529
/** @defgroup TIM_Input_Capture_Selection TIM Input Capture Selection
530
/** @defgroup TIM_Input_Capture_Selection TIM Input Capture Selection
530
  * @{
531
  * @{
531
  */
532
  */
532
#define TIM_ICSELECTION_DIRECTTI           TIM_CCMR1_CC1S_0                     /*!< TIM Input 1, 2, 3 or 4 is selected to be
533
#define TIM_ICSELECTION_DIRECTTI           TIM_CCMR1_CC1S_0                     /*!< TIM Input 1, 2, 3 or 4 is selected to be connected to IC1, IC2, IC3 or IC4, respectively */
533
                                                                                     connected to IC1, IC2, IC3 or IC4, respectively */
-
 
534
#define TIM_ICSELECTION_INDIRECTTI         TIM_CCMR1_CC1S_1                     /*!< TIM Input 1, 2, 3 or 4 is selected to be
534
#define TIM_ICSELECTION_INDIRECTTI         TIM_CCMR1_CC1S_1                     /*!< TIM Input 1, 2, 3 or 4 is selected to be connected to IC2, IC1, IC4 or IC3, respectively */
535
                                                                                     connected to IC2, IC1, IC4 or IC3, respectively */
-
 
536
#define TIM_ICSELECTION_TRC                TIM_CCMR1_CC1S                       /*!< TIM Input 1, 2, 3 or 4 is selected to be connected to TRC */
535
#define TIM_ICSELECTION_TRC                TIM_CCMR1_CC1S                       /*!< TIM Input 1, 2, 3 or 4 is selected to be connected to TRC */
537
/**
536
/**
538
  * @}
537
  * @}
539
  */
538
  */
540
 
539
 
Line 783... Line 782...
783
  */
782
  */
784
 
783
 
785
/** @defgroup TIM_DMA_Burst_Length TIM DMA Burst Length
784
/** @defgroup TIM_DMA_Burst_Length TIM DMA Burst Length
786
  * @{
785
  * @{
787
  */
786
  */
788
#define TIM_DMABURSTLENGTH_1TRANSFER       0x00000000U                          /*!< The transfer is done to 1 register starting trom TIMx_CR1 + TIMx_DCR.DBA   */
787
#define TIM_DMABURSTLENGTH_1TRANSFER       0x00000000U                          /*!< The transfer is done to 1 register starting from TIMx_CR1 + TIMx_DCR.DBA   */
789
#define TIM_DMABURSTLENGTH_2TRANSFERS      0x00000100U                          /*!< The transfer is done to 2 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
788
#define TIM_DMABURSTLENGTH_2TRANSFERS      0x00000100U                          /*!< The transfer is done to 2 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
790
#define TIM_DMABURSTLENGTH_3TRANSFERS      0x00000200U                          /*!< The transfer is done to 3 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
789
#define TIM_DMABURSTLENGTH_3TRANSFERS      0x00000200U                          /*!< The transfer is done to 3 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
791
#define TIM_DMABURSTLENGTH_4TRANSFERS      0x00000300U                          /*!< The transfer is done to 4 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
790
#define TIM_DMABURSTLENGTH_4TRANSFERS      0x00000300U                          /*!< The transfer is done to 4 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
792
#define TIM_DMABURSTLENGTH_5TRANSFERS      0x00000400U                          /*!< The transfer is done to 5 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
791
#define TIM_DMABURSTLENGTH_5TRANSFERS      0x00000400U                          /*!< The transfer is done to 5 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
793
#define TIM_DMABURSTLENGTH_6TRANSFERS      0x00000500U                          /*!< The transfer is done to 6 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
792
#define TIM_DMABURSTLENGTH_6TRANSFERS      0x00000500U                          /*!< The transfer is done to 6 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
794
#define TIM_DMABURSTLENGTH_7TRANSFERS      0x00000600U                          /*!< The transfer is done to 7 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
793
#define TIM_DMABURSTLENGTH_7TRANSFERS      0x00000600U                          /*!< The transfer is done to 7 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
795
#define TIM_DMABURSTLENGTH_8TRANSFERS      0x00000700U                          /*!< The transfer is done to 8 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
794
#define TIM_DMABURSTLENGTH_8TRANSFERS      0x00000700U                          /*!< The transfer is done to 8 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
796
#define TIM_DMABURSTLENGTH_9TRANSFERS      0x00000800U                          /*!< The transfer is done to 9 registers starting trom TIMx_CR1 + TIMx_DCR.DBA  */
795
#define TIM_DMABURSTLENGTH_9TRANSFERS      0x00000800U                          /*!< The transfer is done to 9 registers starting from TIMx_CR1 + TIMx_DCR.DBA  */
797
#define TIM_DMABURSTLENGTH_10TRANSFERS     0x00000900U                          /*!< The transfer is done to 10 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
796
#define TIM_DMABURSTLENGTH_10TRANSFERS     0x00000900U                          /*!< The transfer is done to 10 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
798
#define TIM_DMABURSTLENGTH_11TRANSFERS     0x00000A00U                          /*!< The transfer is done to 11 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
797
#define TIM_DMABURSTLENGTH_11TRANSFERS     0x00000A00U                          /*!< The transfer is done to 11 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
799
#define TIM_DMABURSTLENGTH_12TRANSFERS     0x00000B00U                          /*!< The transfer is done to 12 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
798
#define TIM_DMABURSTLENGTH_12TRANSFERS     0x00000B00U                          /*!< The transfer is done to 12 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
800
#define TIM_DMABURSTLENGTH_13TRANSFERS     0x00000C00U                          /*!< The transfer is done to 13 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
799
#define TIM_DMABURSTLENGTH_13TRANSFERS     0x00000C00U                          /*!< The transfer is done to 13 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
801
#define TIM_DMABURSTLENGTH_14TRANSFERS     0x00000D00U                          /*!< The transfer is done to 14 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
800
#define TIM_DMABURSTLENGTH_14TRANSFERS     0x00000D00U                          /*!< The transfer is done to 14 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
802
#define TIM_DMABURSTLENGTH_15TRANSFERS     0x00000E00U                          /*!< The transfer is done to 15 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
801
#define TIM_DMABURSTLENGTH_15TRANSFERS     0x00000E00U                          /*!< The transfer is done to 15 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
803
#define TIM_DMABURSTLENGTH_16TRANSFERS     0x00000F00U                          /*!< The transfer is done to 16 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
802
#define TIM_DMABURSTLENGTH_16TRANSFERS     0x00000F00U                          /*!< The transfer is done to 16 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
804
#define TIM_DMABURSTLENGTH_17TRANSFERS     0x00001000U                          /*!< The transfer is done to 17 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
803
#define TIM_DMABURSTLENGTH_17TRANSFERS     0x00001000U                          /*!< The transfer is done to 17 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
805
#define TIM_DMABURSTLENGTH_18TRANSFERS     0x00001100U                          /*!< The transfer is done to 18 registers starting trom TIMx_CR1 + TIMx_DCR.DBA */
804
#define TIM_DMABURSTLENGTH_18TRANSFERS     0x00001100U                          /*!< The transfer is done to 18 registers starting from TIMx_CR1 + TIMx_DCR.DBA */
806
/**
805
/**
807
  * @}
806
  * @}
808
  */
807
  */
809
 
808
 
810
/** @defgroup DMA_Handle_index TIM DMA Handle Index
809
/** @defgroup DMA_Handle_index TIM DMA Handle Index
Line 1019... Line 1018...
1019
 
1018
 
1020
/**
1019
/**
1021
  * @brief  Indicates whether or not the TIM Counter is used as downcounter.
1020
  * @brief  Indicates whether or not the TIM Counter is used as downcounter.
1022
  * @param  __HANDLE__ TIM handle.
1021
  * @param  __HANDLE__ TIM handle.
1023
  * @retval False (Counter used as upcounter) or True (Counter used as downcounter)
1022
  * @retval False (Counter used as upcounter) or True (Counter used as downcounter)
1024
  * @note This macro is particularly useful to get the counting mode when the timer operates in Center-aligned mode or Encoder
1023
  * @note This macro is particularly useful to get the counting mode when the timer operates in Center-aligned mode
1025
mode.
1024
  *       or Encoder mode.
1026
  */
1025
  */
1027
#define __HAL_TIM_IS_TIM_COUNTING_DOWN(__HANDLE__)    (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR))
1026
#define __HAL_TIM_IS_TIM_COUNTING_DOWN(__HANDLE__)    (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR))
1028
 
1027
 
1029
/**
1028
/**
1030
  * @brief  Set the TIM Prescaler on runtime.
1029
  * @brief  Set the TIM Prescaler on runtime.
Line 1094... Line 1093...
1094
  *            @arg TIM_CLOCKDIVISION_DIV4: tDTS=4*tCK_INT
1093
  *            @arg TIM_CLOCKDIVISION_DIV4: tDTS=4*tCK_INT
1095
  */
1094
  */
1096
#define __HAL_TIM_GET_CLOCKDIVISION(__HANDLE__)  ((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD)
1095
#define __HAL_TIM_GET_CLOCKDIVISION(__HANDLE__)  ((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD)
1097
 
1096
 
1098
/**
1097
/**
1099
  * @brief  Set the TIM Input Capture prescaler on runtime without calling another time HAL_TIM_IC_ConfigChannel() function.
1098
  * @brief  Set the TIM Input Capture prescaler on runtime without calling another time HAL_TIM_IC_ConfigChannel()
-
 
1099
  *         function.
1100
  * @param  __HANDLE__ TIM handle.
1100
  * @param  __HANDLE__ TIM handle.
1101
  * @param  __CHANNEL__ TIM Channels to be configured.
1101
  * @param  __CHANNEL__ TIM Channels to be configured.
1102
  *          This parameter can be one of the following values:
1102
  *          This parameter can be one of the following values:
1103
  *            @arg TIM_CHANNEL_1: TIM Channel 1 selected
1103
  *            @arg TIM_CHANNEL_1: TIM Channel 1 selected
1104
  *            @arg TIM_CHANNEL_2: TIM Channel 2 selected
1104
  *            @arg TIM_CHANNEL_2: TIM Channel 2 selected
Line 1537... Line 1537...
1537
#define TIM_CHANNEL_STATE_GET(__HANDLE__, __CHANNEL__)\
1537
#define TIM_CHANNEL_STATE_GET(__HANDLE__, __CHANNEL__)\
1538
  (((__CHANNEL__) == TIM_CHANNEL_1) ? (__HANDLE__)->ChannelState[0] :\
1538
  (((__CHANNEL__) == TIM_CHANNEL_1) ? (__HANDLE__)->ChannelState[0] :\
1539
   ((__CHANNEL__) == TIM_CHANNEL_2) ? (__HANDLE__)->ChannelState[1] :\
1539
   ((__CHANNEL__) == TIM_CHANNEL_2) ? (__HANDLE__)->ChannelState[1] :\
1540
   ((__CHANNEL__) == TIM_CHANNEL_3) ? (__HANDLE__)->ChannelState[2] :\
1540
   ((__CHANNEL__) == TIM_CHANNEL_3) ? (__HANDLE__)->ChannelState[2] :\
1541
   (__HANDLE__)->ChannelState[3])
1541
   (__HANDLE__)->ChannelState[3])
1542
   
1542
 
1543
#define TIM_CHANNEL_STATE_SET(__HANDLE__, __CHANNEL__, __CHANNEL_STATE__) \
1543
#define TIM_CHANNEL_STATE_SET(__HANDLE__, __CHANNEL__, __CHANNEL_STATE__) \
1544
  (((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->ChannelState[0] = (__CHANNEL_STATE__)) :\
1544
  (((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->ChannelState[0] = (__CHANNEL_STATE__)) :\
1545
   ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->ChannelState[1] = (__CHANNEL_STATE__)) :\
1545
   ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->ChannelState[1] = (__CHANNEL_STATE__)) :\
1546
   ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->ChannelState[2] = (__CHANNEL_STATE__)) :\
1546
   ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->ChannelState[2] = (__CHANNEL_STATE__)) :\
1547
   ((__HANDLE__)->ChannelState[3] = (__CHANNEL_STATE__)))
1547
   ((__HANDLE__)->ChannelState[3] = (__CHANNEL_STATE__)))
Line 1723... Line 1723...
1723
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig);
1723
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig);
1724
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig);
1724
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchro_IT(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef *sSlaveConfig);
1725
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1725
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1726
                                              uint32_t BurstRequestSrc, uint32_t  *BurstBuffer, uint32_t  BurstLength);
1726
                                              uint32_t BurstRequestSrc, uint32_t  *BurstBuffer, uint32_t  BurstLength);
1727
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1727
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1728
                                                   uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength,
1728
                                                   uint32_t BurstRequestSrc, uint32_t *BurstBuffer,
1729
                                                   uint32_t DataLength);
1729
                                                   uint32_t BurstLength,  uint32_t DataLength);
1730
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
1730
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
1731
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1731
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1732
                                             uint32_t BurstRequestSrc, uint32_t  *BurstBuffer, uint32_t  BurstLength);
1732
                                             uint32_t BurstRequestSrc, uint32_t  *BurstBuffer, uint32_t  BurstLength);
1733
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1733
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress,
1734
                                                  uint32_t BurstRequestSrc, uint32_t  *BurstBuffer, uint32_t  BurstLength,
1734
                                                  uint32_t BurstRequestSrc, uint32_t  *BurstBuffer,
1735
                                                  uint32_t  DataLength);
1735
                                                  uint32_t  BurstLength, uint32_t  DataLength);
1736
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
1736
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
1737
HAL_StatusTypeDef HAL_TIM_GenerateEvent(TIM_HandleTypeDef *htim, uint32_t EventSource);
1737
HAL_StatusTypeDef HAL_TIM_GenerateEvent(TIM_HandleTypeDef *htim, uint32_t EventSource);
1738
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel);
1738
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel);
1739
/**
1739
/**
1740
  * @}
1740
  * @}
Line 1794... Line 1794...
1794
 
1794
 
1795
/* Private functions----------------------------------------------------------*/
1795
/* Private functions----------------------------------------------------------*/
1796
/** @defgroup TIM_Private_Functions TIM Private Functions
1796
/** @defgroup TIM_Private_Functions TIM Private Functions
1797
  * @{
1797
  * @{
1798
  */
1798
  */
1799
void TIM_DMADelayPulseCplt(DMA_HandleTypeDef *hdma);
-
 
1800
void TIM_DMADelayPulseHalfCplt(DMA_HandleTypeDef *hdma);
-
 
1801
void TIM_DMAError(DMA_HandleTypeDef *hdma);
1799
void TIM_DMAError(DMA_HandleTypeDef *hdma);
1802
void TIM_DMACaptureCplt(DMA_HandleTypeDef *hdma);
1800
void TIM_DMACaptureCplt(DMA_HandleTypeDef *hdma);
1803
void TIM_DMACaptureHalfCplt(DMA_HandleTypeDef *hdma);
1801
void TIM_DMACaptureHalfCplt(DMA_HandleTypeDef *hdma);
1804
 
1802
 
1805
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)
1803
#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1)