STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
TIM HAL module driver. This file provides firmware functions to manage the following functionalities of the Timer Extended peripheral: More...
#include "stm32f4xx_hal.h"
Go to the source code of this file.
Functions | |
static void | TIM_DMADelayPulseNCplt (DMA_HandleTypeDef *hdma) |
TIM DMA Delay Pulse complete callback (complementary channel). | |
static void | TIM_DMAErrorCCxN (DMA_HandleTypeDef *hdma) |
TIM DMA error callback (complementary channel) | |
static void | TIM_CCxNChannelCmd (TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelNState) |
Enables or disables the TIM Capture Compare Channel xN. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_Init (TIM_HandleTypeDef *htim, const TIM_HallSensor_InitTypeDef *sConfig) |
Initializes the TIM Hall Sensor Interface and initialize the associated handle. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_DeInit (TIM_HandleTypeDef *htim) |
DeInitializes the TIM Hall Sensor interface. | |
void | HAL_TIMEx_HallSensor_MspInit (TIM_HandleTypeDef *htim) |
Initializes the TIM Hall Sensor MSP. | |
void | HAL_TIMEx_HallSensor_MspDeInit (TIM_HandleTypeDef *htim) |
DeInitializes TIM Hall Sensor MSP. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_Start (TIM_HandleTypeDef *htim) |
Starts the TIM Hall Sensor Interface. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_Stop (TIM_HandleTypeDef *htim) |
Stops the TIM Hall sensor Interface. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_Start_IT (TIM_HandleTypeDef *htim) |
Starts the TIM Hall Sensor Interface in interrupt mode. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_Stop_IT (TIM_HandleTypeDef *htim) |
Stops the TIM Hall Sensor Interface in interrupt mode. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_Start_DMA (TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length) |
Starts the TIM Hall Sensor Interface in DMA mode. | |
HAL_StatusTypeDef | HAL_TIMEx_HallSensor_Stop_DMA (TIM_HandleTypeDef *htim) |
Stops the TIM Hall Sensor Interface in DMA mode. | |
HAL_StatusTypeDef | HAL_TIMEx_OCN_Start (TIM_HandleTypeDef *htim, uint32_t Channel) |
Starts the TIM Output Compare signal generation on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OCN_Stop (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the TIM Output Compare signal generation on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OCN_Start_IT (TIM_HandleTypeDef *htim, uint32_t Channel) |
Starts the TIM Output Compare signal generation in interrupt mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OCN_Stop_IT (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the TIM Output Compare signal generation in interrupt mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OCN_Start_DMA (TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData, uint16_t Length) |
Starts the TIM Output Compare signal generation in DMA mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OCN_Stop_DMA (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the TIM Output Compare signal generation in DMA mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_PWMN_Start (TIM_HandleTypeDef *htim, uint32_t Channel) |
Starts the PWM signal generation on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_PWMN_Stop (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the PWM signal generation on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_PWMN_Start_IT (TIM_HandleTypeDef *htim, uint32_t Channel) |
Starts the PWM signal generation in interrupt mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_PWMN_Stop_IT (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the PWM signal generation in interrupt mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_PWMN_Start_DMA (TIM_HandleTypeDef *htim, uint32_t Channel, const uint32_t *pData, uint16_t Length) |
Starts the TIM PWM signal generation in DMA mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_PWMN_Stop_DMA (TIM_HandleTypeDef *htim, uint32_t Channel) |
Stops the TIM PWM signal generation in DMA mode on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OnePulseN_Start (TIM_HandleTypeDef *htim, uint32_t OutputChannel) |
Starts the TIM One Pulse signal generation on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OnePulseN_Stop (TIM_HandleTypeDef *htim, uint32_t OutputChannel) |
Stops the TIM One Pulse signal generation on the complementary output. | |
HAL_StatusTypeDef | HAL_TIMEx_OnePulseN_Start_IT (TIM_HandleTypeDef *htim, uint32_t OutputChannel) |
Starts the TIM One Pulse signal generation in interrupt mode on the complementary channel. | |
HAL_StatusTypeDef | HAL_TIMEx_OnePulseN_Stop_IT (TIM_HandleTypeDef *htim, uint32_t OutputChannel) |
Stops the TIM One Pulse signal generation in interrupt mode on the complementary channel. | |
HAL_StatusTypeDef | HAL_TIMEx_ConfigCommutEvent (TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource) |
Configure the TIM commutation event sequence. | |
HAL_StatusTypeDef | HAL_TIMEx_ConfigCommutEvent_IT (TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource) |
Configure the TIM commutation event sequence with interrupt. | |
HAL_StatusTypeDef | HAL_TIMEx_ConfigCommutEvent_DMA (TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource) |
Configure the TIM commutation event sequence with DMA. | |
HAL_StatusTypeDef | HAL_TIMEx_MasterConfigSynchronization (TIM_HandleTypeDef *htim, const TIM_MasterConfigTypeDef *sMasterConfig) |
Configures the TIM in master mode. | |
HAL_StatusTypeDef | HAL_TIMEx_ConfigBreakDeadTime (TIM_HandleTypeDef *htim, const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig) |
Configures the Break feature, dead time, Lock level, OSSI/OSSR State and the AOE(automatic output enable). | |
HAL_StatusTypeDef | HAL_TIMEx_RemapConfig (TIM_HandleTypeDef *htim, uint32_t Remap) |
Configures the TIMx Remapping input capabilities. | |
void | HAL_TIMEx_CommutCallback (TIM_HandleTypeDef *htim) |
Commutation callback in non-blocking mode. | |
void | HAL_TIMEx_CommutHalfCpltCallback (TIM_HandleTypeDef *htim) |
Commutation half complete callback in non-blocking mode. | |
void | HAL_TIMEx_BreakCallback (TIM_HandleTypeDef *htim) |
Break detection callback in non-blocking mode. | |
HAL_TIM_StateTypeDef | HAL_TIMEx_HallSensor_GetState (const TIM_HandleTypeDef *htim) |
Return the TIM Hall Sensor interface handle state. | |
HAL_TIM_ChannelStateTypeDef | HAL_TIMEx_GetChannelNState (const TIM_HandleTypeDef *htim, uint32_t ChannelN) |
Return actual state of the TIM complementary channel. | |
void | TIMEx_DMACommutationCplt (DMA_HandleTypeDef *hdma) |
TIM DMA Commutation callback. | |
void | TIMEx_DMACommutationHalfCplt (DMA_HandleTypeDef *hdma) |
TIM DMA Commutation half complete callback. | |
TIM HAL module driver. This file provides firmware functions to manage the following functionalities of the Timer Extended peripheral:
Copyright (c) 2016 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
============================================================================== ##### TIMER Extended features ##### ============================================================================== [..] The Timer Extended features include: (#) Complementary outputs with programmable dead-time for : (++) Output Compare (++) PWM generation (Edge and Center-aligned Mode) (++) One-pulse mode output (#) Synchronization circuit to control the timer with external signals and to interconnect several timers together. (#) Break input to put the timer output signals in reset state or in a known state. (#) Supports incremental (quadrature) encoder and hall-sensor circuitry for positioning purposes ##### How to use this driver ##### ============================================================================== [..] (#) Initialize the TIM low level resources by implementing the following functions depending on the selected feature: (++) Hall Sensor output : HAL_TIMEx_HallSensor_MspInit() (#) Initialize the TIM low level resources : (##) Enable the TIM interface clock using __HAL_RCC_TIMx_CLK_ENABLE(); (##) TIM pins configuration (+++) Enable the clock for the TIM GPIOs using the following function: __HAL_RCC_GPIOx_CLK_ENABLE(); (+++) Configure these TIM pins in Alternate function mode using HAL_GPIO_Init(); (#) The external Clock can be configured, if needed (the default clock is the internal clock from the APBx), using the following function: HAL_TIM_ConfigClockSource, the clock configuration should be done before any start function. (#) Configure the TIM in the desired functioning mode using one of the initialization function of this driver: (++) HAL_TIMEx_HallSensor_Init() and HAL_TIMEx_ConfigCommutEvent(): to use the Timer Hall Sensor Interface and the commutation event with the corresponding Interrupt and DMA request if needed (Note that One Timer is used to interface with the Hall sensor Interface and another Timer should be used to use the commutation event). (#) Activate the TIM peripheral using one of the start functions: (++) Complementary Output Compare : HAL_TIMEx_OCN_Start(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_OCN_Start_IT() (++) Complementary PWM generation : HAL_TIMEx_PWMN_Start(), HAL_TIMEx_PWMN_Start_DMA(), HAL_TIMEx_PWMN_Start_IT() (++) Complementary One-pulse mode output : HAL_TIMEx_OnePulseN_Start(), HAL_TIMEx_OnePulseN_Start_IT() (++) Hall Sensor output : HAL_TIMEx_HallSensor_Start(), HAL_TIMEx_HallSensor_Start_DMA(), HAL_TIMEx_HallSensor_Start_IT().
Definition in file stm32f4xx_hal_tim_ex.c.