STM32L486xx HAL User Manual
Data Structures | Defines | Functions
stm32l4xx_ll_lptim.h File Reference

Header file of LPTIM LL module. More...

#include "stm32l4xx.h"

Go to the source code of this file.

Data Structures

struct  LL_LPTIM_InitTypeDef
 LPTIM Init structure definition. More...

Defines

#define LL_LPTIM_ISR_CMPM   LPTIM_ISR_CMPM
#define LL_LPTIM_ISR_ARRM   LPTIM_ISR_ARRM
#define LL_LPTIM_ISR_EXTTRIG   LPTIM_ISR_EXTTRIG
#define LL_LPTIM_ISR_CMPOK   LPTIM_ISR_CMPOK
#define LL_LPTIM_ISR_ARROK   LPTIM_ISR_ARROK
#define LL_LPTIM_ISR_UP   LPTIM_ISR_UP
#define LL_LPTIM_ISR_DOWN   LPTIM_ISR_DOWN
#define LL_LPTIM_IER_CMPMIE   LPTIM_IER_CMPMIE
#define LL_LPTIM_IER_ARRMIE   LPTIM_IER_ARRMIE
#define LL_LPTIM_IER_EXTTRIGIE   LPTIM_IER_EXTTRIGIE
#define LL_LPTIM_IER_CMPOKIE   LPTIM_IER_CMPOKIE
#define LL_LPTIM_IER_ARROKIE   LPTIM_IER_ARROKIE
#define LL_LPTIM_IER_UPIE   LPTIM_IER_UPIE
#define LL_LPTIM_IER_DOWNIE   LPTIM_IER_DOWNIE
#define LL_LPTIM_OPERATING_MODE_CONTINUOUS   LPTIM_CR_CNTSTRT
#define LL_LPTIM_OPERATING_MODE_ONESHOT   LPTIM_CR_SNGSTRT
#define LL_LPTIM_UPDATE_MODE_IMMEDIATE   0x00000000U
#define LL_LPTIM_UPDATE_MODE_ENDOFPERIOD   LPTIM_CFGR_PRELOAD
#define LL_LPTIM_COUNTER_MODE_INTERNAL   0x00000000U
#define LL_LPTIM_COUNTER_MODE_EXTERNAL   LPTIM_CFGR_COUNTMODE
#define LL_LPTIM_OUTPUT_WAVEFORM_PWM   0x00000000U
#define LL_LPTIM_OUTPUT_WAVEFORM_SETONCE   LPTIM_CFGR_WAVE
#define LL_LPTIM_OUTPUT_POLARITY_REGULAR   0x00000000U
#define LL_LPTIM_OUTPUT_POLARITY_INVERSE   LPTIM_CFGR_WAVPOL
#define LL_LPTIM_PRESCALER_DIV1   0x00000000U
#define LL_LPTIM_PRESCALER_DIV2   LPTIM_CFGR_PRESC_0
#define LL_LPTIM_PRESCALER_DIV4   LPTIM_CFGR_PRESC_1
#define LL_LPTIM_PRESCALER_DIV8   (LPTIM_CFGR_PRESC_1 | LPTIM_CFGR_PRESC_0)
#define LL_LPTIM_PRESCALER_DIV16   LPTIM_CFGR_PRESC_2
#define LL_LPTIM_PRESCALER_DIV32   (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_0)
#define LL_LPTIM_PRESCALER_DIV64   (LPTIM_CFGR_PRESC_2 | LPTIM_CFGR_PRESC_1)
#define LL_LPTIM_PRESCALER_DIV128   LPTIM_CFGR_PRESC
#define LL_LPTIM_TRIG_SOURCE_GPIO   0x00000000U
#define LL_LPTIM_TRIG_SOURCE_RTCALARMA   LPTIM_CFGR_TRIGSEL_0
#define LL_LPTIM_TRIG_SOURCE_RTCALARMB   LPTIM_CFGR_TRIGSEL_1
#define LL_LPTIM_TRIG_SOURCE_RTCTAMP1   (LPTIM_CFGR_TRIGSEL_1 | LPTIM_CFGR_TRIGSEL_0)
#define LL_LPTIM_TRIG_SOURCE_RTCTAMP2   LPTIM_CFGR_TRIGSEL_2
#define LL_LPTIM_TRIG_SOURCE_RTCTAMP3   (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_0)
#define LL_LPTIM_TRIG_SOURCE_COMP1   (LPTIM_CFGR_TRIGSEL_2 | LPTIM_CFGR_TRIGSEL_1)
#define LL_LPTIM_TRIG_SOURCE_COMP2   LPTIM_CFGR_TRIGSEL
#define LL_LPTIM_TRIG_FILTER_NONE   0x00000000U
#define LL_LPTIM_TRIG_FILTER_2   LPTIM_CFGR_TRGFLT_0
#define LL_LPTIM_TRIG_FILTER_4   LPTIM_CFGR_TRGFLT_1
#define LL_LPTIM_TRIG_FILTER_8   LPTIM_CFGR_TRGFLT
#define LL_LPTIM_TRIG_POLARITY_RISING   LPTIM_CFGR_TRIGEN_0
#define LL_LPTIM_TRIG_POLARITY_FALLING   LPTIM_CFGR_TRIGEN_1
#define LL_LPTIM_TRIG_POLARITY_RISING_FALLING   LPTIM_CFGR_TRIGEN
#define LL_LPTIM_CLK_SOURCE_INTERNAL   0x00000000U
#define LL_LPTIM_CLK_SOURCE_EXTERNAL   LPTIM_CFGR_CKSEL
#define LL_LPTIM_CLK_FILTER_NONE   0x00000000U
#define LL_LPTIM_CLK_FILTER_2   LPTIM_CFGR_CKFLT_0
#define LL_LPTIM_CLK_FILTER_4   LPTIM_CFGR_CKFLT_1
#define LL_LPTIM_CLK_FILTER_8   LPTIM_CFGR_CKFLT
#define LL_LPTIM_CLK_POLARITY_RISING   0x00000000U
#define LL_LPTIM_CLK_POLARITY_FALLING   LPTIM_CFGR_CKPOL_0
#define LL_LPTIM_CLK_POLARITY_RISING_FALLING   LPTIM_CFGR_CKPOL_1
#define LL_LPTIM_ENCODER_MODE_RISING   0x00000000U
#define LL_LPTIM_ENCODER_MODE_FALLING   LPTIM_CFGR_CKPOL_0
#define LL_LPTIM_ENCODER_MODE_RISING_FALLING   LPTIM_CFGR_CKPOL_1
#define LL_LPTIM_INPUT1_SRC_GPIO   0x00000000U
#define LL_LPTIM_INPUT1_SRC_COMP1   LPTIM_OR_OR_0
#define LL_LPTIM_INPUT1_SRC_COMP2   LPTIM_OR_OR_1
#define LL_LPTIM_INPUT1_SRC_COMP1_COMP2   LPTIM_OR_OR
#define LL_LPTIM_INPUT2_SRC_GPIO   0x00000000U
#define LL_LPTIM_INPUT2_SRC_COMP2   LPTIM_OR_OR_1
#define LL_LPTIM_WriteReg(__INSTANCE__, __REG__, __VALUE__)   WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
 Write a value in LPTIM register.
