STM32L4xx_HAL_Driver  1.14.0
LPTIM Read operation functions

Read operation functions. More...

Functions

uint32_t HAL_LPTIM_ReadCounter (LPTIM_HandleTypeDef *hlptim)
 Return the current counter value. More...
 
uint32_t HAL_LPTIM_ReadAutoReload (LPTIM_HandleTypeDef *hlptim)
 Return the current Autoreload (Period) value. More...
 
uint32_t HAL_LPTIM_ReadCompare (LPTIM_HandleTypeDef *hlptim)
 Return the current Compare (Pulse) value. More...
 

Detailed Description

Read operation functions.

  ==============================================================================
                  ##### LPTIM Read operation functions #####
  ==============================================================================
[..]  This section provides LPTIM Reading functions.
      (+) Read the counter value.
      (+) Read the period (Auto-reload) value.
      (+) Read the pulse (Compare)value.

Function Documentation

◆ HAL_LPTIM_ReadAutoReload()

uint32_t HAL_LPTIM_ReadAutoReload ( LPTIM_HandleTypeDef hlptim)

Return the current Autoreload (Period) value.

Parameters
hlptimLPTIM handle
Return values
Autoreloadvalue.

Definition at line 1570 of file stm32l4xx_hal_lptim.c.

1571 {
1572  /* Check the parameters */
1573  assert_param(IS_LPTIM_INSTANCE(hlptim->Instance));
1574 
1575  return (hlptim->Instance->ARR);
1576 }
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_LPTIM_ReadCompare()

uint32_t HAL_LPTIM_ReadCompare ( LPTIM_HandleTypeDef hlptim)

Return the current Compare (Pulse) value.

Parameters
hlptimLPTIM handle
Return values
Comparevalue.

Definition at line 1583 of file stm32l4xx_hal_lptim.c.

1584 {
1585  /* Check the parameters */
1586  assert_param(IS_LPTIM_INSTANCE(hlptim->Instance));
1587 
1588  return (hlptim->Instance->CMP);
1589 }
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_LPTIM_ReadCounter()

uint32_t HAL_LPTIM_ReadCounter ( LPTIM_HandleTypeDef hlptim)

Return the current counter value.

Parameters
hlptimLPTIM handle
Return values
Countervalue.

Definition at line 1557 of file stm32l4xx_hal_lptim.c.

1558 {
1559  /* Check the parameters */
1560  assert_param(IS_LPTIM_INSTANCE(hlptim->Instance));
1561 
1562  return (hlptim->Instance->CNT);
1563 }
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))