XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-2
V2.1, 2008-08
CPUSV2_X, V2.2
In contrast to other on-chip peripherals, there is a closer conjunction between the
watchdog timer and the CPU. If enabled, the watchdog timer expects to be serviced by
the CPU within a programmable period of time, otherwise it will reset the chip. Thus, the
watchdog timer is able to prevent the CPU from going astray when executing erroneous
code. After reset, the watchdog timer starts counting automatically but, it can be disabled
via software, if desired.
In addition to its active operation state, the CPU can enter idle mode by executing the
IDLE instruction. In idle mode the CPU stops program execution but still reacts to
interrupt or PEC requests. Transition to the active state can be forced by an interrupt
request or a reset.
A set of Special Function Registers is dedicated to the CPU core (CSFRs):
•
CPU Status Indication and Control:
PSW, CPUCON1, CPUCON2
•
Code Access Control:
IP, CSP
•
Data Paging Control:
DPP0, DPP1, DPP2, DPP3
•
Global GPRs Access Control:
CP
•
System Stack Access Control:
SP, SPSEG, STKUN, STKOV
•
Multiply and Divide Support:
MDL, MDH, MDC
•
Indirect Addressing Offset:
QR0, QR1, QX0, QX1
•
MAC Address Pointers:
IDX0, IDX1
•
MAC Status Indication and Control:
MCW, MSW, MAH, MAL, MRW
•
ALU Constants Support:
ZEROS, ONES
The CPU also uses CSFRs to access the General Purpose Registers (GPRs). Since all
CSFRs can be controlled by any instruction capable of addressing the SFR/CSFR
memory space, there is no need for special system control instructions.
However, to ensure proper processor operation, certain restrictions on the user access
to some CSFRs must be imposed. For example, the instruction pointer (CSP, IP) cannot
be accessed directly at all. These registers can only be changed indirectly via branch
instructions. Registers PSW, SP, and MDC can be modified not only explicitly by the
programmer, but also implicitly by the CPU during normal instruction processing.
Note: Note that any explicit write request (via software) to an CSFR supersedes a
simultaneous modification by hardware of the same register.