思澈科技软件开发工具包  2.20

Functions

HAL_StatusTypeDef HAL_GPT_OC_ConfigChannel (GPT_HandleTypeDef *htim, GPT_OC_InitTypeDef *sConfig, uint32_t Channel)
 Initializes the TIM Output Compare Channels according to the specified parameters in the GPT_OC_InitTypeDef. More...
 
HAL_StatusTypeDef HAL_GPT_IC_ConfigChannel (GPT_HandleTypeDef *htim, GPT_IC_InitTypeDef *sConfig, uint32_t Channel)
 Initializes the TIM Input Capture Channels according to the specified parameters in the GPT_IC_InitTypeDef. More...
 
HAL_StatusTypeDef HAL_GPT_PWM_ConfigChannel (GPT_HandleTypeDef *htim, GPT_OC_InitTypeDef *sConfig, uint32_t Channel)
 Initializes the TIM PWM channels according to the specified parameters in the GPT_OC_InitTypeDef. More...
 
HAL_StatusTypeDef HAL_GPT_OnePulse_ConfigChannel (GPT_HandleTypeDef *htim, GPT_OnePulse_InitTypeDef *sConfig, uint32_t OutputChannel, uint32_t InputChannel)
 Initializes the TIM One Pulse Channels according to the specified parameters in the GPT_OnePulse_InitTypeDef. More...
 
HAL_StatusTypeDef HAL_GPT_ConfigOCrefClear (GPT_HandleTypeDef *htim, GPT_ClearInputConfigTypeDef *sClearInputConfig, uint32_t Channel)
 Configures the OCRef clear feature. More...
 
HAL_StatusTypeDef HAL_GPT_ConfigClockSource (GPT_HandleTypeDef *htim, GPT_ClockConfigTypeDef *sClockSourceConfig)
 Configures the clock source to be used. More...
 
HAL_StatusTypeDef HAL_GPT_ConfigTI1Input (GPT_HandleTypeDef *htim, uint32_t TI1_Selection)
 Selects the signal connected to the TI1 input: direct from CH1_input or a XOR combination between CH1_input, CH2_input & CH3_input. More...
 
HAL_StatusTypeDef HAL_GPT_SlaveConfigSynchronization (GPT_HandleTypeDef *htim, GPT_SlaveConfigTypeDef *sSlaveConfig)
 Configures the TIM in Slave mode. More...
 
HAL_StatusTypeDef HAL_GPT_SlaveConfigSynchronization_IT (GPT_HandleTypeDef *htim, GPT_SlaveConfigTypeDef *sSlaveConfig)
 Configures the TIM in Slave mode in interrupt mode. More...
 
HAL_StatusTypeDef HAL_GPT_DMABurst_WriteStart (GPT_HandleTypeDef *htim, uint32_t BurstBaseAddress, uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength)
 Configure the DMA Burst to transfer Data from the memory to the TIM peripheral. More...
 
HAL_StatusTypeDef HAL_GPT_DMABurst_WriteStop (GPT_HandleTypeDef *htim, uint32_t BurstRequestSrc)
 Stops the TIM DMA Burst mode. More...
 
HAL_StatusTypeDef HAL_GPT_DMABurst_ReadStart (GPT_HandleTypeDef *htim, uint32_t BurstBaseAddress, uint32_t BurstRequestSrc, uint32_t *BurstBuffer, uint32_t BurstLength)
 Configure the DMA Burst to transfer Data from the TIM peripheral to the memory. More...
 
HAL_StatusTypeDef HAL_GPT_DMABurst_ReadStop (GPT_HandleTypeDef *htim, uint32_t BurstRequestSrc)
 Stop the DMA burst reading. More...
 
HAL_StatusTypeDef HAL_GPT_GenerateEvent (GPT_HandleTypeDef *htim, uint32_t EventSource)
 Generate a software event. More...
 
uint32_t HAL_GPT_ReadCapturedValue (GPT_HandleTypeDef *htim, uint32_t Channel)
 Read the captured value from Capture Compare unit. More...
 

Detailed Description

Function Documentation

◆ HAL_GPT_ConfigClockSource()

HAL_StatusTypeDef HAL_GPT_ConfigClockSource ( GPT_HandleTypeDef htim,
GPT_ClockConfigTypeDef sClockSourceConfig 
)

