STM32H735xx HAL User Manual
Functions
LPTIM Configuration
LPTIM Exported Functions

Functions

__STATIC_INLINE void LL_LPTIM_Enable (LPTIM_TypeDef *LPTIMx)
 Enable the LPTIM instance.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabled (LPTIM_TypeDef *LPTIMx)
 Indicates whether the LPTIM instance is enabled.
__STATIC_INLINE void LL_LPTIM_StartCounter (LPTIM_TypeDef *LPTIMx, uint32_t OperatingMode)
 Starts the LPTIM counter in the desired mode.
__STATIC_INLINE void LL_LPTIM_EnableResetAfterRead (LPTIM_TypeDef *LPTIMx)
 Enable reset after read.
__STATIC_INLINE void LL_LPTIM_DisableResetAfterRead (LPTIM_TypeDef *LPTIMx)
 Disable reset after read.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledResetAfterRead (LPTIM_TypeDef *LPTIMx)
 Indicate whether the reset after read feature is enabled.
__STATIC_INLINE void LL_LPTIM_ResetCounter (LPTIM_TypeDef *LPTIMx)
 Reset of the LPTIM_CNT counter register (synchronous).
__STATIC_INLINE void LL_LPTIM_SetUpdateMode (LPTIM_TypeDef *LPTIMx, uint32_t UpdateMode)
 Set the LPTIM registers update mode (enable/disable register preload)
__STATIC_INLINE uint32_t LL_LPTIM_GetUpdateMode (LPTIM_TypeDef *LPTIMx)
 Get the LPTIM registers update mode.
__STATIC_INLINE void LL_LPTIM_SetAutoReload (LPTIM_TypeDef *LPTIMx, uint32_t AutoReload)
 Set the auto reload value.
__STATIC_INLINE uint32_t LL_LPTIM_GetAutoReload (LPTIM_TypeDef *LPTIMx)
 Get actual auto reload value.
__STATIC_INLINE void LL_LPTIM_SetCompare (LPTIM_TypeDef *LPTIMx, uint32_t CompareValue)
 Set the compare value.
__STATIC_INLINE uint32_t LL_LPTIM_GetCompare (LPTIM_TypeDef *LPTIMx)
 Get actual compare value.
__STATIC_INLINE uint32_t LL_LPTIM_GetCounter (LPTIM_TypeDef *LPTIMx)
 Get actual counter value.
__STATIC_INLINE void LL_LPTIM_SetCounterMode (LPTIM_TypeDef *LPTIMx, uint32_t CounterMode)
 Set the counter mode (selection of the LPTIM counter clock source).
__STATIC_INLINE uint32_t LL_LPTIM_GetCounterMode (LPTIM_TypeDef *LPTIMx)
 Get the counter mode.
__STATIC_INLINE void LL_LPTIM_ConfigOutput (LPTIM_TypeDef *LPTIMx, uint32_t Waveform, uint32_t Polarity)
 Configure the LPTIM instance output (LPTIMx_OUT)
__STATIC_INLINE void LL_LPTIM_SetWaveform (LPTIM_TypeDef *LPTIMx, uint32_t Waveform)
 Set waveform shape.
__STATIC_INLINE uint32_t LL_LPTIM_GetWaveform (LPTIM_TypeDef *LPTIMx)
 Get actual waveform shape.
__STATIC_INLINE void LL_LPTIM_SetPolarity (LPTIM_TypeDef *LPTIMx, uint32_t Polarity)
 Set output polarity.
__STATIC_INLINE uint32_t LL_LPTIM_GetPolarity (LPTIM_TypeDef *LPTIMx)
 Get actual output polarity.
__STATIC_INLINE void LL_LPTIM_SetPrescaler (LPTIM_TypeDef *LPTIMx, uint32_t Prescaler)
 Set actual prescaler division ratio.
__STATIC_INLINE uint32_t LL_LPTIM_GetPrescaler (LPTIM_TypeDef *LPTIMx)
 Get actual prescaler division ratio.
__STATIC_INLINE void LL_LPTIM_SetInput1Src (LPTIM_TypeDef *LPTIMx, uint32_t Src)
 Set LPTIM input 1 source (default GPIO).
__STATIC_INLINE void LL_LPTIM_SetInput2Src (LPTIM_TypeDef *LPTIMx, uint32_t Src)
 Set LPTIM input 2 source (default GPIO).

Function Documentation

__STATIC_INLINE void LL_LPTIM_ConfigOutput ( LPTIM_TypeDef *  LPTIMx,
uint32_t  Waveform,
uint32_t  Polarity 
)

Configure the LPTIM instance output (LPTIMx_OUT)

Note:
This function must be called when the LPTIM instance is disabled.
Regarding the LPTIM output polarity the change takes effect immediately, so the output default value will change immediately after the polarity is re-configured, even before the timer is enabled.
Reference Manual to LL API cross reference:
CFGR WAVE LL_LPTIM_ConfigOutput
CFGR WAVPOL LL_LPTIM_ConfigOutput
Parameters:
LPTIMxLow-Power Timer instance
WaveformThis parameter can be one of the following values:
PolarityThis parameter can be one of the following values:
Return values:
None

