
System Protection And Reset Status
MOTOROLA
System Integration Module
9-17
Figure 9-1 MCF5249 Unterminated Access Recovery
When the SWT times out and SWRI register bit is programmed for a software reset, an internal reset will
be asserted, and the SWTR register bit will be set in the RSR.
To prevent SWT from interrupting or resetting, users must service the SWSR register. The SWT service
sequence consists of the following steps:
1. Write $55 to SWSR
2. Write $AA to the SWSR
Both writes must occur in the order listed prior to the SWT timeout, but any number of instructions or
accesses to the SWSR can be executed between the two writes. This order allows interrupts and
exceptions to occur, if necessary, between the two writes.
Caution should be exercised when changing system protection control register (SYPCR) values after the
software watchdog timer (SWT) has been enabled with the setting of the SWE register bit, because it is
difficult to determine the state of the SWT while the timer is running. The SWP and SWT[1:0] bits in
SYPCR determine the SWT timeout period. The countdown value determined by the SWP and SWT[1:0]
bits is constantly compared with that specified by these bits. Therefore, altering the contents of the SWP
and SWT[1:0] bits improperly will result in unpredictable processor behavior. The following steps must be
taken in order to change one of these values in the SYPCR:
CODE ENABLES SWT INTERRUPT AND
1. SWT TIMES-OUT DUE TO UN-TERMINATED BUS
2. UNABLE TO SERVICE SWT INTERRUPT DUE TO “HUNG” BUS
CYCLE. WAIT ANOTHER SWT TIMEOUT BEFORE SETTING SWTA.
SWT TIMEOUT
SWTAVAL 2
SWT TA 1
SWT IRQ 1
SWTA FUNCTIONALITY BY WRITING SYPCR
(BIT 1 IN SYPCR)
SWT IACK CYCLE
CODE IN SWT INTERRUPT HANDLER POLLS THE
SWTAVAL BIT IN THE SYPCR TO DETERMINE
WHETHER OR NOT SWT TA WAS NEEDED.
IF SO, EXECUTE CODE TO IDENTIFY BAD ADDRESS.
3. HELD UNTIL ANOTHER
BUS CYCLE STARTS
PROBLEM:
NOTE: RECOMMEND THAT SWT IRQ
BE SET TO THE HIGHEST LEVEL IN THE SYSTEM.
1 SWT IRQ AND SWT TA ARE ACTIVE-LOW SIGNALS.
2 SWTAVAL IS SET TO ‘1’ IF SWT TA SIGNAL IS ASSERTED.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.