EasyManuals Logo

ST STM32F2 User Manual

ST STM32F2
1371 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #471 background imageLoading...
Page #471 background image
UM1940
HAL RTC Generic Driver
DocID028236 Rev 2
471/1371
Function description
DeInitializes the RTC MSP.
Parameters
hrtc: pointer to a RTC_HandleTypeDef structure that
contains the configuration information for RTC.
Return values
None:
HAL_RTC_SetTime
Function name
HAL_StatusTypeDef HAL_RTC_SetTime (RTC_HandleTypeDef
* hrtc, RTC_TimeTypeDef * sTime, uint32_t Format)
Function description
Sets RTC current time.
Parameters
hrtc: pointer to a RTC_HandleTypeDef structure that
contains the configuration information for RTC.
sTime: Pointer to Time structure
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
Return values
HAL: status
HAL_RTC_GetTime
Function name
HAL_StatusTypeDef HAL_RTC_GetTime (RTC_HandleTypeDef
* hrtc, RTC_TimeTypeDef * sTime, uint32_t Format)
Function description
Gets RTC current time.
Parameters
hrtc: pointer to a RTC_HandleTypeDef structure that
contains the configuration information for RTC.
sTime: Pointer to Time structure
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
Return values
HAL: status
Notes
You must call HAL_RTC_GetDate() after
HAL_RTC_GetTime() to unlock the values in the higher-order
calendar shadow registers to ensure consistency between the
time and date values. Reading RTC current time locks the
values in calendar shadow registers until Current date is read.
HAL_RTC_SetDate
Function name
HAL_StatusTypeDef HAL_RTC_SetDate (RTC_HandleTypeDef
* hrtc, RTC_DateTypeDef * sDate, uint32_t Format)
Function description
Sets RTC current date.
Parameters
hrtc: pointer to a RTC_HandleTypeDef structure that
contains the configuration information for RTC.
sDate: Pointer to date structure
Format: specifies the format of the entered parameters. This
parameter can be one of the following values:

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F2 and is the answer not in the manual?

ST STM32F2 Specifications

General IconGeneral
BrandST
ModelSTM32F2
CategoryMicrocontrollers
LanguageEnglish

Related product manuals