STM32F439xx HAL User Manual
Functions
Time Output Compare functions
TIM Exported Functions

Time Output Compare functions. More...

Functions

HAL_StatusTypeDef HAL_TIM_OC_Init (TIM_HandleTypeDef *htim)
 Initializes the TIM Output Compare according to the specified parameters in the TIM_HandleTypeDef and create the associated handle.
HAL_StatusTypeDef HAL_TIM_OC_DeInit (TIM_HandleTypeDef *htim)
 DeInitializes the TIM peripheral.
__weak void HAL_TIM_OC_MspInit (TIM_HandleTypeDef *htim)
 Initializes the TIM Output Compare MSP.
__weak void HAL_TIM_OC_MspDeInit (TIM_HandleTypeDef *htim)
 DeInitializes TIM Output Compare MSP.
HAL_StatusTypeDef HAL_TIM_OC_Start (TIM_HandleTypeDef *htim, uint32_t Channel)
 Starts the TIM Output Compare signal generation.
HAL_StatusTypeDef HAL_TIM_OC_Stop (TIM_HandleTypeDef *htim, uint32_t Channel)
 Stops the TIM Output Compare signal generation.
HAL_StatusTypeDef HAL_TIM_OC_Start_IT (TIM_HandleTypeDef *htim, uint32_t Channel)
 Starts the TIM Output Compare signal generation in interrupt mode.
HAL_StatusTypeDef HAL_TIM_OC_Stop_IT (TIM_HandleTypeDef *htim, uint32_t Channel)
 Stops the TIM Output Compare signal generation in interrupt mode.
HAL_StatusTypeDef HAL_TIM_OC_Start_DMA (TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)
 Starts the TIM Output Compare signal generation in DMA mode.
HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA (TIM_HandleTypeDef *htim, uint32_t Channel)
 Stops the TIM Output Compare signal generation in DMA mode.

Detailed Description

Time Output Compare functions.

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

Function Documentation

HAL_StatusTypeDef HAL_TIM_OC_DeInit ( TIM_HandleTypeDef htim)

DeInitializes the TIM peripheral.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
Return values:
HALstatus

Definition at line 527 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_DISABLE, assert_param, HAL_TIM_OC_MspDeInit(), HAL_TIM_STATE_BUSY, HAL_TIM_STATE_RESET, TIM_HandleTypeDef::Instance, and TIM_HandleTypeDef::State.

HAL_StatusTypeDef HAL_TIM_OC_Init ( TIM_HandleTypeDef htim)

Initializes the TIM Output Compare according to the specified parameters in the TIM_HandleTypeDef and create the associated handle.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
Return values:
HALstatus

Definition at line 488 of file stm32f4xx_hal_tim.c.

References assert_param, TIM_Base_InitTypeDef::ClockDivision, TIM_Base_InitTypeDef::CounterMode, HAL_TIM_OC_MspInit(), HAL_TIM_STATE_BUSY, HAL_TIM_STATE_READY, HAL_TIM_STATE_RESET, TIM_HandleTypeDef::Init, TIM_HandleTypeDef::Instance, IS_TIM_CLOCKDIVISION_DIV, IS_TIM_COUNTER_MODE, TIM_HandleTypeDef::Lock, TIM_HandleTypeDef::State, and TIM_Base_SetConfig().

DeInitializes TIM Output Compare MSP.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
Return values:
None

Definition at line 570 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_OC_DeInit().

Initializes the TIM Output Compare MSP.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
Return values:
None

Definition at line 555 of file stm32f4xx_hal_tim.c.

Referenced by HAL_TIM_OC_Init().

HAL_StatusTypeDef HAL_TIM_OC_Start ( TIM_HandleTypeDef htim,
uint32_t  Channel 
)

Starts the TIM Output Compare signal generation.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
ChannelTIM Channel to be enabled. This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
  • TIM_CHANNEL_3: TIM Channel 3 selected
  • TIM_CHANNEL_4: TIM Channel 4 selected
Return values:
HALstatus

Definition at line 591 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_ENABLE, __HAL_TIM_MOE_ENABLE, assert_param, TIM_HandleTypeDef::Instance, TIM_CCx_ENABLE, and TIM_CCxChannelCmd().

HAL_StatusTypeDef HAL_TIM_OC_Start_DMA ( TIM_HandleTypeDef htim,
uint32_t  Channel,
uint32_t *  pData,
uint16_t  Length 
)

Starts the TIM Output Compare signal generation in DMA mode.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
ChannelTIM Channel to be enabled. This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
  • TIM_CHANNEL_3: TIM Channel 3 selected
  • TIM_CHANNEL_4: TIM Channel 4 selected