#define LL_LPTIM_ReadReg(__INSTANCE__, __REG__)   READ_REG(__INSTANCE__->__REG__)
 Read a value in LPTIM register.

Functions

__STATIC_INLINE void LL_LPTIM_Enable (LPTIM_TypeDef *LPTIMx)
 Enable the LPTIM instance.
__STATIC_INLINE void LL_LPTIM_Disable (LPTIM_TypeDef *LPTIMx)
 Disable 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_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).
__STATIC_INLINE void LL_LPTIM_EnableTimeout (LPTIM_TypeDef *LPTIMx)
 Enable the timeout function.
__STATIC_INLINE void LL_LPTIM_DisableTimeout (LPTIM_TypeDef *LPTIMx)
 Disable the timeout function.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledTimeout (LPTIM_TypeDef *LPTIMx)
 Indicate whether the timeout function is enabled.
__STATIC_INLINE void LL_LPTIM_TrigSw (LPTIM_TypeDef *LPTIMx)
 Start the LPTIM counter.
__STATIC_INLINE void LL_LPTIM_ConfigTrigger (LPTIM_TypeDef *LPTIMx, uint32_t Source, uint32_t Filter, uint32_t Polarity)
 Configure the external trigger used as a trigger event for the LPTIM.
__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerSource (LPTIM_TypeDef *LPTIMx)
 Get actual external trigger source.
