STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
stm32f4xx_hal_lptim.h File Reference

Header file of LPTIM HAL module. More...

Include dependency graph for stm32f4xx_hal_lptim.h:

Go to the source code of this file.

Data Structures

struct  LPTIM_ClockConfigTypeDef
 LPTIM Clock configuration definition. More...
 
struct  LPTIM_ULPClockConfigTypeDef
 LPTIM Clock configuration definition. More...
 
struct  LPTIM_TriggerConfigTypeDef
 LPTIM Trigger configuration definition. More...
 
struct  LPTIM_InitTypeDef
 LPTIM Initialization Structure definition. More...
 
struct  LPTIM_HandleTypeDef
 LPTIM handle Structure definition. More...
 

Macros

#define LPTIM_EXTI_LINE_WAKEUPTIMER_EVENT   EXTI_IMR_MR23
 
#define LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC   0x00000000U
 
#define LPTIM_CLOCKSOURCE_ULPTIM   LPTIM_CFGR_CKSEL
 
#define LPTIM_PRESCALER_DIV1   0x00000000U
 
#define LPTIM_PRESCALER_DIV2   LPTIM_CFGR_PRESC_0
 
#define LPTIM_PRESCALER_DIV4   LPTIM_CFGR_PRESC_1
 
#define LPTIM_PRESCALER_DIV8   (LPTIM_CFGR_PRESC_0 | LPTIM_CFGR_PRESC_1)
 
#define LPTIM_PRESCALER_DIV16   LPTIM_CFGR_PRESC_2
 
#define LPTIM_PRESCALER_DIV32   (LPTIM_CFGR_PRESC_0 | LPTIM_CFGR_PRESC_2)
 
#define LPTIM_PRESCALER_DIV64   (LPTIM_CFGR_PRESC_1 | LPTIM_CFGR_PRESC_2)
 
#define LPTIM_PRESCALER_DIV128   LPTIM_CFGR_PRESC
 
#define LPTIM_OUTPUTPOLARITY_HIGH   0x00000000U
 
#define LPTIM_OUTPUTPOLARITY_LOW   LPTIM_CFGR_WAVPOL
 
#define LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION   0x00000000U
 
#define LPTIM_CLOCKSAMPLETIME_2TRANSITIONS   LPTIM_CFGR_CKFLT_0
 
#define LPTIM_CLOCKSAMPLETIME_4TRANSITIONS   LPTIM_CFGR_CKFLT_1
 
#define LPTIM_CLOCKSAMPLETIME_8TRANSITIONS   LPTIM_CFGR_CKFLT
 
#define LPTIM_CLOCKPOLARITY_RISING   0x00000000U
 
#define LPTIM_CLOCKPOLARITY_FALLING   LPTIM_CFGR_CKPOL_0
 
#define LPTIM_CLOCKPOLARITY_RISING_FALLING   LPTIM_CFGR_CKPOL_1
 
#define LPTIM_TRIGSOURCE_SOFTWARE   0x0000FFFFU
 
#define LPTIM_TRIGSOURCE_0   0x00000000U
 
#define LPTIM_TRIGSOURCE_1   LPTIM_CFGR_TRIGSEL_0
 
#define LPTIM_TRIGSOURCE_2   LPTIM_CFGR_TRIGSEL_1
 
#define LPTIM_TRIGSOURCE_3   (LPTIM_CFGR_TRIGSEL_0 | LPTIM_CFGR_TRIGSEL_1)
 
#define LPTIM_TRIGSOURCE_4   LPTIM_CFGR_TRIGSEL_2
 
#define LPTIM_TRIGSOURCE_5   (LPTIM_CFGR_TRIGSEL_0 | LPTIM_CFGR_TRIGSEL_2)
 
#define LPTIM_ACTIVEEDGE_RISING   LPTIM_CFGR_TRIGEN_0
 
#define LPTIM_ACTIVEEDGE_FALLING   LPTIM_CFGR_TRIGEN_1
 
#define LPTIM_ACTIVEEDGE_RISING_FALLING   LPTIM_CFGR_TRIGEN
 
