bf0_hal_lptim.h
Header file of LPTIM HAL module.
- Author
- Sifli software development team 
- Attention
Defines
- 
LPTIM_EXTI_LINE_WAKEUPTIMER_EVENT
- External interrupt line 23 Connected to the LPTIM EXTI Line 
- 
LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC
- 
LPTIM_CLOCKSOURCE_ULPTIM
- 
LPTIM_EXCLOCKSOURCE_IO
- 
LPTIM_EXCLOCKSOURCE_COMP
- 
LPTIM_INTCLOCKSOURCE_LPCLOCK
- 
LPTIM_INTLOCKSOURCE_APBCLOCK
- 
LPTIM_PRESCALER_DIV1
- 
LPTIM_PRESCALER_DIV2
- 
LPTIM_PRESCALER_DIV4
- 
LPTIM_PRESCALER_DIV8
- 
LPTIM_PRESCALER_DIV16
- 
LPTIM_PRESCALER_DIV32
- 
LPTIM_PRESCALER_DIV64
- 
LPTIM_PRESCALER_DIV128
- 
LPTIM_OUTPUTPOLARITY_HIGH
- 
LPTIM_OUTPUTPOLARITY_LOW
- 
LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION
- 
LPTIM_CLOCKSAMPLETIME_2TRANSITIONS
- 
LPTIM_CLOCKSAMPLETIME_4TRANSITIONS
- 
LPTIM_CLOCKSAMPLETIME_8TRANSITIONS
- 
LPTIM_CLOCKPOLARITY_RISING
- 
LPTIM_CLOCKPOLARITY_FALLING
- 
LPTIM_CLOCKPOLARITY_RISING_FALLING
- 
LPTIM_TRIGSOURCE_SOFTWARE
- 
LPTIM_TRIGSOURCE_0
- 
LPTIM_TRIGSOURCE_1
- 
LPTIM_TRIGSOURCE_2
- 
LPTIM_TRIGSOURCE_3
- 
LPTIM_TRIGSOURCE_4
- 
LPTIM_TRIGSOURCE_5
- 
LPTIM_ACTIVEEDGE_RISING
- 
LPTIM_ACTIVEEDGE_FALLING
- 
LPTIM_ACTIVEEDGE_RISING_FALLING
- 
LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION
- 
LPTIM_TRIGSAMPLETIME_2TRANSITIONS
- 
LPTIM_TRIGSAMPLETIME_4TRANSITIONS
- 
LPTIM_TRIGSAMPLETIME_8TRANSITIONS
- 
LPTIM_UPDATE_IMMEDIATE
- 
LPTIM_UPDATE_ENDOFPERIOD
- 
LPTIM_COUNTERSOURCE_INTERNAL
- 
LPTIM_COUNTERSOURCE_EXTERNAL
- 
LPTIM_FLAG_UE
- 
LPTIM_FLAG_OF
- 
LPTIM_FLAG_OC
- 
LPTIM_FLAG_ET
- 
LPTIM_FLAG_UEWKUP
- 
LPTIM_FLAG_OFWKUP
- 
LPTIM_FLAG_OCWKUP
- 
LPTIM_IT_UEIE
- 
LPTIM_IT_OFIE
- 
LPTIM_IT_OCIE
- 
LPTIM_IT_ETIE
- 
LPTIM_IT_UEWE
- 
LPTIM_IT_OFWE
- 
LPTIM_IT_OCWE
- 
LPTIM_OP_PAD_AF
- 
LPTIM_OP_PAD_PA4
- 
LPTIM_OP_PAD_PB9
- 
LPTIM_OP_TIM_DAC
- 
__HAL_LPTIM_RESET_HANDLE_STATE(__HANDLE__)
- Reset LPTIM handle state. - 参数:
- __HANDLE__ – LPTIM handle 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_ENABLE(__HANDLE__)
- Enable/Disable the LPTIM peripheral. - 参数:
- __HANDLE__ – LPTIM handle 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_DISABLE(__HANDLE__)
- 
__HAL_LPTIM_START_CONTINUOUS(__HANDLE__)
- Starts the LPTIM peripheral in Continuous or in single mode. - 参数:
- __HANDLE__ – DMA handle 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_START_SINGLE(__HANDLE__)
- 
__HAL_LPTIM_COUNTRST_RESET(__HANDLE__)
- Reset the LPTIM counter. - 参数:
- __HANDLE__ – DMA handle 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_COUNTRST_GET(__HANDLE__)
- Get the LPTIM counter reset status. - 参数:
- __HANDLE__ – DMA handle 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_AUTORELOAD_SET(__HANDLE__, __VALUE__)
- Writes the passed parameter in the Autoreload register. - 参数:
- __HANDLE__ – LPTIM handle 
- __VALUE__ – Autoreload value 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_COMPARE_SET(__HANDLE__, __VALUE__)
- Writes the passed parameter in the Compare register. - 参数:
- __HANDLE__ – LPTIM handle 
- __VALUE__ – Compare value 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_GET_FLAG(__HANDLE__, __FLAG__)
- Checks whether the specified LPTIM flag is set or not. - 参数:
- __HANDLE__ – LPTIM handle 
- __FLAG__ – LPTIM flag to check This parameter can be a value of: - LPTIM_FLAG_DOWN : Counter direction change up Flag. 
- LPTIM_FLAG_UP : Counter direction change down to up Flag. 
- LPTIM_FLAG_ARROK : Autoreload register update OK Flag. 
- LPTIM_FLAG_CMPOK : Compare register update OK Flag. 
- LPTIM_FLAG_ET : External trigger edge event Flag. 
- LPTIM_FLAG_ARRM : Autoreload match Flag. 
- LPTIM_FLAG_CMPM : Compare match Flag. 
 
 
- 返回值:
- The – state of the specified flag (SET or RESET). 
 
