English
Language : 

DS80C320-MCG Datasheet, PDF (156/175 Pages) Dallas Semiconductor – High-Speed Microcontroller User Guide
High-Speed Microcontroller User’s Guide
This is regardless of whether any bits were modified. Figure 13-1 illustrates a number of examples of
correct and incorrect use of the Timed Access procedure.
TIMED ACCESS EXAMPLES Figure 13-1
three machine cycles
MOV 0C7h, #0AAh
three machine cycles
MOV 0C7h, #55h
three machine cycles
SETB EWT
three machine cycles
MOV 0C7h, #0AAh
three machine cycles
MOV 0C7h, #55h
one machine cycle
NOP
two machine cycles
SETB EWT
three machine cycles
MOV 0C7h, #0AAh
three machine cycles
MOV 0C7h, #55h
three machine cycles
MOV WDCON, #02h
VALID TIMED ACCESS PROCEDURES
three machine cycles
MOV 0C7h, #0AAh
one machine cycles
NOP
three machine cycle
MOV 0C7h, #55H
two machine cycles
SETB EWT
*Second write to TA register does not occur within 3 cycles of first write.
three machine cycles
MOV 0C7h, #0AAh
three machine cycles
MOV 0C7h, #55H
one machine cycle
NOP
three machine cycles
MOV WDCON, #02h
*Modification of protected bit did not occur with 3 cycles of second write to TA register.
three machine cycles
MOV 0C7h, #0AAh
three machine cycles
MOV 0C7h, #55h
two machine cycle
SETB EWT
two machine cycles
SETB EWT
*Modification of second protected bit did not complete within 3 cycles of second write to TA register.
INVALID TIMED ACCESS PROCEDURES
TIMED ACCESS PROTECTS WATCHDOG
Any microcontroller-based system can be faced with environmental conditions that are beyond its
designed abilities. These include external signal transients due to component failure, fluctuating power
conditions, massive electrostatic discharge (ESD), and other unexpected system events. When a
microcontroller is exposed to such conditions, program execution can become corrupted. Members of the
High-Speed Microcontroller family which incorporate a Watchdog Timer can initiate a reset to recover
from these conditions. The primary function of the Timed Access feature is to protect against accidental
disabling of the watchdog timer by an “out-of-control” device. This will allow the watchdog timer to
reset the system in the event of program execution failure.
The following hypothetical example demonstrates how a single bit change can corrupt program
execution. The Timed Access procedure protects against an accidental write to the EWT bit by the errant
code, allowing the watchdog timer reset function to reset the device. While this is a purely fictitious
example, it illustrates how the watchdog timer and Timed Access feature make the High-Speed
Microcontroller minimize the effect of accidental code corruption. Note: Timed Access is not optional
and must be supported if the protected bits are used. This example simply helps explain the category of
problem that the Timed Access prevents.
156 of 175