
CPU16
REFERENCE MANUAL
EXCEPTION PROCESSING
MOTOROLA
9-11
9.7.1.2 Bus Error (BERR)
BERR is caused by assertion of the IMB BERR signal. BERR can be asserted by any
of three sources:
1. External logic, via the BERR pin.
2. Another microcontroller module.
3. Microcontroller system watchdog functions.
Refer to the appropriate microcontroller user's manual for more information.
BERR assertions do not force immediate exception processing. The signal is synchro-
nized with normal bus cycles and is latched into the CPU16 at the end of the bus cycle
in which it was asserted. Since bus cycles can overlap instruction boundaries, bus er-
ror exception processing may not occur at the end of the instruction in which the bus
cycle begins. Timing of BERR detection/acknowledge is dependent upon several fac-
tors:
Which bus cycle of an instruction is terminated by assertion of BERR.
The number of bus cycles in the instruction during which BERR is asserted.
The number of bus cycles in the instruction following the instruction in which BERR
is asserted.
Whether BERR is asserted during a program space access or a data space ac-
cess.
Because of these factors, it is impossible to predict precisely how long after occur-
rence of a bus error the bus error exception will be processed.
Caution
The external bus interface in the system integration module does not
latch data when an external bus cycle is terminated by a bus error.
When this occurs during an instruction prefetch, the IMB precharge
state (bus pulled high, or $FF) is latched into the CPU16 instruction
register, with indeterminate results. Refer to
SECTION 3 SYSTEM
RESOURCES
for more information concerning the IMB and bus in-
terfacing.
Bus error exception support in the CPU16 is provided to allow for dynamic memory
sizing after reset. To implement this feature, use a small routine similar to the example
below. The example assumes that memory starts at address $00000, and is contigu-
ous through the highest memory address —it must be modified for other memory
maps.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.