Cpu_select(), Table 4: clock speeds and baud rates supported, E 51) – Maxim Integrated 73S12xxF Software User Manual

Page 51

Advertising
background image


UG_12xxF_016

73S12xxF Software User Guide

Rev. 1.50

51

Return Codes None.

4.2.8 Clock Generator Circuit API – Available with all 73S12xxF Devices

The Clock Generator API configures the system clock speed.

CPU_Select()

Purpose

Select the CPU speed. This API should be called after

API_Init()

is called if a

change in CPU speed is desired. The default speed is 3.69 MHz. Care should be
taken when selecting speeds other than 3.69 MHz, as the speed will affect the
number of supported Serial baud rates and timers API. The timer and Serial baud
rates will be adjusted internally by the LAPI. A wait state will be inserted to allow
USB I/O access time, i.e. CKCON will be set to the appropriate value to adjust wait
states.

Synopsis

void CPU_Select ( enum CPU_SPEED speed )


Parameters

speed: Input parameter
Specifies which CPU speed to run. Possible values are

CPU_3Mhz69 0,
CPU_6Mhz

1,

CPU_12Mhz

2,

CPU_24Mhz 3

Return Codes None.

Some CPU speeds will limit the number of Serial baud rates supported.

Table 4

lists the baud rates

supported by specific CPU clock rates.

Table 4: Clock Speeds and Baud Rates Supported

Baud Rate (bps)

CPU Clock Rate

3.69

MHz

6 MHz

12

MHz

24 MHz

600

X

1200

X

X

2400

X

X

X

4800

X

X

X

9600

X

X

X

14400

X

X

X

X

19200

X

X

28800

X

X

X

38400

X

57600

X

X

115200

X

115385

X

187500

X

375000

X

750000

X

//Can only support these rates when the CPU is running at 3.69 MHz
//CPU_3Mhz69
{BPS_600_3MHz69, BPS_1200_3MHz69, BPS_2400_3MHz69, BPS_4800_3MHz69,
BPS_9600_3MHz69, BPS_14400_3MHz69, BPS_19200_3MHz69, BPS_28800_3MHz69,

Advertising