STM32L4xx_HAL_Driver  1.14.0
Time Base configuration

Functions

__STATIC_INLINE void LL_TIM_EnableCounter (TIM_TypeDef *TIMx)
 Enable timer counter. CR1 CEN LL_TIM_EnableCounter. More...
 
__STATIC_INLINE void LL_TIM_DisableCounter (TIM_TypeDef *TIMx)
 Disable timer counter. CR1 CEN LL_TIM_DisableCounter. More...
 
__STATIC_INLINE uint32_t LL_TIM_IsEnabledCounter (TIM_TypeDef *TIMx)
 Indicates whether the timer counter is enabled. CR1 CEN LL_TIM_IsEnabledCounter. More...
 
__STATIC_INLINE void LL_TIM_EnableUpdateEvent (TIM_TypeDef *TIMx)
 Enable update event generation. CR1 UDIS LL_TIM_EnableUpdateEvent. More...
 
__STATIC_INLINE void LL_TIM_DisableUpdateEvent (TIM_TypeDef *TIMx)
 Disable update event generation. CR1 UDIS LL_TIM_DisableUpdateEvent. More...
 
__STATIC_INLINE uint32_t LL_TIM_IsEnabledUpdateEvent (TIM_TypeDef *TIMx)
 Indicates whether update event generation is enabled. CR1 UDIS LL_TIM_IsEnabledUpdateEvent. More...
 
__STATIC_INLINE void LL_TIM_SetUpdateSource (TIM_TypeDef *TIMx, uint32_t UpdateSource)
 Set update event source. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetUpdateSource (TIM_TypeDef *TIMx)
 Get actual event update source CR1 URS LL_TIM_GetUpdateSource. More...
 
__STATIC_INLINE void LL_TIM_SetOnePulseMode (TIM_TypeDef *TIMx, uint32_t OnePulseMode)
 Set one pulse mode (one shot v.s. repetitive). CR1 OPM LL_TIM_SetOnePulseMode. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetOnePulseMode (TIM_TypeDef *TIMx)
 Get actual one pulse mode. CR1 OPM LL_TIM_GetOnePulseMode. More...
 
__STATIC_INLINE void LL_TIM_SetCounterMode (TIM_TypeDef *TIMx, uint32_t CounterMode)
 Set the timer counter counting mode. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetCounterMode (TIM_TypeDef *TIMx)
 Get actual counter mode. More...
 
__STATIC_INLINE void LL_TIM_EnableARRPreload (TIM_TypeDef *TIMx)
 Enable auto-reload (ARR) preload. CR1 ARPE LL_TIM_EnableARRPreload. More...
 
__STATIC_INLINE void LL_TIM_DisableARRPreload (TIM_TypeDef *TIMx)
 Disable auto-reload (ARR) preload. CR1 ARPE LL_TIM_DisableARRPreload. More...
 
__STATIC_INLINE uint32_t LL_TIM_IsEnabledARRPreload (TIM_TypeDef *TIMx)
 Indicates whether auto-reload (ARR) preload is enabled. CR1 ARPE LL_TIM_IsEnabledARRPreload. More...
 
__STATIC_INLINE void LL_TIM_SetClockDivision (TIM_TypeDef *TIMx, uint32_t ClockDivision)
 Set the division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetClockDivision (TIM_TypeDef *TIMx)
 Get the actual division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters. More...
 
__STATIC_INLINE void LL_TIM_SetCounter (TIM_TypeDef *TIMx, uint32_t Counter)
 Set the counter value. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetCounter (TIM_TypeDef *TIMx)
 Get the counter value. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetDirection (TIM_TypeDef *TIMx)
 Get the current direction of the counter CR1 DIR LL_TIM_GetDirection. More...
 
__STATIC_INLINE void LL_TIM_SetPrescaler (TIM_TypeDef *TIMx, uint32_t Prescaler)
 Set the prescaler value. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetPrescaler (TIM_TypeDef *TIMx)
 Get the prescaler value. PSC PSC LL_TIM_GetPrescaler. More...
 