__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerFilter (LPTIM_TypeDef *LPTIMx)
 Get actual external trigger filter.
__STATIC_INLINE uint32_t LL_LPTIM_GetTriggerPolarity (LPTIM_TypeDef *LPTIMx)
 Get actual external trigger polarity.
__STATIC_INLINE void LL_LPTIM_SetClockSource (LPTIM_TypeDef *LPTIMx, uint32_t ClockSource)
 Set the source of the clock used by the LPTIM instance.
__STATIC_INLINE uint32_t LL_LPTIM_GetClockSource (LPTIM_TypeDef *LPTIMx)
 Get actual LPTIM instance clock source.
__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.
__STATIC_INLINE uint32_t LL_LPTIM_GetClockPolarity (LPTIM_TypeDef *LPTIMx)
 Get actual clock polarity.
__STATIC_INLINE uint32_t LL_LPTIM_GetClockFilter (LPTIM_TypeDef *LPTIMx)
 Get actual clock digital filter.
__STATIC_INLINE void LL_LPTIM_SetEncoderMode (LPTIM_TypeDef *LPTIMx, uint32_t EncoderMode)
 Configure the encoder mode.
__STATIC_INLINE uint32_t LL_LPTIM_GetEncoderMode (LPTIM_TypeDef *LPTIMx)
 Get actual encoder mode.
__STATIC_INLINE void LL_LPTIM_EnableEncoderMode (LPTIM_TypeDef *LPTIMx)
 Enable the encoder mode.
__STATIC_INLINE void LL_LPTIM_DisableEncoderMode (LPTIM_TypeDef *LPTIMx)
 Disable the encoder mode.
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledEncoderMode (LPTIM_TypeDef *LPTIMx)
 Indicates whether the LPTIM operates in encoder mode.
__STATIC_INLINE void LL_LPTIM_ClearFLAG_CMPM (LPTIM_TypeDef *LPTIMx)
 Clear the compare match flag (CMPMCF)
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPM (LPTIM_TypeDef *LPTIMx)
 Inform application whether a compare match interrupt has occurred.
__STATIC_INLINE void LL_LPTIM_ClearFLAG_ARRM (LPTIM_TypeDef *LPTIMx)
 Clear the autoreload match flag (ARRMCF)
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARRM (LPTIM_TypeDef *LPTIMx)
 Inform application whether a autoreload match interrupt has occurred.
__STATIC_INLINE void LL_LPTIM_ClearFlag_EXTTRIG (LPTIM_TypeDef *LPTIMx)
 Clear the external trigger valid edge flag(EXTTRIGCF).
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_EXTTRIG (LPTIM_TypeDef *LPTIMx)
 Inform application whether a valid edge on the selected external trigger input has occurred.
__STATIC_INLINE void LL_LPTIM_ClearFlag_CMPOK (LPTIM_TypeDef *LPTIMx)
 Clear the compare register update interrupt flag (CMPOKCF).
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_CMPOK (LPTIM_TypeDef *LPTIMx)
 Informs application whether the APB bus write operation to the LPTIMx_CMP register has been successfully completed; If so, a new one can be initiated.
__STATIC_INLINE void LL_LPTIM_ClearFlag_ARROK (LPTIM_TypeDef *LPTIMx)
 Clear the autoreload register update interrupt flag (ARROKCF).
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_ARROK (LPTIM_TypeDef *LPTIMx)
 Informs application whether the APB bus write operation to the LPTIMx_ARR register has been successfully completed; If so, a new one can be initiated.
__STATIC_INLINE void LL_LPTIM_ClearFlag_UP (LPTIM_TypeDef *LPTIMx)
 Clear the counter direction change to up interrupt flag (UPCF).
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_UP (LPTIM_TypeDef *LPTIMx)
 Informs the application whether the counter direction has changed from down to up (when the LPTIM instance operates in encoder mode).
__STATIC_INLINE void LL_LPTIM_ClearFlag_DOWN (LPTIM_TypeDef *LPTIMx)
 Clear the counter direction change to down interrupt flag (DOWNCF).
__STATIC_INLINE uint32_t LL_LPTIM_IsActiveFlag_DOWN (LPTIM_TypeDef *LPTIMx)
 Informs the application whether the counter direction has changed from up to down (when the LPTIM instance operates in encoder mode).