Definition at line 596 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_DisableResetAfterRead ( LPTIM_TypeDef *  LPTIMx)

Disable reset after read.

Reference Manual to LL API cross reference:
CR RSTARE LL_LPTIM_DisableResetAfterRead
Parameters:
LPTIMxLow-Power Timer instance
Return values:
None

Definition at line 421 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_Enable ( LPTIM_TypeDef *  LPTIMx)

Enable the LPTIM instance.

Note:
After setting the ENABLE bit, a delay of two counter clock is needed before the LPTIM instance is actually enabled.
Reference Manual to LL API cross reference:
CR ENABLE LL_LPTIM_Enable
Parameters:
LPTIMxLow-Power Timer instance
Return values:
None

Definition at line 368 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_EnableResetAfterRead ( LPTIM_TypeDef *  LPTIMx)

Enable reset after read.

Note:
After calling this function any read access to LPTIM_CNT register will asynchronously reset the LPTIM_CNT register content.
Reference Manual to LL API cross reference:
CR RSTARE LL_LPTIM_EnableResetAfterRead
Parameters:
LPTIMxLow-Power Timer instance
Return values:
None

Definition at line 410 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetAutoReload ( LPTIM_TypeDef *  LPTIMx)

Get actual auto reload value.

Reference Manual to LL API cross reference:
ARR ARR LL_LPTIM_GetAutoReload
Parameters:
LPTIMxLow-Power Timer instance
Return values:
AutoReloadValue between Min_Data=0x00 and Max_Data=0xFFFF

Definition at line 504 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetCompare ( LPTIM_TypeDef *  LPTIMx)

Get actual compare value.

Reference Manual to LL API cross reference:
CMP CMP LL_LPTIM_GetCompare
Parameters:
LPTIMxLow-Power Timer instance
Return values:
CompareValueValue between Min_Data=0x00 and Max_Data=0xFFFF

Definition at line 531 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetCounter ( LPTIM_TypeDef *  LPTIMx)

Get actual counter value.

Note:
When the LPTIM instance is running with an asynchronous clock, reading the LPTIMx_CNT register may return unreliable values. So in this case it is necessary to perform two consecutive read accesses and verify that the two returned values are identical.
Reference Manual to LL API cross reference:
CNT CNT LL_LPTIM_GetCounter
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Countervalue

Definition at line 546 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetCounterMode ( LPTIM_TypeDef *  LPTIMx)

Get the counter mode.

Reference Manual to LL API cross reference:
CFGR COUNTMODE LL_LPTIM_GetCounterMode
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 574 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetPolarity ( LPTIM_TypeDef *  LPTIMx)

Get actual output polarity.

Reference Manual to LL API cross reference:
CFGR WAVPOL LL_LPTIM_GetPolarity
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 650 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetPrescaler ( LPTIM_TypeDef *  LPTIMx)

Get actual prescaler division ratio.

Reference Manual to LL API cross reference:
CFGR PRESC LL_LPTIM_GetPrescaler
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 694 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetUpdateMode ( LPTIM_TypeDef *  LPTIMx)

Get the LPTIM registers update mode.

Reference Manual to LL API cross reference:
CFGR PRELOAD LL_LPTIM_GetUpdateMode
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 475 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_GetWaveform ( LPTIM_TypeDef *  LPTIMx)

Get actual waveform shape.

Reference Manual to LL API cross reference:
CFGR WAVE LL_LPTIM_GetWaveform
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 623 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE uint32_t LL_LPTIM_IsEnabled ( LPTIM_TypeDef *  LPTIMx)

Indicates whether the LPTIM instance is enabled.

Reference Manual to LL API cross reference:
CR ENABLE LL_LPTIM_IsEnabled
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Stateof bit (1 or 0).

Definition at line 379 of file stm32h7xx_ll_lptim.h.

Referenced by LL_LPTIM_Init().

__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledResetAfterRead ( LPTIM_TypeDef *  LPTIMx)

Indicate whether the reset after read feature is enabled.

Reference Manual to LL API cross reference:
CR RSTARE LL_LPTIM_IsEnabledResetAfterRead
Parameters:
LPTIMxLow-Power Timer instance
Return values:
Stateof bit (1 or 0).

Definition at line 432 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_ResetCounter ( LPTIM_TypeDef *  LPTIMx)

Reset of the LPTIM_CNT counter register (synchronous).

Note:
Due to the synchronous nature of this reset, it only takes place after a synchronization delay of 3 LPTIM core clock cycles (LPTIM core clock may be different from APB clock).
COUNTRST is automatically cleared by hardware
Reference Manual to LL API cross reference:
CR COUNTRST LL_LPTIM_ResetCounter
Parameters:
LPTIMxLow-Power Timer instance
Return values:
None

Definition at line 447 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetAutoReload ( LPTIM_TypeDef *  LPTIMx,
uint32_t  AutoReload 
)

Set the auto reload value.

