Initialization and de-initialization functions. STMicroelectronics STM32F4
Publicitate
Publicitate
UM1725
a. PWM Mode: To generate a PWM signal with specified period and pulse, call
HAL_LPTIM_PWM_Start() or HAL_LPTIM_PWM_Start_IT() for interruption mode. b. One Pulse Mode: To generate pulse with specified width in response to a stimulus, call HAL_LPTIM_OnePulse_Start() or
HAL_LPTIM_OnePulse_Start_IT() for interruption mode. c. Set once Mode: In this mode, the output changes the level (from low level to high level if the output polarity is configured high, else the opposite) when a compare match occurs. To start this mode, call HAL_LPTIM_SetOnce_Start() or
HAL_LPTIM_SetOnce_Start_IT() for interruption mode. d. Encoder Mode: To use the encoder interface call HAL_LPTIM_Encoder_Start() or HAL_LPTIM_Encoder_Start_IT() for interruption mode. e. Time out Mode: an active edge on one selected trigger input rests the counter.
The first trigger event will start the timer, any successive trigger event will reset the counter and the timer will restart. To start this mode call
HAL_LPTIM_TimeOut_Start_IT() or HAL_LPTIM_TimeOut_Start_IT() for interruption mode. f. Counter Mode: counter can be used to count external events on the LPTIM
Input1 or it can be used to count internal clock cycles. To start this mode, call
HAL_LPTIM_Counter_Start() or HAL_LPTIM_Counter_Start_IT() for interruption mode.
4. User can stop any process by calling the corresponding API: HAL_LPTIM_Xxx_Stop() or HAL_LPTIM_Xxx_Stop_IT() if the process is already started in interruption mode.
5. Call HAL_LPTIM_DeInit() to deinitialize the LPTIM peripheral.
37.3.2 Initialization and de-initialization functions
This section provides functions allowing to:
Initialize the LPTIM according to the specified parameters in the LPTIM_InitTypeDef and creates the associated handle.
DeInitialize the LPTIM peripheral.
Initialize the LPTIM MSP.
DeInitialize LPTIM MSP.
This section contains the following APIs:
37.3.3 LPTIM Start Stop operation functions
This section provides functions allowing to:
Start the PWM mode.
Stop the PWM mode.
Start the One pulse mode.
Stop the One pulse mode.
Start the Set once mode.
Stop the Set once mode.
Start the Encoder mode.
Stop the Encoder mode.
Start the Timeout mode.
Stop the Timeout mode.
Start the Counter mode.
DOCID025834 Rev 3 501/963
Descarcă
Publicitate