Search by Tags

RTCSync

 

Compare with Revision




Subscribe for this article updates

This tool synchronizes the system time with the RTC chip on [Article not found #100759].

Registry Settings

Supported RTC Brands

We support different external RTC components. This is done using the following registry settings:

[HKEY_LOCAL_MACHINE\SOFTWARE\Toradex\RTCSync]
"Protocol"  = dword:0x00000001   default: 1
"SlaveAddr" = dword:0x00000068   default: 0x68 (7-bit address)


The following RTC protocols are supported:

RTC usedProtocolDefault
7bit SlaveAddr
Note
ST M41T010x68Used on Evaluation Board, Iris, Orchid and Protea
Dallas DS1339
Dallas DS3231
20x68
Epson RX-8564LC30x51Used on the Limestone board
ST M41T8140x68Used on the [Article not found #100782]
TI TPS65864350x34Internal RTC of PMU on Colibri T20
Dates need to be 1.1.2010 or newer. Timer will overflow around 2044.
TI TPS65911x60x2DInternal RTC of PMU on Colibri/Apalis T30

The Default Protocol (if the registry entry is missing) is 1 (M41T0). The Default SlaveAddr (if the registry entry is missing) is 0x68 or 0x51, according to the table above.

RTCSync on Limestone

Change the registry value "Protocol" to 3 to support the RTC chip on the Limestone.

RTCSync Usage

How it Works

  1. RTCSync is executed once during system boot. It reads the external RTC's time and stores it to the CPU's timer.
  2. RTCSync is executed each time the WinCE SystemTime is modified to write the system time back to the external RTC.
  3. RTCSync.exe can be called by the user to force step 1.

Synchronize I2C accesses between RTCSync and Other Threads

If you are using the I2C interface in parallel to RTCSync, you can use a Mutex named "I2C" to synchronize your accesses with the RTCSync tool.

Using a Customized RTCSync Tool

It is possible to purchase the source code of the RTCSync tool, in order to adjust it for a different RTC IC.

Following registry settings starts the RTCSync tool in the WinCE image:

[HKEY_LOCAL_MACHINE\init]
"Launch48"="rtcsync.exe"

You can change the value to set the key to your own sync tool or to disable the RTCSync tool.