- 
__HAL_LPTIM_CLEAR_FLAG(__HANDLE__, __FLAG__)
- Clears the specified LPTIM flag. - 参数:
- __HANDLE__ – LPTIM handle. 
- __FLAG__ – LPTIM flag to clear. This parameter can be a value of: - LPTIM_IT_UEIE : Update event interrupt. 
- LPTIM_IT_OFIE : Overflow Interrupt. 
- LPTIM_IT_OCIE : Output compare Interrupt. 
- LPTIM_IT_ETIE : External trigger valid edge Interrupt. 
- LPTIM_IT_UEWE : all Wakeup Interrupt. 
 
 
- 返回值:
- None. – 
 
- 
__HAL_LPTIM_ENABLE_IT(__HANDLE__, __INTERRUPT__)
- Enable the specified LPTIM interrupt. - 参数:
- __HANDLE__ – LPTIM handle. 
- __INTERRUPT__ – LPTIM interrupt to set. This parameter can be a value of: - LPTIM_IT_UEIE : Update event interrupt. 
- LPTIM_IT_OFIE : Overflow Interrupt. 
- LPTIM_IT_OCIE : Output compare Interrupt. 
- LPTIM_IT_ETIE : External trigger valid edge Interrupt. 
- LPTIM_IT_UEWE : Update event Wakeup Interrupt. 
- LPTIM_IT_OFWE : Overflow Wakeup Interrupt. 
- LPTIM_IT_OCWE : Output compare Wakeup Interrupt. 
 
 
- 返回值:
- None. – 
 
- 
__HAL_LPTIM_DISABLE_IT(__HANDLE__, __INTERRUPT__)
- Disable the specified LPTIM interrupt. - 参数:
- __HANDLE__ – LPTIM handle. 
- __INTERRUPT__ – LPTIM interrupt to set. This parameter can be a value of: - LPTIM_IT_UEIE : Update event interrupt. 
- LPTIM_IT_OFIE : Overflow Interrupt. 
- LPTIM_IT_OCIE : Output compare Interrupt. 
- LPTIM_IT_ETIE : External trigger valid edge Interrupt. 
- LPTIM_IT_UEWE : Update event Wakeup Interrupt. 
- LPTIM_IT_OFWE : Overflow Wakeup Interrupt. 
- LPTIM_IT_OCWE : Output compare Wakeup Interrupt. 
 
 
- 返回值:
- None. – 
 
