Hwclock and system clock is not sync
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Hwclock date and time and system clock date and time is not syncing on kernel(PCF85263 i2c RTC module).it is getting 1 sec delay.
Example :
root@iWave-G23S:~# date;hwclock
Thu May 9 19:24:35 UTC 2019
Thu May 9 19:24:34 2019 0.000000 seconds.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Victor,
I was tried your solution but another terminal also facing above mentioned issue.
Regards,
Kumaresan G

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So I have no idea why bash shows the time another than "date".
Possibly there is some issue inside bash.
Please try to configure bash to run "date" with every command prompt.
I mean something like this:
PS1="[\$(date +%H:%M:%S)][\u@\h:\w]\$ "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Victor,
After sync hardware clock and system clock 1 sec delay is coming in terminal timestamp and kernel time.
Board Prints:
[2019-05-13 18:25:14.154] root@iWave-G23S:~# hwclock -w;hwclock -s
[2019-05-13 18:20:11.628] root@iWave-G23S:~# date;hwclock
[2019-05-13 18:20:15.717] Mon May 13 18:20:14 UTC 2019
[2019-05-13 18:20:15.723] Mon May 13 18:20:14 2019 0.000000 seconds
Regards,
Kumaresan G

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please try to run another shell after you change the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Victor,
I tried your hwclock -w;hwclock -s, solution it is sync hwclock;date command but,after power on/off and reboot hwclock date and time and system clock date and time is not syncing on kernel.
Regards,
Kumaresan G

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can add hwclock -s into startup script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hii,
Can you suggest crystal oscillator frequency ppm and load capacitor values for PCF85263 RTC IC.
Regards,
Kumaresan G

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use "hwclock -w" and "hwclock -s" to synchronize HW and system clocks.
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
