beautypg.com

Troubleshooting, 1 unexplained device resets, 2 ds5000t/ds2250t reports the incorrect time/date – Maxim Integrated Secure Microcontroller User Manual

Page 176: Nexplained, Evice, Esets, Ds5000t/ds2250t, Eports the, Ncorrect

background image

Secure Microcontroller User’s Guide

176 of 187

18. TROUBLESHOOTING

Maxim’s secure microcontroller family has proven itself to be a reliable and easy-to-use product. As with
any highly integrated device, however, questions and or problems can arise during its use and
development. Many of these stem from inadvertent attempts to design with the secure microcontroller as
though it were exactly an 8051. To reduce these difficulties, Maxim has gathered the common problems
in this section. These are the result of thousands of application questions and represent the most likely
sources of trouble. The following section is organized by symptom, with suggested remedies. If these fail,
Maxim applications engineers are available to assist you. The next section lists specific do’s and don’ts
for designing with secure microcontrollers. These are largely based on the default practices of 8051 and
other microcontroller users.

18.1 Unexplained Device Resets

Several features in the device can cause a reset. Because many of these are unique to the secure
microcontroller family, a traditional 8051 user may be unaware of them.

1) Watchdog Timer. If the watchdog timer is enabled, it will cause a reset every 122,800 machine

cycles. At 12MHz, this is 122.8ms. The Watchdog may be operating even though it was never
deliberately enabled. If the Watchdog is not used, deliberately disable it in software as part of the
reset vector. If it is used, the code may be missing an opportunity to strobe the Watchdog leading to
an accidental reset.

2) Power Supply Glitches. The soft microprocessor monitors V

CC

for a power failure. When power

drops below its V

CCMIN

threshold, the microprocessor will reset. Good decoupling can eliminate resets

due to noise. A 10µF and a 0.1µF capacitor are reasonable values, but actual selections depend on the
system. Note: Be especially wary of synchronous resets. That is, if every time an event occurs, the
microprocessor resets. The event (i.e., turning on a motor) could be causing a dip in V

CC

.

3) Electrostatic Discharge. Most microprocessors lose control during a large static burst. The watchdog

timer catches an out-of-control processor. This appears as a watchdog timer reset.


During the debugging process, it can be necessary to isolate the cause of an unexpected device reset.
Because resets are initiated by a limited number of sources, it is relatively easy to determine their source
by interrogating a few bits. These bits should be interrogated early in the code following a reset to
determine its source. As a debug tool, software could set the state of one or more port pins to indicate the
type of reset to the designer. Note that power supply problems or glitches will most likely appear as
unplanned power-on resets.

SOURCE

POR

BIT

PCON.6

WTR BIT

PCON.4

Power-On Reset

0

0

Watchdog Reset

0

1

External Reset

1

0

18.2 DS5000T/DS2250T Reports the Incorrect Time/Date

1)

Shift register corruption of the internal real-time clock. When using a DS5000T or DS2250T and
ECE2=1, any MOVX will increment the clock pointer. If the microcontroller receives an interrupt
while reading the clock, a MOVX done as part of the ISR will alter the clock pointer. Either disable
interrupts while in the clock or clear ECE2 as soon as an interrupt occurs.