STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
TIM Encoder functions. More...
Functions | |
HAL_StatusTypeDef | HAL_TIM_Encoder_Init (TIM_HandleTypeDef *htim, const TIM_Encoder_InitTypeDef *sConfig) |
Initializes the TIM Encoder Interface and initialize the associated handle. | |
HAL_StatusTypeDef | HAL_TIM_Encoder_DeInit (TIM_HandleTypeDef *htim) |
DeInitializes the TIM Encoder interface. | |
void | HAL_TIM_Encoder_MspInit (TIM_HandleTypeDef *htim) |
Initializes the TIM Encoder Interface MSP. | |
void | HAL_TIM_Encoder_MspDeInit (TIM_HandleTypeDef *htim) |
DeInitializes TIM Encoder Interface MSP. | |
HAL_StatusTypeDef | HAL_TIM_Encoder_Start (TIM_HandleTypeDef *htim, uint32_t Channel) |
Starts the TIM Encoder Interface. | |
HAL_StatusTypeDef | HAL_TIM_Encoder_Stop (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the TIM Encoder Interface. | |
HAL_StatusTypeDef | HAL_TIM_Encoder_Start_IT (TIM_HandleTypeDef *htim, uint32_t Channel) |
Starts the TIM Encoder Interface in interrupt mode. | |
HAL_StatusTypeDef | HAL_TIM_Encoder_Stop_IT (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the TIM Encoder Interface in interrupt mode. | |
HAL_StatusTypeDef | HAL_TIM_Encoder_Start_DMA (TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData1, uint32_t *pData2, uint16_t Length) |
Starts the TIM Encoder Interface in DMA mode. | |
HAL_StatusTypeDef | HAL_TIM_Encoder_Stop_DMA (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the TIM Encoder Interface in DMA mode. | |
TIM Encoder functions.
============================================================================== ##### TIM Encoder functions ##### ============================================================================== [..] This section provides functions allowing to: (+) Initialize and configure the TIM Encoder. (+) De-initialize the TIM Encoder. (+) Start the TIM Encoder. (+) Stop the TIM Encoder. (+) Start the TIM Encoder and enable interrupt. (+) Stop the TIM Encoder and disable interrupt. (+) Start the TIM Encoder and enable DMA transfer. (+) Stop the TIM Encoder and disable DMA transfer.
HAL_StatusTypeDef HAL_TIM_Encoder_Init | ( | TIM_HandleTypeDef * | htim, |
const TIM_Encoder_InitTypeDef * | sConfig ) |
#include <stm32f4xx_hal_tim.h>
Initializes the TIM Encoder Interface and initialize the associated handle.
htim | TIM Encoder Interface handle |
sConfig | TIM Encoder Interface configuration structure |
HAL | status |
Definition at line 3019 of file stm32f4xx_hal_tim.c.
References assert_param, TIM_Base_InitTypeDef::AutoReloadPreload, TIM_Base_InitTypeDef::ClockDivision, TIM_Base_InitTypeDef::CounterMode, TIM_HandleTypeDef::DMABurstState, TIM_Encoder_InitTypeDef::EncoderMode, HAL_DMA_BURST_STATE_READY, HAL_ERROR, HAL_OK, HAL_TIM_CHANNEL_STATE_READY, HAL_TIM_Encoder_MspInit(), HAL_TIM_STATE_BUSY, HAL_TIM_STATE_READY, HAL_TIM_STATE_RESET, HAL_UNLOCKED, TIM_Encoder_InitTypeDef::IC1Filter, TIM_Encoder_InitTypeDef::IC1Polarity, TIM_Encoder_InitTypeDef::IC1Prescaler, TIM_Encoder_InitTypeDef::IC1Selection, TIM_Encoder_InitTypeDef::IC2Filter, TIM_Encoder_InitTypeDef::IC2Polarity, TIM_Encoder_InitTypeDef::IC2Prescaler, TIM_Encoder_InitTypeDef::IC2Selection, TIM_HandleTypeDef::Init, TIM_HandleTypeDef::Instance, IS_TIM_AUTORELOAD_PRELOAD, IS_TIM_CLOCKDIVISION_DIV, IS_TIM_COUNTER_MODE, IS_TIM_ENCODER_MODE, IS_TIM_ENCODERINPUT_POLARITY, IS_TIM_IC_FILTER, IS_TIM_IC_PRESCALER, IS_TIM_IC_SELECTION, IS_TIM_PERIOD, TIM_HandleTypeDef::Lock, TIM_Base_InitTypeDef::Period, TIM_HandleTypeDef::State, TIM_Base_SetConfig(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, and TIM_CHANNEL_STATE_SET.
HAL_StatusTypeDef HAL_TIM_Encoder_DeInit | ( | TIM_HandleTypeDef * | htim | ) |
#include <stm32f4xx_hal_tim.h>
DeInitializes the TIM Encoder interface.
htim | TIM Encoder Interface handle |
HAL | status |
Definition at line 3134 of file stm32f4xx_hal_tim.c.
References __HAL_TIM_DISABLE, __HAL_UNLOCK, assert_param, TIM_HandleTypeDef::DMABurstState, HAL_DMA_BURST_STATE_RESET, HAL_OK, HAL_TIM_CHANNEL_STATE_RESET, HAL_TIM_Encoder_MspDeInit(), HAL_TIM_STATE_BUSY, HAL_TIM_STATE_RESET, TIM_HandleTypeDef::Instance, TIM_HandleTypeDef::State, TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, and TIM_CHANNEL_STATE_SET.
__weak void HAL_TIM_Encoder_MspInit | ( | TIM_HandleTypeDef * | htim | ) |
#include <stm32f4xx_hal_tim.h>
Initializes the TIM Encoder Interface MSP.
htim | TIM Encoder Interface handle |
None |
Definition at line 3179 of file stm32f4xx_hal_tim.c.
References UNUSED.
Referenced by HAL_TIM_Encoder_Init().
__weak void HAL_TIM_Encoder_MspDeInit | ( | TIM_HandleTypeDef * | htim | ) |
#include <stm32f4xx_hal_tim.h>
DeInitializes TIM Encoder Interface MSP.
htim | TIM Encoder Interface handle |
None |
Definition at line 3194 of file stm32f4xx_hal_tim.c.
References UNUSED.
Referenced by HAL_TIM_Encoder_DeInit().
HAL_StatusTypeDef HAL_TIM_Encoder_Start | ( | TIM_HandleTypeDef * | htim, |
uint32_t | Channel ) |
#include <stm32f4xx_hal_tim.h>
Starts the TIM Encoder Interface.
htim | TIM Encoder Interface handle |
Channel | TIM Channels to be enabled This parameter can be one of the following values:
|
HAL | status |
Definition at line 3214 of file stm32f4xx_hal_tim.c.
References __HAL_TIM_ENABLE, assert_param, HAL_ERROR, HAL_OK, HAL_TIM_CHANNEL_STATE_BUSY, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_ENABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_GET, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_GET, and TIM_CHANNEL_STATE_SET.
HAL_StatusTypeDef HAL_TIM_Encoder_Stop | ( | TIM_HandleTypeDef * | htim, |
uint32_t | Channel ) |
#include <stm32f4xx_hal_tim.h>
Stops the TIM Encoder Interface.
htim | TIM Encoder Interface handle |
Channel | TIM Channels to be disabled This parameter can be one of the following values:
|
HAL | status |
Definition at line 3308 of file stm32f4xx_hal_tim.c.
References __HAL_TIM_DISABLE, assert_param, HAL_OK, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_DISABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, and TIM_CHANNEL_STATE_SET.
HAL_StatusTypeDef HAL_TIM_Encoder_Start_IT | ( | TIM_HandleTypeDef * | htim, |
uint32_t | Channel ) |
#include <stm32f4xx_hal_tim.h>
Starts the TIM Encoder Interface in interrupt mode.
htim | TIM Encoder Interface handle |
Channel | TIM Channels to be enabled This parameter can be one of the following values:
|
HAL | status |
Definition at line 3368 of file stm32f4xx_hal_tim.c.
References __HAL_TIM_ENABLE, __HAL_TIM_ENABLE_IT, assert_param, HAL_ERROR, HAL_OK, HAL_TIM_CHANNEL_STATE_BUSY, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_ENABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_GET, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_GET, TIM_CHANNEL_STATE_SET, TIM_IT_CC1, and TIM_IT_CC2.
HAL_StatusTypeDef HAL_TIM_Encoder_Stop_IT | ( | TIM_HandleTypeDef * | htim, |
uint32_t | Channel ) |
#include <stm32f4xx_hal_tim.h>
Stops the TIM Encoder Interface in interrupt mode.
htim | TIM Encoder Interface handle |
Channel | TIM Channels to be disabled This parameter can be one of the following values:
|
HAL | status |
Definition at line 3468 of file stm32f4xx_hal_tim.c.
References __HAL_TIM_DISABLE, __HAL_TIM_DISABLE_IT, assert_param, HAL_OK, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_DISABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_SET, TIM_IT_CC1, and TIM_IT_CC2.
HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA | ( | TIM_HandleTypeDef * | htim, |
uint32_t | Channel, | ||
uint32_t * | pData1, | ||
uint32_t * | pData2, | ||
uint16_t | Length ) |
#include <stm32f4xx_hal_tim.h>
Starts the TIM Encoder Interface in DMA mode.
htim | TIM Encoder Interface handle |
Channel | TIM Channels to be enabled This parameter can be one of the following values:
|
pData1 | The destination Buffer address for IC1. |
pData2 | The destination Buffer address for IC2. |
Length | The length of data to be transferred from TIM peripheral to memory. |
HAL | status |
Definition at line 3533 of file stm32f4xx_hal_tim.c.
References __HAL_TIM_ENABLE, __HAL_TIM_ENABLE_DMA, assert_param, HAL_BUSY, HAL_DMA_Start_IT(), HAL_ERROR, HAL_OK, HAL_TIM_CHANNEL_STATE_BUSY, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::hdma, TIM_HandleTypeDef::Instance, TIM_CCx_ENABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_GET, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_GET, TIM_CHANNEL_STATE_SET, TIM_DMA_CC1, TIM_DMA_CC2, TIM_DMA_ID_CC1, TIM_DMA_ID_CC2, TIM_DMACaptureCplt(), TIM_DMACaptureHalfCplt(), TIM_DMAError(), __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.
HAL_StatusTypeDef HAL_TIM_Encoder_Stop_DMA | ( | TIM_HandleTypeDef * | htim, |
uint32_t | Channel ) |
#include <stm32f4xx_hal_tim.h>
Stops the TIM Encoder Interface in DMA mode.
htim | TIM Encoder Interface handle |
Channel | TIM Channels to be enabled This parameter can be one of the following values:
|
HAL | status |
Definition at line 3746 of file stm32f4xx_hal_tim.c.
References __HAL_TIM_DISABLE, __HAL_TIM_DISABLE_DMA, assert_param, HAL_DMA_Abort_IT(), HAL_OK, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::hdma, TIM_HandleTypeDef::Instance, TIM_CCx_DISABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_SET, TIM_DMA_CC1, TIM_DMA_CC2, TIM_DMA_ID_CC1, and TIM_DMA_ID_CC2.