程序改了,还是查询,没发生跳变,一晚上快半小时,请问什么样时间校准?
int main (void)
{
S_RTC_TIME_DATA_T sInitTime, sReadRTC;
SYS_Init();
UART0_Init();
sInitTime.u32Year = 2017;
sInitTime.u32Month = 3;
sInitTime.u32Day = 10;
sInitTime.u32Hour = 22;
sInitTime.u32Minute = 30;
sInitTime.u32Second = 0;
sInitTime.u32DayOfWeek = RTC_TUESDAY;
sInitTime.u32TimeScale = RTC_CLOCK_24;
printf("\n RTC Time Display Test \n\n");
while(1){
RTC_GetDateAndTime(&sReadRTC);
if(sReadRTC.u32Second!=temp)
{
printf(" %d/%02d/%02d %02d:%02d:%02d\n",
sReadRTC.u32Year, sReadRTC.u32Month, sReadRTC.u32Day, sReadRTC.u32Hour, sReadRTC.u32Minute, sReadRTC.u32Second);
temp=sReadRTC.u32Second;
}
}
|