I used the external crystal oscillator (32768HZ) for the real-time clock experiment, but I found that my read time is always 0:0:0 on January 1, 2016. I feel that the real-time clock is not counting.
The following is my configuration, can you help check if there is a problem?
The following is my program configuration and initialization
Key_Test = 0;
Finally, I found out that it was read on January 1, 2016, 0:00, 0:00.
Hi yang wei
Have you tried the Demo code that is included in the SDK? I saw that you have the same configuration that the example code, does this example work for you?
/* Initialize RTC instance * - See RTC configuration component for options */ RTC_DRV_Init(RTCTIMER1, &rtcTimer1_Config0); /* Configure RTC Time Seconds Interrupt */ RTC_DRV_ConfigureSecondsInt(RTCTIMER1, &rtcTimer1_SecIntConfig0); /* Set APIS to allow usermode access to RTC Memory Space */ /* Clear bit position to grant usermode access level */ AIPS->OPACR[regIdx] &= ~AIPS_OPACR_SP5_MASK; /* Switch to user mode */ swUserMode(); /* Set the time and date */ RTC_DRV_SetTimeDate(RTCTIMER1, &rtcTimer1_StartTime0); /* Start the RTC counter */ RTC_DRV_StartCounter(RTCTIMER1);