- 
__HAL_LPTIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
- Checks whether the specified LPTIM interrupt is set or not. - 参数:
- __HANDLE__ – LPTIM handle. 
- __INTERRUPT__ – LPTIM interrupt to check. This parameter can be a value of: - LPTIM_IT_UEIE : Update event interrupt. 
- LPTIM_IT_OFIE : Overflow Interrupt. 
- LPTIM_IT_OCIE : Output compare Interrupt. 
- LPTIM_IT_ETIE : External trigger valid edge Interrupt. 
- LPTIM_IT_UEWE : Update event Wakeup Interrupt. 
- LPTIM_IT_OFWE : Overflow Wakeup Interrupt. 
- LPTIM_IT_OCWE : Output compare Wakeup Interrupt. 
 
 
- 返回值:
- Interrupt – status. 
 
- 
__HAL_LPTIM_SET_PRESCALER(__HANDLE__, __DIV__)
- Set the specified LPTIM prescaler. - 参数:
- __HANDLE__ – LPTIM handle. 
- __DIV__ – LPTIM prescaler to set. This parameter can be a value of: - LPTIM_PRESCALER_DIV1 : Configure the prescaler division factor as 1. 
- LPTIM_PRESCALER_DIV2 : Configure the prescaler division factor as 2. 
- LPTIM_PRESCALER_DIV4 : Configure the prescaler division factor as 4. 
- LPTIM_PRESCALER_DIV8 : Configure the prescaler division factor as 8. 
- LPTIM_PRESCALER_DIV16 : Configure the prescaler division factor as 16. 
- LPTIM_PRESCALER_DIV32 : Configure the prescaler division factor as 32. 
- LPTIM_PRESCALER_DIV64 : Configure the prescaler division factor as 64. 
- LPTIM_PRESCALER_DIV128 : Configure the prescaler division factor as 128. 
 
 
- 返回值:
- None. – 
 
- 
__HAL_LPTIM_CLEAR_PRESCALER(__HANDLE__, __MASK__)
- Clear the LPTIM prescaler register. - 参数:
- __HANDLE__ – LPTIM handle. 
- __MASK__ – LPTIM prescaler mask to clean. This parameter can be a value of: - LPTIM_PRESCALER_DIV128 : Clear the prescaler register. 
 
 
- 返回值:
- None. – 
 
- 
__HAL_LPTIM_OPTR_CONFIG(__HANDLE__, __VALUE__)
- LPTIM Option Register. - 参数:
- __HANDLE__ – LPTIM handle 
- __VALUE__ – This parameter can be a value of : - LPTIM_OP_PAD_AF 
- LPTIM_OP_PAD_PA4 
- LPTIM_OP_PAD_PB9 
- LPTIM_OP_TIM_DAC 
 
 
- 返回值:
- None – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_IT()
- Enable interrupt on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_DISABLE_IT()
- Disable interrupt on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_EVENT()
- Enable event on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_DISABLE_EVENT()
- Disable event on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE()
- Enable falling edge trigger on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE()
- Disable falling edge trigger on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE()
- Enable rising edge trigger on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE()
- Disable rising edge trigger on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_RISING_FALLING_EDGE()
- Enable rising & falling edge trigger on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_DISABLE_RISING_FALLING_EDGE()
- Disable rising & falling edge trigger on the LPTIM Wake-up Timer associated Exti line. This parameter can be: - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_GET_FLAG()
- Check whether the LPTIM Wake-up Timer associated Exti line interrupt flag is set or not. - 返回值:
- Line – Status. 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_CLEAR_FLAG()
- Clear the LPTIM Wake-up Timer associated Exti line flag. - 返回值:
- None. – 
 
- 
__HAL_LPTIM_WAKEUPTIMER_EXTI_GENERATE_SWIT()
- Generate a Software interrupt on the LPTIM Wake-up Timer associated Exti line. - 返回值:
- None. – 
 