__STATIC_INLINE void LL_TIM_SetAutoReload (TIM_TypeDef *TIMx, uint32_t AutoReload)
 Set the auto-reload value. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetAutoReload (TIM_TypeDef *TIMx)
 Get the auto-reload value. ARR ARR LL_TIM_GetAutoReload. More...
 
__STATIC_INLINE void LL_TIM_SetRepetitionCounter (TIM_TypeDef *TIMx, uint32_t RepetitionCounter)
 Set the repetition counter value. More...
 
__STATIC_INLINE uint32_t LL_TIM_GetRepetitionCounter (TIM_TypeDef *TIMx)
 Get the repetition counter value. More...
 
__STATIC_INLINE void LL_TIM_EnableUIFRemap (TIM_TypeDef *TIMx)
 Force a continuous copy of the update interrupt flag (UIF) into the timer counter register (bit 31). More...
 
__STATIC_INLINE void LL_TIM_DisableUIFRemap (TIM_TypeDef *TIMx)
 Disable update interrupt flag (UIF) remapping. CR1 UIFREMAP LL_TIM_DisableUIFRemap. More...
 

Detailed Description

Function Documentation

◆ LL_TIM_DisableARRPreload()

__STATIC_INLINE void LL_TIM_DisableARRPreload ( TIM_TypeDef *  TIMx)

Disable auto-reload (ARR) preload. CR1 ARPE LL_TIM_DisableARRPreload.

Parameters
TIMxTimer instance
Return values
None

Definition at line 1624 of file stm32l4xx_ll_tim.h.