#define LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION   0x00000000U
 
#define LPTIM_TRIGSAMPLETIME_2TRANSITIONS   LPTIM_CFGR_TRGFLT_0
 
#define LPTIM_TRIGSAMPLETIME_4TRANSITIONS   LPTIM_CFGR_TRGFLT_1
 
#define LPTIM_TRIGSAMPLETIME_8TRANSITIONS   LPTIM_CFGR_TRGFLT
 
#define LPTIM_UPDATE_IMMEDIATE   0x00000000U
 
#define LPTIM_UPDATE_ENDOFPERIOD   LPTIM_CFGR_PRELOAD
 
#define LPTIM_COUNTERSOURCE_INTERNAL   0x00000000U
 
#define LPTIM_COUNTERSOURCE_EXTERNAL   LPTIM_CFGR_COUNTMODE
 
#define LPTIM_FLAG_DOWN   LPTIM_ISR_DOWN
 
#define LPTIM_FLAG_UP   LPTIM_ISR_UP
 
#define LPTIM_FLAG_ARROK   LPTIM_ISR_ARROK
 
#define LPTIM_FLAG_CMPOK   LPTIM_ISR_CMPOK
 
#define LPTIM_FLAG_EXTTRIG   LPTIM_ISR_EXTTRIG
 
#define LPTIM_FLAG_ARRM   LPTIM_ISR_ARRM
 
#define LPTIM_FLAG_CMPM   LPTIM_ISR_CMPM
 
#define LPTIM_IT_DOWN   LPTIM_IER_DOWNIE
 
#define LPTIM_IT_UP   LPTIM_IER_UPIE
 
#define LPTIM_IT_ARROK   LPTIM_IER_ARROKIE
 
#define LPTIM_IT_CMPOK   LPTIM_IER_CMPOKIE
 
#define LPTIM_IT_EXTTRIG   LPTIM_IER_EXTTRIGIE
 
#define LPTIM_IT_ARRM   LPTIM_IER_ARRMIE
 
#define LPTIM_IT_CMPM   LPTIM_IER_CMPMIE
 
#define LPTIM_OP_PAD_AF   0x00000000U
 
#define LPTIM_OP_PAD_PA4   LPTIM_OR_LPT_IN1_RMP_0
 
#define LPTIM_OP_PAD_PB9   LPTIM_OR_LPT_IN1_RMP_1
 
#define LPTIM_OP_TIM_DAC   LPTIM_OR_LPT_IN1_RMP
 
#define __HAL_LPTIM_RESET_HANDLE_STATE(__HANDLE__)
 Reset LPTIM handle state.
 
#define __HAL_LPTIM_ENABLE(__HANDLE__)
 Enable the LPTIM peripheral.
 
#define __HAL_LPTIM_DISABLE(__HANDLE__)
 Disable the LPTIM peripheral.
 
#define __HAL_LPTIM_START_CONTINUOUS(__HANDLE__)
 Start the LPTIM peripheral in Continuous mode.
 
#define __HAL_LPTIM_START_SINGLE(__HANDLE__)
 Start the LPTIM peripheral in single mode.
 
#define __HAL_LPTIM_AUTORELOAD_SET(__HANDLE__, __VALUE__)
 Write the passed parameter in the Autoreload register.
 
#define __HAL_LPTIM_COMPARE_SET(__HANDLE__, __VALUE__)
 Write the passed parameter in the Compare register.
 
#define __HAL_LPTIM_GET_FLAG(__HANDLE__, __FLAG__)
 Check whether the specified LPTIM flag is set or not.
 
#define __HAL_LPTIM_CLEAR_FLAG(__HANDLE__, __FLAG__)
 Clear the specified LPTIM flag.
 
#define __HAL_LPTIM_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the specified LPTIM interrupt.
 
#define __HAL_LPTIM_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the specified LPTIM interrupt.
 
#define __HAL_LPTIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified LPTIM interrupt source is enabled or not.
 
#define __HAL_LPTIM_OPTR_CONFIG(__HANDLE__, __VALUE__)
 LPTIM Option Register.
 
