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

Input channel configuration

Input channel configuration
[TIM Exported Functions]

Functions

__STATIC_INLINE void LL_TIM_IC_Config (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t Configuration)
 Configure input channel.
__STATIC_INLINE void LL_TIM_IC_SetActiveInput (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICActiveInput)
 Set the active input.
__STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput (TIM_TypeDef *TIMx, uint32_t Channel)
 Get the current active input.
__STATIC_INLINE void LL_TIM_IC_SetPrescaler (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPrescaler)
 Set the prescaler of input channel.
__STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler (TIM_TypeDef *TIMx, uint32_t Channel)
 Get the current prescaler value acting on an input channel.
__STATIC_INLINE void LL_TIM_IC_SetFilter (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICFilter)
 Set the input filter duration.
__STATIC_INLINE uint32_t LL_TIM_IC_GetFilter (TIM_TypeDef *TIMx, uint32_t Channel)
 Get the input filter duration CCMR1 IC1F LL_TIM_IC_Config
CCMR1 IC2F LL_TIM_IC_Config
CCMR2 IC3F LL_TIM_IC_Config
CCMR2 IC4F LL_TIM_IC_Config
.
__STATIC_INLINE void LL_TIM_IC_SetPolarity (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ICPolarity)
 Set the input channel polarity.
__STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity (TIM_TypeDef *TIMx, uint32_t Channel)
 Get the current input channel polarity.
__STATIC_INLINE void LL_TIM_IC_EnableXORCombination (TIM_TypeDef *TIMx)
 Connect the TIMx_CH1, CH2 and CH3 pins to the TI1 input (XOR combination).
__STATIC_INLINE void LL_TIM_IC_DisableXORCombination (TIM_TypeDef *TIMx)
 Connect the TIMx_CH1 pin to TI1 input.
__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH1 (TIM_TypeDef *TIMx)
 Get captured value for input channel 1.
__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH2 (TIM_TypeDef *TIMx)
 Get captured value for input channel 2.
__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH3 (TIM_TypeDef *TIMx)
 Get captured value for input channel 3.
__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH4 (TIM_TypeDef *TIMx)
 Get captured value for input channel 4.

Function Documentation

__STATIC_INLINE void LL_TIM_IC_Config ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
uint32_t  Configuration 
)

Configure input channel.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCMR1 CC1S LL_TIM_IC_Config
CCMR1 IC1PSC LL_TIM_IC_Config
CCMR1 IC1F LL_TIM_IC_Config
CCMR1 CC2S LL_TIM_IC_Config
CCMR1 IC2PSC LL_TIM_IC_Config
CCMR1 IC2F LL_TIM_IC_Config
CCMR2 CC3S LL_TIM_IC_Config
CCMR2 IC3PSC LL_TIM_IC_Config
CCMR2 IC3F LL_TIM_IC_Config
CCMR2 CC4S LL_TIM_IC_Config
CCMR2 IC4PSC LL_TIM_IC_Config
CCMR2 IC4F LL_TIM_IC_Config
CCER CC1P LL_TIM_IC_Config
CCER CC1NP LL_TIM_IC_Config
CCER CC2P LL_TIM_IC_Config
CCER CC2NP LL_TIM_IC_Config
CCER CC3P LL_TIM_IC_Config
CCER CC3NP LL_TIM_IC_Config
CCER CC4P LL_TIM_IC_Config
CCER CC4NP LL_TIM_IC_Config
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
ConfigurationThis parameter must be a combination of all the following values:

  • LL_TIM_ACTIVEINPUT_DIRECTTI or LL_TIM_ACTIVEINPUT_INDIRECTTI or LL_TIM_ACTIVEINPUT_TRC
  • LL_TIM_ICPSC_DIV1 or ... or LL_TIM_ICPSC_DIV8
  • LL_TIM_IC_FILTER_FDIV1 or ... or LL_TIM_IC_FILTER_FDIV32_N8
  • LL_TIM_IC_POLARITY_RISING or LL_TIM_IC_POLARITY_FALLING or LL_TIM_IC_POLARITY_BOTHEDGE
Return values:
None

Definition at line 2324 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_IC_DisableXORCombination ( TIM_TypeDef *  TIMx )

Connect the TIMx_CH1 pin to TI1 input.

Note:
Macro IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not a timer instance provides an XOR input. CR2 TI1S LL_TIM_IC_DisableXORCombination
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 2597 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_IC_EnableXORCombination ( TIM_TypeDef *  TIMx )

Connect the TIMx_CH1, CH2 and CH3 pins to the TI1 input (XOR combination).

