L4 HAL Drivers

Embed: (wiki syntax)

« Back to documentation index

Time PWM functions

Time PWM functions
[TIM Exported Functions]

Time PWM functions. More...

Functions

HAL_StatusTypeDef HAL_TIM_PWM_Init (TIM_HandleTypeDef *htim)
 Initializes the TIM PWM Time Base according to the specified parameters in the TIM_HandleTypeDef and initialize the associated handle.
HAL_StatusTypeDef HAL_TIM_PWM_DeInit (TIM_HandleTypeDef *htim)
 DeInitialize the TIM peripheral.
__weak void HAL_TIM_PWM_MspInit (TIM_HandleTypeDef *htim)
 Initializes the TIM PWM MSP.
__weak void HAL_TIM_PWM_MspDeInit (TIM_HandleTypeDef *htim)
 DeInitialize TIM PWM MSP.
HAL_StatusTypeDef HAL_TIM_PWM_Start (TIM_HandleTypeDef *htim, uint32_t Channel)
 Starts the PWM signal generation.
HAL_StatusTypeDef HAL_TIM_PWM_Stop (TIM_HandleTypeDef *htim, uint32_t Channel)
 Stops the PWM signal generation.
HAL_StatusTypeDef HAL_TIM_PWM_Start_IT (TIM_HandleTypeDef *htim, uint32_t Channel)
 Starts the PWM signal generation in interrupt mode.
HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT (TIM_HandleTypeDef *htim, uint32_t Channel)
 Stops the PWM signal generation in interrupt mode.
HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA (TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length)
 Starts the TIM PWM signal generation in DMA mode.
HAL_StatusTypeDef HAL_TIM_PWM_Stop_DMA (TIM_HandleTypeDef *htim, uint32_t Channel)
 Stops the TIM PWM signal generation in DMA mode.

Detailed Description

Time PWM functions.

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


Function Documentation

HAL_StatusTypeDef HAL_TIM_PWM_DeInit ( TIM_HandleTypeDef *  htim )

DeInitialize the TIM peripheral.

Parameters:
htim,:TIM handle
Return values:
HALstatus

Definition at line 1015 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_PWM_Init ( TIM_HandleTypeDef *  htim )

Initializes the TIM PWM Time Base according to the specified parameters in the TIM_HandleTypeDef and initialize the associated handle.

Parameters:
htim,:TIM handle
Return values:
HALstatus

Definition at line 976 of file stm32l4xx_hal_tim.c.

__weak void HAL_TIM_PWM_MspDeInit ( TIM_HandleTypeDef *  htim )

DeInitialize TIM PWM MSP.

Parameters:
htim,:TIM handle
Return values:
None

Definition at line 1054 of file stm32l4xx_hal_tim.c.

__weak void HAL_TIM_PWM_MspInit ( TIM_HandleTypeDef *  htim )

Initializes the TIM PWM MSP.

Parameters:
htim,:TIM handle
Return values:
None

Definition at line 1042 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_PWM_Start ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Starts the PWM signal generation.

Parameters:
htim: TIM handle
Channel: TIM Channels 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 1074 of file stm32l4xx_hal_tim.c.

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

Starts the TIM PWM signal generation in DMA mode.

Parameters:
htim: TIM handle
Channel: TIM Channels 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
pData,:The source Buffer address.
Length,:The length of data to be transferred from memory to TIM peripheral
Return values:
HALstatus

Definition at line 1277 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_PWM_Start_IT ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Starts the PWM signal generation in interrupt mode.

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
Return values:
HALstatus

Definition at line 1143 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_PWM_Stop ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Stops the PWM signal generation.

Parameters:
htim: TIM handle
Channel: TIM Channels 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 1108 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_PWM_Stop_DMA ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Stops the TIM PWM signal generation in DMA mode.

Parameters:
htim: TIM handle
Channel: TIM Channels 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 1394 of file stm32l4xx_hal_tim.c.

HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT ( TIM_HandleTypeDef *  htim,
uint32_t  Channel 
)

Stops the PWM signal generation in interrupt mode.

Parameters:
htim: TIM handle
Channel: TIM Channels 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 1209 of file stm32l4xx_hal_tim.c.