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

Capture Compare configuration

Capture Compare configuration
[TIM Exported Functions]

Functions

__STATIC_INLINE void LL_TIM_CC_EnablePreload (TIM_TypeDef *TIMx)
 Enable the capture/compare control bits (CCxE, CCxNE and OCxM) preload.
__STATIC_INLINE void LL_TIM_CC_DisablePreload (TIM_TypeDef *TIMx)
 Disable the capture/compare control bits (CCxE, CCxNE and OCxM) preload.
__STATIC_INLINE void LL_TIM_CC_SetUpdate (TIM_TypeDef *TIMx, uint32_t CCUpdateSource)
 Set the updated source of the capture/compare control bits (CCxE, CCxNE and OCxM).
__STATIC_INLINE void LL_TIM_CC_SetDMAReqTrigger (TIM_TypeDef *TIMx, uint32_t DMAReqTrigger)
 Set the trigger of the capture/compare DMA request.
__STATIC_INLINE void LL_TIM_CC_SetLockLevel (TIM_TypeDef *TIMx, uint32_t LockLevel)
 Set the lock level to freeze the configuration of several capture/compare parameters.
__STATIC_INLINE void LL_TIM_CC_EnableChannel (TIM_TypeDef *TIMx, uint32_t Channels)
 Enable capture/compare channels.
__STATIC_INLINE void LL_TIM_CC_DisableChannel (TIM_TypeDef *TIMx, uint32_t Channels)
 Disable capture/compare channels.

Function Documentation

__STATIC_INLINE void LL_TIM_CC_DisableChannel ( TIM_TypeDef *  TIMx,
uint32_t  Channels 
)

Disable capture/compare channels.

Note:
Macros IS_TIM_CCX_INSTANCE(TIMx, Channel) or IS_TIM_CCXN_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCER CC1E LL_TIM_CC_EnableChannel
CCER CC1NE LL_TIM_CC_EnableChannel
CCER CC2E LL_TIM_CC_EnableChannel
CCER CC2NE LL_TIM_CC_EnableChannel
CCER CC3E LL_TIM_CC_EnableChannel
CCER CC3NE LL_TIM_CC_EnableChannel
CCER CC4E LL_TIM_CC_EnableChannel
CCER CC5E LL_TIM_CC_EnableChannel
CCER CC6E LL_TIM_CC_EnableChannel
Parameters:
TIMxTimer instance
ChannelsThis parameter can be a combination of the following values:

  • LL_TIM_CHANNEL_CH1
  • LL_TIM_CHANNEL_CH1N
  • LL_TIM_CHANNEL_CH2
  • LL_TIM_CHANNEL_CH2N
  • LL_TIM_CHANNEL_CH3
  • LL_TIM_CHANNEL_CH3N
  • LL_TIM_CHANNEL_CH4
  • LL_TIM_CHANNEL_CH5
  • LL_TIM_CHANNEL_CH6
Return values:
None

Definition at line 1571 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_CC_DisablePreload ( TIM_TypeDef *  TIMx )

Disable the capture/compare control bits (CCxE, CCxNE and OCxM) preload.

Note:
Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check whether or not a timer instance is able to generate a commutation event. CR2 CCPC LL_TIM_CC_DisablePreload
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 1458 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_CC_EnableChannel ( TIM_TypeDef *  TIMx,
uint32_t  Channels 
)

Enable capture/compare channels.

Note:
Macros IS_TIM_CCX_INSTANCE(TIMx, Channel) or IS_TIM_CCXN_INSTANCE(TIMx, Channel) can be used to check whether or not a channel is supported by the a timer instance. CCER CC1E LL_TIM_CC_EnableChannel
CCER CC1NE LL_TIM_CC_EnableChannel
CCER CC2E LL_TIM_CC_EnableChannel
CCER CC2NE LL_TIM_CC_EnableChannel
CCER CC3E LL_TIM_CC_EnableChannel
CCER CC3NE LL_TIM_CC_EnableChannel
CCER CC4E LL_TIM_CC_EnableChannel
CCER CC5E LL_TIM_CC_EnableChannel
CCER CC6E LL_TIM_CC_EnableChannel
Parameters:
TIMxTimer instance
ChannelsThis parameter can be a combination of the following values:

  • LL_TIM_CHANNEL_CH1
  • LL_TIM_CHANNEL_CH1N
  • LL_TIM_CHANNEL_CH2
  • LL_TIM_CHANNEL_CH2N
  • LL_TIM_CHANNEL_CH3
  • LL_TIM_CHANNEL_CH3N
  • LL_TIM_CHANNEL_CH4
  • LL_TIM_CHANNEL_CH5
  • LL_TIM_CHANNEL_CH6
Return values:
None

Definition at line 1539 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_CC_EnablePreload ( TIM_TypeDef *  TIMx )

Enable the capture/compare control bits (CCxE, CCxNE and OCxM) preload.

Note:
CCxE, CCxNE and OCxM bits are preloaded, after having been written, they are updated only when a commutation event (COM) occurs.
Only on channels that have a complementary output.
Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check whether or not a timer instance is able to generate a commutation event. CR2 CCPC LL_TIM_CC_EnablePreload
Parameters:
TIMxTimer instance
Return values:
None

Definition at line 1445 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_CC_SetDMAReqTrigger ( TIM_TypeDef *  TIMx,
uint32_t  DMAReqTrigger 
)

Set the trigger of the capture/compare DMA request.

CR2 CCDS LL_TIM_CC_SetDMAReqTrigger

Parameters:
TIMxTimer instance
DMAReqTriggerThis parameter can be one of the following values:

  • LL_TIM_CCDMAREQUEST_CC
  • LL_TIM_CCDMAREQUEST_UPDATE
Return values:
None

Definition at line 1488 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_CC_SetLockLevel ( TIM_TypeDef *  TIMx,
uint32_t  LockLevel 
)

Set the lock level to freeze the configuration of several capture/compare parameters.

Note:
Macro IS_TIM_BREAK_INSTANCE(TIMx) can be used to check whether or not the lock mechanism is supported by a timer instance. BDTR LOCK LL_TIM_CC_SetLockLevel
Parameters:
TIMxTimer instance
LockLevelThis parameter can be one of the following values:

  • LL_TIM_LOCKLEVEL_OFF
  • LL_TIM_LOCKLEVEL_1
  • LL_TIM_LOCKLEVEL_2
  • LL_TIM_LOCKLEVEL_3
Return values:
None

Definition at line 1507 of file stm32l4xx_ll_tim.h.

__STATIC_INLINE void LL_TIM_CC_SetUpdate ( TIM_TypeDef *  TIMx,
uint32_t  CCUpdateSource 
)

Set the updated source of the capture/compare control bits (CCxE, CCxNE and OCxM).

Note:
Macro IS_TIM_COMMUTATION_EVENT_INSTANCE(TIMx) can be used to check whether or not a timer instance is able to generate a commutation event. CR2 CCUS LL_TIM_CC_SetUpdate
Parameters:
TIMxTimer instance
CCUpdateSourceThis parameter can be one of the following values:

  • LL_TIM_CCUPDATESOURCE_COMG_ONLY
  • LL_TIM_CCUPDATESOURCE_COMG_AND_TRGI
Return values:
None

Definition at line 1474 of file stm32l4xx_ll_tim.h.