pDataThe source Buffer address.
LengthThe length of data to be transferred from memory to TIM peripheral
Return values:
HALstatus

Definition at line 793 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_ENABLE, __HAL_TIM_ENABLE_DMA, __HAL_TIM_MOE_ENABLE, assert_param, HAL_DMA_Start_IT(), HAL_TIM_STATE_BUSY, HAL_TIM_STATE_READY, TIM_HandleTypeDef::hdma, TIM_HandleTypeDef::Instance, TIM_HandleTypeDef::State, TIM_CCx_ENABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_3, TIM_CHANNEL_4, TIM_DMA_CC1, TIM_DMA_CC2, TIM_DMA_CC3, TIM_DMA_CC4, TIM_DMA_ID_CC1, TIM_DMA_ID_CC2, TIM_DMA_ID_CC3, TIM_DMA_ID_CC4, TIM_DMADelayPulseCplt(), TIM_DMAError(), __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.

HAL_StatusTypeDef HAL_TIM_OC_Start_IT ( TIM_HandleTypeDef htim,
uint32_t  Channel 
)

Starts the TIM Output Compare signal generation in interrupt mode.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
ChannelTIM Channel to be enabled. This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
  • TIM_CHANNEL_3: TIM Channel 3 selected
  • TIM_CHANNEL_4: TIM Channel 4 selected
Return values:
HALstatus

Definition at line 657 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_ENABLE, __HAL_TIM_ENABLE_IT, __HAL_TIM_MOE_ENABLE, assert_param, TIM_HandleTypeDef::Instance, TIM_CCx_ENABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_3, TIM_CHANNEL_4, TIM_IT_CC1, TIM_IT_CC2, TIM_IT_CC3, and TIM_IT_CC4.

HAL_StatusTypeDef HAL_TIM_OC_Stop ( TIM_HandleTypeDef htim,
uint32_t  Channel 
)

Stops the TIM Output Compare signal generation.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
ChannelTIM Channel to be disabled. This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
  • TIM_CHANNEL_3: TIM Channel 3 selected
  • TIM_CHANNEL_4: TIM Channel 4 selected
Return values:
HALstatus

Definition at line 624 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_DISABLE, __HAL_TIM_MOE_DISABLE, assert_param, TIM_HandleTypeDef::Instance, TIM_CCx_DISABLE, and TIM_CCxChannelCmd().

HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA ( TIM_HandleTypeDef htim,
uint32_t  Channel 
)

Stops the TIM Output Compare signal generation in DMA mode.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
ChannelTIM Channel to be disabled. This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
  • TIM_CHANNEL_3: TIM Channel 3 selected
  • TIM_CHANNEL_4: TIM Channel 4 selected
Return values:
HALstatus

Definition at line 911 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_DISABLE, __HAL_TIM_DISABLE_DMA, __HAL_TIM_MOE_DISABLE, assert_param, HAL_TIM_STATE_READY, TIM_HandleTypeDef::Instance, TIM_HandleTypeDef::State, TIM_CCx_DISABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_3, TIM_CHANNEL_4, TIM_DMA_CC1, TIM_DMA_CC2, TIM_DMA_CC3, and TIM_DMA_CC4.

HAL_StatusTypeDef HAL_TIM_OC_Stop_IT ( TIM_HandleTypeDef htim,
uint32_t  Channel 
)

Stops the TIM Output Compare signal generation in interrupt mode.

Parameters:
htimpointer to a TIM_HandleTypeDef structure that contains the configuration information for TIM module.
ChannelTIM Channel to be disabled. This parameter can be one of the following values:
  • TIM_CHANNEL_1: TIM Channel 1 selected
  • TIM_CHANNEL_2: TIM Channel 2 selected
  • TIM_CHANNEL_3: TIM Channel 3 selected
  • TIM_CHANNEL_4: TIM Channel 4 selected
Return values:
HALstatus

Definition at line 724 of file stm32f4xx_hal_tim.c.

References __HAL_TIM_DISABLE, __HAL_TIM_DISABLE_IT, __HAL_TIM_MOE_DISABLE, assert_param, TIM_HandleTypeDef::Instance, TIM_CCx_DISABLE, TIM_CCxChannelCmd(), TIM_CHANNEL_1, TIM_CHANNEL_2, TIM_CHANNEL_3, TIM_CHANNEL_4, TIM_IT_CC1, TIM_IT_CC2, TIM_IT_CC3, and TIM_IT_CC4.