1625 {
1626  CLEAR_BIT(TIMx->CR1, TIM_CR1_ARPE);
1627 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_TIM_DisableCounter()

__STATIC_INLINE void LL_TIM_DisableCounter ( TIM_TypeDef *  TIMx)

Disable timer counter. CR1 CEN LL_TIM_DisableCounter.

Parameters
TIMxTimer instance
Return values
None

Definition at line 1453 of file stm32l4xx_ll_tim.h.

1454 {
1455  CLEAR_BIT(TIMx->CR1, TIM_CR1_CEN);
1456 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_TIM_DisableUIFRemap()

__STATIC_INLINE void LL_TIM_DisableUIFRemap ( TIM_TypeDef *  TIMx)

Disable update interrupt flag (UIF) remapping. CR1 UIFREMAP LL_TIM_DisableUIFRemap.

Parameters
TIMxTimer instance
Return values
None

Definition at line 1817 of file stm32l4xx_ll_tim.h.

1818 {
1819  CLEAR_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
1820 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_TIM_DisableUpdateEvent()

__STATIC_INLINE void LL_TIM_DisableUpdateEvent ( TIM_TypeDef *  TIMx)

Disable update event generation. CR1 UDIS LL_TIM_DisableUpdateEvent.

Parameters
TIMxTimer instance
Return values
None

Definition at line 1486 of file stm32l4xx_ll_tim.h.

1487 {
1488  SET_BIT(TIMx->CR1, TIM_CR1_UDIS);
1489 }

◆ LL_TIM_EnableARRPreload()

__STATIC_INLINE void LL_TIM_EnableARRPreload ( TIM_TypeDef *  TIMx)

Enable auto-reload (ARR) preload. CR1 ARPE LL_TIM_EnableARRPreload.

Parameters
TIMxTimer instance
Return values
None

Definition at line 1613 of file stm32l4xx_ll_tim.h.

1614 {
1615  SET_BIT(TIMx->CR1, TIM_CR1_ARPE);
1616 }

◆ LL_TIM_EnableCounter()

__STATIC_INLINE void LL_TIM_EnableCounter ( TIM_TypeDef *  TIMx)

Enable timer counter. CR1 CEN LL_TIM_EnableCounter.

Parameters
TIMxTimer instance
Return values
None

Definition at line 1442 of file stm32l4xx_ll_tim.h.

1443 {
1444  SET_BIT(TIMx->CR1, TIM_CR1_CEN);
1445 }

◆ LL_TIM_EnableUIFRemap()

__STATIC_INLINE void LL_TIM_EnableUIFRemap ( TIM_TypeDef *  TIMx)

Force a continuous copy of the update interrupt flag (UIF) into the timer counter register (bit 31).

Note
This allows both the counter value and a potential roll-over condition signalled by the UIFCPY flag to be read in an atomic way. CR1 UIFREMAP LL_TIM_EnableUIFRemap
Parameters
TIMxTimer instance
Return values
None

Definition at line 1806 of file stm32l4xx_ll_tim.h.

1807 {
1808  SET_BIT(TIMx->CR1, TIM_CR1_UIFREMAP);
1809 }

◆ LL_TIM_EnableUpdateEvent()

__STATIC_INLINE void LL_TIM_EnableUpdateEvent ( TIM_TypeDef *  TIMx)

Enable update event generation. CR1 UDIS LL_TIM_EnableUpdateEvent.

Parameters
TIMxTimer instance
Return values
None

Definition at line 1475 of file stm32l4xx_ll_tim.h.

1476 {
1477  CLEAR_BIT(TIMx->CR1, TIM_CR1_UDIS);
1478 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_TIM_GetAutoReload()

__STATIC_INLINE uint32_t LL_TIM_GetAutoReload ( TIM_TypeDef *  TIMx)

Get the auto-reload value. ARR ARR LL_TIM_GetAutoReload.

Note
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter.
Parameters
TIMxTimer instance
Return values
Auto-reloadvalue

Definition at line 1766 of file stm32l4xx_ll_tim.h.

1767 {
1768  return (uint32_t)(READ_REG(TIMx->ARR));
1769 }

◆ LL_TIM_GetClockDivision()

__STATIC_INLINE uint32_t LL_TIM_GetClockDivision ( TIM_TypeDef *  TIMx)

Get the actual division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters.

Note
Macro IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check whether or not the clock division feature is supported by the timer instance. CR1 CKD LL_TIM_GetClockDivision
Parameters
TIMxTimer instance
Return values
Returnedvalue can be one of the following values:
  • LL_TIM_CLOCKDIVISION_DIV1
  • LL_TIM_CLOCKDIVISION_DIV2
  • LL_TIM_CLOCKDIVISION_DIV4

Definition at line 1670 of file stm32l4xx_ll_tim.h.

1671 {
1672  return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_CKD));
1673 }

◆ LL_TIM_GetCounter()

__STATIC_INLINE uint32_t LL_TIM_GetCounter ( TIM_TypeDef *  TIMx)

Get the counter value.

Note
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter. CNT CNT LL_TIM_GetCounter
Parameters
TIMxTimer instance
Return values
Countervalue (between Min_Data=0 and Max_Data=0xFFFF or 0xFFFFFFFF)

Definition at line 1697 of file stm32l4xx_ll_tim.h.

1698 {
1699  return (uint32_t)(READ_REG(TIMx->CNT));
1700 }

◆ LL_TIM_GetCounterMode()

__STATIC_INLINE uint32_t LL_TIM_GetCounterMode ( TIM_TypeDef *  TIMx)

Get actual counter mode.

Note
Macro IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to check whether or not the counter mode selection feature is supported by a timer instance. CR1 DIR LL_TIM_GetCounterMode
CR1 CMS LL_TIM_GetCounterMode
Parameters
TIMxTimer instance
Return values
Returnedvalue can be one of the following values:
  • LL_TIM_COUNTERMODE_UP
  • LL_TIM_COUNTERMODE_DOWN
  • LL_TIM_COUNTERMODE_CENTER_UP
  • LL_TIM_COUNTERMODE_CENTER_DOWN
  • LL_TIM_COUNTERMODE_CENTER_UP_DOWN

Definition at line 1602 of file stm32l4xx_ll_tim.h.

1603 {
1604  return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR | TIM_CR1_CMS));
1605 }

