STM32F4xx_HAL_Driver  1.8.3
Initialisation and deinitialisation functions
+ Collaboration diagram for Initialisation and deinitialisation functions:

Functions

ErrorStatus LL_TIM_DeInit (const TIM_TypeDef *TIMx)
 Set TIMx registers to their reset values. More...
 
void LL_TIM_StructInit (LL_TIM_InitTypeDef *TIM_InitStruct)
 Set the fields of the time base unit configuration data structure to their default values. More...
 
ErrorStatus LL_TIM_Init (TIM_TypeDef *TIMx, const LL_TIM_InitTypeDef *TIM_InitStruct)
 Configure the TIMx time base unit. More...
 
void LL_TIM_OC_StructInit (LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct)
 Set the fields of the TIMx output channel configuration data structure to their default values. More...
 
ErrorStatus LL_TIM_OC_Init (TIM_TypeDef *TIMx, uint32_t Channel, const LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct)
 Configure the TIMx output channel. More...
 
void LL_TIM_IC_StructInit (LL_TIM_IC_InitTypeDef *TIM_ICInitStruct)
 Set the fields of the TIMx input channel configuration data structure to their default values. More...
 
ErrorStatus LL_TIM_IC_Init (TIM_TypeDef *TIMx, uint32_t Channel, const LL_TIM_IC_InitTypeDef *TIM_IC_InitStruct)
 Configure the TIMx input channel. More...
 
void LL_TIM_ENCODER_StructInit (LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct)
 Fills each TIM_EncoderInitStruct field with its default value. More...
 
ErrorStatus LL_TIM_ENCODER_Init (TIM_TypeDef *TIMx, const LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct)
 Configure the encoder interface of the timer instance. More...
 
void LL_TIM_HALLSENSOR_StructInit (LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct)
 Set the fields of the TIMx Hall sensor interface configuration data structure to their default values. More...
 
ErrorStatus LL_TIM_HALLSENSOR_Init (TIM_TypeDef *TIMx, const LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct)
 Configure the Hall sensor interface of the timer instance. More...
 
void LL_TIM_BDTR_StructInit (LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct)
 Set the fields of the Break and Dead Time configuration data structure to their default values. More...
 
ErrorStatus LL_TIM_BDTR_Init (TIM_TypeDef *TIMx, const LL_TIM_BDTR_InitTypeDef *TIM_BDTRInitStruct)
 Configure the Break and Dead Time feature of the timer instance. More...
 

Detailed Description

Function Documentation

◆ LL_TIM_BDTR_Init()

ErrorStatus LL_TIM_BDTR_Init ( TIM_TypeDef *  TIMx,
const LL_TIM_BDTR_InitTypeDef TIM_BDTRInitStruct 
)

Configure the Break and Dead Time feature of the timer instance.

