For NXP (founded by Philips) LPC2366 — Clock Source & Dividers
Simulation support for this peripheral or feature is comprised of:
- Dialog boxes which display and allow you to change peripheral configuration.
- VTREGs (Virtual Target Registers) which support I/O with the peripheral.
These simulation capabilities are described below.
Clock Dividers Dialog
The Clock Dividers dialog displays the registers and settings for
the CPU and Peripheral clock supported by this device. The Peripheral
Clock list allows you to specify a different clock divider for each
CPU Clock Configuration
CCLKCFG (CPU Clock Configuration Register) contains the
8-bit divisor used to create the CCLK signal from the PLL
CCLKSEL (CPU Clock Configuration Selection) holds the
8-bit divisor value used to create the CCLK signal from the PLL
CCLK (CPU Clock) displays the resulting CPU clock value
USB Clock Configuration
USBCLKCFG (USB Clock Configuration Register) contains
the 4-bit divisor used to create the USBCLK signal from the PLL
USBSEL (USB Clock Configuration Selection) holds the
4-bit divisor value used to create the USBCLK signal from the PLL
USBCLK (USB Clock) displays the resulting USB clock
value in MHz.
Clock Source Dialog
The Clock Source dialog selects the source of the input clocking
to the PLL.
Clock Source Select
CLKSRCSEL (Clock Source Select Register) contains the
2-bit selectiong value.
CLKSRC (Clock Source Selection) reflects the setting the
the CLKSRCSEL register.
Oscillators (XTAL, IRC and RTCX) text boxes allow you to
change the frequency of a clock source.
Data Type: unsigned long
The CLOCK VTREG contains the speed of the microcontroller
instruction clock (in Hertz). This is effectively the number of
1-cycle instructions that the simulated microcontroller can execute
each second. This number is derived by dividing the oscillator
frequency (specified by the XTAL VTREG) by a fixed number. CLOCK is a
read-only VTREG. It may not be changed directly. It changes when the
value of the XTAL VTREG or the clock divisor (which is not available
on all devices) changes.
Data Type: unsigned long
The XTAL VTREG contains the frequency of the oscillator (in Hertz)
used to drive the microcontroller. The value is automatically set
from the value specified in Project Options - Options for Target.
However, you may change the value of XTAL using the command window.
You may also output the current value of XTAL using the
XTAL may be used in calculations to synchronize external scripts
with the simulated microcontroller.