Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Embed: (wiki syntax)

« Back to documentation index

timer synchronisation configuration

timer synchronisation configuration
[TIM Exported Functions]

Functions

__STATIC_INLINE void LL_TIM_SetTriggerOutput (TIM_TypeDef *TIMx, uint32_t TimerSynchronization)
 Set the trigger output (TRGO) used for timer synchronization .
__STATIC_INLINE void LL_TIM_SetTriggerOutput2 (TIM_TypeDef *TIMx, uint32_t ADCSynchronization)
 Set the trigger output 2 (TRGO2) used for ADC synchronization .
__STATIC_INLINE void LL_TIM_SetSlaveMode (TIM_TypeDef *TIMx, uint32_t SlaveMode)
 Set the synchronization mode of a slave timer.
__STATIC_INLINE void LL_TIM_SetTriggerInput (TIM_TypeDef *TIMx, uint32_t TriggerInput)
 Set the selects the trigger input to be used to synchronize the counter.
__STATIC_INLINE void LL_TIM_EnableMasterSlaveMode (TIM_TypeDef *TIMx)
 Enable the Master/Slave mode.
__STATIC_INLINE void LL_TIM_DisableMasterSlaveMode (TIM_TypeDef *TIMx)
 Disable the Master/Slave mode.
__STATIC_INLINE void LL_TIM_ConfigETR (TIM_TypeDef *TIMx, uint32_t ETRPolarity, uint32_t ETRPrescaler, uint32_t ETRFilter)
 Configure the external trigger (ETR) input.
__STATIC_INLINE void LL_TIM_SetETRSource (TIM_TypeDef *TIMx, uint32_t ETRSource)
 Select the external trigger (ETR) input source.

Function Documentation

__STATIC_INLINE void LL_TIM_ConfigETR ( TIM_TypeDef *  TIMx,
uint32_t  ETRPolarity,
uint32_t  ETRPrescaler,
uint32_t  ETRFilter 
)

Configure the external trigger (ETR) input.

Note:
Macro IS_TIM_ETR_INSTANCE(TIMx) can be used to check whether or not a timer instance provides an external trigger input. SMCR ETP LL_TIM_ConfigETR
SMCR ETPS LL_TIM_ConfigETR
SMCR ETF LL_TIM_ConfigETR
Parameters:
TIMxTimer instance
ETRPolarityThis parameter can be one of the following values:

  • LL_TIM_ETR_POLARITY_NONINVERTED
  • LL_TIM_ETR_POLARITY_INVERTED
ETRPrescalerThis parameter can be one of the following values:

  • LL_TIM_ETR_PRESCALER_DIV1
  • LL_TIM_ETR_PRESCALER_DIV2
  • LL_TIM_ETR_PRESCALER_DIV4
  • LL_TIM_ETR_PRESCALER_DIV8
ETRFilterThis parameter can be one of the following values:

  • LL_TIM_ETR_FILTER_FDIV1
  • LL_TIM_ETR_FILTER_FDIV1_N2
  • LL_TIM_ETR_FILTER_FDIV1_N4
  • LL_TIM_ETR_FILTER_FDIV1_N8
  • LL_TIM_ETR_FILTER_FDIV2_N6
  • LL_TIM_ETR_FILTER_FDIV2_N8
  • LL_TIM_ETR_FILTER_FDIV4_N6
  • LL_TIM_ETR_FILTER_FDIV4_N8
  • LL_TIM_ETR_FILTER_FDIV8_N6
  • LL_TIM_ETR_FILTER_FDIV8_N8
  • LL_TIM_ETR_FILTER_FDIV16_N5
  • LL_TIM_ETR_FILTER_FDIV16_N6
  • LL_TIM_ETR_FILTER_FDIV16_N8
  • LL_TIM_ETR_FILTER_FDIV32_N5
  • LL_TIM_ETR_FILTER_FDIV32_N6
  • LL_TIM_ETR_FILTER_FDIV32_N8
Return values:
None

Definition at line 2872 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_DisableMasterSlaveMode ( TIM_TypeDef *  TIMx )

Disable the Master/Slave mode.

Note:
Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR MSM LL_TIM_DisableMasterSlaveMode
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 2832 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_EnableMasterSlaveMode ( TIM_TypeDef *  TIMx )

Enable the Master/Slave mode.

Note:
Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR MSM LL_TIM_EnableMasterSlaveMode
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 2819 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_SetETRSource ( TIM_TypeDef *  TIMx,
uint32_t  ETRSource 
)