Configures the clock source to be used.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
sClockSourceConfigpointer to a GPT_ClockConfigTypeDef structure that contains the clock source information for the TIM peripheral.
Return values
HALstatus

◆ HAL_GPT_ConfigOCrefClear()

HAL_StatusTypeDef HAL_GPT_ConfigOCrefClear ( GPT_HandleTypeDef htim,
GPT_ClearInputConfigTypeDef sClearInputConfig,
uint32_t  Channel 
)

Configures the OCRef clear feature.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
sClearInputConfigpointer to a GPT_ClearInputConfigTypeDef structure that contains the OCREF clear feature and parameters for the TIM peripheral.
Channelspecifies the TIM Channel. This parameter can be one of the following values:
  • GPT_CHANNEL_1: TIM Channel 1 selected
  • GPT_CHANNEL_2: TIM Channel 2 selected
  • GPT_CHANNEL_3: TIM Channel 3 selected
  • GPT_CHANNEL_4: TIM Channel 4 selected
Return values
HALstatus

◆ HAL_GPT_ConfigTI1Input()

HAL_StatusTypeDef HAL_GPT_ConfigTI1Input ( GPT_HandleTypeDef htim,
uint32_t  TI1_Selection 
)

Selects the signal connected to the TI1 input: direct from CH1_input or a XOR combination between CH1_input, CH2_input & CH3_input.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
TI1_SelectionIndicate whether or not channel 1 is connected to the output of a XOR gate. This parameter can be one of the following values:
  • GPT_TI1SELECTION_CH1: The TIMx_CH1 pin is connected to TI1 input
  • GPT_TI1SELECTION_XORCOMBINATION: The TIMx_CH1, CH2 and CH3 pins are connected to the TI1 input (XOR combination)
Return values
HALstatus

◆ HAL_GPT_DMABurst_ReadStart()

HAL_StatusTypeDef HAL_GPT_DMABurst_ReadStart ( GPT_HandleTypeDef htim,
uint32_t  BurstBaseAddress,
uint32_t  BurstRequestSrc,
uint32_t *  BurstBuffer,
uint32_t  BurstLength 
)

Configure the DMA Burst to transfer Data from the TIM peripheral to the memory.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
BurstBaseAddressTIM Base address from when the DMA will starts the Data read. This parameters can be on of the following values:
  • GPT_DMABASE_CR1
  • GPT_DMABASE_CR2
  • GPT_DMABASE_SMCR
  • GPT_DMABASE_DIER
  • GPT_DMABASE_SR
  • GPT_DMABASE_EGR
  • GPT_DMABASE_CCMR1
  • GPT_DMABASE_CCMR2
  • GPT_DMABASE_CCER
  • GPT_DMABASE_CNT
  • GPT_DMABASE_PSC
  • GPT_DMABASE_ARR
  • GPT_DMABASE_RCR
  • GPT_DMABASE_CCR1
  • GPT_DMABASE_CCR2
  • GPT_DMABASE_CCR3
  • GPT_DMABASE_CCR4
  • GPT_DMABASE_BDTR
  • GPT_DMABASE_DCR
BurstRequestSrcTIM DMA Request sources. This parameters can be on of the following values:
  • GPT_DMA_UPDATE: TIM update Interrupt source
  • GPT_DMA_CC1: TIM Capture Compare 1 DMA source
  • GPT_DMA_CC2: TIM Capture Compare 2 DMA source
  • GPT_DMA_CC3: TIM Capture Compare 3 DMA source
  • GPT_DMA_CC4: TIM Capture Compare 4 DMA source
  • GPT_DMA_COM: TIM Commutation DMA source
  • GPT_DMA_TRIGGER: TIM Trigger DMA source
BurstBufferThe Buffer address.
BurstLengthDMA Burst length. This parameter can be one value between GPT_DMABURSTLENGTH_1TRANSFER and GPT_DMABURSTLENGTH_18TRANSFERS.
Return values
HALstatus

◆ HAL_GPT_DMABurst_ReadStop()

HAL_StatusTypeDef HAL_GPT_DMABurst_ReadStop ( GPT_HandleTypeDef htim,
uint32_t  BurstRequestSrc 
)

Stop the DMA burst reading.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
BurstRequestSrcTIM DMA Request sources to disable.
Return values
HALstatus

◆ HAL_GPT_DMABurst_WriteStart()

