beautypg.com

3 ram loses data when powered down, 4 unable to invoke stop mode, 5 serial port does not work – Maxim Integrated Secure Microcontroller User Manual

Page 177: 6 program will not execute, Oses, Owered, Nable to, Nvoke, Erial, Rogram

background image

Secure Microcontroller User’s Guide

177 of 187

2)

Time is not changing. The timekeeper oscillator must be enabled if the RTC is to be used. If the
oscillator is off, the time will remain as it was written.

18.3 RAM Loses Data When Powered Down

The battery is drained, and no longer has sufficient capacity to create a voltage that sustains data in the
absence of power. This could occur if a negative voltage (below -0.3V) has been applied to the part on
any pin. Look for undershoots on power or signals. Also, the power could have been applied in reverse
polarity or a DS5000(T) could have been plugged in backwards. If this happens to a module, the part may
still work, but will not retain memory. Note that lithium batteries have a very long time constant. Putting
the device on the shelf for one to two weeks may restore enough voltage to battery back the memory
again. The lifetime of such a battery will be reduced, however.

18.4 Unable to Invoke Stop Mode

Unlike the 8051, the STOP bit in the PCON register is timed-access protected. Existing 8051 code will
not use the timed-access procedure, so the STOP mode would not be successfully invoked.

18.5 Serial Port Does Not Work

The serial port is not a complicated peripheral, but there are many elements that need to be initialized.
The following checklist is provided to help in debugging.

1) Are the P3.0 (RXD) and P3.1 (TXD) bits in the Port 3 SFR latch set to 1?
2) Is the correct serial port mode selected?
3) If using serial port mode 1 or 3, is appropriate timer reload value selected?
4) If using serial port mode 1 or 3, is timer 1 enabled? (TCON.6)
5) If desired, is the serial port doubler bit, SMOD, set? (PCON.7)
6) If desired, is the receiver enable bit, REN, set? (SCON.4)
7) Is the serial port interrupt bit, ES, set? (IE.4)
8) Is the global interrupt enable bit, EA, set? (IE.7)

18.6 Program Will Not Execute

This is a general category of complaint. In most cases more information is needed. Prior to calling for
applications support, check the status of ALE,

PSEN, XTAL2, ports, and RST. Also, try adding

instructions that write a value to the ports to see which sections of code are being run and which are not
(similar to using print statements). The following is a list of some common reasons that the program will
not execute.

EA is floating.
The

EA pin has an internal pulldown resistor. If EA is unconnected, it floats to a low state, forcing the use

of the expanded bus on Ports 0 and 2, and disabling internal NV RAM. Connect

EA directly to +5V for

proper operation.

Crystal is not running.
Check the capacitance used with the crystals. Approximately 20pF–40pF is typical. Take note of any
stray capacitance that could increase the actual loading.