- 
IS_LPTIM_CLOCK_SOURCE(__SOURCE__)
- 
IS_LPTIM_CLOCK_PRESCALER(__PRESCALER__)
- 
IS_LPTIM_CLOCK_PRESCALERDIV1(__PRESCALER__)
- 
IS_LPTIM_OUTPUT_POLARITY(__POLARITY__)
- 
IS_LPTIM_CLOCK_SAMPLE_TIME(__SAMPLETIME__)
- 
IS_LPTIM_CLOCK_POLARITY(__POLARITY__)
- 
IS_LPTIM_TRG_SOURCE(__TRIG__)
- 
IS_LPTIM_EXT_TRG_POLARITY(__POLAR__)
- 
IS_LPTIM_TRIG_SAMPLE_TIME(__SAMPLETIME__)
- 
IS_LPTIM_COUNTER_SOURCE(__SOURCE__)
- 
IS_LPTIM_AUTORELOAD(__AUTORELOAD__)
- 
IS_LPTIM_COMPARE(__COMPARE__)
- 
IS_LPTIM_PERIOD(PERIOD)
- 
IS_LPTIM_PULSE(PULSE)
- 
IS_LPTIM_INSTANCE(__INSTANCE__)
Typedefs
- 
typedef enum __HAL_LPTIM_StateTypeDef HAL_LPTIM_StateTypeDef
- HAL LPTIM State structure definition. 
Enums
- 
enum HAL_LPTIM_ModeTypeDef
- LPTIM Mode Structure definition. - Values: - 
enumerator HAL_LPTIM_ONESHOT
 - 
enumerator HAL_LPTIM_PERIOD
 
- 
enumerator HAL_LPTIM_ONESHOT
- 
enum __HAL_LPTIM_StateTypeDef
- HAL LPTIM State structure definition. - Values: - 
enumerator HAL_LPTIM_STATE_RESET
- Peripheral not yet initialized or disabled 
 - 
enumerator HAL_LPTIM_STATE_READY
- Peripheral Initialized and ready for use 
 - 
enumerator HAL_LPTIM_STATE_BUSY
- An internal process is ongoing 
 - 
enumerator HAL_LPTIM_STATE_TIMEOUT
- Timeout state 
 - 
enumerator HAL_LPTIM_STATE_ERROR
- Internal Process is ongoing 
 