HAL_StatusTypeDef HAL_GPT_DMABurst_WriteStart ( GPT_HandleTypeDef htim,
uint32_t  BurstBaseAddress,
uint32_t  BurstRequestSrc,
uint32_t *  BurstBuffer,
uint32_t  BurstLength 
)

Configure the DMA Burst to transfer Data from the memory to the TIM peripheral.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
BurstBaseAddressTIM Base address from when the DMA will starts the Data write. This parameters can be on of the following values:
  • GPT_DMABASE_CR1
  • GPT_DMABASE_CR2
  • GPT_DMABASE_SMCR
  • GPT_DMABASE_DIER
  • GPT_DMABASE_SR
  • GPT_DMABASE_EGR
  • GPT_DMABASE_CCMR1
  • GPT_DMABASE_CCMR2
  • GPT_DMABASE_CCER
  • GPT_DMABASE_CNT
  • GPT_DMABASE_PSC
  • GPT_DMABASE_ARR
  • GPT_DMABASE_RCR
  • GPT_DMABASE_CCR1
  • GPT_DMABASE_CCR2
  • GPT_DMABASE_CCR3
  • GPT_DMABASE_CCR4
  • GPT_DMABASE_BDTR
  • GPT_DMABASE_DCR
BurstRequestSrcTIM DMA Request sources. This parameters can be on of the following values:
  • GPT_DMA_UPDATE: TIM update Interrupt source
  • GPT_DMA_CC1: TIM Capture Compare 1 DMA source
  • GPT_DMA_CC2: TIM Capture Compare 2 DMA source
  • GPT_DMA_CC3: TIM Capture Compare 3 DMA source
  • GPT_DMA_CC4: TIM Capture Compare 4 DMA source
  • GPT_DMA_COM: TIM Commutation DMA source
  • GPT_DMA_TRIGGER: TIM Trigger DMA source
BurstBufferThe Buffer address.
BurstLengthDMA Burst length. This parameter can be one value between GPT_DMABURSTLENGTH_1TRANSFER and GPT_DMABURSTLENGTH_18TRANSFERS.
Return values
HALstatus

◆ HAL_GPT_DMABurst_WriteStop()

HAL_StatusTypeDef HAL_GPT_DMABurst_WriteStop ( GPT_HandleTypeDef htim,
uint32_t  BurstRequestSrc 
)

Stops the TIM DMA Burst mode.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
BurstRequestSrcTIM DMA Request sources to disable
Return values
HALstatus

◆ HAL_GPT_GenerateEvent()

HAL_StatusTypeDef HAL_GPT_GenerateEvent ( GPT_HandleTypeDef htim,
uint32_t  EventSource 
)

Generate a software event.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
EventSourcespecifies the event source. This parameter can be one of the following values:
  • GPT_EVENTSOURCE_UPDATE: Timer update Event source
  • GPT_EVENTSOURCE_CC1: Timer Capture Compare 1 Event source
  • GPT_EVENTSOURCE_CC2: Timer Capture Compare 2 Event source
  • GPT_EVENTSOURCE_CC3: Timer Capture Compare 3 Event source
  • GPT_EVENTSOURCE_CC4: Timer Capture Compare 4 Event source
  • GPT_EVENTSOURCE_COM: Timer COM event source
  • GPT_EVENTSOURCE_TRIGGER: Timer Trigger Event source
  • GPT_EVENTSOURCE_BREAK: Timer Break event source
Note
TIM6 and TIM7 can only generate an update event.
GPT_EVENTSOURCE_COM and GPT_EVENTSOURCE_BREAK are used only with TIM1 and TIM8.
Return values
HALstatus

◆ HAL_GPT_IC_ConfigChannel()

HAL_StatusTypeDef HAL_GPT_IC_ConfigChannel ( GPT_HandleTypeDef htim,
GPT_IC_InitTypeDef sConfig,
uint32_t  Channel 
)

Initializes the TIM Input Capture Channels according to the specified parameters in the GPT_IC_InitTypeDef.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
sConfigTIM Input Capture configuration structure
ChannelTIM Channels to be enabled. This parameter can be one of the following values:
  • GPT_CHANNEL_1: TIM Channel 1 selected
  • GPT_CHANNEL_2: TIM Channel 2 selected
  • GPT_CHANNEL_3: TIM Channel 3 selected
  • GPT_CHANNEL_4: TIM Channel 4 selected
Return values
HALstatus

◆ HAL_GPT_OC_ConfigChannel()

