AN2616 Freescale Semiconductor / Motorola, AN2616 Datasheet - Page 31

no-image

AN2616

Manufacturer Part Number
AN2616
Description
Getting Started with HCS08 and CodeWarrior Using C
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Invoke the debugger
Set clock frequency
MOTOROLA
CAUTION:
An important consideration in setting the FLL is that, if the HCS08 serial monitor
is being used for debugging, then changing the processor speed from that set
by the monitor will cause CodeWarrior to lose control of the device, unless the
SCI speed is also adjusted to take account of the change in processing speed.
BDM operation is unaffected by changes in processor speed, as it either has a
separate fixed frequency clock (as MC9S08GB60), or the BDM pod has the
ability to re synchronize in the event of the device changing frequency.
The Internal Clock Generator (ICG) used within the MC9S08GB60 has an FLL
that allows a frequency higher than the reference source (for example, crystal
or internal oscillator) to be generated. This enables the processor frequency to
be optimized in terms of power consumption and performance.
The demo board includes a 32.768 kHz crystal, while the evaluation board has
a 4 MHz crystal on board. The crystals allow the device to operate at a
maximum frequency of 18.87 MHz for the demo board (32.768 kHz) and
20 MHz for the evaluation board (4 MHz).
The formula for calculating the bus frequency is:
Where
Getting Started with HCS08 and CodeWarrior Using C
Freescale Semiconductor, Inc.
For More Information On This Product,
In CodeWarrior, press the Debug button (
program and produces an executable file, which invokes the debugger.
The debugger erases the FLASH and downloads the code to the device.
In the debugger, press RUN (
Pressing SW1 will cause an interrupt, which will read SW4 and set LED1
accordingly.
LED2, LED3, LED4 and LED5 (buzzer) will still function as before.
P = 1 or 64 (high or low frequency range)
N[0:7] = {4, 6, 8, 10, 12, 14, 16, or 18}
R[0:7] = 1, 2, 4, 8, 16, 32, 64, or 128
Go to: www.freescale.com
Bus frequency = ((f
IRG
); the application will run.
÷ 7) × P × N ÷ R) ÷ 2
Developing an Application with CodeWarrior
). This compiles the
AN2616
31

Related parts for AN2616