
#)
User
’
s Manual
18-2
1999-08
18.1
Reset Sources
Several sources (external or internal) can generate a reset for the C161PI. Software can
identify the respective reset source via the reset source indication flags in register
WDTCON. Generally any reset causes the same actions on the C161PI
’
s modules. The
differences are described in the following sections.
Hardware Reset
A hardware reset is triggered when the reset input signal RSTIN is latched low. To ensure
the recognition of the RSTIN signal (latching), it must be held low for at least 100 ns plus
2 CPU clock cycles (input filter plus synchronization). Also shorter RSTIN pulses may
trigger a hardware reset, if they coincide with the latch
’
s sample point. The actual
minimum duration for a reset pulse depends on the current CPU clock generation mode.
The worstcase is generating the CPU clock via the SlowDown Divider using the maximum
factor while the configured basic mode uses the prescaler (
f
CPU
=
f
OSC
/ 64 in this case).
After the reset sequence has been completed, the RSTIN input is sampled again. When
the reset input signal is inactive at that time, the internal reset condition is terminated
(indicated as short hardware reset, SHWR). When the reset input signal is still active at
that time, the internal reset condition is prolonged until RSTIN gets inactive (indicated as
long hardware reset, LHWR).
During a hardware reset the inputs for the reset configuration (PORT0, RD) need some
time to settle on the required levels, especially if the hardware reset aborts a read
operation from an external peripheral. During this settling time the configuration may
intermittently be wrong. For the duration of one internal reset sequence after a reset has
been recognized the configuration latches are not transparent, i.e. the (new)
configuration becomes valid earliest after the completion of one reset sequence. This
usually covers the required settling time.
When the basic clock is generated by the PLL the internal reset condition is automatically
extended until the on-chip PLL has locked.
The input RSTIN provides an internal pullup device equalling a resistor of 50 K
to
150 K
(the minimum reset time must be determined by the lowest value). Simply
connecting an external capacitor is sufficient for an automatic power-on reset (see b) in
figure above). RSTIN may also be connected to the output of other logic gates (see a) in
figure above). See also section
Bidirectional Reset
“
in this case.
Note: A power-on reset requires an active time of two reset sequences (1036 CPU clock
cycles) after a stable clock signal is available (about 10...50 ms, depending on the
oscillator frequency, to allow the on-chip oscillator to stabilize).