#define __HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_IT()
 Enable interrupt on the LPTIM Wake-up Timer associated Exti line.
 
#define __HAL_LPTIM_WAKEUPTIMER_EXTI_DISABLE_IT()
 Disable interrupt on the LPTIM Wake-up Timer associated Exti line.
 
#define __HAL_LPTIM_WAKEUPTIMER_EXTI_ENABLE_EVENT()
 Enable event on the LPTIM Wake-up Timer associated Exti line.
 
#define __HAL_LPTIM_WAKEUPTIMER_EXTI_DISABLE_EVENT()
 Disable event on the LPTIM Wake-up Timer associated Exti line.
 
#define IS_LPTIM_CLOCK_SOURCE(__SOURCE__)
 
#define IS_LPTIM_CLOCK_PRESCALER(__PRESCALER__)
 
#define IS_LPTIM_CLOCK_PRESCALERDIV1(__PRESCALER__)
 
#define IS_LPTIM_OUTPUT_POLARITY(__POLARITY__)
 
#define IS_LPTIM_CLOCK_SAMPLE_TIME(__SAMPLETIME__)
 
#define IS_LPTIM_CLOCK_POLARITY(__POLARITY__)
 
#define IS_LPTIM_TRG_SOURCE(__TRIG__)
 
#define IS_LPTIM_EXT_TRG_POLARITY(__POLARITY__)
 
#define IS_LPTIM_TRIG_SAMPLE_TIME(__SAMPLETIME__)
 
#define IS_LPTIM_UPDATE_MODE(__MODE__)
 
#define IS_LPTIM_COUNTER_SOURCE(__SOURCE__)
 
#define IS_LPTIM_COMPARE(__COMPARE__)
 
#define IS_LPTIM_PERIOD(__PERIOD__)
 
#define IS_LPTIM_PULSE(__PULSE__)
 

Enumerations

enum  HAL_LPTIM_StateTypeDef {
  HAL_LPTIM_STATE_RESET = 0x00U , HAL_LPTIM_STATE_READY = 0x01U , HAL_LPTIM_STATE_BUSY = 0x02U , HAL_LPTIM_STATE_TIMEOUT = 0x03U ,
  HAL_LPTIM_STATE_ERROR = 0x04U
}
 HAL LPTIM State structure definition. More...
 

Functions

HAL_StatusTypeDef HAL_LPTIM_Init (LPTIM_HandleTypeDef *hlptim)
 Initialize the LPTIM according to the specified parameters in the LPTIM_InitTypeDef and initialize the associated handle.
 
HAL_StatusTypeDef HAL_LPTIM_DeInit (LPTIM_HandleTypeDef *hlptim)
 DeInitialize the LPTIM peripheral.
 
void HAL_LPTIM_MspInit (LPTIM_HandleTypeDef *hlptim)
 Initialize the LPTIM MSP.
 
void HAL_LPTIM_MspDeInit (LPTIM_HandleTypeDef *hlptim)
 DeInitialize LPTIM MSP.
 
