HAL TIM Extension Driver
Field Documentation
uint32_t TIM_BreakDeadTimeConfigTypeDef::OffStateRunMode
TIM off state in run mode. This parameter can be a value of
TIM_OSSR_Off_State_Selection_for_Run_mode_state
uint32_t TIM_BreakDeadTimeConfigTypeDef::OffStateIDLEMode
TIM off state in IDLE mode. This parameter can be a value of
TIM_OSSI_Off_State_Selection_for_Idle_mode_state
uint32_t TIM_BreakDeadTimeConfigTypeDef::LockLevel
TIM Lock level. This parameter can be a value of
uint32_t TIM_BreakDeadTimeConfigTypeDef::DeadTime
TIM dead Time. This parameter can be a number between Min_Data = 0x00 and
Max_Data = 0xFF
uint32_t TIM_BreakDeadTimeConfigTypeDef::BreakState
TIM Break State. This parameter can be a value of
TIM_Break_Input_enable_disable
uint32_t TIM_BreakDeadTimeConfigTypeDef::BreakPolarity
TIM Break input polarity. This parameter can be a value of
uint32_t TIM_BreakDeadTimeConfigTypeDef::AutomaticOutput
TIM Automatic Output Enable state. This parameter can be a value of
TIM_AOE_Bit_Set_Reset
46.2
TIMEx Firmware driver API description
46.2.1
TIMER Extended features
The Timer Extension features include:
1.
Complementary outputs with programmable dead-time for :
2.
Synchronization circuit to control the timer with external signals and to interconnect
several timers together.
3.
Break input to put the timer output signals in reset state or in a known state.
4.
Supports incremental (quadrature) encoder and hall-sensor circuitry for positioning
purposes
46.2.2
How to use this driver
1.
Initialize the TIM low level resources by implementing the following functions
depending from feature used :
2.
Initialize the TIM low level resources :
a.
b.
3.
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.
630/1371
Input Capture
Output Compare
PWM generation (Edge and Center-aligned Mode)
One-pulse mode output
Complementary Output Compare : HAL_TIM_OC_MspInit()
Complementary PWM generation : HAL_TIM_PWM_MspInit()
Complementary One-pulse mode output : HAL_TIM_OnePulse_MspInit()
Hall Sensor output : HAL_TIM_HallSensor_MspInit()
Enable the TIM interface clock using __TIMx_CLK_ENABLE();
TIM pins configuration
Enable the clock for the TIM GPIOs using the following function:
__GPIOx_CLK_ENABLE();
Configure these TIM pins in Alternate function mode using HAL_GPIO_Init();
DocID028236 Rev 2
TIM_Lock_level
TIM_Break_Polarity
UM1940
Need help?
Do you have a question about the STM32F2 and is the answer not in the manual?