For Infineon XC886-8FF — Clock Control
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 Control Dialog
The Clock Generation dialog displays and allows you to specify the
PLL and oscillator configuration for the MCU clock.
OCS_CON (OSC Control Register) contains the following
control bit settings:
OSCR (Oscillator Run Status Bit) when set, indicates
that the oscillator is running.
OSCSS (Oscillator Source Select) when set, selects the
OSCPD (On-chip OSC Power-down Control) when set, powers
down the on-chip oscillator.
ORDRES (Oscillator Run Detection Reset) when set, the
oscillator run detection logic is reset and restarted.
XPD (XTAL Power-down Control) when set, power is removed
PLL_CON (PLL Control Register) contains the following
PLL control bit settings:
LOCK (PLL Lock Status Flag) when set, indicates the PLL
OSCDISC (Oscillator Disconnect) when set, disconnects
the oscillator from the PLL. If reset, it is connected.
RESLD (Restart Lock Detection) when set, resets the PLL
lock status flag(LOCK) and restarts the lock detection.
VCOBYP (PLL VCO Bypass Mode Select) when set, the
derives the PLL clock from the oscillator clock divided by 2.
NDIV (PLL N-Divider) selects the N-divider value to
produce required system clock frequency.
CMCON (Clock Control Register) contains the CLKREL
CLKREL (Clock Divider) selects the slow-down clock
Oscillators & CPU Clock
XTAL Freq. (Off Chip) specifies the crystal oscillator
frequency in Hz.
- On Chip Freq. displays on chip frequency in Hz.
CPU Clock displays the resulting system clock frequency
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 from the selected oscillator
frequency and clock prescaler and PLL settings (if present). The
CLOCK VTREG can only be read. It can not be changed directly. It can
only be changed by changing the value of the selected oscillator
frequency or by changing the clock prescaler or PLL settings (not
available on all devices).
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.