STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_LPTIM_SetClockSource (LPTIM_TypeDef *LPTIMx, uint32_t ClockSource)
 Set the source of the clock used by the LPTIM instance. More...
 
__STATIC_INLINE uint32_t LL_LPTIM_GetClockSource (LPTIM_TypeDef *LPTIMx)
 Get actual LPTIM instance clock source. CFGR CKSEL LL_LPTIM_GetClockSource. More...
 
__STATIC_INLINE void LL_LPTIM_ConfigClock (LPTIM_TypeDef *LPTIMx, uint32_t ClockFilter, uint32_t ClockPolarity)
 Configure the active edge or edges used by the counter when the LPTIM is clocked by an external clock source. More...
 
__STATIC_INLINE uint32_t LL_LPTIM_GetClockPolarity (LPTIM_TypeDef *LPTIMx)
 Get actual clock polarity CFGR CKPOL LL_LPTIM_GetClockPolarity. More...
 
__STATIC_INLINE uint32_t LL_LPTIM_GetClockFilter (LPTIM_TypeDef *LPTIMx)
 Get actual clock digital filter CFGR CKFLT LL_LPTIM_GetClockFilter. More...
 

Detailed Description

Function Documentation

◆ LL_LPTIM_ConfigClock()

__STATIC_INLINE void LL_LPTIM_ConfigClock ( LPTIM_TypeDef *  LPTIMx,
uint32_t  ClockFilter,
uint32_t  ClockPolarity 
)

Configure the active edge or edges used by the counter when the LPTIM is clocked by an external clock source.

Note
This function must be called when the LPTIM instance is disabled.
When both external clock signal edges are considered active ones, the LPTIM must also be clocked by an internal clock source with a frequency equal to at least four times the external clock frequency.
An internal clock source must be present when a digital filter is required for external clock. CFGR CKFLT LL_LPTIM_ConfigClock
CFGR CKPOL LL_LPTIM_ConfigClock
Parameters
LPTIMxLow-Power Timer instance
ClockFilterThis parameter can be one of the following values:
  • LL_LPTIM_CLK_FILTER_NONE
  • LL_LPTIM_CLK_FILTER_2
  • LL_LPTIM_CLK_FILTER_4
  • LL_LPTIM_CLK_FILTER_8
ClockPolarityThis parameter can be one of the following values:
  • LL_LPTIM_CLK_POLARITY_RISING
  • LL_LPTIM_CLK_POLARITY_FALLING
  • LL_LPTIM_CLK_POLARITY_RISING_FALLING
Return values
None

Definition at line 959 of file stm32l4xx_ll_lptim.h.

960 {
961  MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKFLT | LPTIM_CFGR_CKPOL, ClockFilter | ClockPolarity);
962 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_LPTIM_GetClockFilter()

__STATIC_INLINE uint32_t LL_LPTIM_GetClockFilter ( LPTIM_TypeDef *  LPTIMx)

Get actual clock digital filter CFGR CKFLT LL_LPTIM_GetClockFilter.

Parameters
LPTIMxLow-Power Timer instance
Return values
Returnedvalue can be one of the following values:
  • LL_LPTIM_CLK_FILTER_NONE
  • LL_LPTIM_CLK_FILTER_2
  • LL_LPTIM_CLK_FILTER_4
  • LL_LPTIM_CLK_FILTER_8

Definition at line 988 of file stm32l4xx_ll_lptim.h.

989 {
990  return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKFLT));
991 }

◆ LL_LPTIM_GetClockPolarity()

__STATIC_INLINE uint32_t LL_LPTIM_GetClockPolarity ( LPTIM_TypeDef *  LPTIMx)

Get actual clock polarity CFGR CKPOL LL_LPTIM_GetClockPolarity.

Parameters
LPTIMxLow-Power Timer instance
Return values
Returnedvalue can be one of the following values:
  • LL_LPTIM_CLK_POLARITY_RISING
  • LL_LPTIM_CLK_POLARITY_FALLING
  • LL_LPTIM_CLK_POLARITY_RISING_FALLING

Definition at line 973 of file stm32l4xx_ll_lptim.h.

974 {
975  return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKPOL));
976 }

◆ LL_LPTIM_GetClockSource()

__STATIC_INLINE uint32_t LL_LPTIM_GetClockSource ( LPTIM_TypeDef *  LPTIMx)

Get actual LPTIM instance clock source. CFGR CKSEL LL_LPTIM_GetClockSource.

Parameters
LPTIMxLow-Power Timer instance
Return values
Returnedvalue can be one of the following values:
  • LL_LPTIM_CLK_SOURCE_INTERNAL
  • LL_LPTIM_CLK_SOURCE_EXTERNAL

Definition at line 932 of file stm32l4xx_ll_lptim.h.

933 {
934  return (uint32_t)(READ_BIT(LPTIMx->CFGR, LPTIM_CFGR_CKSEL));
935 }

◆ LL_LPTIM_SetClockSource()

__STATIC_INLINE void LL_LPTIM_SetClockSource ( LPTIM_TypeDef *  LPTIMx,
uint32_t  ClockSource 
)

Set the source of the clock used by the LPTIM instance.

Note
This function must be called when the LPTIM instance is disabled. CFGR CKSEL LL_LPTIM_SetClockSource
Parameters
LPTIMxLow-Power Timer instance
ClockSourceThis parameter can be one of the following values:
  • LL_LPTIM_CLK_SOURCE_INTERNAL
  • LL_LPTIM_CLK_SOURCE_EXTERNAL
Return values
None

Definition at line 919 of file stm32l4xx_ll_lptim.h.

920 {
921  MODIFY_REG(LPTIMx->CFGR, LPTIM_CFGR_CKSEL, ClockSource);
922 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)