G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
Initialization and de-initialization functions

Functions

ErrorStatus DDL_RTC_DeInit (RTC_TypeDef *RTCx)
 De-Initializes the RTC registers to their default reset values.
ErrorStatus DDL_RTC_Init (RTC_TypeDef *RTCx, DDL_RTC_InitTypeDef *RTC_InitStruct)
 Initializes the RTC registers according to the specified parameters in RTC_InitStruct.
void DDL_RTC_StructInit (DDL_RTC_InitTypeDef *RTC_InitStruct)
 Set each DDL_RTC_InitTypeDef field to default value.
ErrorStatus DDL_RTC_TIME_Init (RTC_TypeDef *RTCx, DDL_RTC_TimeTypeDef *RTC_TimeStruct)
 Set the RTC current time.
void DDL_RTC_TIME_StructInit (DDL_RTC_TimeTypeDef *RTC_TimeStruct)
 Set each DDL_RTC_TimeTypeDef field to default value (Time = 0sec).
ErrorStatus DDL_RTC_ALM_Init (RTC_TypeDef *RTCx, DDL_RTC_AlarmTypeDef *RTC_AlarmStruct)
 Set the RTC Alarm.
void DDL_RTC_ALM_StructInit (DDL_RTC_AlarmTypeDef *RTC_AlarmStruct)
 Set each DDL_RTC_AlarmTypeDef of ALARM field to default value (Time = 00h:00mn:00sec).
ErrorStatus DDL_RTC_EnterInitMode (RTC_TypeDef *RTCx)
 Enters the RTC Initialization mode.
ErrorStatus DDL_RTC_ExitInitMode (RTC_TypeDef *RTCx)
 Exit the RTC Initialization mode.
ErrorStatus DDL_RTC_WaitForSynchro (RTC_TypeDef *RTCx)
 Waits until the RTC registers (RTC_CNT, RTC_ALR, RTC_PSCRLD) are synchronized with RTC APB clock.
ErrorStatus DDL_RTC_WaitForOperationComplete (RTC_TypeDef *RTCx)
 Waits until the RTC operation is completed.

Detailed Description

Function Documentation

◆ DDL_RTC_ALM_Init()

ErrorStatus DDL_RTC_ALM_Init ( RTC_TypeDef * RTCx,
DDL_RTC_AlarmTypeDef * RTC_AlarmStruct )

Set the RTC Alarm.

Note
The Alarm register can only be written when the corresponding Alarm is disabled (Use DDL_RTC_ALM_Disable function).
Parameters
RTCxRTC Instance
RTC_AlarmStructpointer to a DDL_RTC_AlarmTypeDef structure that contains the alarm configuration parameters.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: ALARMA registers are configured
  • ERROR: ALARMA registers are not configured

Definition at line 245 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_ALM_StructInit()

void DDL_RTC_ALM_StructInit ( DDL_RTC_AlarmTypeDef * RTC_AlarmStruct)

Set each DDL_RTC_AlarmTypeDef of ALARM field to default value (Time = 00h:00mn:00sec).

Parameters
RTC_AlarmStructpointer to a DDL_RTC_AlarmTypeDef structure which will be initialized.
Return values
None

Definition at line 274 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_DeInit()

ErrorStatus DDL_RTC_DeInit ( RTC_TypeDef * RTCx)

De-Initializes the RTC registers to their default reset values.

Note
This function does not reset the RTC Clock source and RTC Backup Data registers.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC registers are de-initialized
  • ERROR: RTC registers are not de-initialized

Definition at line 108 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_EnterInitMode()

ErrorStatus DDL_RTC_EnterInitMode ( RTC_TypeDef * RTCx)

Enters the RTC Initialization mode.

Note
The RTC Initialization mode is write protected, use the
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC is in Init mode
  • ERROR: RTC is not in Init mode

Definition at line 288 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_ExitInitMode()

ErrorStatus DDL_RTC_ExitInitMode ( RTC_TypeDef * RTCx)

Exit the RTC Initialization mode.

Note
When the initialization sequence is complete, the calendar restarts counting after 4 RTCCLK cycles.
The RTC Initialization mode is write protected, use the DDL_RTC_DisableWriteProtection before calling this function.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC exited from in Init mode
  • ERROR: Not applicable

Definition at line 329 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_Init()

ErrorStatus DDL_RTC_Init ( RTC_TypeDef * RTCx,
DDL_RTC_InitTypeDef * RTC_InitStruct )

Initializes the RTC registers according to the specified parameters in RTC_InitStruct.

Parameters
RTCxRTC Instance
RTC_InitStructpointer to a DDL_RTC_InitTypeDef structure that contains the configuration information for the RTC peripheral.
Note
The RTC Prescaler register is write protected and can be written in initialization mode only.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC registers are initialized
  • ERROR: RTC registers are not initialized

Definition at line 153 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_StructInit()

void DDL_RTC_StructInit ( DDL_RTC_InitTypeDef * RTC_InitStruct)

Set each DDL_RTC_InitTypeDef field to default value.

Parameters
RTC_InitStructpointer to a DDL_RTC_InitTypeDef structure which will be initialized.
Return values
None

Definition at line 184 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_TIME_Init()

ErrorStatus DDL_RTC_TIME_Init ( RTC_TypeDef * RTCx,
DDL_RTC_TimeTypeDef * RTC_TimeStruct )

Set the RTC current time.

Parameters
RTCxRTC Instance
RTC_TimeStructpointer 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 199 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_TIME_StructInit()

void DDL_RTC_TIME_StructInit ( DDL_RTC_TimeTypeDef * RTC_TimeStruct)

Set each DDL_RTC_TimeTypeDef field to default value (Time = 0sec).

Parameters
RTC_TimeStructpointer to a DDL_RTC_TimeTypeDef structure which will be initialized.
Return values
None

Definition at line 228 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_WaitForOperationComplete()

ErrorStatus DDL_RTC_WaitForOperationComplete ( RTC_TypeDef * RTCx)

Waits until the RTC operation is completed.

Note
This function waits until the OCFLG (Operation Complete Flag) is set, which indicates that the previous write operation to RTC registers has been completed and a new write operation can be performed.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC operation is completed
  • ERROR: Timeout occurred, RTC operation is not completed

Definition at line 388 of file g32r4xx_ddl_rtc.c.

◆ DDL_RTC_WaitForSynchro()

ErrorStatus DDL_RTC_WaitForSynchro ( RTC_TypeDef * RTCx)

Waits until the RTC registers (RTC_CNT, RTC_ALR, RTC_PSCRLD) are synchronized with RTC APB clock.

Note
After APB clock reset or stop, this bit must be cleared by software and user program must wait until it is set by hardware before reading RTC_CNT, RTC_PSCRLD, RTC_ALR registers.
Parameters
RTCxRTC Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RTC registers are synchronized
  • ERROR: Timeout occurred, RTC registers are not synchronized

Definition at line 351 of file g32r4xx_ddl_rtc.c.