STM8L15x Standard Peripherals Drivers: WakeUp Timer configuration functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

WakeUp Timer configuration functions

WakeUp Timer configuration functions. More...

Functions

uint16_t RTC_GetWakeUpCounter (void)
 Returns the RTC Wakeup timer counter value.
void RTC_SetWakeUpCounter (uint16_t RTC_WakeupCounter)
 Sets the RTC Wakeup counter.
void RTC_WakeUpClockConfig (RTC_WakeUpClock_TypeDef RTC_WakeUpClock)
 Configures the RTC Wakeup clock source.
ErrorStatus RTC_WakeUpCmd (FunctionalState NewState)
 Enables or Disables the RTC Wakeup Unit.

Detailed Description

WakeUp Timer configuration functions.

 ===============================================================================
                     WakeUp Timer configuration functions
 ===============================================================================  

  This section provide functions allowing to program and read the RTC WakeUp.


Function Documentation

uint16_t RTC_GetWakeUpCounter ( void  )

Returns the RTC Wakeup timer counter value.

Parameters:
None.
Return values:
RTCWakeup Counter value.

Definition at line 1414 of file stm8l15x_rtc.c.

References RTC.

void RTC_SetWakeUpCounter ( uint16_t  RTC_WakeupCounter)

Sets the RTC Wakeup counter.

Note:
Before configuring the wakeup unit counter, the wake up Unit must be disabled (if enabled) using RTC_WakeUpCmd(Disable).
Parameters:
RTC_WakeupCounter,:specifies the Wake up counter, This parameter can be a value from 0x0000 to 0xFFFF.
Return values:
None.

Definition at line 1394 of file stm8l15x_rtc.c.

References RTC.

void RTC_WakeUpClockConfig ( RTC_WakeUpClock_TypeDef  RTC_WakeUpClock)

Configures the RTC Wakeup clock source.

Precondition:
Before configuring the wakeup unit Clock source, the wake up Unit must be disabled (if enabled) using RTC_WakeUpCmd(Disable) .
Parameters:
RTC_WakeupClockSrc,:specifies the Wakeup clock source, this parameter can be one of the RTC_WakeupClockSrc_TypeDef enumeration.
Return values:
None

Definition at line 1363 of file stm8l15x_rtc.c.

References IS_RTC_WAKEUP_CLOCK, RTC, RTC_CR1_WUCKSEL, and RTC_CR2_WUTE.

ErrorStatus RTC_WakeUpCmd ( FunctionalState  NewState)

Enables or Disables the RTC Wakeup Unit.

Parameters:
NewState,:new state of the Wakeup Unit. This parameter can be: ENABLE or DISABLE.
Return values:
AnErrorStatus enumeration value:
  • SUCCESS : RTC Wakeup Unit is enabled/disabled
  • ERROR : RTC Wakeup Unit is not enabled/disabled

Definition at line 1434 of file stm8l15x_rtc.c.

References DISABLE, ERROR, IS_FUNCTIONAL_STATE, RESET, RTC, RTC_CR2_WUTE, RTC_ISR1_WUTWF, SUCCESS, and WUTWF_TIMEOUT.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com