- 
enumerator HAL_LPTIM_STATE_RESET
Functions
- 
void HAL_LPTIM_InitDefault(LPTIM_HandleTypeDef *hlptim)
- Set default setting for the LPTIM. - 参数:
- hlptim – LPTIM handle 
 
 
- 
HAL_StatusTypeDef HAL_LPTIM_Init(LPTIM_HandleTypeDef *hlptim)
- Initializes the LPTIM according to the specified parameters in the LPTIM_InitTypeDef and creates the associated handle. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_DeInit(LPTIM_HandleTypeDef *hlptim)
- DeInitializes the LPTIM peripheral. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
void HAL_LPTIM_MspInit(LPTIM_HandleTypeDef *hlptim)
- Initializes the LPTIM MSP. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_MspDeInit(LPTIM_HandleTypeDef *hlptim)
- DeInitializes LPTIM MSP. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
HAL_StatusTypeDef HAL_LPTIM_PWM_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse, uint32_t psc_reg)
- Starts the LPTIM PWM generation. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- Pulse – Specifies the compare value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- psc_reg – Prescale value 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_PWM_Stop(LPTIM_HandleTypeDef *hlptim)
- Stops the LPTIM PWM generation. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_PWM_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
- Starts the LPTIM PWM generation in interrupt mode. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF 
- Pulse – Specifies the compare value. This parameter must be a value between 0x000000 and 0xFFFFFF 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_PWM_Stop_IT(LPTIM_HandleTypeDef *hlptim)
- Stops the LPTIM PWM generation in interrupt mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_PWM_Set_Period(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse, uint32_t psc_reg)
- Tthe LPTIM PWM set period, pulse, pscaler, for real-time chang period. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF 
- Pulse – Specifies the compare value. This parameter must be a value between 0x000000 and 0xFFFFFF 
- psc_reg – Prescale value, ref LPTIM_Clock_Prescaler 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
- Starts the LPTIM One pulse generation. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- Pulse – Specifies the compare value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Stop(LPTIM_HandleTypeDef *hlptim)
- Stops the LPTIM One pulse generation. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
- Starts the LPTIM One pulse generation in interrupt mode. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- Pulse – Specifies the compare value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Stop_IT(LPTIM_HandleTypeDef *hlptim)
- Stops the LPTIM One pulse generation in interrupt mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
- Starts the LPTIM in Set once mode. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- Pulse – Specifies the compare value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Stop(LPTIM_HandleTypeDef *hlptim)
- Stops the LPTIM Set once mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
- Starts the LPTIM Set once mode in interrupt mode. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- Pulse – Specifies the compare value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Stop_IT(LPTIM_HandleTypeDef *hlptim)
- Stops the LPTIM Set once mode in interrupt mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Timeout)
- Starts the Timeout function. The first trigger event will start the timer, any successive trigger event will reset the counter and the timer restarts. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- Timeout – Specifies the TimeOut value to rest the counter. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Stop(LPTIM_HandleTypeDef *hlptim)
- Stops the Timeout function. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Timeout)
- Starts the Timeout function in interrupt mode. The first trigger event will start the timer, any successive trigger event will reset the counter and the timer restarts. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
- Timeout – Specifies the TimeOut value to rest the counter. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Stop_IT(LPTIM_HandleTypeDef *hlptim)
- Stops the Timeout function in interrupt mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_Counter_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period)
- Starts the Counter mode. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_Counter_Stop(LPTIM_HandleTypeDef *hlptim)
- Stops the Counter mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_Counter_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period)
- Starts the Counter mode in interrupt mode. - 参数:
- hlptim – LPTIM handle 
- Period – Specifies the Autoreload value. This parameter must be a value between 0x000000 and 0xFFFFFF. 
 
- 返回值:
- HAL – status 
 
- 
HAL_StatusTypeDef HAL_LPTIM_Counter_Stop_IT(LPTIM_HandleTypeDef *hlptim)
- Stops the Counter mode in interrupt mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – status 
 
- 
uint32_t HAL_LPTIM_ReadCounter(LPTIM_HandleTypeDef *hlptim)
- This function returns the current counter value. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- Counter – value. 
 
- 
uint32_t HAL_LPTIM_ReadAutoReload(LPTIM_HandleTypeDef *hlptim)
- This function return the current Autoreload (Period) value. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- Autoreload – value. 
 
- 
uint32_t HAL_LPTIM_ReadCompare(LPTIM_HandleTypeDef *hlptim)
- This function return the current Compare (Pulse) value. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- Compare – value. 
 
- 
void HAL_LPTIM_IRQHandler(LPTIM_HandleTypeDef *hlptim)
- This function handles LPTIM interrupt request. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_CompareMatchCallback(LPTIM_HandleTypeDef *hlptim)
- Compare match callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_AutoReloadMatchCallback(LPTIM_HandleTypeDef *hlptim)
- Autoreload match callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_TriggerCallback(LPTIM_HandleTypeDef *hlptim)
- Trigger detected callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_OutCompareCallback(LPTIM_HandleTypeDef *hlptim)
- Ouput compare callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_UpdateEventCallback(LPTIM_HandleTypeDef *hlptim)
- Update event callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_CompareWriteCallback(LPTIM_HandleTypeDef *hlptim)
- Compare write callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_AutoReloadWriteCallback(LPTIM_HandleTypeDef *hlptim)
- Autoreload write callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_OverFlowWakeUpCallback(LPTIM_HandleTypeDef *hlptim)
- Autoreload Overflow wakeup callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_DirectionUpCallback(LPTIM_HandleTypeDef *hlptim)
- Direction counter changed from Down to Up callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
void HAL_LPTIM_DirectionDownCallback(LPTIM_HandleTypeDef *hlptim)
- Direction counter changed from Up to Down callback in non blocking mode. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- None – 
 
