Customer Quesiton:
Quote:
Given that the RTC on the processor (or card engine, not sure which) is not backed up by battery, I was wondering how it would get synchronized with an RTC that would be built into our hardware. Also, can you tell me what kinds of things the system’s RTC is used for? I know it’s used when files are written to flash, what other uses does it have?
Response:
Most of our modules have a processor that has a built in RTC, but you must provide power to the processor to keep it running. In most applications this is going to be a lot more power than you would want to just keep a RTC powered. This is why it is typically a better approach to use an external RTC chip that has its own 'coin' battery.
Our kernel implements the following functions: (Make sure you are providing the boot string to enable this ‘rtc:rtc_xxx’ )
OEMGetRealTime -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcehardware5/html/wce50lrfoemgetrealtime.asp
OEMSetRealTime -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecoreos5/html/wce50lrfSetSystemTime.asp
Once you have read your external RTC via a driver or application, you can call
SetSystemTime() with a
SYSTEMTIME structure.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecoreos5/html/wce50lrfsetsystemtime.asp
Which allow you to use the following timer functions (the ones that use date and time)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecoreos5/html/wce50grftimefunctions.asp
Whenever any applications, .etc. need to use a ‘time stamp’ or you need to show the current clock (like in the desktop view), the clock in the kernel will be what is used.