Select the external trigger (ETR) input source.

Note:
Macro IS_TIM_ETRSEL_INSTANCE(TIMx) can be used to check whether or not a timer instance supports ETR source selection. OR2 ETRSEL LL_TIM_SetETRSource
Parameters:
TIMxTimer instance
ETRSourceThis parameter can be one of the following values:

  • LL_TIM_ETRSOURCE_LEGACY
  • LL_TIM_ETRSOURCE_COMP1
  • LL_TIM_ETRSOURCE_COMP2
Return values:
None

Definition at line 2889 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_SetSlaveMode ( TIM_TypeDef *  TIMx,
uint32_t  SlaveMode 
)

Set the synchronization mode of a slave timer.

Note:
Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR SMS LL_TIM_SetSlaveMode
Parameters:
TIMxTimer instance
SlaveModeThis parameter can be one of the following values:

  • LL_TIM_SLAVEMODE_DISABLED
  • LL_TIM_SLAVEMODE_RESET
  • LL_TIM_SLAVEMODE_GATED
  • LL_TIM_SLAVEMODE_TRIGGER
  • LL_TIM_SLAVEMODE_COMBINED_RESETTRIGGER (not supported by STM32F373xC and STM32F378xx devices)
Return values:
None

Definition at line 2784 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_SetTriggerInput ( TIM_TypeDef *  TIMx,
uint32_t  TriggerInput 
)

Set the selects the trigger input to be used to synchronize the counter.

Note:
Macro IS_TIM_SLAVE_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a slave timer. SMCR TS LL_TIM_SetTriggerInput
Parameters:
TIMxTimer instance
TriggerInputThis parameter can be one of the following values:

  • LL_TIM_TS_ITR0
  • LL_TIM_TS_ITR1
  • LL_TIM_TS_ITR2
  • LL_TIM_TS_ITR3
  • LL_TIM_TS_TI1F_ED
  • LL_TIM_TS_TI1FP1
  • LL_TIM_TS_TI2FP2
  • LL_TIM_TS_ETRF
Return values:
None

Definition at line 2806 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_SetTriggerOutput ( TIM_TypeDef *  TIMx,
uint32_t  TimerSynchronization 
)

Set the trigger output (TRGO) used for timer synchronization .

Note:
Macro IS_TIM_MASTER_INSTANCE(TIMx) can be used to check whether or not a timer instance can operate as a master timer. CR2 MMS LL_TIM_SetTriggerOutput
Parameters:
TIMxTimer instance
TimerSynchronizationThis parameter can be one of the following values:

  • LL_TIM_TRGO_RESET
  • LL_TIM_TRGO_ENABLE
  • LL_TIM_TRGO_UPDATE
  • LL_TIM_TRGO_CC1IF
  • LL_TIM_TRGO_OC1REF
  • LL_TIM_TRGO_OC2REF
  • LL_TIM_TRGO_OC3REF
  • LL_TIM_TRGO_OC4REF
Return values:
None

Definition at line 2735 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_SetTriggerOutput2 ( TIM_TypeDef *  TIMx,
uint32_t  ADCSynchronization 
)

Set the trigger output 2 (TRGO2) used for ADC synchronization .

Note:
Macro IS_TIM_TRGO2_INSTANCE(TIMx) can be used to check whether or not a timer instance can be used for ADC synchronization. CR2 MMS2 LL_TIM_SetTriggerOutput2
Parameters:
TIMxTimer Instance
ADCSynchronizationThis parameter can be one of the following values:

  • LL_TIM_TRGO2_RESET
  • LL_TIM_TRGO2_ENABLE
  • LL_TIM_TRGO2_UPDATE
  • LL_TIM_TRGO2_CC1F
  • LL_TIM_TRGO2_OC1
  • LL_TIM_TRGO2_OC2
  • LL_TIM_TRGO2_OC3
  • LL_TIM_TRGO2_OC4
  • LL_TIM_TRGO2_OC5
  • LL_TIM_TRGO2_OC6
  • LL_TIM_TRGO2_OC4_RISINGFALLING
  • LL_TIM_TRGO2_OC6_RISINGFALLING
  • LL_TIM_TRGO2_OC4_RISING_OC6_RISING
  • LL_TIM_TRGO2_OC4_RISING_OC6_FALLING
  • LL_TIM_TRGO2_OC5_RISING_OC6_RISING
  • LL_TIM_TRGO2_OC5_RISING_OC6_FALLING
Return values:
None

Definition at line 2765 of file stm32l4xx_ll_tim.h.