Peripheral Control functions.
More...
|
HAL_StatusTypeDef | HAL_TIMEx_ConfigCommutEvent (TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource) |
| Configure the TIM commutation event sequence. More...
|
|
HAL_StatusTypeDef | HAL_TIMEx_ConfigCommutEvent_IT (TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource) |
| Configure the TIM commutation event sequence with interrupt. More...
|
|
HAL_StatusTypeDef | HAL_TIMEx_ConfigCommutEvent_DMA (TIM_HandleTypeDef *htim, uint32_t InputTrigger, uint32_t CommutationSource) |
| Configure the TIM commutation event sequence with DMA. More...
|
|
HAL_StatusTypeDef | HAL_TIMEx_MasterConfigSynchronization (TIM_HandleTypeDef *htim, const TIM_MasterConfigTypeDef *sMasterConfig) |
| Configures the TIM in master mode. More...
|
|
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). More...
|
|
HAL_StatusTypeDef | HAL_TIMEx_RemapConfig (TIM_HandleTypeDef *htim, uint32_t Remap) |
| Configures the TIMx Remapping input capabilities. More...
|
|
Peripheral Control functions.
==============================================================================
##### Peripheral Control functions #####
==============================================================================
[..]
This section provides functions allowing to:
(+) Configure the commutation event in case of use of the Hall sensor interface.
(+) Configure Output channels for OC and PWM mode.
(+) Configure Complementary channels, break features and dead time.
(+) Configure Master synchronization.
(+) Configure timer remapping capabilities.
◆ HAL_TIMEx_ConfigBreakDeadTime()
Configures the Break feature, dead time, Lock level, OSSI/OSSR State and the AOE(automatic output enable).
- Parameters
-
htim | TIM handle |
sBreakDeadTimeConfig | pointer to a TIM_ConfigBreakDeadConfigTypeDef structure that contains the BDTR Register configuration information for the TIM peripheral. |
- Note
- Interrupts can be generated when an active level is detected on the break input, the break 2 input or the system break input. Break interrupt can be enabled by calling the __HAL_TIM_ENABLE_IT macro.
- Return values
-
Definition at line 2015 of file stm32f4xx_hal_tim_ex.c.
◆ HAL_TIMEx_ConfigCommutEvent()
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent |
( |
TIM_HandleTypeDef * |
htim, |
|
|
uint32_t |
InputTrigger, |
|
|
uint32_t |
CommutationSource |
|
) |
| |
Configure the TIM commutation event sequence.
- Note
- This function is mandatory to use the commutation event in order to update the configuration at each commutation detection on the TRGI input of the Timer, the typical use of this feature is with the use of another Timer(interface Timer) configured in Hall sensor interface, this interface Timer will generate the commutation at its TRGO output (connected to Timer used in this function) each time the TI1 of the Interface Timer detect a commutation at its input TI1.
- Parameters
-
htim | TIM handle |
InputTrigger | the Internal trigger corresponding to the Timer Interfacing with the Hall sensor This parameter can be one of the following values:
- TIM_TS_ITR0: Internal trigger 0 selected
- TIM_TS_ITR1: Internal trigger 1 selected
- TIM_TS_ITR2: Internal trigger 2 selected
- TIM_TS_ITR3: Internal trigger 3 selected
- TIM_TS_NONE: No trigger is needed
|
CommutationSource | the Commutation Event source This parameter can be one of the following values:
- TIM_COMMUTATION_TRGI: Commutation source is the TRGI of the Interface Timer
- TIM_COMMUTATION_SOFTWARE: Commutation source is set by software using the COMG bit
|
- Return values
-
Definition at line 1792 of file stm32f4xx_hal_tim_ex.c.
◆ HAL_TIMEx_ConfigCommutEvent_DMA()
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_DMA |
( |
TIM_HandleTypeDef * |
htim, |
|
|
uint32_t |
InputTrigger, |
|
|
uint32_t |
CommutationSource |
|
) |
| |
Configure the TIM commutation event sequence with DMA.
- Note
- This function is mandatory to use the commutation event in order to update the configuration at each commutation detection on the TRGI input of the Timer, the typical use of this feature is with the use of another Timer(interface Timer) configured in Hall sensor interface, this interface Timer will generate the commutation at its TRGO output (connected to Timer used in this function) each time the TI1 of the Interface Timer detect a commutation at its input TI1.
-
The user should configure the DMA in his own software, in This function only the COMDE bit is set
- Parameters
-
htim | TIM handle |
InputTrigger | the Internal trigger corresponding to the Timer Interfacing with the Hall sensor This parameter can be one of the following values:
- TIM_TS_ITR0: Internal trigger 0 selected
- TIM_TS_ITR1: Internal trigger 1 selected
- TIM_TS_ITR2: Internal trigger 2 selected
- TIM_TS_ITR3: Internal trigger 3 selected
- TIM_TS_NONE: No trigger is needed
|
CommutationSource | the Commutation Event source This parameter can be one of the following values:
- TIM_COMMUTATION_TRGI: Commutation source is the TRGI of the Interface Timer
- TIM_COMMUTATION_SOFTWARE: Commutation source is set by software using the COMG bit
|
- Return values
-
Definition at line 1905 of file stm32f4xx_hal_tim_ex.c.
◆ HAL_TIMEx_ConfigCommutEvent_IT()
HAL_StatusTypeDef HAL_TIMEx_ConfigCommutEvent_IT |
( |
TIM_HandleTypeDef * |
htim, |
|
|
uint32_t |
InputTrigger, |
|
|
uint32_t |
CommutationSource |
|
) |
| |
Configure the TIM commutation event sequence with interrupt.
- Note
- This function is mandatory to use the commutation event in order to update the configuration at each commutation detection on the TRGI input of the Timer, the typical use of this feature is with the use of another Timer(interface Timer) configured in Hall sensor interface, this interface Timer will generate the commutation at its TRGO output (connected to Timer used in this function) each time the TI1 of the Interface Timer detect a commutation at its input TI1.
- Parameters
-
htim | TIM handle |
InputTrigger | the Internal trigger corresponding to the Timer Interfacing with the Hall sensor This parameter can be one of the following values:
- TIM_TS_ITR0: Internal trigger 0 selected
- TIM_TS_ITR1: Internal trigger 1 selected
- TIM_TS_ITR2: Internal trigger 2 selected
- TIM_TS_ITR3: Internal trigger 3 selected
- TIM_TS_NONE: No trigger is needed
|
CommutationSource | the Commutation Event source This parameter can be one of the following values:
- TIM_COMMUTATION_TRGI: Commutation source is the TRGI of the Interface Timer
- TIM_COMMUTATION_SOFTWARE: Commutation source is set by software using the COMG bit
|
- Return values
-
Definition at line 1848 of file stm32f4xx_hal_tim_ex.c.
◆ HAL_TIMEx_MasterConfigSynchronization()
Configures the TIM in master mode.
- Parameters
-
htim | TIM handle. |
sMasterConfig | pointer to a TIM_MasterConfigTypeDef structure that contains the selected trigger output (TRGO) and the Master/Slave mode. |
- Return values
-
Definition at line 1954 of file stm32f4xx_hal_tim_ex.c.
◆ HAL_TIMEx_RemapConfig()
Configures the TIMx Remapping input capabilities.
- Parameters
-
htim | TIM handle. |
Remap | specifies the TIM remapping source. For TIM1, the parameter can have the following values: (**)
- TIM_TIM1_TIM3_TRGO: TIM1 ITR2 is connected to TIM3 TRGO
- TIM_TIM1_LPTIM: TIM1 ITR2 is connected to LPTIM1 output
For TIM2, the parameter can have the following values: (**)
- TIM_TIM2_TIM8_TRGO: TIM2 ITR1 is connected to TIM8 TRGO (*)
- TIM_TIM2_ETH_PTP: TIM2 ITR1 is connected to PTP trigger output (*)
- TIM_TIM2_USBFS_SOF: TIM2 ITR1 is connected to OTG FS SOF
- TIM_TIM2_USBHS_SOF: TIM2 ITR1 is connected to OTG FS SOF
For TIM5, the parameter can have the following values:
- TIM_TIM5_GPIO: TIM5 TI4 is connected to GPIO
- TIM_TIM5_LSI: TIM5 TI4 is connected to LSI
- TIM_TIM5_LSE: TIM5 TI4 is connected to LSE
- TIM_TIM5_RTC: TIM5 TI4 is connected to the RTC wakeup interrupt
- TIM_TIM5_TIM3_TRGO: TIM5 ITR1 is connected to TIM3 TRGO (*)
- TIM_TIM5_LPTIM: TIM5 ITR1 is connected to LPTIM1 output (*)
For TIM9, the parameter can have the following values: (**)
- TIM_TIM9_TIM3_TRGO: TIM9 ITR1 is connected to TIM3 TRGO
- TIM_TIM9_LPTIM: TIM9 ITR1 is connected to LPTIM1 output
For TIM11, the parameter can have the following values:
- TIM_TIM11_GPIO: TIM11 TI1 is connected to GPIO
- TIM_TIM11_HSE: TIM11 TI1 is connected to HSE_RTC clock
- TIM_TIM11_SPDIFRX: TIM11 TI1 is connected to SPDIFRX_FRAME_SYNC (*)
(*) Value not defined in all devices.
(**) Register not available in all devices. |
- Return values
-
Definition at line 2091 of file stm32f4xx_hal_tim_ex.c.