__STATIC_INLINE void LL_LPTIM_EnableIT_CMPM (LPTIM_TypeDef *LPTIMx)
 Enable compare match interrupt (CMPMIE).
__STATIC_INLINE void LL_LPTIM_DisableIT_CMPM (LPTIM_TypeDef *LPTIMx)
 Disable compare match interrupt (CMPMIE).
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPM (LPTIM_TypeDef *LPTIMx)
 Indicates whether the compare match interrupt (CMPMIE) is enabled.
__STATIC_INLINE void LL_LPTIM_EnableIT_ARRM (LPTIM_TypeDef *LPTIMx)
 Enable autoreload match interrupt (ARRMIE).
__STATIC_INLINE void LL_LPTIM_DisableIT_ARRM (LPTIM_TypeDef *LPTIMx)
 Disable autoreload match interrupt (ARRMIE).
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARRM (LPTIM_TypeDef *LPTIMx)
 Indicates whether the autoreload match interrupt (ARRMIE) is enabled.
__STATIC_INLINE void LL_LPTIM_EnableIT_EXTTRIG (LPTIM_TypeDef *LPTIMx)
 Enable external trigger valid edge interrupt (EXTTRIGIE).
__STATIC_INLINE void LL_LPTIM_DisableIT_EXTTRIG (LPTIM_TypeDef *LPTIMx)
 Disable external trigger valid edge interrupt (EXTTRIGIE).
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_EXTTRIG (LPTIM_TypeDef *LPTIMx)
 Indicates external trigger valid edge interrupt (EXTTRIGIE) is enabled.
__STATIC_INLINE void LL_LPTIM_EnableIT_CMPOK (LPTIM_TypeDef *LPTIMx)
 Enable compare register write completed interrupt (CMPOKIE).
__STATIC_INLINE void LL_LPTIM_DisableIT_CMPOK (LPTIM_TypeDef *LPTIMx)
 Disable compare register write completed interrupt (CMPOKIE).
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_CMPOK (LPTIM_TypeDef *LPTIMx)
 Indicates whether the compare register write completed interrupt (CMPOKIE) is enabled.
__STATIC_INLINE void LL_LPTIM_EnableIT_ARROK (LPTIM_TypeDef *LPTIMx)
 Enable autoreload register write completed interrupt (ARROKIE).
__STATIC_INLINE void LL_LPTIM_DisableIT_ARROK (LPTIM_TypeDef *LPTIMx)
 Disable autoreload register write completed interrupt (ARROKIE).
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_ARROK (LPTIM_TypeDef *LPTIMx)
 Indicates whether the autoreload register write completed interrupt (ARROKIE) is enabled.
__STATIC_INLINE void LL_LPTIM_EnableIT_UP (LPTIM_TypeDef *LPTIMx)
 Enable direction change to up interrupt (UPIE).
__STATIC_INLINE void LL_LPTIM_DisableIT_UP (LPTIM_TypeDef *LPTIMx)
 Disable direction change to up interrupt (UPIE).
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_UP (LPTIM_TypeDef *LPTIMx)
 Indicates whether the direction change to up interrupt (UPIE) is enabled.
__STATIC_INLINE void LL_LPTIM_EnableIT_DOWN (LPTIM_TypeDef *LPTIMx)
 Enable direction change to down interrupt (DOWNIE).
__STATIC_INLINE void LL_LPTIM_DisableIT_DOWN (LPTIM_TypeDef *LPTIMx)
 Disable direction change to down interrupt (DOWNIE).
__STATIC_INLINE uint32_t LL_LPTIM_IsEnabledIT_DOWN (LPTIM_TypeDef *LPTIMx)
 Indicates whether the direction change to down interrupt (DOWNIE) is enabled.
ErrorStatus LL_LPTIM_DeInit (LPTIM_TypeDef *LPTIMx)
 Set LPTIMx registers to their reset values.
void LL_LPTIM_StructInit (LL_LPTIM_InitTypeDef *LPTIM_InitStruct)
 Set each fields of the LPTIM_InitStruct structure to its default value.
ErrorStatus LL_LPTIM_Init (LPTIM_TypeDef *LPTIMx, LL_LPTIM_InitTypeDef *LPTIM_InitStruct)
 Configure the LPTIMx peripheral according to the specified parameters.

Detailed Description

Header file of LPTIM LL module.

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32l4xx_ll_lptim.h.