◆ LL_TIM_GetDirection()

__STATIC_INLINE uint32_t LL_TIM_GetDirection ( TIM_TypeDef *  TIMx)

Get the current direction of the counter CR1 DIR LL_TIM_GetDirection.

Parameters
TIMxTimer instance
Return values
Returnedvalue can be one of the following values:
  • LL_TIM_COUNTERDIRECTION_UP
  • LL_TIM_COUNTERDIRECTION_DOWN

Definition at line 1710 of file stm32l4xx_ll_tim.h.

1711 {
1712  return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_DIR));
1713 }

◆ LL_TIM_GetOnePulseMode()

__STATIC_INLINE uint32_t LL_TIM_GetOnePulseMode ( TIM_TypeDef *  TIMx)

Get actual one pulse mode. CR1 OPM LL_TIM_GetOnePulseMode.

Parameters
TIMxTimer instance
Return values
Returnedvalue can be one of the following values:
  • LL_TIM_ONEPULSEMODE_SINGLE
  • LL_TIM_ONEPULSEMODE_REPETITIVE

Definition at line 1558 of file stm32l4xx_ll_tim.h.

1559 {
1560  return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_OPM));
1561 }

◆ LL_TIM_GetPrescaler()

__STATIC_INLINE uint32_t LL_TIM_GetPrescaler ( TIM_TypeDef *  TIMx)

Get the prescaler value. PSC PSC LL_TIM_GetPrescaler.

Parameters
TIMxTimer instance
Return values
Prescalervalue between Min_Data=0 and Max_Data=65535

Definition at line 1737 of file stm32l4xx_ll_tim.h.

1738 {
1739  return (uint32_t)(READ_REG(TIMx->PSC));
1740 }

◆ LL_TIM_GetRepetitionCounter()

__STATIC_INLINE uint32_t LL_TIM_GetRepetitionCounter ( TIM_TypeDef *  TIMx)

Get the repetition counter value.

Note
Macro IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a repetition counter. RCR REP LL_TIM_GetRepetitionCounter
Parameters
TIMxTimer instance
Return values
Repetitioncounter value

Definition at line 1794 of file stm32l4xx_ll_tim.h.

1795 {
1796  return (uint32_t)(READ_REG(TIMx->RCR));
1797 }

◆ LL_TIM_GetUpdateSource()

__STATIC_INLINE uint32_t LL_TIM_GetUpdateSource ( TIM_TypeDef *  TIMx)

Get actual event update source CR1 URS LL_TIM_GetUpdateSource.

Parameters
TIMxTimer instance
Return values
Returnedvalue can be one of the following values:
  • LL_TIM_UPDATESOURCE_REGULAR
  • LL_TIM_UPDATESOURCE_COUNTER

Definition at line 1531 of file stm32l4xx_ll_tim.h.

1532 {
1533  return (uint32_t)(READ_BIT(TIMx->CR1, TIM_CR1_URS));
1534 }

◆ LL_TIM_IsEnabledARRPreload()

__STATIC_INLINE uint32_t LL_TIM_IsEnabledARRPreload ( TIM_TypeDef *  TIMx)

Indicates whether auto-reload (ARR) preload is enabled. CR1 ARPE LL_TIM_IsEnabledARRPreload.

Parameters
TIMxTimer instance
Return values
Stateof bit (1 or 0).

Definition at line 1635 of file stm32l4xx_ll_tim.h.

1636 {
1637  return ((READ_BIT(TIMx->CR1, TIM_CR1_ARPE) == (TIM_CR1_ARPE)) ? 1UL : 0UL);
1638 }

◆ LL_TIM_IsEnabledCounter()

__STATIC_INLINE uint32_t LL_TIM_IsEnabledCounter ( TIM_TypeDef *  TIMx)