Note:
Macro IS_TIM_XOR_INSTANCE(TIMx) can be used to check whether or not a timer instance provides an XOR input. CR2 TI1S LL_TIM_IC_EnableXORCombination
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 2584 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetActiveInput ( TIM_TypeDef *  TIMx,
uint32_t  Channel 
)

Get the current active input.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCMR1 CC1S LL_TIM_IC_Config
CCMR1 CC2S LL_TIM_IC_Config
CCMR2 CC3S LL_TIM_IC_Config
CCMR2 CC4S LL_TIM_IC_Config
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
Return values:
Returnedvalue can be one of the following values:

  • LL_TIM_ACTIVEINPUT_DIRECTTI
  • LL_TIM_ACTIVEINPUT_INDIRECTTI
  • LL_TIM_ACTIVEINPUT_TRC

Definition at line 2378 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH1 ( TIM_TypeDef *  TIMx )

Get captured value for input channel 1.

Note:
In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter.
Macro IS_TIM_CC1_INSTANCE(TIMx) can be used to check whether or not input channel 1 is supported by a timer instance. CCR1 CCR1 LL_TIM_IC_GetCaptureCH1
Parameters:
TIMxTimer instance
Return values:
CapturedValue

Definition at line 2613 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH2 ( TIM_TypeDef *  TIMx )

Get captured value for input channel 2.

Note:
In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter.
Macro IS_TIM_CC2_INSTANCE(TIMx) can be used to check whether or not input channel 2 is supported by a timer instance. CCR2 CCR2 LL_TIM_IC_GetCaptureCH2
Parameters:
TIMxTimer instance
Return values:
CapturedValue

Definition at line 2629 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH3 ( TIM_TypeDef *  TIMx )

Get captured value for input channel 3.

Note:
In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter.
Macro IS_TIM_CC3_INSTANCE(TIMx) can be used to check whether or not input channel 3 is supported by a timer instance. CCR3 CCR3 LL_TIM_IC_GetCaptureCH3
Parameters:
TIMxTimer instance
Return values:
CapturedValue

Definition at line 2645 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetCaptureCH4 ( TIM_TypeDef *  TIMx )

Get captured value for input channel 4.

Note:
In 32-bit timer implementations returned captured value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter.
Macro IS_TIM_CC4_INSTANCE(TIMx) can be used to check whether or not input channel 4 is supported by a timer instance. CCR4 CCR4 LL_TIM_IC_GetCaptureCH4
Parameters:
TIMxTimer instance
Return values:
CapturedValue

Definition at line 2661 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetFilter ( TIM_TypeDef *  TIMx,
uint32_t  Channel 
)

Get the input filter duration CCMR1 IC1F LL_TIM_IC_Config
CCMR1 IC2F LL_TIM_IC_Config
CCMR2 IC3F LL_TIM_IC_Config
CCMR2 IC4F LL_TIM_IC_Config
.

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
Return values:
Returnedvalue can be one of the following values:

  • LL_TIM_IC_FILTER_FDIV1
  • LL_TIM_IC_FILTER_FDIV1_N2
  • LL_TIM_IC_FILTER_FDIV1_N4
  • LL_TIM_IC_FILTER_FDIV1_N8
  • LL_TIM_IC_FILTER_FDIV2_N6
  • LL_TIM_IC_FILTER_FDIV2_N8
  • LL_TIM_IC_FILTER_FDIV4_N6
  • LL_TIM_IC_FILTER_FDIV4_N8
  • LL_TIM_IC_FILTER_FDIV8_N6
  • LL_TIM_IC_FILTER_FDIV8_N8
  • LL_TIM_IC_FILTER_FDIV16_N5
  • LL_TIM_IC_FILTER_FDIV16_N6
  • LL_TIM_IC_FILTER_FDIV16_N8
  • LL_TIM_IC_FILTER_FDIV32_N5
  • LL_TIM_IC_FILTER_FDIV32_N6
  • LL_TIM_IC_FILTER_FDIV32_N8

Definition at line 2510 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetPolarity ( TIM_TypeDef *  TIMx,
uint32_t  Channel 
)

Get the current input channel polarity.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCER CC1P LL_TIM_IC_Config
CCER CC1NP LL_TIM_IC_Config
CCER CC2P LL_TIM_IC_Config
CCER CC2NP LL_TIM_IC_Config
CCER CC3P LL_TIM_IC_Config
CCER CC3NP LL_TIM_IC_Config
CCER CC4P LL_TIM_IC_Config
CCER CC4NP LL_TIM_IC_Config
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
Return values:
Returnedvalue can be one of the following values:

  • LL_TIM_IC_POLARITY_RISING
  • LL_TIM_IC_POLARITY_FALLING
  • LL_TIM_IC_POLARITY_BOTHEDGE

