17.06.2014 Views

CME34M Hardware Manual - RTD Embedded Technologies, Inc.

CME34M Hardware Manual - RTD Embedded Technologies, Inc.

CME34M Hardware Manual - RTD Embedded Technologies, Inc.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

.<br />

Real Time Clock Control<br />

Overview<br />

The cpuModule is equipped with a Real Time Clock (RTC) which provides system date and time functions.<br />

When the cpuModule is turned off, a battery must be attached to the utility connector to provide power to the<br />

RTC. Without power, the RTC will lose the date/time information when the system is turned off.<br />

The RTC also provides an “alarm” function. This may be used to generate an interrupt at a particular time and<br />

day. This feature is commonly used to wake up the system from Sleep/Standby to run a scheduled task<br />

(defragment the hard drive, back up files, etc.).<br />

In addition to the date/time/alarm functions, the RTC contains several bytes of battery-backed RAM, commonly<br />

called CMOS memory. In a typical desktop PC, the CMOS memory is used by the BIOS to store user settings.<br />

This <strong>RTD</strong> cpuModule uses onboard flash to store user BIOS settings. To preserve compatibility with traditional<br />

PCs, the <strong>RTD</strong> Enhanced BIOS also mirrors the user settings from flash in CMOS. Therefore, the contents of<br />

CMOS may be overwritten at boot time, and should be treated as “read only”.<br />

Accessing the RTC Registers<br />

You may access the RTC date/time and CMOS memory using the Index and Data Registers located at I/O<br />

addresses 70h and 71h.<br />

• Address 70h is the Index register. It must be written with the number of the register to read or write.<br />

Valid values are 00h to 7Fh.<br />

• Address 71h is the Data register. It contains the contents of the register pointed to by the Index.<br />

To read/write an RTC register, you must first set the Index register with the register number, and then read/write<br />

the Data register.<br />

A list of key RTC registers is shown in Table 50 below:<br />

Table 50<br />

Real Time Clock Registers<br />

Registers<br />

(hex)<br />

Registers<br />

(decimal)<br />

Function<br />

00h 0 RTC Seconds<br />

02h 2 RTC Minutes<br />

04h 4 RTC Hours<br />

06h 6 RTC Day of Week<br />

07h 7 RTC Day of Month<br />

08h 8 RTC Month<br />

09h 9 RTC Year<br />

0Ah 10 RTC Status Register A<br />

• Bit 7: RTC Update In Progress (Read Only) - RTC registers<br />

should not be accessed when this bit is high.<br />

• Bits 6-4: Divider for 32.768 KHz input (should always be 010)<br />

• Bits 3-0: Rate select for periodic interrupt.<br />

64 <strong>CME34M</strong> cpuModule BDM-610000076 Rev A

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!