Indicates whether the timer counter is enabled. CR1 CEN LL_TIM_IsEnabledCounter.

Parameters
TIMxTimer instance
Return values
Stateof bit (1 or 0).

Definition at line 1464 of file stm32l4xx_ll_tim.h.

1465 {
1466  return ((READ_BIT(TIMx->CR1, TIM_CR1_CEN) == (TIM_CR1_CEN)) ? 1UL : 0UL);
1467 }

◆ LL_TIM_IsEnabledUpdateEvent()

__STATIC_INLINE uint32_t LL_TIM_IsEnabledUpdateEvent ( TIM_TypeDef *  TIMx)

Indicates whether update event generation is enabled. CR1 UDIS LL_TIM_IsEnabledUpdateEvent.

Parameters
TIMxTimer instance
Return values
Invertedstate of bit (0 or 1).

Definition at line 1497 of file stm32l4xx_ll_tim.h.

1498 {
1499  return ((READ_BIT(TIMx->CR1, TIM_CR1_UDIS) == (uint32_t)RESET) ? 1UL : 0UL);
1500 }

◆ LL_TIM_SetAutoReload()

__STATIC_INLINE void LL_TIM_SetAutoReload ( TIM_TypeDef *  TIMx,
uint32_t  AutoReload 
)

Set the auto-reload value.

Note
The counter is blocked while the auto-reload value is null.
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter.
Helper macro __LL_TIM_CALC_ARR can be used to calculate the AutoReload parameter ARR ARR LL_TIM_SetAutoReload
Parameters
TIMxTimer instance
AutoReloadbetween Min_Data=0 and Max_Data=65535
Return values
None

Definition at line 1753 of file stm32l4xx_ll_tim.h.

1754 {
1755  WRITE_REG(TIMx->ARR, AutoReload);
1756 }

◆ LL_TIM_SetClockDivision()

__STATIC_INLINE void LL_TIM_SetClockDivision ( TIM_TypeDef *  TIMx,
uint32_t  ClockDivision 
)

Set the division ratio between the timer clock and the sampling clock used by the dead-time generators (when supported) and the digital filters.

Note
Macro IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx) can be used to check whether or not the clock division feature is supported by the timer instance. CR1 CKD LL_TIM_SetClockDivision
Parameters
TIMxTimer instance
ClockDivisionThis parameter can be one of the following values:
  • LL_TIM_CLOCKDIVISION_DIV1
  • LL_TIM_CLOCKDIVISION_DIV2
  • LL_TIM_CLOCKDIVISION_DIV4
Return values
None

Definition at line 1653 of file stm32l4xx_ll_tim.h.

1654 {
1655  MODIFY_REG(TIMx->CR1, TIM_CR1_CKD, ClockDivision);
1656 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_TIM_SetCounter()

__STATIC_INLINE void LL_TIM_SetCounter ( TIM_TypeDef *  TIMx,
uint32_t  Counter 
)

Set the counter value.

Note
Macro IS_TIM_32B_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a 32 bits counter. CNT CNT LL_TIM_SetCounter
Parameters
TIMxTimer instance
CounterCounter value (between Min_Data=0 and Max_Data=0xFFFF or 0xFFFFFFFF)
Return values
None

Definition at line 1684 of file stm32l4xx_ll_tim.h.

1685 {
1686  WRITE_REG(TIMx->CNT, Counter);
1687 }

◆ LL_TIM_SetCounterMode()

__STATIC_INLINE void LL_TIM_SetCounterMode ( TIM_TypeDef *  TIMx,
uint32_t  CounterMode 
)

Set the timer counter counting mode.

Note
Macro IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx) can be used to check whether or not the counter mode selection feature is supported by a timer instance.
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. CR1 DIR LL_TIM_SetCounterMode
CR1 CMS LL_TIM_SetCounterMode
Parameters
TIMxTimer instance
CounterModeThis parameter can be one of the following values:
  • LL_TIM_COUNTERMODE_UP
  • LL_TIM_COUNTERMODE_DOWN
  • LL_TIM_COUNTERMODE_CENTER_UP
  • LL_TIM_COUNTERMODE_CENTER_DOWN
  • LL_TIM_COUNTERMODE_CENTER_UP_DOWN