Note:
The LPTIMx_ARR register content must only be modified when the LPTIM is enabled
After a write to the LPTIMx_ARR register a new write operation to the same register can only be performed when the previous write operation is completed. Any successive write before the ARROK flag is set, will lead to unpredictable results.
autoreload value be strictly greater than the compare value.
Reference Manual to LL API cross reference:
ARR ARR LL_LPTIM_SetAutoReload
Parameters:
LPTIMxLow-Power Timer instance
AutoReloadValue between Min_Data=0x00 and Max_Data=0xFFFF
Return values:
None

Definition at line 493 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetCompare ( LPTIM_TypeDef *  LPTIMx,
uint32_t  CompareValue 
)

Set the compare value.

Note:
After a write to the LPTIMx_CMP register a new write operation to the same register can only be performed when the previous write operation is completed. Any successive write before the CMPOK flag is set, will lead to unpredictable results.
Reference Manual to LL API cross reference:
CMP CMP LL_LPTIM_SetCompare
Parameters:
LPTIMxLow-Power Timer instance
CompareValueValue between Min_Data=0x00 and Max_Data=0xFFFF
Return values:
None

Definition at line 520 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetCounterMode ( LPTIM_TypeDef *  LPTIMx,
uint32_t  CounterMode 
)

Set the counter mode (selection of the LPTIM counter clock source).

Note:
The counter mode can be set only when the LPTIM instance is disabled.
Reference Manual to LL API cross reference:
CFGR COUNTMODE LL_LPTIM_SetCounterMode
Parameters:
LPTIMxLow-Power Timer instance
CounterModeThis parameter can be one of the following values:
Return values:
None

Definition at line 561 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetInput1Src ( LPTIM_TypeDef *  LPTIMx,
uint32_t  Src 
)

Set LPTIM input 1 source (default GPIO).

Reference Manual to LL API cross reference:
CFGR2 IN1SEL LL_LPTIM_SetInput1Src
Parameters:
LPTIMxLow-Power Timer instance
SrcThis parameter can be one of the following values:
Return values:
None

Definition at line 712 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetInput2Src ( LPTIM_TypeDef *  LPTIMx,
uint32_t  Src 
)

Set LPTIM input 2 source (default GPIO).

Reference Manual to LL API cross reference:
CFGR2 IN2SEL LL_LPTIM_SetInput2Src
Parameters:
LPTIMxLow-Power Timer instance
SrcThis parameter can be one of the following values:
Return values:
None

Definition at line 726 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetPolarity ( LPTIM_TypeDef *  LPTIMx,
uint32_t  Polarity 
)

Set output polarity.

Reference Manual to LL API cross reference:
CFGR WAVPOL LL_LPTIM_SetPolarity
Parameters:
LPTIMxLow-Power Timer instance
PolarityThis parameter can be one of the following values:
Return values:
None

Definition at line 637 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetPrescaler ( LPTIM_TypeDef *  LPTIMx,
uint32_t  Prescaler 
)

Set actual prescaler division ratio.

Note:
This function must be called when the LPTIM instance is disabled.
When the LPTIM is configured to be clocked by an internal clock source and the LPTIM counter is configured to be updated by active edges detected on the LPTIM external Input1, the internal clock provided to the LPTIM must be not be prescaled.
Reference Manual to LL API cross reference:
CFGR PRESC LL_LPTIM_SetPrescaler
Parameters:
LPTIMxLow-Power Timer instance
PrescalerThis parameter can be one of the following values:
Return values:
None

Definition at line 675 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetUpdateMode ( LPTIM_TypeDef *  LPTIMx,
uint32_t  UpdateMode 
)

Set the LPTIM registers update mode (enable/disable register preload)

Note:
This function must be called when the LPTIM instance is disabled.
Reference Manual to LL API cross reference:
CFGR PRELOAD LL_LPTIM_SetUpdateMode
Parameters:
LPTIMxLow-Power Timer instance
UpdateModeThis parameter can be one of the following values:
Return values:
None

Definition at line 462 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_SetWaveform ( LPTIM_TypeDef *  LPTIMx,
uint32_t  Waveform 
)

Set waveform shape.

Reference Manual to LL API cross reference:
CFGR WAVE LL_LPTIM_SetWaveform
Parameters:
LPTIMxLow-Power Timer instance
WaveformThis parameter can be one of the following values:
Return values:
None

Definition at line 610 of file stm32h7xx_ll_lptim.h.

__STATIC_INLINE void LL_LPTIM_StartCounter ( LPTIM_TypeDef *  LPTIMx,
uint32_t  OperatingMode 
)

Starts the LPTIM counter in the desired mode.

Note:
LPTIM instance must be enabled before starting the counter.
It is possible to change on the fly from One Shot mode to Continuous mode.
Reference Manual to LL API cross reference:
CR CNTSTRT LL_LPTIM_StartCounter
CR SNGSTRT LL_LPTIM_StartCounter
Parameters:
LPTIMxLow-Power Timer instance
OperatingModeThis parameter can be one of the following values:
Return values:
None

Definition at line 397 of file stm32h7xx_ll_lptim.h.