Definition at line 2570 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE uint32_t LL_TIM_IC_GetPrescaler ( TIM_TypeDef *  TIMx,
uint32_t  Channel 
)

Get the current prescaler value acting on an input channel.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCMR1 IC1PSC LL_TIM_IC_Config
CCMR1 IC2PSC LL_TIM_IC_Config
CCMR2 IC3PSC LL_TIM_IC_Config
CCMR2 IC4PSC LL_TIM_IC_Config
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
Return values:
Returnedvalue can be one of the following values:

  • LL_TIM_ICPSC_DIV1
  • LL_TIM_ICPSC_DIV2
  • LL_TIM_ICPSC_DIV4
  • LL_TIM_ICPSC_DIV8

Definition at line 2433 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_IC_SetActiveInput ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
uint32_t  ICActiveInput 
)

Set the active input.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCMR1 CC1S LL_TIM_IC_Config
CCMR1 CC2S LL_TIM_IC_Config
CCMR2 CC3S LL_TIM_IC_Config
CCMR2 CC4S LL_TIM_IC_Config
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
ICActiveInputThis parameter can be one of the following values:

  • LL_TIM_ACTIVEINPUT_DIRECTTI
  • LL_TIM_ACTIVEINPUT_INDIRECTTI
  • LL_TIM_ACTIVEINPUT_TRC
Return values:
None

Definition at line 2352 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_IC_SetFilter ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
uint32_t  ICFilter 
)

Set the input filter duration.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCMR1 IC1F LL_TIM_IC_Config
CCMR1 IC2F LL_TIM_IC_Config
CCMR2 IC3F LL_TIM_IC_Config
CCMR2 IC4F LL_TIM_IC_Config
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
ICFilterThis parameter can be one of the following values:

  • LL_TIM_IC_FILTER_FDIV1
  • LL_TIM_IC_FILTER_FDIV1_N2
  • LL_TIM_IC_FILTER_FDIV1_N4
  • LL_TIM_IC_FILTER_FDIV1_N8
  • LL_TIM_IC_FILTER_FDIV2_N6
  • LL_TIM_IC_FILTER_FDIV2_N8
  • LL_TIM_IC_FILTER_FDIV4_N6
  • LL_TIM_IC_FILTER_FDIV4_N8
  • LL_TIM_IC_FILTER_FDIV8_N6
  • LL_TIM_IC_FILTER_FDIV8_N8
  • LL_TIM_IC_FILTER_FDIV16_N5
  • LL_TIM_IC_FILTER_FDIV16_N6
  • LL_TIM_IC_FILTER_FDIV16_N8
  • LL_TIM_IC_FILTER_FDIV32_N5
  • LL_TIM_IC_FILTER_FDIV32_N6
  • LL_TIM_IC_FILTER_FDIV32_N8
Return values:
None

Definition at line 2473 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_IC_SetPolarity ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
uint32_t  ICPolarity 
)

Set the input channel polarity.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCER CC1P LL_TIM_IC_Config
CCER CC1NP LL_TIM_IC_Config
CCER CC2P LL_TIM_IC_Config
CCER CC2NP LL_TIM_IC_Config
CCER CC3P LL_TIM_IC_Config
CCER CC3NP LL_TIM_IC_Config
CCER CC4P LL_TIM_IC_Config
CCER CC4NP LL_TIM_IC_Config
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
ICPolarityThis parameter can be one of the following values:

  • LL_TIM_IC_POLARITY_RISING
  • LL_TIM_IC_POLARITY_FALLING
  • LL_TIM_IC_POLARITY_BOTHEDGE
Return values:
None

Definition at line 2541 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_IC_SetPrescaler ( TIM_TypeDef *  TIMx,
uint32_t  Channel,
uint32_t  ICPrescaler 
)

Set the prescaler of input channel.

Note:
Macro IS_TIM_CCX_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCMR1 IC1PSC LL_TIM_IC_Config
CCMR1 IC2PSC LL_TIM_IC_Config
CCMR2 IC3PSC LL_TIM_IC_Config
CCMR2 IC4PSC LL_TIM_IC_Config
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
ICPrescalerThis parameter can be one of the following values:

  • LL_TIM_ICPSC_DIV1
  • LL_TIM_ICPSC_DIV2
  • LL_TIM_ICPSC_DIV4
  • LL_TIM_ICPSC_DIV8
Return values:
None

Definition at line 2406 of file stm32l4xx_ll_tim.h.