Note
As the bits AOE, BKP, BKE, OSSR, OSSI and DTG[7:0] can be write-locked depending on the LOCK configuration, it can be necessary to configure all of them during the first write access to the TIMx_BDTR register.
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not a timer instance provides a break input.
Parameters
TIMxTimer Instance
TIM_BDTRInitStructpointer to a LL_TIM_BDTR_InitTypeDef structure (Break and Dead Time configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: Break and Dead Time is initialized
  • ERROR: not applicable

Definition at line 690 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_BDTR_StructInit()

void LL_TIM_BDTR_StructInit ( LL_TIM_BDTR_InitTypeDef TIM_BDTRInitStruct)

Set the fields of the Break and Dead Time configuration data structure to their default values.

Parameters
TIM_BDTRInitStructpointer to a LL_TIM_BDTR_InitTypeDef structure (Break and Dead Time configuration data structure)
Return values
None

Definition at line 664 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_DeInit()

ErrorStatus LL_TIM_DeInit ( const TIM_TypeDef *  TIMx)

Set TIMx registers to their reset values.

Parameters
TIMxTimer instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TIMx registers are de-initialized
  • ERROR: invalid TIMx instance

Definition at line 168 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_ENCODER_Init()

ErrorStatus LL_TIM_ENCODER_Init ( TIM_TypeDef *  TIMx,
const LL_TIM_ENCODER_InitTypeDef TIM_EncoderInitStruct 
)

Configure the encoder interface of the timer instance.

Parameters
TIMxTimer Instance
TIM_EncoderInitStructpointer to a LL_TIM_ENCODER_InitTypeDef structure (TIMx encoder interface configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TIMx registers are de-initialized
  • ERROR: not applicable

Definition at line 492 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_ENCODER_StructInit()

void LL_TIM_ENCODER_StructInit ( LL_TIM_ENCODER_InitTypeDef TIM_EncoderInitStruct)

Fills each TIM_EncoderInitStruct field with its default value.

Parameters
TIM_EncoderInitStructpointer to a LL_TIM_ENCODER_InitTypeDef structure (encoder interface configuration data structure)
Return values
None

Definition at line 469 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_HALLSENSOR_Init()

ErrorStatus LL_TIM_HALLSENSOR_Init ( TIM_TypeDef *  TIMx,
const LL_TIM_HALLSENSOR_InitTypeDef TIM_HallSensorInitStruct 
)

Configure the Hall sensor interface of the timer instance.

Note
TIMx CH1, CH2 and CH3 inputs connected through a XOR to the TI1 input channel
TIMx slave mode controller is configured in reset mode. Selected internal trigger is TI1F_ED.
Channel 1 is configured as input, IC1 is mapped on TRC.
Captured value stored in TIMx_CCR1 correspond to the time elapsed between 2 changes on the inputs. It gives information about motor speed.
Channel 2 is configured in output PWM 2 mode.
Compare value stored in TIMx_CCR2 corresponds to the commutation delay.
OC2REF is selected as trigger output on TRGO.
LL_TIM_IC_POLARITY_BOTHEDGE must not be used for TI1 when it is used when TIMx operates in Hall sensor interface mode.
Parameters
TIMxTimer Instance
TIM_HallSensorInitStructpointer to a LL_TIM_HALLSENSOR_InitTypeDef structure (TIMx HALL sensor interface configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TIMx registers are de-initialized
  • ERROR: not applicable

Definition at line 585 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_HALLSENSOR_StructInit()

void LL_TIM_HALLSENSOR_StructInit ( LL_TIM_HALLSENSOR_InitTypeDef TIM_HallSensorInitStruct)

Set the fields of the TIMx Hall sensor interface configuration data structure to their default values.

Parameters
TIM_HallSensorInitStructpointer to a LL_TIM_HALLSENSOR_InitTypeDef structure (HALL sensor interface configuration data structure)
Return values
None

Definition at line 555 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_IC_Init()

ErrorStatus LL_TIM_IC_Init ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
const LL_TIM_IC_InitTypeDef TIM_IC_InitStruct 
)

Configure the TIMx input channel.

Parameters
TIMxTimer Instance
ChannelThis parameter can be one of the following values:
  • LL_TIM_CHANNEL_CH1
  • LL_TIM_CHANNEL_CH2
  • LL_TIM_CHANNEL_CH3
  • LL_TIM_CHANNEL_CH4
TIM_IC_InitStructpointer to a LL_TIM_IC_InitTypeDef structure (TIMx input channel configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TIMx output channel is initialized
  • ERROR: TIMx output channel is not initialized

Definition at line 438 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_IC_StructInit()

void LL_TIM_IC_StructInit ( LL_TIM_IC_InitTypeDef TIM_ICInitStruct)

Set the fields of the TIMx input channel configuration data structure to their default values.

Parameters
TIM_ICInitStructpointer to a LL_TIM_IC_InitTypeDef structure (the input channel configuration data structure)
Return values
None

Definition at line 415 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_Init()

ErrorStatus LL_TIM_Init ( TIM_TypeDef *  TIMx,
const LL_TIM_InitTypeDef TIM_InitStruct 
)

Configure the TIMx time base unit.

Parameters
TIMxTimer Instance
TIM_InitStructpointer to a LL_TIM_InitTypeDef structure (TIMx time base unit configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TIMx registers are de-initialized
  • ERROR: not applicable

Definition at line 304 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_OC_Init()

ErrorStatus LL_TIM_OC_Init ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
const LL_TIM_OC_InitTypeDef TIM_OC_InitStruct 
)

Configure the TIMx output channel.

Parameters
TIMxTimer Instance
ChannelThis parameter can be one of the following values:
  • LL_TIM_CHANNEL_CH1
  • LL_TIM_CHANNEL_CH2
  • LL_TIM_CHANNEL_CH3
  • LL_TIM_CHANNEL_CH4
TIM_OC_InitStructpointer to a LL_TIM_OC_InitTypeDef structure (TIMx output channel configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TIMx output channel is initialized
  • ERROR: TIMx output channel is not initialized

Definition at line 383 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_OC_StructInit()

void LL_TIM_OC_StructInit ( LL_TIM_OC_InitTypeDef TIM_OC_InitStruct)

Set the fields of the TIMx output channel configuration data structure to their default values.

Parameters
TIM_OC_InitStructpointer to a LL_TIM_OC_InitTypeDef structure (the output channel configuration data structure)
Return values
None

Definition at line 356 of file stm32f4xx_ll_tim.c.

◆ LL_TIM_StructInit()

void LL_TIM_StructInit ( LL_TIM_InitTypeDef TIM_InitStruct)

Set the fields of the time base unit configuration data structure to their default values.

Parameters
TIM_InitStructpointer to a LL_TIM_InitTypeDef structure (time base unit configuration data structure)
Return values
None

Definition at line 285 of file stm32f4xx_ll_tim.c.