Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Initialisation and deinitialisation functions
[TIM Exported Functions]
Functions | |
ErrorStatus | LL_TIM_DeInit (TIM_TypeDef *TIMx) |
Set TIMx registers to their reset values. | |
void | LL_TIM_StructInit (LL_TIM_InitTypeDef *TIM_InitStruct) |
Set the fields of the time base unit configuration data structure to their default values. | |
ErrorStatus | LL_TIM_Init (TIM_TypeDef *TIMx, LL_TIM_InitTypeDef *TIM_InitStruct) |
Configure the TIMx time base unit. | |
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. | |
ErrorStatus | LL_TIM_OC_Init (TIM_TypeDef *TIMx, uint32_t Channel, LL_TIM_OC_InitTypeDef *TIM_OC_InitStruct) |
Configure the TIMx output channel. | |
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. | |
ErrorStatus | LL_TIM_IC_Init (TIM_TypeDef *TIMx, uint32_t Channel, LL_TIM_IC_InitTypeDef *TIM_IC_InitStruct) |
Configure the TIMx input channel. | |
void | LL_TIM_ENCODER_StructInit (LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct) |
Fills each TIM_EncoderInitStruct field with its default value. | |
ErrorStatus | LL_TIM_ENCODER_Init (TIM_TypeDef *TIMx, LL_TIM_ENCODER_InitTypeDef *TIM_EncoderInitStruct) |
Configure the encoder interface of the timer instance. | |
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. | |
ErrorStatus | LL_TIM_HALLSENSOR_Init (TIM_TypeDef *TIMx, LL_TIM_HALLSENSOR_InitTypeDef *TIM_HallSensorInitStruct) |
Configure the Hall sensor interface of the timer instance. |
Function Documentation
ErrorStatus LL_TIM_DeInit | ( | TIM_TypeDef * | TIMx ) |
Set TIMx registers to their reset values.
- Parameters:
-
TIMx Timer instance
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: TIMx registers are de-initialized
- ERROR: invalid TIMx instance
Definition at line 175 of file stm32l4xx_ll_tim.c.
ErrorStatus LL_TIM_ENCODER_Init | ( | TIM_TypeDef * | TIMx, |
LL_TIM_ENCODER_InitTypeDef * | TIM_EncoderInitStruct | ||
) |
Configure the encoder interface of the timer instance.
- Parameters:
-
TIMx Timer Instance TIM_EncoderInitStruct pointer to a LL_TIM_ENCODER_InitTypeDef structure (TIMx encoder interface configuration data structure)
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: TIMx registers are de-initialized
- ERROR: not applicable
Definition at line 473 of file stm32l4xx_ll_tim.c.
void LL_TIM_ENCODER_StructInit | ( | LL_TIM_ENCODER_InitTypeDef * | TIM_EncoderInitStruct ) |
Fills each TIM_EncoderInitStruct field with its default value.
- Parameters:
-
TIM_EncoderInitStruct pointer to a LL_TIM_ENCODER_InitTypeDef structure (encoder interface configuration data structure)
- Return values:
-
None
Definition at line 451 of file stm32l4xx_ll_tim.c.
ErrorStatus LL_TIM_HALLSENSOR_Init | ( | TIM_TypeDef * | TIMx, |
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:
-
TIMx Timer Instance TIM_HallSensorInitStruct pointer to a LL_TIM_HALLSENSOR_InitTypeDef structure (TIMx HALL sensor interface configuration data structure)
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: TIMx registers are de-initialized
- ERROR: not applicable
Definition at line 564 of file stm32l4xx_ll_tim.c.
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_HallSensorInitStruct pointer to a LL_TIM_HALLSENSOR_InitTypeDef structure (HALL sensor interface configuration data structure)
- Return values:
-
None
Definition at line 535 of file stm32l4xx_ll_tim.c.
ErrorStatus LL_TIM_IC_Init | ( | TIM_TypeDef * | TIMx, |
uint32_t | Channel, | ||
LL_TIM_IC_InitTypeDef * | TIM_IC_InitStruct | ||
) |
Configure the TIMx input channel.
- Parameters:
-
TIMx Timer Instance Channel This 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_InitStruct pointer to a LL_TIM_IC_InitTypeDef structure (TIMx input channel configuration data structure)
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: TIMx output channel is initialized
- ERROR: TIMx output channel is not initialized
Definition at line 420 of file stm32l4xx_ll_tim.c.
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_ICInitStruct pointer to a LL_TIM_IC_InitTypeDef structure (the input channel configuration data structure)
- Return values:
-
None
Definition at line 398 of file stm32l4xx_ll_tim.c.
ErrorStatus LL_TIM_Init | ( | TIM_TypeDef * | TIMx, |
LL_TIM_InitTypeDef * | TIM_InitStruct | ||
) |
Configure the TIMx time base unit.
- Parameters:
-
TIMx Timer Instance TIM_InitStruct pointer to a LL_TIM_InitTypeDef structure (TIMx time base unit configuration data structure)
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: TIMx registers are de-initialized
- ERROR: not applicable
Definition at line 279 of file stm32l4xx_ll_tim.c.
ErrorStatus LL_TIM_OC_Init | ( | TIM_TypeDef * | TIMx, |
uint32_t | Channel, | ||
LL_TIM_OC_InitTypeDef * | TIM_OC_InitStruct | ||
) |
Configure the TIMx output channel.
- Parameters:
-
TIMx Timer Instance Channel This parameter can be one of the following values: - LL_TIM_CHANNEL_CH1
- LL_TIM_CHANNEL_CH2
- LL_TIM_CHANNEL_CH3
- LL_TIM_CHANNEL_CH4
- LL_TIM_CHANNEL_CH5
- LL_TIM_CHANNEL_CH6
TIM_OC_InitStruct pointer to a LL_TIM_OC_InitTypeDef structure (TIMx output channel configuration data structure)
- Return values:
-
An ErrorStatus enumeration value: - SUCCESS: TIMx output channel is initialized
- ERROR: TIMx output channel is not initialized
Definition at line 360 of file stm32l4xx_ll_tim.c.
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_InitStruct pointer to a LL_TIM_OC_InitTypeDef structure (the output channel configuration data structure)
- Return values:
-
None
Definition at line 332 of file stm32l4xx_ll_tim.c.
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_InitStruct pointer to a LL_TIM_InitTypeDef structure (time base unit configuration data structure)
- Return values:
-
None
Definition at line 261 of file stm32l4xx_ll_tim.c.
Generated on Tue Jul 12 2022 11:00:16 by
