STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
TIM One Pulse functions

TIM One Pulse functions. More...

Collaboration diagram for TIM One Pulse functions:

Functions

HAL_StatusTypeDef HAL_TIM_OnePulse_Init (TIM_HandleTypeDef *htim, uint32_t OnePulseMode)
 Initializes the TIM One Pulse Time Base according to the specified parameters in the TIM_HandleTypeDef and initializes the associated handle.
 
HAL_StatusTypeDef HAL_TIM_OnePulse_DeInit (TIM_HandleTypeDef *htim)
 DeInitializes the TIM One Pulse.
 
void HAL_TIM_OnePulse_MspInit (TIM_HandleTypeDef *htim)
 Initializes the TIM One Pulse MSP.
 
void HAL_TIM_OnePulse_MspDeInit (TIM_HandleTypeDef *htim)
 DeInitializes TIM One Pulse MSP.
 
HAL_StatusTypeDef HAL_TIM_OnePulse_Start (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Starts the TIM One Pulse signal generation.
 
HAL_StatusTypeDef HAL_TIM_OnePulse_Stop (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Stops the TIM One Pulse signal generation.
 
HAL_StatusTypeDef HAL_TIM_OnePulse_Start_IT (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Starts the TIM One Pulse signal generation in interrupt mode.
 
HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT (TIM_HandleTypeDef *htim, uint32_t OutputChannel)
 Stops the TIM One Pulse signal generation in interrupt mode.
 

Detailed Description

TIM One Pulse functions.

  ==============================================================================
                        ##### TIM One Pulse functions #####
  ==============================================================================
  [..]
    This section provides functions allowing to:
    (+) Initialize and configure the TIM One Pulse.
    (+) De-initialize the TIM One Pulse.
    (+) Start the TIM One Pulse.
    (+) Stop the TIM One Pulse.
    (+) Start the TIM One Pulse and enable interrupt.
    (+) Stop the TIM One Pulse and disable interrupt.
    (+) Start the TIM One Pulse and enable DMA transfer.
    (+) Stop the TIM One Pulse and disable DMA transfer.

Function Documentation

◆ HAL_TIM_OnePulse_Init()

HAL_StatusTypeDef HAL_TIM_OnePulse_Init ( TIM_HandleTypeDef * htim,
uint32_t OnePulseMode )

#include <stm32f4xx_hal_tim.h>

Initializes the TIM One Pulse Time Base according to the specified parameters in the TIM_HandleTypeDef and initializes the associated handle.

Note
Switching from Center Aligned counter mode to Edge counter mode (or reverse) requires a timer reset to avoid unexpected direction due to DIR bit readonly in center aligned mode. Ex: call HAL_TIM_OnePulse_DeInit() before HAL_TIM_OnePulse_Init()
When the timer instance is initialized in One Pulse mode, timer channels 1 and channel 2 are reserved and cannot be used for other purpose.
Parameters
htimTIM One Pulse handle
OnePulseModeSelect the One pulse mode. This parameter can be one of the following values:
  • TIM_OPMODE_SINGLE: Only one pulse will be generated.
  • TIM_OPMODE_REPETITIVE: Repetitive pulses will be generated.
Return values
HALstatus

Definition at line 2628 of file stm32f4xx_hal_tim.c.

References assert_param, TIM_Base_InitTypeDef::AutoReloadPreload, TIM_Base_InitTypeDef::ClockDivision, TIM_Base_InitTypeDef::CounterMode, TIM_HandleTypeDef::DMABurstState, HAL_DMA_BURST_STATE_READY, HAL_ERROR, HAL_OK, HAL_TIM_CHANNEL_STATE_READY, HAL_TIM_OnePulse_MspInit(), HAL_TIM_STATE_BUSY, HAL_TIM_STATE_READY, HAL_TIM_STATE_RESET, HAL_UNLOCKED, TIM_HandleTypeDef::Init, TIM_HandleTypeDef::Instance, IS_TIM_AUTORELOAD_PRELOAD, IS_TIM_CLOCKDIVISION_DIV, IS_TIM_COUNTER_MODE, IS_TIM_OPM_MODE, IS_TIM_PERIOD, TIM_HandleTypeDef::Lock, TIM_Base_InitTypeDef::Period, TIM_HandleTypeDef::State, TIM_Base_SetConfig(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, and TIM_CHANNEL_STATE_SET.

◆ HAL_TIM_OnePulse_DeInit()

◆ HAL_TIM_OnePulse_MspInit()

__weak void HAL_TIM_OnePulse_MspInit ( TIM_HandleTypeDef * htim)

#include <stm32f4xx_hal_tim.h>

Initializes the TIM One Pulse MSP.

Parameters
htimTIM One Pulse handle
Return values
None

Definition at line 2742 of file stm32f4xx_hal_tim.c.

References UNUSED.

Referenced by HAL_TIM_OnePulse_Init().

◆ HAL_TIM_OnePulse_MspDeInit()

__weak void HAL_TIM_OnePulse_MspDeInit ( TIM_HandleTypeDef * htim)

#include <stm32f4xx_hal_tim.h>

DeInitializes TIM One Pulse MSP.

Parameters
htimTIM One Pulse handle
Return values
None

Definition at line 2757 of file stm32f4xx_hal_tim.c.

References UNUSED.

Referenced by HAL_TIM_OnePulse_DeInit().

◆ HAL_TIM_OnePulse_Start()

HAL_StatusTypeDef HAL_TIM_OnePulse_Start ( TIM_HandleTypeDef * htim,
uint32_t OutputChannel )

#include <stm32f4xx_hal_tim.h>

Starts the TIM One Pulse signal generation.

Note
Though OutputChannel parameter is deprecated and ignored by the function it has been kept to avoid HAL_TIM API compatibility break.
The pulse output channel is determined when calling HAL_TIM_OnePulse_ConfigChannel().
Parameters
htimTIM One Pulse handle
OutputChannelSee note above
Return values
HALstatus

Definition at line 2777 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_MOE_ENABLE, HAL_ERROR, HAL_OK, HAL_TIM_CHANNEL_STATE_BUSY, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_ENABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_GET, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_GET, TIM_CHANNEL_STATE_SET, and UNUSED.

◆ HAL_TIM_OnePulse_Stop()

HAL_StatusTypeDef HAL_TIM_OnePulse_Stop ( TIM_HandleTypeDef * htim,
uint32_t OutputChannel )

#include <stm32f4xx_hal_tim.h>

Stops the TIM One Pulse signal generation.

Note
Though OutputChannel parameter is deprecated and ignored by the function it has been kept to avoid HAL_TIM API compatibility break.
The pulse output channel is determined when calling HAL_TIM_OnePulse_ConfigChannel().
Parameters
htimTIM One Pulse handle
OutputChannelSee note above
Return values
HALstatus

Definition at line 2834 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_DISABLE, __HAL_TIM_MOE_DISABLE, HAL_OK, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_DISABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_SET, and UNUSED.

◆ HAL_TIM_OnePulse_Start_IT()

HAL_StatusTypeDef HAL_TIM_OnePulse_Start_IT ( TIM_HandleTypeDef * htim,
uint32_t OutputChannel )

#include <stm32f4xx_hal_tim.h>

Starts the TIM One Pulse signal generation in interrupt mode.

Note
Though OutputChannel parameter is deprecated and ignored by the function it has been kept to avoid HAL_TIM API compatibility break.
The pulse output channel is determined when calling HAL_TIM_OnePulse_ConfigChannel().
Parameters
htimTIM One Pulse handle
OutputChannelSee note above
Return values
HALstatus

Definition at line 2877 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_ENABLE_IT, __HAL_TIM_MOE_ENABLE, HAL_ERROR, HAL_OK, HAL_TIM_CHANNEL_STATE_BUSY, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_ENABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_GET, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_GET, TIM_CHANNEL_STATE_SET, TIM_IT_CC1, TIM_IT_CC2, and UNUSED.

◆ HAL_TIM_OnePulse_Stop_IT()

HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT ( TIM_HandleTypeDef * htim,
uint32_t OutputChannel )

#include <stm32f4xx_hal_tim.h>

Stops the TIM One Pulse signal generation in interrupt mode.

Note
Though OutputChannel parameter is deprecated and ignored by the function it has been kept to avoid HAL_TIM API compatibility break.
The pulse output channel is determined when calling HAL_TIM_OnePulse_ConfigChannel().
Parameters
htimTIM One Pulse handle
OutputChannelSee note above
Return values
HALstatus

Definition at line 2940 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_DISABLE, __HAL_TIM_DISABLE_IT, __HAL_TIM_MOE_DISABLE, HAL_OK, HAL_TIM_CHANNEL_STATE_READY, TIM_HandleTypeDef::Instance, TIM_CCx_DISABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_N_STATE_SET, TIM_CHANNEL_STATE_SET, TIM_IT_CC1, TIM_IT_CC2, and UNUSED.