- 
HAL_LPTIM_StateTypeDef HAL_LPTIM_GetState(LPTIM_HandleTypeDef *hlptim)
- Returns the LPTIM state. - 参数:
- hlptim – LPTIM handle 
 
- 返回值:
- HAL – state 
 
- 
struct LPTIM_ClockConfigTypeDef
- #include <bf0_hal_lptim.h>LPTIM Clock configuration definition. Public Members - 
uint32_t Source
- Selects the clock source. This parameter can be a value of LPTIM Clock Source 
 - 
uint32_t Prescaler
- Specifies the counter clock Prescaler. This parameter can be a value of LPTIM Clock Prescaler 
 - 
uint32_t ExtSource
- Specifies the external clock source. This parameter can be a value of LPTIM Clock Source 
 - 
uint32_t IntSource
- Specifies the internal clock source. This parameter can be a value of LPTIM Clock Source 
 
- 
uint32_t Source
- 
struct LPTIM_ULPClockConfigTypeDef
- #include <bf0_hal_lptim.h>LPTIM Clock configuration definition. Public Members - 
uint32_t Polarity
- Selects the polarity of the active edge for the counter unit if the ULPTIM input is selected. Note: This parameter is used only when Ultra low power clock source is used. Note: If the polarity is configured on ‘both edges’, an auxiliary clock (one of the Low power oscillator) must be active. This parameter can be a value of LPTIM Clock Polarity 
 - 
uint32_t SampleTime
- Selects the clock sampling time to configure the clock glitch filter. Note: This parameter is used only when Ultra low power clock source is used. This parameter can be a value of LPTIM Clock Sample Time 
 
- 
uint32_t Polarity
- 
struct LPTIM_TriggerConfigTypeDef
- #include <bf0_hal_lptim.h>LPTIM Trigger configuration definition. Public Members - 
uint32_t Source
- Selects the Trigger source. This parameter can be a value of LPTIM Trigger Source 
 - 
uint32_t ActiveEdge
- Selects the Trigger active edge. Note: This parameter is used only when an external trigger is used. This parameter can be a value of LPTIM External Trigger Polarity 
 - 
uint32_t SampleTime
- Selects the trigger sampling time to configure the clock glitch filter. Note: This parameter is used only when an external trigger is used. This parameter can be a value of LPTIM Trigger Sample Time 
 
- 
uint32_t Source
- 
struct LPTIM_InitTypeDef
- #include <bf0_hal_lptim.h>LPTIM Initialization Structure definition. Public Members - 
LPTIM_ClockConfigTypeDef Clock
- Specifies the clock parameters 
 - 
LPTIM_ULPClockConfigTypeDef UltraLowPowerClock
- Specifies the Ultra Low Power clock parameters 
 - 
LPTIM_TriggerConfigTypeDef Trigger
- Specifies the Trigger parameters 
 - 
uint32_t OutputPolarity
- Specifies the Output polarity. This parameter can be a value of LPTIM Output Polarity 
 - 
uint32_t CounterSource
- Specifies whether the counter is incremented each internal event or each external event. This parameter can be a value of LPTIM Counter Source 
 
- 
LPTIM_ClockConfigTypeDef Clock
- 
struct LPTIM_HandleTypeDef
- #include <bf0_hal_lptim.h>LPTIM handle Structure definition. Public Members - 
LPTIM_TypeDef *Instance
- Register base address 
 - 
LPTIM_InitTypeDef Init
- LPTIM required parameters 
 - 
HAL_StatusTypeDef Status
- LPTIM peripheral status 
 - 
HAL_LockTypeDef Lock
- LPTIM locking object 
 - 
HAL_LPTIM_ModeTypeDef Mode
- LPTIM timer mode 
 - 
HAL_LPTIM_StateTypeDef State
- LPTIM peripheral state 
 
- 
LPTIM_TypeDef *Instance
