STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
RTC Private Functions
Collaboration diagram for RTC Private Functions:

Functions

HAL_StatusTypeDef RTC_EnterInitMode (RTC_HandleTypeDef *hrtc)
 Enters the RTC Initialization mode.
 
HAL_StatusTypeDef RTC_ExitInitMode (RTC_HandleTypeDef *hrtc)
 Exits the RTC Initialization mode.
 
uint8_t RTC_ByteToBcd2 (uint8_t number)
 Converts a 2-digit number from decimal to BCD format.
 
uint8_t RTC_Bcd2ToByte (uint8_t number)
 Converts a 2-digit number from BCD to decimal format.
 

Detailed Description

Function Documentation

◆ RTC_EnterInitMode()

HAL_StatusTypeDef RTC_EnterInitMode ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc.h>

Enters the RTC Initialization mode.

Note
The RTC Initialization mode is write protected, use the __HAL_RTC_WRITEPROTECTION_DISABLE() before calling this function.
Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Return values
HALstatus

Definition at line 1813 of file stm32f4xx_hal_rtc.c.

References HAL_ERROR, HAL_GetTick(), HAL_OK, HAL_RTC_STATE_ERROR, RTC_HandleTypeDef::Instance, RTC_TIMEOUT_VALUE, and RTC_HandleTypeDef::State.

Referenced by HAL_RTC_DeInit(), HAL_RTC_Init(), HAL_RTC_SetDate(), HAL_RTC_SetTime(), HAL_RTCEx_DeactivateCoarseCalib(), HAL_RTCEx_DeactivateRefClock(), HAL_RTCEx_SetCoarseCalib(), and HAL_RTCEx_SetRefClock().

◆ RTC_ExitInitMode()

HAL_StatusTypeDef RTC_ExitInitMode ( RTC_HandleTypeDef * hrtc)

#include <stm32f4xx_hal_rtc.h>

Exits the RTC Initialization mode.

Parameters
hrtcpointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC.
Return values
HALstatus

Definition at line 1848 of file stm32f4xx_hal_rtc.c.

References HAL_ERROR, HAL_OK, HAL_RTC_STATE_ERROR, HAL_RTC_WaitForSynchro(), RTC_HandleTypeDef::Instance, and RTC_HandleTypeDef::State.

Referenced by HAL_RTC_DeInit(), HAL_RTC_Init(), HAL_RTC_SetDate(), HAL_RTC_SetTime(), HAL_RTCEx_DeactivateCoarseCalib(), HAL_RTCEx_DeactivateRefClock(), HAL_RTCEx_SetCoarseCalib(), and HAL_RTCEx_SetRefClock().

◆ RTC_ByteToBcd2()

uint8_t RTC_ByteToBcd2 ( uint8_t number)

#include <stm32f4xx_hal_rtc.h>

Converts a 2-digit number from decimal to BCD format.

Parameters
numberdecimal-formatted number (from 0 to 99) to be converted
Return values
Convertedbyte

Definition at line 1874 of file stm32f4xx_hal_rtc.c.

Referenced by HAL_RTC_SetAlarm(), HAL_RTC_SetAlarm_IT(), HAL_RTC_SetDate(), and HAL_RTC_SetTime().

◆ RTC_Bcd2ToByte()

uint8_t RTC_Bcd2ToByte ( uint8_t number)

#include <stm32f4xx_hal_rtc.h>

Converts a 2-digit number from BCD to decimal format.

Parameters
numberBCD-formatted number (from 00 to 99) to be converted
Return values
Convertedword

Definition at line 1892 of file stm32f4xx_hal_rtc.c.

Referenced by HAL_RTC_GetAlarm(), HAL_RTC_GetDate(), HAL_RTC_GetTime(), HAL_RTC_SetAlarm(), HAL_RTC_SetAlarm_IT(), HAL_RTC_SetDate(), HAL_RTC_SetTime(), and HAL_RTCEx_GetTimeStamp().