STM32L443xx HAL User Manual
Functions
TIM Time Base functions
TIM Exported Functions

Time Base functions. More...

Functions

HAL_StatusTypeDef HAL_TIM_Base_Init (TIM_HandleTypeDef *htim)
 Initializes the TIM Time base Unit according to the specified parameters in the TIM_HandleTypeDef and initialize the associated handle.
HAL_StatusTypeDef HAL_TIM_Base_DeInit (TIM_HandleTypeDef *htim)
 DeInitializes the TIM Base peripheral.
__weak void HAL_TIM_Base_MspInit (TIM_HandleTypeDef *htim)
 Initializes the TIM Base MSP.
__weak void HAL_TIM_Base_MspDeInit (TIM_HandleTypeDef *htim)
 DeInitializes TIM Base MSP.
HAL_StatusTypeDef HAL_TIM_Base_Start (TIM_HandleTypeDef *htim)
 Starts the TIM Base generation.
HAL_StatusTypeDef HAL_TIM_Base_Stop (TIM_HandleTypeDef *htim)
 Stops the TIM Base generation.
HAL_StatusTypeDef HAL_TIM_Base_Start_IT (TIM_HandleTypeDef *htim)
 Starts the TIM Base generation in interrupt mode.
HAL_StatusTypeDef HAL_TIM_Base_Stop_IT (TIM_HandleTypeDef *htim)
 Stops the TIM Base generation in interrupt mode.
HAL_StatusTypeDef HAL_TIM_Base_Start_DMA (TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length)
 Starts the TIM Base generation in DMA mode.
HAL_StatusTypeDef HAL_TIM_Base_Stop_DMA (TIM_HandleTypeDef *htim)
 Stops the TIM Base generation in DMA mode.

Detailed Description

Time Base functions.

  ==============================================================================
              ##### Time Base functions #####
  ==============================================================================
  [..]
    This section provides functions allowing to:
    (+) Initialize and configure the TIM base.
    (+) De-initialize the TIM base.
    (+) Start the Time Base.
    (+) Stop the Time Base.
    (+) Start the Time Base and enable interrupt.
    (+) Stop the Time Base and disable interrupt.
    (+) Start the Time Base and enable DMA transfer.
    (+) Stop the Time Base and disable DMA transfer.


Function Documentation

HAL_StatusTypeDef HAL_TIM_Base_DeInit ( TIM_HandleTypeDef htim)
HAL_StatusTypeDef HAL_TIM_Base_Init ( TIM_HandleTypeDef htim)

Initializes the TIM Time base Unit according to the specified parameters in the TIM_HandleTypeDef and initialize the associated handle.

Note:
Switching from Center Aligned counter mode to Edge counter mode (or reverse) requires a timer reset to avoid unexpected direction due to DIR bit readonly in center aligned mode. Ex: call HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init()
Parameters:
htimTIM Base handle
Return values:
HALstatus

Definition at line 269 of file stm32l4xx_hal_tim.c.

References assert_param, TIM_Base_InitTypeDef::AutoReloadPreload, __TIM_HandleTypeDef::Base_MspInitCallback, TIM_Base_InitTypeDef::ClockDivision, TIM_Base_InitTypeDef::CounterMode, __TIM_HandleTypeDef::DMABurstState, HAL_DMA_BURST_STATE_READY, HAL_TIM_Base_MspInit(), HAL_TIM_CHANNEL_STATE_READY, HAL_TIM_STATE_BUSY, HAL_TIM_STATE_READY, HAL_TIM_STATE_RESET, __TIM_HandleTypeDef::Init, __TIM_HandleTypeDef::Instance, IS_TIM_AUTORELOAD_PRELOAD, IS_TIM_CLOCKDIVISION_DIV, IS_TIM_COUNTER_MODE, __TIM_HandleTypeDef::Lock, __TIM_HandleTypeDef::State, TIM_Base_SetConfig(), TIM_CHANNEL_N_STATE_SET_ALL, TIM_CHANNEL_STATE_SET_ALL, and TIM_ResetCallback().

DeInitializes TIM Base MSP.

Parameters:
htimTIM Base handle
Return values:
None

Definition at line 386 of file stm32l4xx_hal_tim.c.

Referenced by HAL_TIM_Base_DeInit(), and HAL_TIM_UnRegisterCallback().

Initializes the TIM Base MSP.

Parameters:
htimTIM Base handle
Return values:
None

Definition at line 371 of file stm32l4xx_hal_tim.c.

Referenced by HAL_TIM_Base_Init(), and HAL_TIM_UnRegisterCallback().

HAL_StatusTypeDef HAL_TIM_Base_Start ( TIM_HandleTypeDef htim)

Starts the TIM Base generation.

Parameters:
htimTIM Base handle
Return values:
HALstatus

Definition at line 402 of file stm32l4xx_hal_tim.c.

References __HAL_TIM_ENABLE, assert_param, HAL_TIM_STATE_BUSY, HAL_TIM_STATE_READY, __TIM_HandleTypeDef::Instance, IS_TIM_SLAVEMODE_TRIGGER_ENABLED, and __TIM_HandleTypeDef::State.

HAL_StatusTypeDef HAL_TIM_Base_Start_DMA ( TIM_HandleTypeDef htim,
uint32_t *  pData,
uint16_t  Length 
)
HAL_StatusTypeDef HAL_TIM_Base_Start_IT ( TIM_HandleTypeDef htim)

Starts the TIM Base generation in interrupt mode.

Parameters:
htimTIM Base handle
Return values:
HALstatus

Definition at line 461 of file stm32l4xx_hal_tim.c.

References __HAL_TIM_ENABLE, __HAL_TIM_ENABLE_IT, assert_param, HAL_TIM_STATE_BUSY, HAL_TIM_STATE_READY, __TIM_HandleTypeDef::Instance, IS_TIM_SLAVEMODE_TRIGGER_ENABLED, __TIM_HandleTypeDef::State, and TIM_IT_UPDATE.

HAL_StatusTypeDef HAL_TIM_Base_Stop ( TIM_HandleTypeDef htim)

Stops the TIM Base generation.

Parameters:
htimTIM Base handle
Return values:
HALstatus

Definition at line 441 of file stm32l4xx_hal_tim.c.

References __HAL_TIM_DISABLE, assert_param, HAL_TIM_STATE_READY, __TIM_HandleTypeDef::Instance, and __TIM_HandleTypeDef::State.

HAL_StatusTypeDef HAL_TIM_Base_Stop_DMA ( TIM_HandleTypeDef htim)

Stops the TIM Base generation in DMA mode.

Parameters:
htimTIM Base handle
Return values:
HALstatus

Definition at line 597 of file stm32l4xx_hal_tim.c.

References __HAL_TIM_DISABLE, __HAL_TIM_DISABLE_DMA, assert_param, HAL_DMA_Abort_IT(), HAL_TIM_STATE_READY, __TIM_HandleTypeDef::hdma, __TIM_HandleTypeDef::Instance, __TIM_HandleTypeDef::State, TIM_DMA_ID_UPDATE, and TIM_DMA_UPDATE.

HAL_StatusTypeDef HAL_TIM_Base_Stop_IT ( TIM_HandleTypeDef htim)

Stops the TIM Base generation in interrupt mode.

Parameters:
htimTIM Base handle
Return values:
HALstatus

Definition at line 503 of file stm32l4xx_hal_tim.c.

References __HAL_TIM_DISABLE, __HAL_TIM_DISABLE_IT, assert_param, HAL_TIM_STATE_READY, __TIM_HandleTypeDef::Instance, __TIM_HandleTypeDef::State, and TIM_IT_UPDATE.