HAL_StatusTypeDef HAL_LPTIM_PWM_Start (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
 Start the LPTIM PWM generation.
 
HAL_StatusTypeDef HAL_LPTIM_PWM_Stop (LPTIM_HandleTypeDef *hlptim)
 Stop the LPTIM PWM generation.
 
HAL_StatusTypeDef HAL_LPTIM_PWM_Start_IT (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
 Start the LPTIM PWM generation in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_PWM_Stop_IT (LPTIM_HandleTypeDef *hlptim)
 Stop the LPTIM PWM generation in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Start (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
 Start the LPTIM One pulse generation.
 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Stop (LPTIM_HandleTypeDef *hlptim)
 Stop the LPTIM One pulse generation.
 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Start_IT (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
 Start the LPTIM One pulse generation in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_OnePulse_Stop_IT (LPTIM_HandleTypeDef *hlptim)
 Stop the LPTIM One pulse generation in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Start (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
 Start the LPTIM in Set once mode.
 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Stop (LPTIM_HandleTypeDef *hlptim)
 Stop the LPTIM Set once mode.
 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Start_IT (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse)
 Start the LPTIM Set once mode in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_SetOnce_Stop_IT (LPTIM_HandleTypeDef *hlptim)
 Stop the LPTIM Set once mode in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_Encoder_Start (LPTIM_HandleTypeDef *hlptim, uint32_t Period)
 Start the Encoder interface.
 
HAL_StatusTypeDef HAL_LPTIM_Encoder_Stop (LPTIM_HandleTypeDef *hlptim)
 Stop the Encoder interface.
 
HAL_StatusTypeDef HAL_LPTIM_Encoder_Start_IT (LPTIM_HandleTypeDef *hlptim, uint32_t Period)
 Start the Encoder interface in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_Encoder_Stop_IT (LPTIM_HandleTypeDef *hlptim)
 Stop the Encoder interface in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Start (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Timeout)
 Start the Timeout function.
 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Stop (LPTIM_HandleTypeDef *hlptim)
 Stop the Timeout function.
 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Start_IT (LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Timeout)
 Start the Timeout function in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_TimeOut_Stop_IT (LPTIM_HandleTypeDef *hlptim)
 Stop the Timeout function in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_Counter_Start (LPTIM_HandleTypeDef *hlptim, uint32_t Period)
 Start the Counter mode.
 
HAL_StatusTypeDef HAL_LPTIM_Counter_Stop (LPTIM_HandleTypeDef *hlptim)
 Stop the Counter mode.
 
HAL_StatusTypeDef HAL_LPTIM_Counter_Start_IT (LPTIM_HandleTypeDef *hlptim, uint32_t Period)
 Start the Counter mode in interrupt mode.
 
HAL_StatusTypeDef HAL_LPTIM_Counter_Stop_IT (LPTIM_HandleTypeDef *hlptim)
 Stop the Counter mode in interrupt mode.
 
uint32_t HAL_LPTIM_ReadCounter (const LPTIM_HandleTypeDef *hlptim)
 Return the current counter value.
 
uint32_t HAL_LPTIM_ReadAutoReload (const LPTIM_HandleTypeDef *hlptim)
 Return the current Autoreload (Period) value.
 
uint32_t HAL_LPTIM_ReadCompare (const LPTIM_HandleTypeDef *hlptim)
 Return the current Compare (Pulse) value.
 
void HAL_LPTIM_IRQHandler (LPTIM_HandleTypeDef *hlptim)
 Handle LPTIM interrupt request.
 
void HAL_LPTIM_CompareMatchCallback (LPTIM_HandleTypeDef *hlptim)
 Compare match callback in non-blocking mode.
 
void HAL_LPTIM_AutoReloadMatchCallback (LPTIM_HandleTypeDef *hlptim)
 Autoreload match callback in non-blocking mode.
 
void HAL_LPTIM_TriggerCallback (LPTIM_HandleTypeDef *hlptim)
 Trigger detected callback in non-blocking mode.
 
void HAL_LPTIM_CompareWriteCallback (LPTIM_HandleTypeDef *hlptim)
 Compare write callback in non-blocking mode.
 
void HAL_LPTIM_AutoReloadWriteCallback (LPTIM_HandleTypeDef *hlptim)
 Autoreload write callback in non-blocking mode.
 
void HAL_LPTIM_DirectionUpCallback (LPTIM_HandleTypeDef *hlptim)
 Direction counter changed from Down to Up callback in non-blocking mode.
 
void HAL_LPTIM_DirectionDownCallback (LPTIM_HandleTypeDef *hlptim)
 Direction counter changed from Up to Down callback in non-blocking mode.
 
HAL_LPTIM_StateTypeDef HAL_LPTIM_GetState (const LPTIM_HandleTypeDef *hlptim)
 Return the LPTIM handle state.
 
void LPTIM_Disable (LPTIM_HandleTypeDef *hlptim)
 Disable LPTIM HW instance.
 

Detailed Description

Header file of LPTIM HAL module.

Author
MCD Application Team
Attention

Copyright (c) 2016 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32f4xx_hal_lptim.h.