Martin Johnson / STM32F3-Discovery

Dependents:   Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more

Embed: (wiki syntax)

« Back to documentation index

Time and Date configuration functions

Time and Date configuration functions
[RTC_Private_Functions]

Time and Date configuration functions. More...

Functions

ErrorStatus RTC_SetTime (uint32_t RTC_Format, RTC_TimeTypeDef *RTC_TimeStruct)
 Set the RTC current time.
void RTC_TimeStructInit (RTC_TimeTypeDef *RTC_TimeStruct)
 Fills each RTC_TimeStruct member with its default value (Time = 00h:00min:00sec).
void RTC_GetTime (uint32_t RTC_Format, RTC_TimeTypeDef *RTC_TimeStruct)
 Get the RTC current Time.
uint32_t RTC_GetSubSecond (void)
 Gets the RTC current Calendar Subseconds value.
ErrorStatus RTC_SetDate (uint32_t RTC_Format, RTC_DateTypeDef *RTC_DateStruct)
 Set the RTC current date.
void RTC_DateStructInit (RTC_DateTypeDef *RTC_DateStruct)
 Fills each RTC_DateStruct member with its default value (Monday, January 01 xx00).
void RTC_GetDate (uint32_t RTC_Format, RTC_DateTypeDef *RTC_DateStruct)
 Get the RTC current date.

Detailed Description

Time and Date configuration functions.

 ===============================================================================
               ##### Time and Date configuration functions #####
 ===============================================================================  
    [..] This section provide functions allowing to program and read the RTC Calendar
         (Time and Date).


Function Documentation

void RTC_DateStructInit ( RTC_DateTypeDef *  RTC_DateStruct )

Fills each RTC_DateStruct member with its default value (Monday, January 01 xx00).

Parameters:
RTC_DateStruct,:pointer to a RTC_DateTypeDef structure which will be initialized.
Return values:
None

Definition at line 998 of file stm32f30x_rtc.c.

void RTC_GetDate ( uint32_t  RTC_Format,
RTC_DateTypeDef *  RTC_DateStruct 
)

Get the RTC current date.

Parameters:
RTC_Format,:specifies the format of the returned parameters. This parameter can be one of the following values:

  • RTC_Format_BIN: Binary data format
  • RTC_Format_BCD: BCD data format
RTC_DateStruct,:pointer to a RTC_DateTypeDef structure that will contain the returned current date configuration.
Return values:
None

Definition at line 1017 of file stm32f30x_rtc.c.

uint32_t RTC_GetSubSecond ( void   )

Gets the RTC current Calendar Subseconds value.

Note:
This function freeze the Time and Date registers after reading the SSR register.
Parameters:
None
Return values:
RTCcurrent Calendar Subseconds value.

Definition at line 882 of file stm32f30x_rtc.c.

void RTC_GetTime ( uint32_t  RTC_Format,
RTC_TimeTypeDef *  RTC_TimeStruct 
)

Get the RTC current Time.

Parameters:
RTC_Format,:specifies the format of the returned parameters. This parameter can be one of the following values:

  • RTC_Format_BIN: Binary data format
  • RTC_Format_BCD: BCD data format
RTC_TimeStruct,:pointer to a RTC_TimeTypeDef structure that will contain the returned current time configuration.
Return values:
None

Definition at line 849 of file stm32f30x_rtc.c.

ErrorStatus RTC_SetDate ( uint32_t  RTC_Format,
RTC_DateTypeDef *  RTC_DateStruct 
)

Set the RTC current date.

Parameters:
RTC_Format,:specifies the format of the entered parameters. This parameter can be one of the following values:

  • RTC_Format_BIN: Binary data format
  • RTC_Format_BCD: BCD data format
RTC_DateStruct,:pointer to a RTC_DateTypeDef structure that contains the date configuration information for the RTC.
Return values:
AnErrorStatus enumeration value:

  • SUCCESS: RTC Date register is configured
  • ERROR: RTC Date register is not configured

Definition at line 907 of file stm32f30x_rtc.c.

ErrorStatus RTC_SetTime ( uint32_t  RTC_Format,
RTC_TimeTypeDef *  RTC_TimeStruct 
)

Set the RTC current time.

Parameters:
RTC_Format,:specifies the format of the entered parameters. This parameter can be one of the following values:

  • RTC_Format_BIN: Binary data format
  • RTC_Format_BCD: BCD data format
RTC_TimeStruct,:pointer to a RTC_TimeTypeDef structure that contains the time configuration information for the RTC.
Return values:
AnErrorStatus enumeration value:

  • SUCCESS: RTC Time register is configured
  • ERROR: RTC Time register is not configured

Definition at line 726 of file stm32f30x_rtc.c.

void RTC_TimeStructInit ( RTC_TimeTypeDef *  RTC_TimeStruct )

Fills each RTC_TimeStruct member with its default value (Time = 00h:00min:00sec).

Parameters:
RTC_TimeStruct,:pointer to a RTC_TimeTypeDef structure which will be initialized.
Return values:
None

Definition at line 830 of file stm32f30x_rtc.c.