TIM PWM functions.
More...
TIM PWM functions.
==============================================================================
##### TIM PWM functions #####
==============================================================================
[..]
This section provides functions allowing to:
(+) Initialize and configure the TIM PWM.
(+) De-initialize the TIM PWM.
(+) Start the TIM PWM.
(+) Stop the TIM PWM.
(+) Start the TIM PWM and enable interrupt.
(+) Stop the TIM PWM and disable interrupt.
(+) Start the TIM PWM and enable DMA transfer.
(+) Stop the TIM PWM and disable DMA transfer.
◆ HAL_TIM_PWM_DeInit()
◆ HAL_TIM_PWM_Init()
Initializes the TIM PWM 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_PWM_DeInit() before HAL_TIM_PWM_Init()
- Parameters
-
- Return values
-
Definition at line 1315 of file stm32f4xx_hal_tim.c.
◆ HAL_TIM_PWM_MspDeInit()
◆ HAL_TIM_PWM_MspInit()
◆ HAL_TIM_PWM_Start()
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
|
- Return values
-
Definition at line 1454 of file stm32f4xx_hal_tim.c.
◆ HAL_TIM_PWM_Start_DMA()
HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA |
( |
TIM_HandleTypeDef * |
htim, |
|
|
uint32_t |
Channel, |
|
|
const uint32_t * |
pData, |
|
|
uint16_t |
Length |
|
) |
| |
Starts the TIM PWM signal generation in DMA mode.
- Parameters
-
htim | TIM PWM 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
-
Definition at line 1713 of file stm32f4xx_hal_tim.c.
◆ HAL_TIM_PWM_Start_IT()
HAL_StatusTypeDef HAL_TIM_PWM_Start_IT |
( |
TIM_HandleTypeDef * |
htim, |
|
|
uint32_t |
Channel |
|
) |
| |
Starts the PWM signal generation in interrupt mode.
- Parameters
-
htim | TIM PWM 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
|
- Return values
-
Definition at line 1543 of file stm32f4xx_hal_tim.c.
◆ HAL_TIM_PWM_Stop()
Stops the PWM signal generation.
- Parameters
-
htim | TIM PWM 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
-
Definition at line 1508 of file stm32f4xx_hal_tim.c.
◆ HAL_TIM_PWM_Stop_DMA()
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 PWM 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
-
Definition at line 1876 of file stm32f4xx_hal_tim.c.
◆ HAL_TIM_PWM_Stop_IT()
Stops the PWM signal generation in interrupt mode.
- Parameters
-
htim | TIM PWM 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
-
Definition at line 1636 of file stm32f4xx_hal_tim.c.