Global Sources
EE Times-India
Stay in touch with EE Times India
 
EE Times-India > Power/Alternative Energy
 
 
Power/Alternative Energy  

Changing clock speed of cpuModules

Posted: 28 Sep 2001     Print Version  Bookmark and Share

Keywords:cpuModules 

cpuModule is a trademark of Real Time Devices.

All trademarks appearing in this document

are the property of their respective owners.

/PDF document

APPLICATION NOTE

ANC109

Changing the Clock Speed of the CMi cpuModules

(Last revision: August 11, 1997)

Copyright 1996 by Real Time Devices, Inc.

All rights reserved

PC/XT, PC/AT are registered trademarks of IBM Corporation.

The Real Time Devices Logo is a registered trademark of Real Time Devices.

cpuModule is a trademark of Real Time Devices.

All trademarks appearing in this document

are the property of their respective owners.

REAL TIME DEVICES, INC.

PO Box 906 State College, PA 16804

Phone: (814) 234-8087 FAX: (814) 234-5218

Publication No. ANC109

ANC109 -- Changing Clock Speed of cpuModules

Real Time Devices, Inc. 2

Introduction

The clock speeds of the CMi and CMT cpuModules can be changed via two

methods, allowing you to reduce power consumption where maximum processing

speed is not required. The following sections explain the two methods.

Methods for Changing Clock Speed

There is one method which can be used to modify the clock speed of the CMi

cpuModule. The following sections describe it.

Modifying Chipset Registers

You may change cpuModule clock speed by altering a divider register in the

chipset of the cpuModules. This divider reduces the clock frequency programmed

in the BIOS. You may change the chipset register at any time during cpuModule

operation, but the change will not be retained once the cpuModule is re-started. If

you are using a cpuModule with a clock-doubled processor (TI 486sxlc2-50 or

TI486sxlc2-66), you must take additional steps before changing the divider

register. Please refer to the following section for details on clock-doubled

processors.

The clock divider is controlled through the Clock Control Register, which is

illustrated below:

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

ENVDSP CLK2DIV1 CLK2DIV0 FCLKDIV1 FCLKDIV0 BOSCSNS SCLKDIV1 SCLKDIV0

The bits used to control clock speed are described below. DO NOT MODIFY

ANY OTHER BITS IN THIS REGISTER!

CLK2DIV[1..0]

These bits select the cpu clock divider as follows:

0 0 = BIOS clock speed

0 1 = BIOS clock speed divided by 2

1 0 = BIOS clock speed divided by 3

1 1 = BIOS clock speed divided by 4

Procedure to change the clock speed using the Clock Control Register

ANC109 -- Changing Clock Speed of cpuModules

Real Time Devices, Inc. 3

Ensure that the cpuModule is in non-Turbo mode. This is done by writing any byte

value to I/O address F4h.

Set the configuration index register to point to the Clock Control Register. This is

done by writing 07h to I/O address ECh.

Read the Clock Control Register contents, by performing an I/O read of the

configuration data register. This is done by reading I/O address EDh.

Modify bits CLK2DIV1 and CLK2DIV0 as desired. Make certain you modify

these bits using only bit-wise AND or OR instructions, so you do not change the

values of any other bits in the Clock Control Register.

Set the configuration index register to again point to the Clock Control Register.

This is done by writing 07h to I/O address ECh.

Write the modified value back to the configuration data register. This is done by

writing I/O address EDh. This will change the clock speed immediately.

Changing Clock Speeds of Clock-Doubled Processors

Before changing the divider register of a cpuModule using a clock-doubled

processor (TI486sxlc2-50 or TI486sxlc2-66), you must switch the processor out

of clock-doubled mode. If you do not, improper cpuModule operation will likely

occur. Once you have exited clock-doubled mode and changed the clock speed,

you may re-enter clock-doubled mode as illustrated below.

Procedure for exiting clock-doubled mode:

Set the processor configuration index register to point to Configuration Control

Register 0 (CCR0). This is done by writing byte value C0h to I/O address 22h.

Read the contents of CCR0 from the configuration data register. This is done by

doing an I/O read of address 23h.

Modify the returned value by a bit-wise AND with byte value BFh.

Set the processor configuration index register to again point to CCR0. This is done

by writing byte value C0h to I/O address 22h.

Write the modified value back to CCR0. This is done by writing the modified byte

value to I/O address 23h.

Procedure for re-entering clock-doubled mode:

Set the processor configuration index register to point to Configuration Control

Register 0 (CCR0). This is done by writing byte value C0h to I/O address 22h.

Read the contents of CCR0 from the configuration data register. This is done by

doing an I/O read of address 23h.

ANC109 -- Changing Clock Speed of cpuModules

Real Time Devices, Inc. 4

Modify the returned value by performing a bit-wise OR with byte value 40h.

Set the processor configuration index register to again point to CCR0. This is done

by writing byte value C0h to I/O address 22h.

Write the modified value back to CCR0. This is done by writing the modified byte

value to I/O address 23h.

Example Program

The following is a brief example program in QuickBasic, showing how to change

the clock speed using the Clock Control Register. This example includes the code

for exiting and re-entering clock-doubled mode. This is not necessary for

cpuModules without clock-doubled processors.

'exit clock-doubled mode

out (&h22, &hC0) 'select CCR0

x = inp(&h23) 'read contents

x = x AND &hBF 'modify bits to disable clock doubling

out (0x22,&hC0) 'select CCR0

out (&h23, x) 'write modified value

'disable turbo mode

out (&hf4, 0) 'write to disable turbo mode

'change clock speed

out (&hEC, &h07) 'select Clock Control Register in VLSI

x = inp(&hED) 'read contents

x = x AND &h9F 'clear bits CLK2DIV1 and CLK2DIV0

x = x OR &h40 'set bits to 10 to divide by 3

out (0xEC,&h07) 'select Clock Control Register in VLS

out (&hED, x) 'write modified value

're-enter clock-doubled mode

out (&h22, &hC0) 'select CCR0

x = inp(&h23) 'read contents

x = x OR &h40 'modify bits to enable clock doubling

out (0x22,&hC0) 'select CCR0

out (&h23, x) 'write modified value

ANC109 -- Changing Clock Speed of cpuModules

Real Time Devices, Inc. 5

For Further Information

If you need further assistance on this topic, please contact factory technical

support at:

Real Time Devices

P.O. Box 906

State College, PA 16804 USA

Phone: (814) 234-8087

Fax: (814) 234-5218

Faxback: (814) 235-1260

If you have comments or corrections for this application note we would also like

to hear from you. Please contact us at the above address.





Comment on "Changing clock speed of cpuModules"
Comments:  
*  You can enter [0] more charecters.
*Verify code:
 
 
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

 

Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

 
Back to Top