beautypg.com

Troubleshooting, 1 device operates at one-third the crystal speed, 2 device resets for no reason – Maxim Integrated High-Speed Microcontroller User Manual

Page 172: 3 access to internal movx sram is unsuccessful

background image

High-Speed Microcontroller User’s Guide

Rev: 062210

172 of 176

17. TROUBLESHOOTING

17.1 Device Operates at One-Third the Crystal Speed

The high-speed microcontroller family operates from the primary or fundamental mode of the external
crystal. Many off-the-shelf high-frequency crystals are specified to operate from their third overtone.
When used with a high-speed microcontroller, these crystals will resonate in their primary mode, which
appear to be one-third of the rated crystal speed. Make sure that any crystals used operate at their rated
speed in primary mode.

17.2 Device Resets for No Reason

During the debugging process, it may 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 appear as unplanned power-on
resets.

SOURCE

POR BIT

WDCON

.6

WTRF BIT

WDCON

.3

Power-On Reset

1

0

Watchdog Reset

0

1

External Reset

0

0

17.3 Access to Internal MOVX SRAM Is Unsuccessful

The internal MOVX SRAM available on some members of the high-speed microcontroller family is
disabled after any reset. To enable the on-chip SRAM, the software should configure the data memory
enable bits (

PMR

.1–0) as needed.


When V

CC

drops below V

BAT

, access to the SRAM is disabled to prevent corruption of the data. If the

battery voltage is greater than V

RST

, this means that the processor can continue to operate while SRAM

access is denied. Make sure that the battery voltage remains below the minimum V

RST

.

17.4 Real-Time Clock Does Not Operate or Keep Accurate Time

The state of the RTC used on the DS87C530 is undefined following a no-battery reset or battery attach.
For the RTC to work, the RTC oscillator must be enabled by setting the RTCE bit (

RTCC

.0).


The RTC is guaranteed to a minimum accuracy of ±2 minutes per month over the rated temperature and
voltage specifications. If the time is found to be less accurate than this, it is most likely due to the
selection of crystal. Make sure that the RTC crystal is 32.768kHz, and either 12.5pF or 6pF capacitance.
The 12/6-bit (

TRIM

.6) setting should correspond to the crystal in use. Unlike other crystals, external load

capacitors should not be used with the RTC. These will seriously distort the accuracy of the clock.
Additional information on design considerations with the RTC can be found in Application Note 79:
Using the DS87C530/DS5250 Real-Time Clock
.