Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

UM1725

HAL TIM Extension Driver

 

Timer detect a commutation at its input TI1.

59.2.38HAL_TIMEx_ConfigCommutationEvent_DMA

Function Name

HAL_StatusTypeDef

 

HAL_TIMEx_ConfigCommutationEvent_DMA

 

(TIM_HandleTypeDef * htim, uint32_t InputTrigger, uint32_t

 

CommutationSource)

Function Description

Configure the TIM commutation event sequence with DMA.

Parameters

 

htim: pointer to a TIM_HandleTypeDef structure that

 

 

contains the configuration information for TIM module.

 

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

 

 

selectedTIM_TS_ITR1: Internal trigger 1

 

 

selectedTIM_TS_ITR2: Internal trigger 2

 

 

selectedTIM_TS_ITR3: Internal trigger 3

 

 

selectedTIM_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

 

 

TimerTIM_COMMUTATION_SOFTWARE: Commutation

 

 

source is set by software using the COMG bit

Return values

 

HAL status

Notes

 

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

59.2.39HAL_TIMEx_MasterConfigSynchronization

Function Name

HAL_StatusTypeDef

 

HAL_TIMEx_MasterConfigSynchronization

 

(TIM_HandleTypeDef * htim, TIM_MasterConfigTypeDef *

 

sMasterConfig)

Function Description

Configures the TIM in master mode.

Parameters

 

htim: pointer to a TIM_HandleTypeDef structure that

 

 

contains the configuration information for TIM module.

 

 

sMasterConfig: pointer to a TIM_MasterConfigTypeDef

 

 

structure that contains the selected trigger output (TRGO) and

 

 

the Master/Slave mode.

Return values

 

HAL status

59.2.40HAL_TIMEx_ConfigBreakDeadTime

DOCID025834 Rev 2

839/900

HAL TIM Extension Driver

 

UM1725

Function Name

HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime

 

(TIM_HandleTypeDef * htim,

 

TIM_BreakDeadTimeConfigTypeDef * sBreakDeadTimeConfig)

Function Description

Configures the Break feature, dead time, Lock level, OSSI/OSSR

 

State and the AOE(automatic output enable).

Parameters

 

htim: pointer to a TIM_HandleTypeDef structure that

 

 

contains the configuration information for TIM module.

 

sBreakDeadTimeConfig: pointer to a

 

 

TIM_ConfigBreakDeadConfig_TypeDef structure that

 

 

contains the BDTR Register configuration information for the

 

 

TIM peripheral.

Return values

 

HAL status

59.2.41HAL_TIMEx_RemapConfig

Function Name

HAL_StatusTypeDef HAL_TIMEx_RemapConfig

 

(TIM_HandleTypeDef * htim, uint32_t Remap)

Function Description

Configures the TIM2, TIM5 and TIM11 Remapping input

 

capabilities.

Parameters

 

htim: pointer to a TIM_HandleTypeDef structure that

 

 

contains the configuration information for TIM module.

 

Remap: specifies the TIM input remapping source. This

 

 

parameter can be one of the following values:

 

 

TIM_TIM2_TIM8_TRGO: TIM2 ITR1 input is connected to

 

 

TIM8 Trigger output(default)TIM_TIM2_ETH_PTP: TIM2 ITR1

 

 

input is connected to ETH PTP trigger

 

 

output.TIM_TIM2_USBFS_SOF: TIM2 ITR1 input is

 

 

connected to USB FS SOF.TIM_TIM2_USBHS_SOF: TIM2

 

 

ITR1 input is connected to USB HS SOF.TIM_TIM5_GPIO:

 

 

TIM5 CH4 input is connected to dedicated Timer

 

 

pin(default)TIM_TIM5_LSI: TIM5 CH4 input is connected to

 

 

LSI clock.TIM_TIM5_LSE: TIM5 CH4 input is connected to

 

 

LSE clock.TIM_TIM5_RTC: TIM5 CH4 input is connected to

 

 

RTC Output event.TIM_TIM11_GPIO: TIM11 CH4 input is

 

 

connected to dedicated Timer pin(default)TIM_TIM11_HSE:

 

 

TIM11 CH4 input is connected to HSE_RTC clock (HSE

 

 

divided by a programmable prescaler)

Return values

 

HAL status

59.2.42HAL_TIMEx_CommutationCallback

Function Name

void HAL_TIMEx_CommutationCallback (TIM_HandleTypeDef

 

* htim)

Function Description

Hall commutation changed callback in non blocking mode.

Parameters

 

htim: pointer to a TIM_HandleTypeDef structure that

 

 

contains the configuration information for TIM module.

Return values

 

None

59.2.43HAL_TIMEx_BreakCallback

840/900

DOCID025834 Rev 2

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]