L4 HAL Drivers

Embed: (wiki syntax)

« Back to documentation index

Time Output Compare 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 initialize the associated handle.
HAL_StatusTypeDef HAL_TIM_OC_DeInit (TIM_HandleTypeDef *htim)
 DeInitialize 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)
 DeInitialize 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 )

DeInitialize the TIM peripheral.

Parameters:
htim,:TIM Output Compare handle
Return values:
HALstatus

Definition at line 503 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_OC_Init ( TIM_HandleTypeDef *  htim )

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

Parameters:
htim,:TIM Output Compare handle
Return values:
HALstatus

Definition at line 464 of file stm32l4xx_hal_tim.c.

__weak void HAL_TIM_OC_MspDeInit ( TIM_HandleTypeDef *  htim )

DeInitialize TIM Output Compare MSP.

Parameters:
htim,:TIM handle
Return values:
None

Definition at line 542 of file stm32l4xx_hal_tim.c.

__weak void HAL_TIM_OC_MspInit ( TIM_HandleTypeDef *  htim )

Initializes the TIM Output Compare MSP.

Parameters:
htim,:TIM handle
Return values:
None

Definition at line 530 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_OC_Start ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Starts the TIM Output Compare signal generation.

Parameters:
htim: TIM Output Compare handle
Channel: TIM 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
  • TIM_CHANNEL_5: TIM Channel 5 selected
  • TIM_CHANNEL_6: TIM Channel 6 selected
Return values:
HALstatus

Definition at line 562 of file stm32l4xx_hal_tim.c.

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:
htim: TIM Output Compare handle
Channel: TIM 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
  • TIM_CHANNEL_5: TIM Channel 5 selected
  • TIM_CHANNEL_6: TIM Channel 6 selected
pData,:The source Buffer address.
Length,:The length of data to be transferred from memory to TIM peripheral
Return values:
HALstatus

Definition at line 768 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_OC_Start_IT ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Starts the TIM Output Compare signal generation in interrupt mode.

Parameters:
htim: TIM OC handle
Channel: TIM 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
  • TIM_CHANNEL_5: TIM Channel 5 selected
  • TIM_CHANNEL_6: TIM Channel 6 selected
Return values:
HALstatus

Definition at line 630 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_OC_Stop ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Stops the TIM Output Compare signal generation.

Parameters:
htim: TIM handle
Channel: TIM 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
  • TIM_CHANNEL_5: TIM Channel 5 selected
  • TIM_CHANNEL_6: TIM Channel 6 selected
Return values:
HALstatus

Definition at line 596 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Stops the TIM Output Compare signal generation in DMA mode.

Parameters:
htim: TIM Output Compare handle
Channel: TIM 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
  • TIM_CHANNEL_5: TIM Channel 5 selected
  • TIM_CHANNEL_6: TIM Channel 6 selected
Return values:
HALstatus

Definition at line 887 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_OC_Stop_IT ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Stops the TIM Output Compare signal generation in interrupt mode.

Parameters:
htim: TIM Output Compare handle
Channel: TIM 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
  • TIM_CHANNEL_5: TIM Channel 5 selected
  • TIM_CHANNEL_6: TIM Channel 6 selected
Return values:
HALstatus

Definition at line 698 of file stm32l4xx_hal_tim.c.