STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
TIM Private Functions
Collaboration diagram for TIM Private Functions:

Functions

void TIM_Base_SetConfig (TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure)
 Time Base configuration.
 
void TIM_TI1_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter)
 Configure the TI1 as Input.
 
void TIM_OC2_SetConfig (TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
 Timer Output Compare 2 configuration.
 
void TIM_ETR_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler, uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter)
 Configures the TIMx External Trigger (ETR).
 
void TIM_DMADelayPulseHalfCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Delay Pulse half complete callback.
 
void TIM_DMAError (DMA_HandleTypeDef *hdma)
 TIM DMA error callback.
 
void TIM_DMACaptureCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Capture complete callback.
 
void TIM_DMACaptureHalfCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Capture half complete callback.
 
void TIM_CCxChannelCmd (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelState)
 Enables or disables the TIM Capture Compare Channel x.
 
static void TIM_OC1_SetConfig (TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
 Timer Output Compare 1 configuration.
 
static void TIM_OC3_SetConfig (TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
 Timer Output Compare 3 configuration.
 
static void TIM_OC4_SetConfig (TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config)
 Timer Output Compare 4 configuration.
 
static void TIM_TI1_ConfigInputStage (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
 Configure the Polarity and Filter for TI1.
 
static void TIM_TI2_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter)
 Configure the TI2 as Input.
 
static void TIM_TI2_ConfigInputStage (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter)
 Configure the Polarity and Filter for TI2.
 
static void TIM_TI3_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter)
 Configure the TI3 as Input.
 
static void TIM_TI4_SetConfig (TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter)
 Configure the TI4 as Input.
 
static void TIM_ITRx_SetConfig (TIM_TypeDef *TIMx, uint32_t InputTriggerSource)
 Selects the Input Trigger source.
 
static void TIM_DMAPeriodElapsedCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Period Elapse complete callback.
 
static void TIM_DMAPeriodElapsedHalfCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Period Elapse half complete callback.
 
static void TIM_DMADelayPulseCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Delay Pulse complete callback.
 
static void TIM_DMATriggerCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Trigger callback.
 
static void TIM_DMATriggerHalfCplt (DMA_HandleTypeDef *hdma)
 TIM DMA Trigger half complete callback.
 
static HAL_StatusTypeDef TIM_SlaveTimer_SetConfig (TIM_HandleTypeDef *htim, const TIM_SlaveConfigTypeDef *sSlaveConfig)
 Slave Timer configuration function.
 

Detailed Description

Function Documentation

◆ TIM_Base_SetConfig()

◆ TIM_TI1_SetConfig()

void TIM_TI1_SetConfig ( TIM_TypeDef * TIMx,
uint32_t TIM_ICPolarity,
uint32_t TIM_ICSelection,
uint32_t TIM_ICFilter )

#include <stm32f4xx_hal_tim.h>

Configure the TI1 as Input.

Parameters
TIMxto select the TIM peripheral.
TIM_ICPolarityThe Input Polarity. This parameter can be one of the following values:
  • TIM_ICPOLARITY_RISING
  • TIM_ICPOLARITY_FALLING
  • TIM_ICPOLARITY_BOTHEDGE
TIM_ICSelectionspecifies the input to be used. This parameter can be one of the following values:
  • TIM_ICSELECTION_DIRECTTI: TIM Input 1 is selected to be connected to IC1.
  • TIM_ICSELECTION_INDIRECTTI: TIM Input 1 is selected to be connected to IC2.
  • TIM_ICSELECTION_TRC: TIM Input 1 is selected to be connected to TRC.
TIM_ICFilterSpecifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
Return values
None
Note
TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI2FP1 (on channel2 path) is used as the input signal. Therefore CCMR1 must be protected against un-initialized filter and polarity values.

Definition at line 7254 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_IC_ConfigChannel(), HAL_TIM_OnePulse_ConfigChannel(), and HAL_TIMEx_HallSensor_Init().

◆ TIM_OC2_SetConfig()

void TIM_OC2_SetConfig ( TIM_TypeDef * TIMx,
const TIM_OC_InitTypeDef * OC_Config )

◆ TIM_ETR_SetConfig()

void TIM_ETR_SetConfig ( TIM_TypeDef * TIMx,
uint32_t TIM_ExtTRGPrescaler,
uint32_t TIM_ExtTRGPolarity,
uint32_t ExtTRGFilter )

#include <stm32f4xx_hal_tim.h>

Configures the TIMx External Trigger (ETR).

Parameters
TIMxto select the TIM peripheral
TIM_ExtTRGPrescalerThe external Trigger Prescaler. This parameter can be one of the following values:
  • TIM_ETRPRESCALER_DIV1: ETRP Prescaler OFF.
  • TIM_ETRPRESCALER_DIV2: ETRP frequency divided by 2.
  • TIM_ETRPRESCALER_DIV4: ETRP frequency divided by 4.
  • TIM_ETRPRESCALER_DIV8: ETRP frequency divided by 8.
TIM_ExtTRGPolarityThe external Trigger Polarity. This parameter can be one of the following values:
  • TIM_ETRPOLARITY_INVERTED: active low or falling edge active.
  • TIM_ETRPOLARITY_NONINVERTED: active high or rising edge active.
ExtTRGFilterExternal Trigger Filter. This parameter must be a value between 0x00 and 0x0F
Return values
None

Definition at line 7548 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_ConfigClockSource(), HAL_TIM_ConfigOCrefClear(), and TIM_SlaveTimer_SetConfig().

◆ TIM_DMADelayPulseHalfCplt()

◆ TIM_DMAError()

◆ TIM_DMACaptureCplt()

◆ TIM_DMACaptureHalfCplt()

◆ TIM_CCxChannelCmd()

void TIM_CCxChannelCmd ( TIM_TypeDef * TIMx,
uint32_t Channel,
uint32_t ChannelState )

#include <stm32f4xx_hal_tim.h>

Enables or disables the TIM Capture Compare Channel x.

Parameters
TIMxto select the TIM peripheral
Channelspecifies the TIM Channel This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1
  • TIM_CHANNEL_2: TIM Channel 2
  • TIM_CHANNEL_3: TIM Channel 3
  • TIM_CHANNEL_4: TIM Channel 4
ChannelStatespecifies the TIM Channel CCxE bit new state. This parameter can be: TIM_CCx_ENABLE or TIM_CCx_DISABLE.
Return values
None

Definition at line 7578 of file stm32f4xx_hal_tim.c.

References assert_param, and IS_TIM_CHANNELS.

Referenced by HAL_TIM_Encoder_Start(), HAL_TIM_Encoder_Start_DMA(), HAL_TIM_Encoder_Start_IT(), HAL_TIM_Encoder_Stop(), HAL_TIM_Encoder_Stop_DMA(), HAL_TIM_Encoder_Stop_IT(), HAL_TIM_IC_Start(), HAL_TIM_IC_Start_DMA(), HAL_TIM_IC_Start_IT(), HAL_TIM_IC_Stop(), HAL_TIM_IC_Stop_DMA(), HAL_TIM_IC_Stop_IT(), HAL_TIM_OC_Start(), HAL_TIM_OC_Start_DMA(), HAL_TIM_OC_Start_IT(), HAL_TIM_OC_Stop(), HAL_TIM_OC_Stop_DMA(), HAL_TIM_OC_Stop_IT(), HAL_TIM_OnePulse_Start(), HAL_TIM_OnePulse_Start_IT(), HAL_TIM_OnePulse_Stop(), HAL_TIM_OnePulse_Stop_IT(), HAL_TIM_PWM_Start(), HAL_TIM_PWM_Start_DMA(), HAL_TIM_PWM_Start_IT(), HAL_TIM_PWM_Stop(), HAL_TIM_PWM_Stop_DMA(), HAL_TIM_PWM_Stop_IT(), HAL_TIMEx_HallSensor_Start(), HAL_TIMEx_HallSensor_Start_DMA(), HAL_TIMEx_HallSensor_Start_IT(), HAL_TIMEx_HallSensor_Stop(), HAL_TIMEx_HallSensor_Stop_DMA(), HAL_TIMEx_HallSensor_Stop_IT(), HAL_TIMEx_OnePulseN_Start(), HAL_TIMEx_OnePulseN_Start_IT(), HAL_TIMEx_OnePulseN_Stop(), and HAL_TIMEx_OnePulseN_Stop_IT().

◆ TIM_OC1_SetConfig()

static void TIM_OC1_SetConfig ( TIM_TypeDef * TIMx,
const TIM_OC_InitTypeDef * OC_Config )
static

◆ TIM_OC3_SetConfig()

static void TIM_OC3_SetConfig ( TIM_TypeDef * TIMx,
const TIM_OC_InitTypeDef * OC_Config )
static

#include <stm32f4xx_hal_tim.c>

Timer Output Compare 3 configuration.

Parameters
TIMxto select the TIM peripheral
OC_ConfigThe output configuration structure
Return values
None

Definition at line 6984 of file stm32f4xx_hal_tim.c.

References assert_param, IS_TIM_OCIDLE_STATE, IS_TIM_OCN_POLARITY, IS_TIM_OCNIDLE_STATE, TIM_OC_InitTypeDef::OCIdleState, TIM_OC_InitTypeDef::OCMode, TIM_OC_InitTypeDef::OCNIdleState, TIM_OC_InitTypeDef::OCNPolarity, TIM_OC_InitTypeDef::OCPolarity, TIM_OC_InitTypeDef::Pulse, and TIM_CHANNEL_3.

Referenced by HAL_TIM_OC_ConfigChannel(), and HAL_TIM_PWM_ConfigChannel().

◆ TIM_OC4_SetConfig()

static void TIM_OC4_SetConfig ( TIM_TypeDef * TIMx,
const TIM_OC_InitTypeDef * OC_Config )
static

#include <stm32f4xx_hal_tim.c>

Timer Output Compare 4 configuration.

Parameters
TIMxto select the TIM peripheral
OC_ConfigThe output configuration structure
Return values
None

Definition at line 7059 of file stm32f4xx_hal_tim.c.

References assert_param, IS_TIM_OCIDLE_STATE, TIM_OC_InitTypeDef::OCIdleState, TIM_OC_InitTypeDef::OCMode, TIM_OC_InitTypeDef::OCPolarity, and TIM_OC_InitTypeDef::Pulse.

Referenced by HAL_TIM_OC_ConfigChannel(), and HAL_TIM_PWM_ConfigChannel().

◆ TIM_TI1_ConfigInputStage()

static void TIM_TI1_ConfigInputStage ( TIM_TypeDef * TIMx,
uint32_t TIM_ICPolarity,
uint32_t TIM_ICFilter )
static

#include <stm32f4xx_hal_tim.c>

Configure the Polarity and Filter for TI1.

Parameters
TIMxto select the TIM peripheral.
TIM_ICPolarityThe Input Polarity. This parameter can be one of the following values:
  • TIM_ICPOLARITY_RISING
  • TIM_ICPOLARITY_FALLING
  • TIM_ICPOLARITY_BOTHEDGE
TIM_ICFilterSpecifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
Return values
None

Definition at line 7301 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_ConfigClockSource(), and TIM_SlaveTimer_SetConfig().

◆ TIM_TI2_SetConfig()

static void TIM_TI2_SetConfig ( TIM_TypeDef * TIMx,
uint32_t TIM_ICPolarity,
uint32_t TIM_ICSelection,
uint32_t TIM_ICFilter )
static

#include <stm32f4xx_hal_tim.c>

Configure the TI2 as Input.

Parameters
TIMxto select the TIM peripheral
TIM_ICPolarityThe Input Polarity. This parameter can be one of the following values:
  • TIM_ICPOLARITY_RISING
  • TIM_ICPOLARITY_FALLING
  • TIM_ICPOLARITY_BOTHEDGE
TIM_ICSelectionspecifies the input to be used. This parameter can be one of the following values:
  • TIM_ICSELECTION_DIRECTTI: TIM Input 2 is selected to be connected to IC2.
  • TIM_ICSELECTION_INDIRECTTI: TIM Input 2 is selected to be connected to IC1.
  • TIM_ICSELECTION_TRC: TIM Input 2 is selected to be connected to TRC.
TIM_ICFilterSpecifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
Return values
None
Note
TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI1FP2 (on channel1 path) is used as the input signal. Therefore CCMR1 must be protected against un-initialized filter and polarity values.

Definition at line 7344 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_IC_ConfigChannel(), and HAL_TIM_OnePulse_ConfigChannel().

◆ TIM_TI2_ConfigInputStage()

static void TIM_TI2_ConfigInputStage ( TIM_TypeDef * TIMx,
uint32_t TIM_ICPolarity,
uint32_t TIM_ICFilter )
static

#include <stm32f4xx_hal_tim.c>

Configure the Polarity and Filter for TI2.

Parameters
TIMxto select the TIM peripheral.
TIM_ICPolarityThe Input Polarity. This parameter can be one of the following values:
  • TIM_ICPOLARITY_RISING
  • TIM_ICPOLARITY_FALLING
  • TIM_ICPOLARITY_BOTHEDGE
TIM_ICFilterSpecifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
Return values
None

Definition at line 7384 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_ConfigClockSource(), and TIM_SlaveTimer_SetConfig().

◆ TIM_TI3_SetConfig()

static void TIM_TI3_SetConfig ( TIM_TypeDef * TIMx,
uint32_t TIM_ICPolarity,
uint32_t TIM_ICSelection,
uint32_t TIM_ICFilter )
static

#include <stm32f4xx_hal_tim.c>

Configure the TI3 as Input.

Parameters
TIMxto select the TIM peripheral
TIM_ICPolarityThe Input Polarity. This parameter can be one of the following values:
  • TIM_ICPOLARITY_RISING
  • TIM_ICPOLARITY_FALLING
  • TIM_ICPOLARITY_BOTHEDGE
TIM_ICSelectionspecifies the input to be used. This parameter can be one of the following values:
  • TIM_ICSELECTION_DIRECTTI: TIM Input 3 is selected to be connected to IC3.
  • TIM_ICSELECTION_INDIRECTTI: TIM Input 3 is selected to be connected to IC4.
  • TIM_ICSELECTION_TRC: TIM Input 3 is selected to be connected to TRC.
TIM_ICFilterSpecifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
Return values
None
Note
TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI3FP4 (on channel1 path) is used as the input signal. Therefore CCMR2 must be protected against un-initialized filter and polarity values.

Definition at line 7427 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_IC_ConfigChannel().

◆ TIM_TI4_SetConfig()

static void TIM_TI4_SetConfig ( TIM_TypeDef * TIMx,
uint32_t TIM_ICPolarity,
uint32_t TIM_ICSelection,
uint32_t TIM_ICFilter )
static

#include <stm32f4xx_hal_tim.c>

Configure the TI4 as Input.

Parameters
TIMxto select the TIM peripheral
TIM_ICPolarityThe Input Polarity. This parameter can be one of the following values:
  • TIM_ICPOLARITY_RISING
  • TIM_ICPOLARITY_FALLING
  • TIM_ICPOLARITY_BOTHEDGE
TIM_ICSelectionspecifies the input to be used. This parameter can be one of the following values:
  • TIM_ICSELECTION_DIRECTTI: TIM Input 4 is selected to be connected to IC4.
  • TIM_ICSELECTION_INDIRECTTI: TIM Input 4 is selected to be connected to IC3.
  • TIM_ICSELECTION_TRC: TIM Input 4 is selected to be connected to TRC.
TIM_ICFilterSpecifies the Input Capture Filter. This parameter must be a value between 0x00 and 0x0F.
Note
TIM_ICFilter and TIM_ICPolarity are not used in INDIRECT mode as TI4FP3 (on channel1 path) is used as the input signal. Therefore CCMR2 must be protected against un-initialized filter and polarity values.
Return values
None

Definition at line 7475 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_IC_ConfigChannel().

◆ TIM_ITRx_SetConfig()

static void TIM_ITRx_SetConfig ( TIM_TypeDef * TIMx,
uint32_t InputTriggerSource )
static

#include <stm32f4xx_hal_tim.c>

Selects the Input Trigger source.

Parameters
TIMxto select the TIM peripheral
InputTriggerSourceThe Input Trigger source. This parameter can be one of the following values:
  • TIM_TS_ITR0: Internal Trigger 0
  • TIM_TS_ITR1: Internal Trigger 1
  • TIM_TS_ITR2: Internal Trigger 2
  • TIM_TS_ITR3: Internal Trigger 3
  • TIM_TS_TI1F_ED: TI1 Edge Detector
  • TIM_TS_TI1FP1: Filtered Timer Input 1
  • TIM_TS_TI2FP2: Filtered Timer Input 2
  • TIM_TS_ETRF: External Trigger input
Return values
None

Definition at line 7518 of file stm32f4xx_hal_tim.c.

References TIM_SLAVEMODE_EXTERNAL1.

Referenced by HAL_TIM_ConfigClockSource().

◆ TIM_DMAPeriodElapsedCplt()

static void TIM_DMAPeriodElapsedCplt ( DMA_HandleTypeDef * hdma)
static

◆ TIM_DMAPeriodElapsedHalfCplt()

static void TIM_DMAPeriodElapsedHalfCplt ( DMA_HandleTypeDef * hdma)
static

#include <stm32f4xx_hal_tim.c>

TIM DMA Period Elapse half complete callback.

Parameters
hdmapointer to DMA handle.
Return values
None

Definition at line 6723 of file stm32f4xx_hal_tim.c.

References HAL_TIM_PeriodElapsedHalfCpltCallback().

Referenced by HAL_TIM_Base_Start_DMA(), HAL_TIM_DMABurst_MultiReadStart(), and HAL_TIM_DMABurst_MultiWriteStart().

◆ TIM_DMADelayPulseCplt()

◆ TIM_DMATriggerCplt()

static void TIM_DMATriggerCplt ( DMA_HandleTypeDef * hdma)
static

◆ TIM_DMATriggerHalfCplt()

static void TIM_DMATriggerHalfCplt ( DMA_HandleTypeDef * hdma)
static

#include <stm32f4xx_hal_tim.c>

TIM DMA Trigger half complete callback.

Parameters
hdmapointer to DMA handle.
Return values
None

Definition at line 6760 of file stm32f4xx_hal_tim.c.

References HAL_TIM_TriggerHalfCpltCallback().

Referenced by HAL_TIM_DMABurst_MultiReadStart(), and HAL_TIM_DMABurst_MultiWriteStart().

◆ TIM_SlaveTimer_SetConfig()