HAL_StatusTypeDef HAL_GPT_OC_ConfigChannel ( GPT_HandleTypeDef htim,
GPT_OC_InitTypeDef sConfig,
uint32_t  Channel 
)

Initializes the TIM Output Compare Channels according to the specified parameters in the GPT_OC_InitTypeDef.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
sConfigTIM Output Compare configuration structure
ChannelTIM Channels to be enabled. This parameter can be one of the following values:
  • GPT_CHANNEL_1: TIM Channel 1 selected
  • GPT_CHANNEL_2: TIM Channel 2 selected
  • GPT_CHANNEL_3: TIM Channel 3 selected
  • GPT_CHANNEL_4: TIM Channel 4 selected
Return values
HALstatus

◆ HAL_GPT_OnePulse_ConfigChannel()

HAL_StatusTypeDef HAL_GPT_OnePulse_ConfigChannel ( GPT_HandleTypeDef htim,
GPT_OnePulse_InitTypeDef sConfig,
uint32_t  OutputChannel,
uint32_t  InputChannel 
)

Initializes the TIM One Pulse Channels according to the specified parameters in the GPT_OnePulse_InitTypeDef.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
sConfigTIM One Pulse configuration structure
OutputChannelTIM Channels to be enabled. This parameter can be one of the following values:
  • GPT_CHANNEL_1: TIM Channel 1 selected
  • GPT_CHANNEL_2: TIM Channel 2 selected
InputChannelTIM Channels to be enabled. This parameter can be one of the following values:
  • GPT_CHANNEL_1: TIM Channel 1 selected
  • GPT_CHANNEL_2: TIM Channel 2 selected
Return values
HALstatus

◆ HAL_GPT_PWM_ConfigChannel()

HAL_StatusTypeDef HAL_GPT_PWM_ConfigChannel ( GPT_HandleTypeDef htim,
GPT_OC_InitTypeDef sConfig,
uint32_t  Channel 
)

Initializes the TIM PWM channels according to the specified parameters in the GPT_OC_InitTypeDef.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
sConfigTIM PWM configuration structure
ChannelTIM Channels to be enabled. This parameter can be one of the following values:
  • GPT_CHANNEL_1: TIM Channel 1 selected
  • GPT_CHANNEL_2: TIM Channel 2 selected
  • GPT_CHANNEL_3: TIM Channel 3 selected
  • GPT_CHANNEL_4: TIM Channel 4 selected
Return values
HALstatus

◆ HAL_GPT_ReadCapturedValue()

uint32_t HAL_GPT_ReadCapturedValue ( GPT_HandleTypeDef htim,
uint32_t  Channel 
)

Read the captured value from Capture Compare unit.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
ChannelTIM Channels to be enabled. This parameter can be one of the following values:
  • GPT_CHANNEL_1: TIM Channel 1 selected
  • GPT_CHANNEL_2: TIM Channel 2 selected
  • GPT_CHANNEL_3: TIM Channel 3 selected
  • GPT_CHANNEL_4: TIM Channel 4 selected
Return values
Capturedvalue

◆ HAL_GPT_SlaveConfigSynchronization()

HAL_StatusTypeDef HAL_GPT_SlaveConfigSynchronization ( GPT_HandleTypeDef htim,
GPT_SlaveConfigTypeDef sSlaveConfig 
)

Configures the TIM in Slave mode.

Parameters
htimpointer to a GPT_HandleTypeDef structure that contains the configuration information for TIM module.
sSlaveConfigpointer to a GPT_SlaveConfigTypeDef structure that contains the selected trigger (internal trigger input, filtered timer input or external trigger input) and the ) and the Slave mode (Disable, Reset, Gated, Trigger, External clock mode 1).
Return values
HALstatus

◆ HAL_GPT_SlaveConfigSynchronization_IT()

HAL_StatusTypeDef HAL_GPT_SlaveConfigSynchronization_IT ( GPT_HandleTypeDef htim,
GPT_SlaveConfigTypeDef sSlaveConfig 
)

Configures the TIM in Slave mode in interrupt mode.

Parameters
htimTIM handle.
sSlaveConfigpointer to a GPT_SlaveConfigTypeDef structure that contains the selected trigger (internal trigger input, filtered timer input or external trigger input) and the ) and the Slave mode (Disable, Reset, Gated, Trigger, External clock mode 1).
Return values
HALstatus