CMOS RTC gives inconsistent data sporadicly
Posted: Tue Oct 13, 2015 12:30 pm
Hi all,
I have a X86 based system running Windows Embedded CE. My problem is with internal CMOS RTC in the companion controller chip.
My source code is almost same with the link below.
https://msdn.microsoft.com/en-us/library/aa450606.aspx
Problem Description :
- I update/set the time every 10 seconds.
- System checks the time every 1 seconds.
I see some inconsistent date/time value at second step. For instance;
Assume that I set the time 2015 10 13 10:30:45
2030 10 13 10:30:46
2030 10 13 10:30:47
2015 10 13 10:30:48
Another example;
Assume that I set the time 2015 10 13 11:45:45
For 5 seconds everything is fine then I read,
2002 10 13 11:45:50
2002 10 13 11:45:51
2002 10 13 11:45:52
This error continued until next set time operation.
Not just year changes, that could be month or hour or minute too.
I also checked the implementation in different platforms like Linux and here in OSDev wiki page for CMOS RTC. They are identical to Windows implementation.
Moreover this source code [link aboved] works perfect with a different x-86 based system. So I thought that might be because of my companion controller.
Any of you faced the issue like that before or do you have any idea about what is going on ?
My another question is about Data Mode register in RTC. What i see is that it changes from 0 to 1 randomly.
For instance when I set time it is 0 which states BCD mode. When I get time it is 1 which states binary mode. Is this a normal behavior ?
Thanks in advance,
Bugra
I have a X86 based system running Windows Embedded CE. My problem is with internal CMOS RTC in the companion controller chip.
My source code is almost same with the link below.
https://msdn.microsoft.com/en-us/library/aa450606.aspx
Problem Description :
- I update/set the time every 10 seconds.
- System checks the time every 1 seconds.
I see some inconsistent date/time value at second step. For instance;
Assume that I set the time 2015 10 13 10:30:45
2030 10 13 10:30:46
2030 10 13 10:30:47
2015 10 13 10:30:48
Another example;
Assume that I set the time 2015 10 13 11:45:45
For 5 seconds everything is fine then I read,
2002 10 13 11:45:50
2002 10 13 11:45:51
2002 10 13 11:45:52
This error continued until next set time operation.
Not just year changes, that could be month or hour or minute too.
I also checked the implementation in different platforms like Linux and here in OSDev wiki page for CMOS RTC. They are identical to Windows implementation.
Moreover this source code [link aboved] works perfect with a different x-86 based system. So I thought that might be because of my companion controller.
Any of you faced the issue like that before or do you have any idea about what is going on ?
My another question is about Data Mode register in RTC. What i see is that it changes from 0 to 1 randomly.
For instance when I set time it is 0 which states BCD mode. When I get time it is 1 which states binary mode. Is this a normal behavior ?
Thanks in advance,
Bugra