Return values
None

Definition at line 1582 of file stm32l4xx_ll_tim.h.

1583 {
1584  MODIFY_REG(TIMx->CR1, (TIM_CR1_DIR | TIM_CR1_CMS), CounterMode);
1585 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_TIM_SetOnePulseMode()

__STATIC_INLINE void LL_TIM_SetOnePulseMode ( TIM_TypeDef *  TIMx,
uint32_t  OnePulseMode 
)

Set one pulse mode (one shot v.s. repetitive). CR1 OPM LL_TIM_SetOnePulseMode.

Parameters
TIMxTimer instance
OnePulseModeThis parameter can be one of the following values:
  • LL_TIM_ONEPULSEMODE_SINGLE
  • LL_TIM_ONEPULSEMODE_REPETITIVE
Return values
None

Definition at line 1545 of file stm32l4xx_ll_tim.h.

1546 {
1547  MODIFY_REG(TIMx->CR1, TIM_CR1_OPM, OnePulseMode);
1548 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_TIM_SetPrescaler()

__STATIC_INLINE void LL_TIM_SetPrescaler ( TIM_TypeDef *  TIMx,
uint32_t  Prescaler 
)

Set the prescaler value.

Note
The counter clock frequency CK_CNT is equal to fCK_PSC / (PSC[15:0] + 1).
The prescaler can be changed on the fly as this control register is buffered. The new prescaler ratio is taken into account at the next update event.
Helper macro __LL_TIM_CALC_PSC can be used to calculate the Prescaler parameter PSC PSC LL_TIM_SetPrescaler
Parameters
TIMxTimer instance
Prescalerbetween Min_Data=0 and Max_Data=65535
Return values
None

Definition at line 1726 of file stm32l4xx_ll_tim.h.

1727 {
1728  WRITE_REG(TIMx->PSC, Prescaler);
1729 }

◆ LL_TIM_SetRepetitionCounter()

__STATIC_INLINE void LL_TIM_SetRepetitionCounter ( TIM_TypeDef *  TIMx,
uint32_t  RepetitionCounter 
)

Set the repetition counter value.

Note
For advanced timer instances RepetitionCounter can be up to 65535.
Macro IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx) can be used to check whether or not a timer instance supports a repetition counter. RCR REP LL_TIM_SetRepetitionCounter
Parameters
TIMxTimer instance
RepetitionCounterbetween Min_Data=0 and Max_Data=255
Return values
None

Definition at line 1781 of file stm32l4xx_ll_tim.h.

1782 {
1783  WRITE_REG(TIMx->RCR, RepetitionCounter);
1784 }

◆ LL_TIM_SetUpdateSource()

__STATIC_INLINE void LL_TIM_SetUpdateSource ( TIM_TypeDef *  TIMx,
uint32_t  UpdateSource 
)

Set update event source.

Note
Update event source set to LL_TIM_UPDATESOURCE_REGULAR: any of the following events generate an update interrupt or DMA request if enabled:
  • Counter overflow/underflow
  • Setting the UG bit
  • Update generation through the slave mode controller
Update event source set to LL_TIM_UPDATESOURCE_COUNTER: only counter overflow/underflow generates an update interrupt or DMA request if enabled. CR1 URS LL_TIM_SetUpdateSource
Parameters
TIMxTimer instance
UpdateSourceThis parameter can be one of the following values:
  • LL_TIM_UPDATESOURCE_REGULAR
  • LL_TIM_UPDATESOURCE_COUNTER
Return values
None

Definition at line 1518 of file stm32l4xx_ll_tim.h.

1519 {
1520  MODIFY_REG(TIMx->CR1, TIM_CR1_URS, UpdateSource);
1521 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)