Qualcomm SM6115 平台RTC accuracy problem
Issues:
我们项目中使用的rtc对时有误差,大概24小时内会有十几秒到二十秒左右的误差,请问如何优化使误差在两三秒以内。(The rtc used in our project has an error in timing. There will be an error of about ten seconds to twenty seconds in about 24 hours. How to optimize the error within two or three seconds. The following is the relevant configuration of rtc we currently do in xbl, please help to analyze, thank you!)
pm_driver_post_init ( void )
{
pm_err_flag_type err_flag = PM_ERR_FLAG_SUCCESS;err_flag |= pm_app_vreg_clear_ocp_status();
err_flag |= pm_comm_write_byte(0x0 , 0x5A5B, 0xD0, 0x0); //rtc
err_flag |= pm_comm_write_byte(0x0 , 0x2845, 0x02, 0x0); //rtcreturn err_flag;
}Solved:please try to config as below:
0x5A58 : 0x20
0x5a5B : 0XD0
and please also measure the xo out long time(or by trigger mode), normally the calibration will be on each 10s, please make sure the test methold is ok, thanks!
读纽扣电池电压:/sys/bus/spmi/devices/spmi0-00/1c40000.qcom,spmi:qcom,pm6125@0:vadc@3100/iio:device0/in_voltage_vcoin_input0X5A58
bit7:bit4 CAL_FREQ_RTC_DEFAULT
0x2:CAL_PER_37mSEC
0x3:CAL_PER_75mSEC
0x4:CAL_PER_150mSEC
0x5:CAL_PER_300mSEC
0x6:CAL_PER_612mSEC
0x7:CAL_PER_1p25SEC
0x8:CAL_PER_2p5SEC
0x9:CAL_PER_5SEC
0xA:CAL_PER_10SEC