Index: BPU/RTC/prj/MDK/Objects/YC3121_Keil.axf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: BPU/RTC/prj/MDK/Objects/YC3121_Keil.axf
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: BPU/RTC/user/main.c
===================================================================
--- /YC3121_demo/ModuleDemo/BPU/RTC/user/main.c	(revision 599)
+++ /YC3121_demo/ModuleDemo/BPU/RTC/user/main.c	(working copy)
@@ -1,9 +1,9 @@
 /**
   ******************************************************************************
-  * @file    ModuleDemo/BPU/RTC/use/main.c 
+  * @file    ModuleDemo/BPU/RTC/use/main.c
   * @author  Yichip Application Team
   * @version V1.0.0
-  * @date    13-Dec-2019
+  * @date    19-Feb-2019
   * @brief   Yc3121 RTC interrupt test program.
   ******************************************************************************
   * @attention
@@ -32,6 +32,7 @@
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
 #define uartBaud 115200
+#define ONE_MINUTE     60
 
 /* Private macro -------------------------------------------------------------*/
 /* Private variables ---------------------------------------------------------*/
@@ -47,8 +48,9 @@
   */
 int main(void)
 {
-	UART_Configuration();
 	NVIC_Configuration();
+	UART_Configuration();
+
 	
 	MyPrintf("YcChip Yc3121 RTC Demo V1.0.\n");
 	
@@ -68,10 +70,16 @@
 
 void RTC_Configuration(void)
 {
-	RTC_Set_SecMax(0x8000);
-	RTC_ResetCounter();		//rtc stop counting and counter cleared to 0
-	RTC_SetRefRegister(20);
-	MyPrintf("\nGET RTC RefRegister value: %d\n", RTC_GetRefRegister());
+	uint32_t i = 0xffff;
+	while (i--);
+	
+	MyPrintf("32k RtcCVal: 0x%x\n", RTC_Get_SexMax());
+ 
+	RTC_Calibration();
+	RTC_SetWakeUpCounter(5);
+	RTC_SetRefRegister(0);
+	
+
 	RTC_Config(ENABLE);
 	RTC_ClearITPendingBit();
 }
@@ -113,9 +121,13 @@
   * @retval None
   */
 void SEC_IRQHandler(void)
-{			
-	RTC_ResetCounter();
-	MyPrintf("RTC_IRQHandler In\n");
+{
+	static uint32_t timer = 0;
+	timer = RTC_GetRefRegister();
+	MyPrintf("%d second.\n", timer);
+	timer += 5;
+	RTC_SetWakeUpCounter(timer);
+	RTC_Calibration();
 	RTC_ClearITPendingBit();
 }
 

