Motorola reserves the right to make changes without further notice to any products herein to
improve reliability, function or design. Motorola does not assume any liability arising out of the
application or use of any product or circuit described herein; neither does it convey any license
under its patent rights nor the rights of others. Motorola products are not designed, intended, or
authorized for use as components in systems intended for surgical implant into the body, or other
applications intended to support or sustain life, or for any other application in which the failure
of the Motorola product could create a situation where personal injury or death may occur.
Should Buyer purchase or use Motorola products for any such unintended or unauthorized
application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries,
affiliates, and distributors harmless against all claims, costs, damages, and expenses, and
reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or
death associated with such unintended or unauthorized use, even if such claim alleges that
Motorola was negligent regarding the design or manufacture of the part.
emiconduct
eescale S
Fr
CPU32Bug is a trademark of Motorola Inc.
White Knight is a trademark of FreeSoft Company.
MacTerminal, Apple, and Macintosh are trademarks of Apple Computer, Inc.
IBM-PC is a registered trademark of International Business Machines Corporation.
The computer program stored in the read only memory of the device contains material
copyrighted by Motorola Inc., first published in 1989, and may be used only under a license such
as the License For Computer programs (Article 14) contained in Motorola Terms and Conditions
of Sale, Rev. 1/79.
5-4J9 RS-232C Serial Communication Connector Pin Assignments...................................... 5-8
M68332BCC/DiiiMOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 6
Freescale Semiconductor, Inc.
TABLE OF CONTENTS
nc...
, I
or
emiconduct
eescale S
Fr
M68332BCC/DivMOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 7
Freescale Semiconductor, Inc.
GENERAL INFORMATION
CHAPTER 1
GENERAL INFORMATION
1.1 INTRODUCTION
This manual provides general information, hardware preparation, installation instructions,
functional description, and support information for the M68332BCC Business Card Computer
(hereafter referred as BCC). Appendix A contains BCC downloading S-record information.
nc...
, I
or
emiconduct
eescale S
Fr
1.2 FEATURES
The BCC is a single-board computer complete with these features:
• MC68332 Microcontroller Unit (MCU)
• 64k x 16 bit, two erasable programmable read only memories (EPROMs).
Programmed into the BCC EPROMs is the M68CPU32BUG Debug Monitor. Refer to
the M68CPU32BUG Debug Monitor User's Manual, M68CPU32BUG/AD1.
• 32k x 16 bit, byte addressable random access memory (RAM)
• RS-232C compatible terminal/host computer input/output (I/O) port
• Background mode interface port
• EVS expansion connectors
• 2.25 x 3.875 in. (5.7 x 9.84 cm) PCB
The BCC can be used as a stand-alone evaluation module or can be connected directly to a target
system. The BCC is primarily intended to be used with a terminal or host computer. When using
a host computer, a user must have a terminal emulation package for BCC downloading
operations.
M68332BCC/D1-1MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 8
Freescale Semiconductor, Inc.
1.3 SPECIFICATIONS
Table 1-1 lists the BCC specifications.
Table 1-1. BCC Specifications
CHARACTERISTICSSPECIFICATIONS
GENERAL INFORMATION
nc...
, I
or
emiconduct
Internal Clock
External Clock
Memory
32k x 16 RAM
64k x 16 EPROM
Terminal/Host I/O PortRS-232C compatible (with internal DC-DC converters for
Temperature
Operating
Storage
Relative humidity
Power Requirements
Power Supply
Battery Backup
Dimensions2.25 x 3.875 in. (5.7 x 9.84 cm)
1. An optional high frequency clock source (as high as 16.77 MHz) may be used if MODCK
(P2, pin 28) is pulled to a logic low level. A hybrid oscillator is recommended as the
external clock.
Using the BCC, the user can design, debug, and evaluate MC68332 Microcontroller Unit (MCU)
based target systems. The BCC simplifies user evaluation of prototype hardware/software
products. The BCC requires a user-supplied power supply and an RS-232C compatible terminal
for functional operation.
The BCC can operate as a standalone single board computer, or as a well-defined core in larger
applications. Mounted on the BCC is a microcontroller, on-board memory, and a serial level
converter circuit.
Two 64-pin expansion connectors provide access to the MC68332 pins. Background mode
operation and RS-232C serial communication are available through the 64-pin expansion
connectors. Additional connectors also provide background mode operation and RS-232C serial
nc...
communication. See Chapter 5 for interface connector pin assignments.
, I
or
emiconduct
eescale S
Fr
The BCC is factory tested and shipped with factory installed jumpers. These jumpers allow the
user to customize the BCC functionality when special design considerations are required.
The M68CPU32BUG Debug Monitor (CPU32Bug) is programmed into the BCC EPROMs.
CPU32Bug is a software evaluation and debug tool which may be used to develop systems built
around the MCU. Using the debug monitor, the user interacts with the BCC through pre-defined
monitor commands which are entered at the terminal/host computer keyboard. These commands
perform functions such as modification of memory, modification of MCU internal registers,
program execution under various levels of control, and access to various I/O peripherals in the
MCU itself.
To program the BCC EPROMs you must remove the EPROMs and use an EPROM programmer.
M68332BCC/D1-3MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 10
Freescale Semiconductor, Inc.
1.5 EQUIPMENT REQUIRED
Table 1-2 lists the external equipment requirements for BCC operation.
Table 1-2. External Equipment Requirements
EXTERNAL EQUIPMENT
GENERAL INFORMATION
nc...
, I
or
emiconduct
A terminal or host computer (RS-232C compatible) with a terminal emulation package
(PCKERMIT, PROCOMM, MacTerminal, White Knight, etc.)
RS-232C serial communication cable for the terminal or host computer
+5 Vdc at 200 mA power supply
1.Refer to Chapter 3 for details on downloading using a host computer with terminal emulation
package.
2. Refer to Chapter 2 for details.
(2)
(1)
(2)
.
eescale S
Fr
M68332BCC/D1-4MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 11
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
CHAPTER 2
HARDWARE PREPARATION AND INSTALLATION
2.1 INTRODUCTION
This chapter provides unpacking instructions, hardware preparation, and installation instructions
for the BCC prior to target system installation. This description ensures the BCC is properly
configured for target system operation.
nc...
, I
or
emiconduct
eescale S
Fr
2.2 UNPACKING INSTRUCTIONS
Unpack the BCC from shipping carton. Refer to the packing list and verify that all items are
present. Save packing material for storing and shipping the BCC.
NOTE
If the product arrives damaged, save all packing material, and contact the
carrier’s agent.
2.3 HARDWARE PREPARATION
This portion of text describes the inspection and preparation of the BCC prior to installation and
ensures the proper configuration for target system operation. The BCC was factory tested and
shipped with factory-installed jumpers (Figure 2-1 shows jumper header and connector
locations). These jumper headers allow the user to customize BCC functionality. Table 2-1 is a
description of the BCC jumper header types, and Table 2-2 is a summary of the BCC jumper
headers.
CAUTIONS
Use caution when handling the BCC; the signals are not buffered so the BCC
is sensitive to static discharge.
Depending on the application, it may be necessary to cut wiring trace shorts
(cut-trace shorts) on the PCB. Be careful not to cut adjacent PCB wiring
traces.
M68332BCC/D2-1MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 12
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
64-Pin Expansion Connector
nc...
, I
or
emiconduct
eescale S
Fr
P1
Background Mode
Connector
Clock Input
Select
J4
J5
J7
J6
RS-232C Serial
Communication
J8
64-Pin Expansion Connector
Select
RxD
Select
TxD
P2
J1
J2
J3
VSTBY
Select
RAM Chip
Select
EPROM Chip
Select
Figure 2-1. BCC Jumper Header and Connector Location Diagram
M68332BCC/D2-2MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 13
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
Table 2-1. Jumper Header Types
nc...
, I
or
emiconduct
eescale S
Fr
Jumper Header
three-pin with jumperThree-pin jumper header with jumper and designated as JX (X =
two-pin with jumperTwo-pin jumper header with jumper, designated as JX (X = the
1. J7 and J8 are designated as jumper headers but they are in fact connectors.
Type
(1)
SymbolDescription
the jumper header number). To change the factory jumper header
configuration, move the jumper to the two desired pins.
jumper header number).
Table 2-2. Jumper Header Summary
Jumper
HeaderTypeDescription
J1
J2
J3
J4
(1)
(1)
(1)
(1)
2
1
3
2
1
3
2
1
2
1
Jumper between pins 1 and 2 (factory default); disables (grounds) the on-board
RAM (U1 & U3) voltage standby power (VSTBY) input pin. VSTBY maintains
the data in RAM if BCC power (+5Vdc) is turned off.
No jumper; enables the on-board RAM VSTBY function. The VSTBY voltage
must be supplied by the user.
Jumper between pins 1 and 2 (factory default); enables the on-board RAM
chips (U1 & U3).
Jumper between pins 2 and 3; disables the on-board RAM chips. This allows
the chip select to be used with off-board memory.
Jumper between pins 1 and 2 (factory default); enables the on-board EPROM at
U2.
Jumper between pins 2 and 3; disables the on-board EPROM at U2. This allows
the chip select to be used to boot from off-board memory.
Jumper between pins 1 and 2 (factory default); connects the on-board transmit
data serial communication drivers to the MC68332 MCU device.
No jumper; disconnects the on-board transmit data serial communication drivers
from the MC68332 MCU device. This allows connection of the MCU serial port
to off board logic.
1. These jumper headers are shorted by a trace on the solder side of the PCB (between the pins), as
shown in the schematics. Cut the trace when using the optional feature provided by the jumper.
M68332BCC/D2-3MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 14
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
Table 2-1. Jumper Header Summary (continued)
Jumper
HeaderTypeDescription
nc...
, I
or
emiconduct
(1)
J5
(1)
J6
J7
J8
1. These jumper headers are shorted by a trace on the solder side of the PCB (between the pins), as
shown in the schematics. Cut the trace when using the optional feature provided by the jumper.
10
2
1
3
2
1
8
6
4
2
4
3
2
1
Jumper between pins 1 and 2 (factory default); connects the on-board receive
data serial communication drivers to the MC68332 MCU device.
No jumper; disconnects the on-board receive data serial communication drivers
from the MC68332 MCU device. This allows connection of the MCU serial port
to off board logic.
Jumper between pins 1 and 2; selects an external clock source for the
MC68332 MCU device.
Jumper between pins 2 and 3 (factory default); selects the on-board oscillator
as the MC68332 MCU device clock source.
9
10-pin background mode connector.
7
5
3
1
4-pin RS-232C serial connector.
eescale S
Fr
M68332BCC/D2-4MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 15
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
nc...
, I
or
emiconduct
2.3.1V
Use the two-pin jumper header J1 (shown below) to select a voltage standby (V
supply source. V
device. The BCC is shipped from the factory with V
cut-trace short. To power V
PCB and connect an external power supply between P1, pin 28 and any BCC ground pin. Refer
to the BCC schematic diagram for more detail on V
STBY
Select Header (J1)
STBY
provides battery backup to the RAM contained in the MC68332 MCU
STBY
64-Pin Expansion Connector
U5
V
STBY
MC68332 MCU
STBY
STBY
with an external supply, cut the trace on the bottom of the
STBY
P1
28
19
V
STBY
connected to ground (GND) via J1
signal wiring.
Fabricated Jumper
2
1
J1
GND
) power
eescale S
Fr
NOTE
If the cut-trace short on jumper header J1 is cut, a user-supplied fabricated
jumper must be installed on J1 to return the BCC to its default setting.
M68332BCC/D2-5MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 16
Freescale Semiconductor, Inc.
2.3.2RAM Chip Enable Select Header (J2)
Use the three-pin jumper header J2 (shown below) to enable/disable selection of the on-board
RAM. The BCC is shipped from the factory with the RAM chip select connected to GND via a
cut-trace short on the bottom of the BCC PCB between pins 1 and 2. A fabricated jumper is also
installed between pins 1 and 2. The cut-trace short or a fabricated jumper between pins 1 and 2
enables the BCC on-board RAM.
BR/CS0
BGACK/CS2
HARDWARE PREPARATION AND INSTALLATION
nc...
, I
or
emiconduct
eescale S
Fr
BG/CS1
J2
+5V
GND
To disable the RAM from the BCC memory map, cut the trace on the solder side of the board on
J2, between pins 1 and 2, and move the fabricated jumper to pins 2 and 3. This jumper disables
selection of the on-board RAM by connecting chip enable to +5V. The chip selects are now free
for other uses. Refer to the BCC schematic diagram for more detail on RAM chip select signal
wiring.
3
2
1
Fabricated Jumper
27
22
20
U4
WE
OE
CS
MCM6206
CAUTION
27
22
20
WE
OE
CS
U3
MCM6206
Do not connect the jumper between pins 2 and 3 before removing the cut-trace
short between pins 1 and 2. Installing the jumper before the cut-trace short i s
removed connects +5Vdc to ground. If +5Vdc is shorted to ground the BCC or
power supply may be damaged.
NOTE
If the cut-trace short on jumper header J2 is cut , th e fabricated j ump er must be
reinstalled on J2, pins 1 and 2 to return the BCC to its default setting.
M68332BCC/D2-6MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 17
Freescale Semiconductor, Inc.
2.3.3EPROM Chip Select Header (J3)
When BCC power is applied or reset occurs, the MC68332 MCU device resets itself and
downloads the program in EPROM (U1 & U2). The EPROM contains the boot program. Use the
three-pin jumper header J3 (shown below) to disable the BCC on-board EPROM. The BCC is
shipped from the factory with the EPROM connected to the MCU bootstrap chip select pin
CSBOOT
(
fabricated jumper is also installed between pins 1 and 2. To boot from a program stored in
memory located in the target system, cut this trace, move the jumper to pins 2 and 3, and connect
CSBOOT
fabricated jumper to pins 2 and 3, removes U1 & U2 from the BCC memory map. Refer to the
BCC schematic diagram for more detail on
) via a cut-trace short on the bottom of the BCC PCB between pins 1 and 2. A
to the target system via P2, pin 25. Cutting the cut-trace short and moving the
HARDWARE PREPARATION AND INSTALLATION
CSBOOT
signal wiring.
nc...
, I
or
emiconduct
eescale S
Fr
GND
112
+5V
3
2
1
J3
25
CSBOOT
20
22
64-Pin Expansion Connector
CAUTION
Fabricated Jumper
U5
CSB OOT
MC68 332 MCU
Do not connect the jumper between pins 2 and 3 before removing the cut-trace
short between pins 1 and 2. Installing the jumper before the cut-trace short i s
removed connects +5Vdc to (
the MCU may be damaged.
U2
20
CS
22
OE/VP P
27C512
P2
). If +5Vdc is shorted to (
CSBOOT
U1
CS
OE/VP P
27C512
)
NOTE
If the cut-trace short on jumper header J3 is cut , th e fabricated j ump er must be
reinstalled on J3 pins 1 and 2 to return the BCC to its default setting.
M68332BCC/D2-7MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 18
Freescale Semiconductor, Inc.
2.3.4TxD Select Header (J4)
Jumper header J4 allows the user to disconnect the transmit TxD serial data pin of the MC68332
MCU device (U5) from the RS-232C receiver/driver (U6) and use a target system
receiver/driver. The BCC is shipped from the factory with the receiver/driver connected to MCU
TxD (pin 52) via a cut-trace short on the bottom of the BCC PCB between J4, pins 1 and 2
(shown below). A fabricated jumper is also installed on pins 1 and 2. To disconnect the serial pin
of the MCU, cut this trace and remove the jumper.
HARDWARE PREPARATION AND INSTALLATION
64-Pin Expansion C onnector
P1
nc...
, I
or
emiconduct
eescale S
Fr
U5
TxD
MC68332 MCU
TxD
Fabricated Jumper
J4
52
1
XMT 232
24
P2
64-Pin Expansion C onnector
NOTE
2
15
53
U6
DI1 TX1
MC145407
6
If the cut-trace short on jumper header J4 is cut , th e fabricated j ump er must be
reinstalled on J4 to return the BCC to its default setting.
Refer to the BCC schematic diagram for more detail on TxD signal wiring.
M68332BCC/D2-8MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 19
Freescale Semiconductor, Inc.
2.3.5RxD Select Header (J5)
Jumper header allows the user to disconnect the receive RxD serial data pin of the MC68332
MCU device (U5) from the RS-232C receiver/driver (U6) and use a target system
receiver/driver. The BCC is shipped from the factory with receiver/driver connected to MCU
RxD via a cut-trace short on the bottom of the BCC PCB between J5, pins 1 and 2 (shown
below). A fabricated jumper is also installed on pins 1 and 2. To disconnect the RxD pin of the
MCU, cut this trace and remove the jumper.
HARDWARE PREPARATION AND INSTALLATION
64-Pin Expansion Connector
nc...
, I
or
emiconduct
eescale S
Fr
U5
RxD
MC68332 MCU
P1
RxD
Fabricated Jumper
J5
53
1
RCV 232
26
P2
64-Pin Expansion Connector
2
16
56
U6
DO1 RX1
MC145407
5
NOTE
If the cut-trace short on jumper header J5 is cut , th e fabricated j ump er must be
reinstalled on J5 to return the BCC to its default setting.
Refer to the BCC schematic diagram for more detail on RxD signal wiring.
M68332BCC/D2-9MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 20
Freescale Semiconductor, Inc.
2.3.6Clock Input Select Header (J6)
Use the three-pin jumper header J6 (shown below) to select the BCC on-board clock source or an
external clock source. The BCC on-board clock source is a 32 kHz crystal, which is frequency
multiplied by the MC68332 to a programmable operating frequency. The BCC is shipped with
the on-board crystal selected as the clock source. J6 has a cut-trace short on the bottom of the
BCC PCB between pins 2 and 3. A fabricated jumper is also supplied, but is not required when
the user uses the on-board clock source. Refer to the BCC schematic diagram for more detail on
EXTAL signal wiring.
HARDWARE PREPARATION AND INSTALLATION
nc...
, I
or
emiconduct
eescale S
Fr
BCC
On-Board
Oscillator
Fabricated Jumper
64-Pin Expansion Connector
3
J6
2
1
P2
EXTAL
60
XTAL
62
EXTAL
MC68332 MCU
59
U5
M68332BCC/D2-10MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 21
Freescale Semiconductor, Inc.
An optional high frequency oscillator (0 to 16.77 MHz) may be used if MODCK (connector P2,
pin 28) is pulled to a logic low level. To use the target-system, external-source CMOS clock;
follow these steps:
a. Turn off power to the BCC.
b. Cut the printed circuit trace on the bottom of the BCC between pins 2 and 3.
c. Move the fabricated jumper between pins 2 and 3 to pins 1 and 2.
d. Supply an external oscillator to connector P2, pin 59 (EXTAL).
e. Ground connector P2, pin 28 (MODCK).
f.Apply power to the BCC, start the external oscillator, and drive connector P1, pin 57
(RESET), low.
HARDWARE PREPARATION AND INSTALLATION
nc...
, I
or
emiconduct
eescale S
Fr
NOTES
If the cut-trace short on jumper header J6 is cut , th e fabricated j ump er must be
reinstalled on J6 pins 2 and 3 to return the BCC to its default setting.
Use a hybrid oscillator when driving the MCU from an external source.
Any change in the MC68332 MCU device clock speed causes a corresponding
change in the SCI baud rate. The operational speed of the MCU is determined
by the clock and the synthesizer control register value (SYNCR). The SCI
baud rate is then set based on this system clock frequency. If changes are
made to the MCU speed and the terminal baud rate is not changed
appropriately, terminal communication will fail. Refer to Appendix C of the
M68CPU32BUG Debug Monitor User’s Manual, M68CPU32BUG/AD1.
M68332BCC/D2-11MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 22
nc...
, I
or
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
2.4 INSTALLATION INSTRUCTIONS
A user supplied power supply and RS-232C compatible terminal are required for BCC operation.
An RS-232C compatible host computer, with terminal emulation package, may be connected to
the BCC for S-record downloading.
2.4.1Power Supply - BCC Interconnection
The BCC requires +5 Vdc @ 200 mA (max.) for operation. Use 18 to 20 AWG wire to connect a
user supplied power supply to the BCC. This connection is made via expansion connector P1 or
P2.
There are two preferred methods for connecting the power supply to the BCC: wire-wrap and
crimp-to-wire. When using the crimp-to-wire method, fabricate two wires (+5 Vdc and GND) as
follows:
a. Trim back 18 - 20 AWG wire approximately 0.25 inch.
b. Attach a crimp-to-wire receptacle (Dupont 46227-0000) to the wire using a crimping
tool.
emiconduct
eescale S
Fr
c. Place heat shrink tubing (Digi-Key W183-ND) on the crimp-to-wire receptacle and
shrink using a heat source.
Connect the power supply ground fabricated wire to pin 1, 2, 63, or 64 of P1 or P2. Connect the
power supply +5 Vdc fabricated wire to pin 3, 4, 61, or 62 of P1 or P2 (as shown below).
P1/P2
GND
+5V
+5V
GND
1
3
5
59
61
63
GND
2
+5V
4
6
60
62
64
+5V
GND
M68332BCC/D2-12MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 23
Freescale Semiconductor, Inc.
2.4.2Terminal - BCC Interconnection
Interconnection of an RS-232C compatible terminal to the BCC is accomplished via a user
supplied 9- or 25-conductor cable assembly as shown in Figures 2-2 and 2-3. If the user’s
terminal/host computer has a DB-9 connector refer to Figure 2-2. If the user’s terminal/host
computer has a DB-25 connector refer to Figure 2-3. One end of the cable assembly connects to
the BCC connector J9 (shown below). The other end of the cable assembly connects to the user
supplied terminal or host computer. For connector pin assignments and signal descriptions of
BCC terminal port connector J9, refer to Chapter 5.
HARDWARE PREPARATION AND INSTALLATION
1 2 3 4
nc...
, I
or
emiconduct
eescale S
Fr
BCC
J8
1
2
3
4
J8
XMT 232 GND RCV 232 +10V
XMT 232
G ND
RCV 232
+10V
NC
NC
NC
1
2
3
4
5
6
7
8
9
TER M INA L OR
HO ST COM P UTER
Figure 2-2. BCC to DB-9 Cable Schematic Diagram
M68332BCC/D2-13MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 24
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
nc...
, I
or
emiconduct
BCC
J8
1
2
3
4
XMT 232
GND
RCV 232
+10V
Figure 2-3. BCC to DB-25 Cable Schematic Diagram
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
TER M IN AL OR
HO S T COMP UTER
eescale S
Fr
M68332BCC/D2-14MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 25
Freescale Semiconductor, Inc.
2.4.3Target System - BCC Interconnection
For target system to BCC interconnection the BCC mounts on the target system as shown below.
This configuration is used to evaluate the user’s hardware design. The 64-pin expansion
connectors provide access to most of the MC68332 MCU device pins. Figure 2-4 illustrates the
expansion header pin assignments for the BCC. Physical dimension requirements for installing
the BCC on a target system are illustrated in Figure 2-5.
Figure 2-5. Target System Expansion Connector Installation Dimensions
M68332BCC/D2-17MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 28
Freescale Semiconductor, Inc.
HARDWARE PREPARATION AND INSTALLATION
nc...
, I
or
emiconduct
eescale S
Fr
M68332BCC/D2-18MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 29
nc...
, I
or
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
CHAPTER 3
OPERATING INSTRUCTIONS
3.1 INTRODUCTION
The EPROMs on the BCC contain the M68CPU32BUG debug monitor program (hereafter
referred to as CPU32Bug). CPU32Bug is a software tool for evaluating and debugging systems
built around the MC68332 MCU. CPU32Bug allows loading, debugging, and executing of user
programs. Various CPU32Bug routines that handle I/O, data conversion, timer, and string
functions are available to user programs through system calls. For a detailed description of the
CPU32Bug functions, refer to M68CPU32BUG Debug Monitor User’s Manual,
M68CPU32BUG/AD1.
CPU32Bug consists of:
•Memory and register display and modification commands
emiconduct
eescale S
Fr
•Breakpoint capabilities
•System calls
•Diagnostic commands
•A single-line assembler/disassembler
There are two modes of operation in the CPU32Bug monitor; the debugger mode and the
diagnostic mode. When the user is in the debugger directory the prompt CPU32Bug> appears,
and the user has access to the debugger commands (refer to paragraph 3.4). When the user is in
the diagnostic mode the prompt CPU32Diag> appears, and the user has access to the diagnostic
commands (refer to paragraph 3.4.4). These modes are also called directories.
CPU32Bug is command-driven and performs various operations in response to user commands
entered at the keyboard. CPU32Bug executes entered commands; upon completion the prompt
reappears. However, if a command is entered which causes execution of user target code (i.e.,
GO), control may or may not return to CPU32Bug. This depends upon the user program
function. Entering the help (HE) command provides a list of all possible commands and their
structure.
3.2 LIMITATIONS
CPU32Bug requires some system resources to operate properly: chip selects, level 7 interrupt,
software watchdog timer, periodic interrupt timer, and system exception vectors.
M68332BCC/D3-1MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 30
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
3.2.1Chip Select Usage
The MC68332 MCU has chip select signals that enable peripheral devices. The BCC requires
some of these chip selects for BCC operation making them unavailable to the user. Do not
remove the chip selects used by the BCC, or CPU32Bug will not operate. In addition to the chip
selects employed on the BCC, other chip selects are used elsewhere in the M68332EVK (refer to
Tables 3-1 through 3-3).
Depending on the user’s environment, any or all of the chip selects may be re-configured for an
alternate function (i.e., as I/O or address lines). Chip select pins used by the BCC and EVK
cannot be used in their alternate capacities.
Although a chip select (CS8 on Rev. A and CS4 on Rev. B and Rev. C BCCs) is dedicated for
the ABORT switch, the pin is not used. Instead the chip select decodes the interrupt acknowledge
(IACK) cycle in response to a level 7 interrupt generated by the ABORT switch. Refer the
nc...
System Integration Module User’s Manual (SIM32UM/AD) for more information.
, I
or
emiconduct
eescale S
Fr
When the BCC is not mounted on the M68300PFB Platform Board (PFB), these chip selects are
available to the user. Also if the PFB RAM/EPROM socket pairs (U1/U3, U2/U4) and
coprocessor socket U5 are not populated, the chip selects are available to the user.
Table 3-1. BCC Rev. A Chip Selection Summary
SignalBoard/ChipDescriptionMemory Type
CSBOOTBCC U2CPU32Bug EPROM
CS0BCC U1read/write enable for MSB=UPPER=EVENRAM
CS1BCC U3read/write enable for LSB=LOWER=ODDRAM
CS2PFB U1/U3read enable for MSB/LSB=BOTHRAM
CS3PFB U1write enable for LSB=LOWER=ODDRAM
CS4PFB U4read enable for MSB=UPPER=EVENRAM/EPROM
CS5PFB U2read enable for LSB=LOWER=ODDRAM/EPROM
CS6PFB U5chip enable for MC68881/882
CS7<unused>
CS8PFBABORT push-button autovector
CS9<unused>
CS10PFB U3write enable for MSB=UPPER=EVEN
cut/jump U3-27 from CS4 to CS10 required.
RAM
M68332BCC/D3-2MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 31
nc...
, I
or
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
Table 3-2. BCC Rev. B Chip Selection Summary
SignalBoard/ChipDescriptionMemory Type
CSBOOTBCC U2CPU32Bug EPROM
CS0BCC U1write enable for MSB=UPPER=EVENRAM
CS1BCC U3write enable for LSB=LOWER=ODDRAM
CS2BCC U3/U1read enable for MSB/LSB=BOTHRAM
CS3<unused>
CS4PFBABORT push-button autovector
CS5PFB U5chip enable for MC68881/882. cut/-jump U5-J3
from CS2 to CS5 required.
CS6PFB U2read enable for LSB=LOWER=ODDRAM/EPROM
CS7PFB U4read enable for MSB=UPPER=EVENRAM/EPROM
CS8PFB U1/U3read enable for MSB/LSB=BOTHRAM
CS9PFB U1write enable for LSB=LOWER=ODDRAM
CS10PFB U3write enable for MSB=UPPER=EVENRAM
emiconduct
eescale S
Fr
Table 3-3. BCC Rev. C Chip Selection Summary
SignalBoard/ChipDescriptionMemory Type
CSBOOTBCC U3CPU32Bug EPROM for MSB=UPPER=EVEN
CSBOOTBCC U4CPU32Bug EPROM for LSB=LOWER=ODD
CS0BCC U1write enable for MSB=UPPER=EVENRAM
CS1BCC U2write enable for LSB=LOWER=ODDRAM
CS2BCC U3/U1read enable for MSB/LSB=BOTHRAM
CS3<unused>
CS4PFBABORT push-button autovector
CS5PFB U5chip enable for MC68881/882. cut/-jump U5-J3
from CS2 to CS5 required.
CS6PFB U2read enable for LSB=LOWER=ODDRAM/EPROM
CS7PFB U4read enable for MSB=UPPER=EVENRAM/EPROM
CS8PFB U1/U3read enable for MSB/LSB=BOTHRAM
CS9PFB U1write enable for LSB=LOWER=ODDRAM
CS10PFB U3write enable for MSB=UPPER=EVENRAM
M68332BCC/D3-3MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 32
Freescale Semiconductor, Inc.
3.2.2Other MCU Resources Used by CPU32Bug
Avoid writing the value zero to bit 7 of the port F pin assignment register (PFPAR); such a value
disables the ABORT switch.
The software watchdog timer is disabled via a write-once register (SYPCR) during power-up or
reset, so the software watchdog timer cannot be used or re-enabled by the user unless the user
modifies the SYPCR_OR and SYPCR_AND parameters. Modification of the SYPCR_OR and
SYPCR_AND parameters is detailed in Appendix C of the M68CPU32BUG Debug Monitor
User’s Manual, M68CPU32BUG/AD1.
The monitor uses the system exception vectors, so they are unavailable to the BCC user. The
monitor debug exception vectors are listed in Table 3-4. The associated debugger facilities
(breakpoints, trace mode, etc.) will not operate if the vector offsets in the target program vector
nc...
table are changed.
OPERATING INSTRUCTIONS
, I
or
emiconduct
eescale S
Fr
Table 3-4. CPU32Bug Exception Vectors
Vector
NumberOffsetExceptionCPU32Bug Commands
4$10IllegalInstruction breakpoints (Used by GO, GN, GT)
9$24TraceT, TC, TT
31$7CLevel 7 interruptABORT switch
47$BCTRAP #15System calls (see Chapter 5 of the M68CPU32BUG
Debug Monitor User’s Manual, M68CPU32BUG/AD1)
66$108User DefinedTimer Trap #15 Calls ($4X)
Any change in the MC68332 MCU device clock speed causes a corresponding change in the SCI
baud rate. The operational speed of the MCU is determined by the clock and the synthesizer
control register value (SYNCR) or by an external clock signal applied to the EXTAL pin of the
MCU. The SCI baud rate is then set based on this system clock frequency. If changes are made to
the MCU system clock frequency, changes must be made to the customization parameter area
(FCRYSTAL or FEXTAL) so the correct baud rate can be calculated for SCI communications by
CPU32Bug. See the M68CPU32BUG Debug Monitor User’s Manual (M68CPU32BUG/AD1),
Appendix C for details.
Additionally, CPU32Bug writes a one (1) to the module mapping (MM) bit of the module
control register (MCR). This configures the register block to start at address $FFF000. As the
MM bit is a write-once bit, the user cannot clear it to move the register block to low memory
($7FF000). The user can move the register block by modifying the MCR_AND parameter
detailed in Appendix C of the M68CPU32BUG Debug Monitor User’s Manual,
M68CPU32BUG/AD1.
M68332BCC/D3-4MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 33
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
3.3 OPERATING PROCEDURE
A Power On Reset (POR) occurs when power is applied to the BCC. This POR condition resets
the MCU and user I/O port circuitry. After a POR occurs, processing control passes to the
monitor program. All MC68332 registers are set to their reset state during monitor power-up.
The input serial format for the BCC terminal I/O port must be configured for 8 data bits, 1 stop
bit, no parity, and 9600 baud.
The terminal then displays this message:
CPU32Bug Debugger/Diagnostics - Version X.XX
(C) Copyright 1989, 1990 by Motorola Inc.
CPU32Bug>
nc...
, I
or
emiconduct
eescale S
Fr
where:
X.XX is the software revision level
After initialization or return of control to the monitor, the terminal displays the prompt
"CPU32Bug>" and waits for a response. If an incorrect response is entered, the terminal displays
"Invalid command" followed by the prompt "CPU32Bug>".
CPU32Bug waits for a command line input from the user terminal. When a proper command is
entered, the operation continues in one of two basic modes. If the command causes execution of
a user program, the monitor may or may not be reentered, depending upon the desire of the user.
For the alternate case, the command is executed under the control of the monitor, and the system
returns to a waiting condition after the command is completed. During command execution,
additional user input may be required, depending on the command function.
The user can use any of the commands supported by the monitor. A standard input routine
controls the BCC operation while the user types a command line. Command processing begins
only after the command line has been terminated by pressing the keyboard carriage return <CR>
key.
M68332BCC/D3-5MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 34
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
3.4 MONITOR DESCRIPTION
CPU32Bug performs various operations in response to user commands entered at the keyboard.
When the debugger prompt CPU32Bug> appears on the terminal screen, the debugger is ready
to accept commands.
As the command line is entered it is stored in an internal buffer. Execution begins only after the
carriage return is entered. This lets the user correct entry errors using the control characters
described in the M68CPU32BUG Debug Monitor User’s Manual, M68CPU32BUG/AD1.
After the debugger executes a command it returns with the CPU32Bug> prompt. However, if the
entered command causes execution of user target code, (i.e., GO), then control may or may not
return to the debugger. This depends on the user program function. For example, if a breakpoint
is specified, control returns to the debugger when the breakpoint is encountered during user
nc...
, I
program execution. The user program also returns control to the debugger by means of the TRAP
#15 system call function, .RETURN.
or
emiconduct
eescale S
Fr
Included as part of the CPU32Bug firmware is a single-line assembler/disassembler function.
The assembler is an interactive assembler/editor in which source programs are not saved. Each
source line is translated into MC68332 MCU machine language code and stored line-by-line into
memory as it is entered. In order to display an instruction, the machine code is disassembled and
the instruction mnemonic and operands are displayed. All valid MC68332 MCU instructions are
supported.
The CPU32Bug assembler is effectively a subset of the M68000 Family Structured Assembler
(M68MASM). It has some limitations as compared with the M68MASM assembler, such as not
allowing line numbers and labels; however, it is a useful tool for creating, modifying, and
debugging MC68332 MCU code.
M68332BCC/D3-6MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 35
nc...
, I
or
Freescale Semiconductor, Inc.
3.4.1Memory and Register Display and Modification Commands
Various commands are available to the user for displaying and modifying memory. For more
information, refer to Chapter 3 of the M68CPU32BUG Debug Monitor User’s Manual,
M68CPU32BUG/AD1. The memory display and modification commands are:
•BF (block of memory fill) fills the specified range of memory with a data pattern.
•BM (block of memory move) copies the contents of the memory addresses defined by
<RANGE> to another place in memory, beginning at <ADDR>.
•BS (block of memory search) searches the specified range of memory for a match
with a user-entered data pattern.
•BV (block of memory verify) compares the specified range of memory against a data
pattern.
•MD (memory display) displays the contents of multiple memory locations.
•MM (memory modify) examines and changes memory locations.
•MS (memory set) writes data to memory starting at a specified address.
OPERATING INSTRUCTIONS
emiconduct
eescale S
Fr
•RD (register display) displays the contents of the MCU registers.
•RM (register modify) examines and changes register contents.
•RS (register set) writes data to a specified register.
3.4.2Breakpoint Capabilities
A breakpoint lets the user set a target code instruction address stopping point for debugging
purposes. Target code execution halts when a breakpoint is encountered. For more information
on breakpoints, refer to Chapter 3 of the M68CPU32BUG Debug Monitor User's Manual,
M68CPU32BUG/AD1. The breakpoint commands are:
•BR/NOBR (breakpoint insert/delete) allows the user to set/remove a target code
instruction address as a breakpoint address for debugging purposes.
•GD (go direct) starts target code execution and ignores breakpoints.
•GN (go to temporary breakpoint) sets a temporary breakpoint at the address of the
next instruction, that is, the one following the current instruction.
•GT (go to temporary breakpoint) sets a temporary breakpoint at the current
instruction and starts target code execution.
•TT (trace to temporary breakpoint) sets a temporary breakpoint at a specified address
and traces until encountering a breakpoint.
M68332BCC/D3-7MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 36
Freescale Semiconductor, Inc.
3.4.3System Calls
The CPU32Bug TRAP #15 handler allows system calls from user programs. A system call
accesses selected functional routines contained in CPU32Bug, including input and output
routines. TRAP #15 also transfers control to CPU32Bug at the end of a user program. For more
information on system calls, refer to Chapter 5 of the M68CPU32BUG Debug Monitor User’s
Manual, M68CPU32BUG/AD1. System calls include:
•.INCHR (input character) reads a character from the default input port.
•.INSTAT (input serial port status) checks for characters in the default input port
buffer.
•.INLN (input line (pointer/pointer format)) reads a line from the default input port.
OPERATING INSTRUCTIONS
nc...
, I
or
emiconduct
eescale S
Fr
•.READSTR (input string (pointer/count format)) reads a string of characters from the
default input port into a buffer.
•.READLN (input line (pointer/count format)) reads a string of characters from the
default input port.
•.CHKBRK (check for break) returns zero (0) status in condition code register if break
status is detected at the default input port.
•.OUTCHR (output character) outputs a character to the default output port.
•.OUTSTR (output string in pointer/pointer format) outputs a string of characters to
the default output port.
•.OUTLN (output line in pointer/pointer format) outputs a character strings followed
by a carriage return (<CR>) and a line feed (<LF>) sequence.
•.WRITE (output string in pointer/count format) formats character strings with a
count byte and outputs the string to the default output port. After formatting, the
count byte is the first byte in the string.
•.WRITELN (output line in pointer/count format) formats character strings with a
count byte and outputs the string to the default output port. After formatting, the
count byte is the first byte in the string.
•.PCRLF (output carriage return and line feed) sends a <CR> and a <LF> sequence to
the default output port.
•.ERASLN (erase line) erases the line at the present cursor position.
•.WRITD (output string with data in pointer/count format) uses the monitor I/O
routine which outputs a user string containing embedded variable fields. The user
passes the starting address of the string and the data stack address containing the data
which is inserted into the string. The output goes to the default output port.
M68332BCC/D3-8MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 37
nc...
, I
or
Freescale Semiconductor, Inc.
•.WRITDLN (output line with data in pointer/count format) uses the monitor I/O
routine which outputs a user string containing embedded variable fields. The user
passes the starting address of the string and the data stack address containing the data
which is inserted into the string. The output goes to the default output port.
•.SNDBRK (send break) sends a break to the default output port.
•.TM_STR0 (start timer at T=0) resets the timer to zero and starts it.
•.TM_RD (read timer) reads the timer count.
•.DELAY (timer delay) generates timing delays.
•.RETURN (return to CPU32Bug) returns control to CPU32Bug from the target
program.
•.BINDEC (convert binary to Binary Coded Decimal) calculates the BCD equivalent
of a specified binary number.
•.CHANGEV (parse value) parses value in user specified buffer.
OPERATING INSTRUCTIONS
emiconduct
eescale S
Fr
•.STRCMP (compare two strings in pointer/count format) compares equality and
returns a Boolean flag to the caller.
•.MULU32 (multiply two 32-bit unsigned integers) multiplies two 32-bit unsigned
integers and returns the product on the stack as a 32-bit unsigned integer.
•.DIVU32 (divide two 32-bit unsigned integers) divides two 32-bit unsigned integers
and returns the quotient on the stack as a 32-bit unsigned integer.
M68332BCC/D3-9MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 38
Freescale Semiconductor, Inc.
3.4.4 Diagnostic Monitor
The diagnostic monitor is a series of self-tests for the MC68332 MCU device. The diagnostic
monitor is programmed into the BCC EPROM. For more information on the diagnostic monitor,
refer to Chapter 6 of the M68CPU32BUG Debug Monitor User’s Manual,
M68CPU32BUG/AD1. The diagnostic monitor commands are:
•HE (help) command displays a menu of the top level directory.
•SD (switch directories) command toggles between the CPU32Bug directory and the
CPU32Diag directory.
•LE (loop-on-error) endlessly repeats a test at the point where an error is detected.
OPERATING INSTRUCTIONS
nc...
, I
or
emiconduct
eescale S
Fr
•SE (Stop-On-Error) halts a test at the point where an error is detected.
•LC (loop-continue) endlessly repeats a test or series of tests.
•NV (non-verbose)suppresses all error messages except PASSED or FAILED.
•DE (display error counters) displays the results of a particular test.
•ZE (clear error counters) resets all error counters to zero.
•DP (display pass count) is the number of passes in loop-continue mode. Under this
command the count is displayed with other information at the conclusion of each
pass.
•ZP (zero pass count) resets the pass counter to zero.
CPU tests are a series of diagnostics provided to test the CPU portion of the MC68332
MPU:
– CPU A - Register Test
– CPU B - Instruction Test
– CPU C - Address Mode Test
– CPU D - Exception Processing Test
M68332BCC/D3-10MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 39
Freescale Semiconductor, Inc.
Memory tests are a series of diagnostics that verify random access memory (read/write)
that may reside on the BCC.
– MT A - Set Function Code
– MT B - Set Start Address
– MT C - Set Stop Address
– MT D - Set Bus Data Width
– MT E - March Address Test
– MT F - Walk a Bit Test
– MT G - Refresh Test
– MT H - Random Byte Test
OPERATING INSTRUCTIONS
nc...
, I
or
emiconduct
eescale S
Fr
– MT I - Program Test
– MT J - TAS Test
Bus error test (BERR) tests for internal bus access time-out and internal to external bus
access time-out error conditions, including:
– Bus errors when accessing the BCC RAM.
– Bus errors when reading the BCC EPROM.
– Bus errors when accessing the PFB optional memory.
– Internal bus access time-outs when reading and writing from an undefined function
code/memory location internal to the MCU.
– Internal to external bus access time-outs reading or writing to an undefined
function code/memory location external to the MCU.
M68332BCC/D3-11MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 40
nc...
, I
or
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
3.5 ASSEMBLING/DISASSEMBLING PROCEDURE
The assembler/disassembler is an interactive, one-line assembler/editor in which the source
program is not saved. Each source line is converted into machine language code and is stored in
memory on a line-by-line basis at the time of entry. In order to display an instruction, the
machine code is disassembled and the instruction mnemonic and operands are displayed. All
valid opcodes are converted to assembly language mnemonic. All invalid opcodes return a
Declare Constant Word (DC.W) conversion.
The memory modify (mm ;di) command lets the user create, modify, and debug MC68332 MCU
code. Assembler input must have exactly one space between the mnemonic and the operand.
There must be no space inside the operand field. Assembler input must be terminated by a
carriage return. No comments are allowed after the instruction input and no line labels are
permitted.
After each new assembler input line, the new line is disassembled for the user before stepping to
the new instruction. The new line may assemble to a different number of bytes than the previous
one.
emiconduct
eescale S
Fr
For Branch if Higher or Same (BHS)/Branch if Carry Clear (BCC) mnemonics, disassembly
displays the BCC mnemonic. For Branch if Lower (BLO)/Branch if Carry Set (BCS)
mnemonics, disassembly displays the BCS mnemonic.
Branch address offsets are automatically calculated by the assembler, so the user should input the
destination address rather than an offset value.
The assembler is terminated by entering a period (.) followed by a carriage return as the only
entry on the command input line. Entering a carriage return alone on an input line steps to the
next instruction.
The following pages describe how to operate the assembler/disassembler by creating a typical
program loop, and debugging the program using CPU32Bug monitor commands. A typical
program loop is first assembled. Routine examples then illustrate how to set a breakpoint,
proceed from a breakpoint, display and modify registers, and initiate user program execution.
M68332BCC/D3-12MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 41
nc...
, I
or
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
Enter the periodic interrupt timer (PIT) time-out program starting at address $5000:
EXAMPLEPROGRAM
PROGRAMDESCRIPTION
CPU32Bug>MM 5000;DI<CR>Memory modify at location $5000 with
disassembly option.
5000MOVE.L #$501C,$78<CR>Set-up level six vector table.
5008MOVE.L #$061E0120,$FFFA22<CR>Initialize PIT.
5012LPSTOP #$2500<CR>Execute LPSTOP Instruction.
5018BRA.W $5012<CR>Loop
501CMOVEA.W #$5100,A0<CR>Beginning of message.
5020MOVEA.W #$510E,A1<CR>End of message.
5024BTST.B #$0,$FFFC0C<CR>Check for SCI not busy.
502CBEQ.B $5024<CR>Branch until free.
502EMOVE.B (A0)+,$FFFC0F<CR>Send message byte.
5034CMPA.W A0,A1<CR>Check for end of message.
5036BNE.W $5024<CR>Branch until done.
503ARTE<CR>Return from print routine.
emiconduct
eescale S
Fr
Enter the ASCII code for the output message, PIT TIME-OUT. Each time this message appears
when running the program, indicates the program has completed a loop. Enter the following
ASCII code at memory location $5100:
CPU32Bug>MS 5100 ’PIT TIME-OUT’ODOA<CR>Memory modify at location $5100.
M68332BCC/D3-13MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 42
nc...
, I
or
emiconduct
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
After entering the PIT time-out program display the instructions at location $5000
EXAMPLEPROGRAM
PROGRAMDESCRIPTION
CPU32Bug>MD 5000;DI<CR>Display memory at location $5000 with
Downloading transfers information from a host computer to the BCC, via the load (LO)
command. The procedure described below lets the user download with an IBM personal
computer (PC) or Apple Macintosh host computer.
The LO command moves data in S-record format (see Appendix A) from an external host
computer to the EVK user pseudo ROM.
Subsections 3.6.1 through 3.6.4 list instructions for downloading to the EVK from an Apple
Macintosh with MacTerminal or Red Ryder, or from an IBM-PC with Kermit or PROCOMM.
nc...
, I
or
emiconduct
eescale S
Fr
M68332BCC/D3-16MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 45
Freescale Semiconductor, Inc.
3.6.1Apple Macintosh (with MacTerminal) to BCC
The MacTerminal downloading program serves as a terminal emulator for t he Apple Macintosh
computer. To download a Motorola S-record file from the Apple Macintosh computer to the
BCC:
a. Select the following menu Terminal Settings:
Terminal:VT100
Mode:ANSI
Cursor Shape:Underline
Line Width:80 Columns
OPERATING INSTRUCTIONS
nc...
, I
or
emiconduct
eescale S
Fr
Select:On Line
Auto Repeat
Click on:OK
b. Select the following menu Compatibility Settings:
c. Select the following menu File Transfer Settings:
Settings for Pasting
or Sending Text:Word Wrap Outgoing Text
File Transfer
Protocol:Text
Settings for Saving
Lines Off Top:Retain Line Breaks
Click on:OK
M68332BCC/D3-17MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 46
Freescale Semiconductor, Inc.
d. Apply power to the BCC.
e. Press Apple Macintosh computer keyboard carriage return (<CR>) key to display
applicable BCC monitor prompt.
f Apple Macintosh computer displays the CPU32Bug> prompt.
g. Enter BCC monitor download command as follows:
CPU32Bug>LO<CR>
h. Operate pull-down File menu, and select (choose): Send File ...
i.Use dialog box and select applicable S-record object file.
Click on:Send
Motorola S-record file is now transferred to the BCC.
OPERATING INSTRUCTIONS
nc...
, I
NOTE
or
emiconduct
eescale S
Fr
S-record file will not be displayed during the file
transfer to the BCC.
The underline cursor flashes and the beeper sounds when the S-record has finished
downloading. Press the carriage return twice to return to the CPU32Bug prompt:
<CR>
<CR>
CPU32Bug>
M68332BCC/D3-18MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 47
nc...
, I
or
Freescale Semiconductor, Inc.
3.6.2Apple Macintosh (with White Knight) to BCC
The White Knight downloading program serves as a terminal emulator for the Apple Macintosh
computer. To download a Motorola S-record file from the Apple Macintosh computer to the
BCC:
a. Execute White Knight program.
b. Set up computer program to match BCC baud rate (typically) as follows:
9600 baud, no parity, 8-bits, 1-stop bit, full duplex
c. Apply power to BCC.
d. Press Apple Macintosh computer keyboard carriage return (<CR>) key to display
applicable BCC monitor prompt.
eEnter BCC monitor download command as follows:
CPU32Bug>LO<CR>
f.Operate pull-down File menu, and select (choose):
OPERATING INSTRUCTIONS
emiconduct
eescale S
Fr
Send File - ASCII...
g. Use dialog box and select applicable S-record object file.
Click on:Send
Motorola S-record file is now transferred to the BCC.
NOTE
S-record file will not be displayed during the file
transfer to the BCC.
The underline cursor flashes and the beeper sounds when the S-record has finished
downloading. Press the carriage return twice to return to the CPU32Bug prompt:
<CR>
<CR>
CPU32Bug>
M68332BCC/D3-19MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 48
Freescale Semiconductor, Inc.
OPERATING INSTRUCTIONS
3.6.3IBM-PC (with KERMIT) to BCC
Before performing any IBM-PC operation, ensure that both IBM-PC and BCC baud rates are
9600, and that the IBM-PC asynchronous port is configured for terminal mode of operation. If
the asynchronous port is hard wired for host mode of operation and cannot be re-configured for a
terminal mode of operation, the use a null modem (cross-coupled transmit (TxD), and receive
(RxD), and associated handshake lines) is required.
NOTE
IBM-PC to BCC connection requires one serial communication cable assembly.
This cable is connected to the BCC terminal I/O port connector J9 for
downloading operations.
nc...
, I
or
emiconduct
eescale S
Fr
To perform IBM-PC to BCC downloading procedure:
EXAMPLEDESCRIPTION
C>KERMIT<CR>
IBM-PC Kermit-MS VX.XX
Type ? for help
Kermit-MS>SET BAUD 9600<CR>
Kermit-MS>CONNECT<CR>
[Connecting to host, type Control-] C to return to PC]
<CR>
CPU32Bug>LO<CR>
(CTRL)]C
Kermit-MS>PUSH<CR>
The IBM Personal Computer DOS
Version X.XX (C)Copyright IBM Corp. 1981, 1982, 1983
IBM-PC prompt. Enter Kermit program.
Set IBM-PC baud rate.
Connect IBM-PC to BCC.
BCC download command (via terminal
port) entered.
C>TYPE (File Name) > COM1<CR>
C>EXIT<CR>
Kermit-MS>CONNECT<CR>
M68332BCC/D3-20MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Motorola S-record file name.
S-record downloading completed.
Return to BCC monitor program.
Page 49
Freescale Semiconductor, Inc.
The underline cursor flashes and the beeper sounds when the S-record has finished downloading.
Press the carriage return twice to return to the CPU32Bug prompt:
<CR>
<CR>
CPU32Bug>
CPU32Bug>(CTRL) ]C
KERMIT-MS>EXIT<CR>
OPERATING INSTRUCTIONS
Exit Kermit program.
nc...
, I
or
emiconduct
eescale S
Fr
M68332BCC/D3-21MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 50
Freescale Semiconductor, Inc.
3.6.4IBM-PC (with PROCOMM) to BCC
To perform the IBM-PC to BCC downloading procedure with PROCOMM:
a. Execute the PROCOMM.EXE program.
b. Setup PROCOMM to match BCC baud rate and protocol (type (Alt)P, then the
number 11) as follows:
9600 baud, no parity, 8 bits, 1 stop bit, full duplex
c. Setup ASCII transfer parameters (type (Alt)S, then the number 6) as follows:
Echo Local - No
Expand Blank Lines - Yes
OPERATING INSTRUCTIONS
nc...
, I
or
emiconduct
eescale S
Fr
Pace Character - 0
Character pacing - 15 (milliseconds)
Line Pacing - 10
CR Translation - None
LF Translation - None
Save above settings to disk for future use.
d. Apply power to BCC.
e. Press IBM-PC keyboard carriage return (<CR>) key to display applicable BCC
monitor prompt.
fEnter BCC monitor download command as follows:
CPU32Bug>LO<CR>
g. Instruct PROCOMM to send the S-record file by pressing the Pg Up key on the PC,
then follow PROCOMM instructions on the display screen to select the S-record file
using an ASCII protocol.
Motorola S-record file is transferred to the BCC when the beeper sounds and the
underline cursor flashes. Press the carriage return twice to return to the CPU32Bug
prompt:
<CR>
<CR>
CPU32Bug>
M68332BCC/D3-22MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 51
Freescale Semiconductor, Inc.
FUNCTIONAL DESCRIPTION
CHAPTER 4
FUNCTIONAL DESCRIPTION
4.1 INTRODUCTION
This chapter provides a functional description of the BCC. This description is supported by a
block diagram (Figure 4-1) and a memory map diagram (Figure 4-2). Refer to Chapter 5 for the
BCC schematic diagram.
nc...
, I
or
emiconduct
eescale S
Fr
4.2 BCC DESCRIPTION
The MC68332 Microcontroller Unit (MCU) resident on the BCC provides resources for
designing, debugging, and evaluating MC68332 MCU based target systems and simplifies user
evaluation of prototype hardware/software products.
Figure 4-1 is a block diagram of these BCC circuits:
• MCU
• User memory
• Terminal and host computer I/O port
• Background mode interface port
M68332BCC/D4-1MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 52
nc...
, I
or
TERMINAL/
HOST
COMPUTER
P4
P3
P2
Freescale Semiconductor, Inc.
RS-232C
INTERFACE
U5
BACKGROUND MODE
INTERRUPT SIGNALS
MCU
U1
FUNCTIONAL DESCRIPTION
TIMER CHANNELS
ADDRESS AND CONTROL LIN ES
64K x 8
EPROM
U1
64K x 8
EPROM
U2
32K x 8
RAM
U3
P1
32K x 8
RAM
U4
emiconduct
eescale S
Fr
DATA AND CONTROL LINES
Figure 4-1. BCC Block Diagram
4.2.1MCU
The resident MC68332 Microcontroller Unit (MCU) of the BCC provides resources for
designing, debugging, and evaluating MC68332 MCU based target systems and simplifies user
evaluation of prototype hardware/software products.
The MCU device is a 32-bit integrated microcontroller, combining high-performance data
manipulation capabilities with powerful peripheral subsystems. The MCU includes:
• 32-bit central processor unit (CPU32)
• Time processor unit (TPU)
• Queued serial module (QSM)
• Random access memory (RAM)
• External bus interface
• Chip selects
• System clock
• Test module
M68332BCC/D4-2MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 53
nc...
, I
or
Freescale Semiconductor, Inc.
4.2.1.132-Bit Central Processor Unit
The CPU32 is the central processor for the MC68332 MCU device. The CPU32 is source and
object code compatible with the MC68000 and MC68010. All user programs can be executed
unchanged. The CPU32 features are:
• 32-Bit internal data path and arithmetic hardware - 16-bit external data bus
• 32-Bit internal address bus - 24-bit external address bus
• Powerful instruction set
• Eight 32-bit general purpose data registers
• Seven 32-bit general purpose address registers
• Separate user and supervisor stack pointers and address spaces
• Separate program and data address spaces
• Flexible addressing modes
• Full interrupt processing
4.2.1.2Time Processor Unit
FUNCTIONAL DESCRIPTION
emiconduct
eescale S
Fr
The Time Processor Unit (TPU) optimizes performance of time-related activities. The TPU has a
dedicated execution unit, tri-level prioritized scheduler, data storage RAM, dual time bases, and
microcode ROM which drastically reduces the need for CPU intervention. The TPU controls
sixteen independent, orthogonal channels; each channel has an associated I/O pin and can
perform any time function. Each channel also contains a dedicated event register, for both match
and input capture functions.
Each channel can be synchronized to either of two 16-bit, free-running counters with a pre-scaler.
One counter, based on the system clock, provides resolution of TPU system clock divided by 4.
The second counter, based on an external reference, also provides resolution of TPU system
clock divided by 8. Channels may also be linked together, allowing the user to reference
operations on one channel to the occurrence of a specified action on another channel, providing
inter-task control.
4.2.1.3Queued Serial Module
The QSM contains two serial ports. The queued serial peripheral int erface (QSPI) port provides
easy peripheral expansion or inter-processor communications via a full-duplex, synchronous,
three-line bus: data-in, data-out, and a serial clock. Four programmable peripheral select pins
provide address-ability for as many as 16 peripheral devices. A QSPI enhancement is an added
queue in a small RAM. This lets the QSPI handle as many as 16 serial transfers of 8- to 16-bits
each, or to transmit a stream of data as long as 256 bits without CPU intervention. A special
wrap-around mode lets the user continuously sample a serial peripheral, automatically updating
the QSPI RAM for efficient interfacing to serial peripheral devices (such as analog-to-digital
converters).
M68332BCC/D4-3MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 54
Freescale Semiconductor, Inc.
The serial communications interface (SCI) port provides a standard non-return to zero (NRZ)
mark/space format. Advanced error detection circuitry catches noise glitches to 1/16 of a bit time
in duration. Word length is software selectable between 8- or 9-bits, and the SCI modulus-type,
baud rate generator provides baud rates from 64 to 524k baud, based on a 16.77 MHz system
clock. The SCI features full- or half-duplex operation, with separate transmitter and receiver
enable bits and double buffering of data. Optional parity generation and detection provide either
even or odd parity check capability. Wake-up functions let the CPU run uninterrupted until either
a true idle line is detected or a new address byte is received.
4.2.1.4Random Access Memory
2k bytes of static RAM are contained within the MC68332 MCU device. The RAM is used for
storage of variable and temporary data. RAM data size may be 8-bits (byte), 16-bits (word), or
32-bits (longword). The RAM can be mapped to any 2k byte boundary in the address map.
FUNCTIONAL DESCRIPTION
nc...
, I
or
emiconduct
eescale S
Fr
4.2.1.5External Bus Interface
The external bus consists of 24 address lines and a 16-bit data bus. The data bus allows dynamic
sizing between 8- and 16-bit data accesses. A read-modify-write cycle (RMC) signal prevents
bus cycle interruption. External bus arbitration is accomplished by a three-line handshaking
interface.
4.2.1.6 Chip Selects
Twelve independently programmable chip selects provide fast, two-cycle external memory, or
peripheral access. Block size is programmable from 2 kilobytes through 1 megabyte. Accesses
can be selected for either 8- or 16-bit transfers. As many as 13 wait states can be programmed for
insertion during the access. All bus interface signals are auto matically handled by th e chip select
logic.
4.2.1.7System Clock
An on-chip phase locked loop circuit generates the system clock signal to run the device up to
16.78 MHz from a 32.768 kHz watch crystal. The system speed can be changed dynamically,
providing either high performance or low power consumption under software control. The
system clock is a fully-static CMOS design, so it is possible to completely stop the system clock
via a low power stop instruction, while still retaining the contents of the registers and on-board
RAM.
M68332BCC/D4-4MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 55
Freescale Semiconductor, Inc.
4.2.1.8Test Module
The test module consolidates the microcontroller test logic into a single block to facilitate
production testing, user self-test, and system diagnostics. Scan paths throughout the MC68332
provide signature analysis checks on internal logic. User self-test is initiated by asserting the test
pin to enter test mode. This test provides a pass/fail response to various externally supplied test
vectors.
4.2.2User Memory
On board the BCC is 32k x 16 bits of RAM and 64k x 16 bits of EPROM. The RAM is the
debug monitor storage area and user accessible memory space; the M68CPU32BUG Debug
Monitor is stored in the BCC EPROMs. For debug monitor functionality see the
nc...
M68CPU32BUG Debug Monitor User’s Manual, M68CPU32BUG/AD1. Figure 4-3 is the EVK
memory map.
FUNCTIONAL DESCRIPTION
, I
or
emiconduct
eescale S
Fr
The PFB has sockets for 32k x 16 or 64k x 16 bit RAM or 64k x 16 bit EPROM. The RAM
and/or EPROM, supplied by the user, is user-accessible memory space.
4.2.3Terminal and Host Computer I/O Port
The MC68332 MCU serial communication interface pins drive levels are 0 and 5 Vdc. An
interface device (U5) translates these voltage levels to +/-10 Vdc, sufficient to allow RS-232C
communications.
The RS-232C serial communication port P4 facilitates terminal and host computer
interconnection. If a host computer is used a terminal emulation package (PCKERMIT.EXE,
PROCOMM, MacTerminal, White Knight, etc.) must be utilized. Chapter 5 contains a
description of P4 pin assignments.
4.2.4Background Mode Interface Port
The background debug mode is implemented in MCU microcode. In background mode, registers
can be viewed or altered, memory can be read or written, and test features can be executed.
Background mode is initiated by one of several sources: externally generated breakpoints,
internal peripherally generated breakpoints, software, and catastrophic exception conditions.
Instruction execution is suspended for the duration of background mode. Background mode
communications between the BCC and the development system are via a serial link (P3).
M68332BCC/D4-5MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 56
Freescale Semiconductor, Inc.
FUNCTIONAL DESCRIPTION
nc...
, I
or
emiconduct
eescale S
IN TERNAL RAM
(1)
MCU
IN TER N AL
MODULES
OPTIONAL FPCP
(3)
PFB: U5
ALTERNATE MCU
INTERNAL MODULES
LOCATION
(4)
OPTIONAL RAM/EPROM
PFB: U2 & U4
CPU32BUG EPROM
BCC: U1 & U2
OPT IONAL R AM
PFB: U1 & U3
TARG ET R AM
BCC: U3 & U4
S Y STE M R A M
BCC: U3 & U4
XXX7 FF
(2)
XXX000
FFFF FF
FFF0 00
FFE8 00
800000
7 FF00 0
1 1000 0 /1 20000
10 0 00 0
0E 0000
02 0 00 0
01 000 0
00 300 0
00 000 0
(5)
C PU32 BUG
INTERNAL STACK
CPU32BUG
INTERNAL
VA RIA BL E S
CPU32BUG VECTOR
TA BLE
TAR GET VECTO R
TABLE
Fr
1.Consult the MCU device user’s manual.
2.XXbase address is user programmable. Internal modules, such as
internal RAM, can be configured on power-up/reset by using the
initilization table (INITTBL) covered in Appendix C of the
M68CPU32BUG Debug Monitor User’s Manual,
M68CPU32BUG/AD1.
3.Floating point coprocessor - MC68881/MC68882.
4.See Appendix C of the M68CPU32BUG Debug Monitor User’s
Manual, M68CPU32BUG/AD1.
5.Depends on the memory device type used.
Figure 4-2. BCC Memory Map
M68332BCC/D4-6MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 57
Freescale Semiconductor, Inc.
SUPPORT INFORMATION
CHAPTER 5
SUPPORT INFORMATION
5.1 INTRODUCTION
This chapter provides the connector signal descriptions.
5.2 CONNECTOR SIGNAL DESCRIPTIONS
Connectors P1 and P2 connect the BCC to a target system. Connector P3 is for background
nc...
mode. Connector P4 is for serial communication between the BCC and a host computer.
, I
or
emiconduct
eescale S
Fr
Pin assignments for P1, P2, P3 and P4 are defined in Tables 5-1 through 5-4. Connector signals
are identified by pin number, signal mnemonic, and signal name and description.
Table 5-1. P1 Expansion Connector Pin Assignments
Signal Mnemonic
Pin Number
1, 2GNDGROUND
3, 4+5VSYSTEM POWER SUPPLY – +5 volt power source.
5DTROUTDATA TERMINAL READY – RS-232C handshake from
RESET – Active-low input/output signal for initiating a
/
/
BREAKPOINT – An active-low input signal that places
the CPU32 in background debug mode.
DEVELOPMENT SYSTEM CLOCK – Serial input clock
for background debug mode.
system reset.
FREEZE – Output signal that indicates that the CPU32
has entered background debug mode.
QUOTIENT OUT – Output signal that furnishes the
quotient bit of the polynomial divider for test purposes.
INSTRUCTION PIPE – Active-low output signal used to
track movement of words through the instruction
pipeline.
DEVELOPMENT SERIAL OUT – Serial output for
background debug mode.
INSTRUCTION FETCH – Active-low output signal that
indicates when the CPU is performing an instruction
word pre-fetch and when the instruction pipeline has
been flushed.
DEVELOPMENT SERIAL IN – Serial data input for
background debug mode.
M68332BCC/D5-3MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 60
nc...
, I
or
Freescale Semiconductor, Inc.
SUPPORT INFORMATION
Table 5-2. P2 Expansion Connector Pin Assignments
Signal Mnemonic
Pin Number
1, 2GNDGROUND
3, 4+5V+5 VOLT INPUT POWER
5 — 20D0 — D15DATA BUS – 16 bi-directional data pins.
21RXD DIRECEIVE DATA DEVELOPMENT INTER-FACE –
BCCDI receive data.
22TXD DITRANSMIT DATA DEVELOPMENT INTER-FACE –
BCCDI transmit data.
23MODB DIMODE B DEVELOPMENT INTERFACE – BCCDI
mode B.
24XMT 232TRANSMIT DATA – Serial data output signal.
Signal Name And Description
emiconduct
eescale S
Fr
25
26RCV 232RECEIVE DATA – Serial data input signal.
27R/W READ/WRITE – Active-high output signal that indicates
28MODCKCLOCK MODE SELECT – Active-high input signal that
29
30 — 34A23/
CSBOOT
TSTME
TSC
CS10
CS9
A22/
CS8
A21/
CS7
A20/
CS6
A19/
BOOT CHIP SELECT – An active-low output chip
select.
the direction of data transfer on the bus.
selects the source of the internal system clock.
/
,
,
,
,
TEST MODE ENABLE – Active-low input signal that is
a hardware enable for test mode.
THREE STATE CONTROL – When TSC is 8 volts (1.6
X +5V), this input signal forces all output drivers to a
high-impedance state.
ADDRESS BUS 19—23 – Three-state output address
bus.
CHIP SELECTS 6—10 – Output signals that select
peripheral/memory devices at programmed addresses.
55, 56SIZ0, SIZ1TRANSFER SIZE – Active-low output signals that
57
58CLKOUTSYSTEM CLOCK OUT – Output signal that is the
DSACK0
DSACK1
AVEC
RMC
11RESET
,
AUTOVECTOR – Active-low input signal that requests
READ-MODIFY-WRITE CYCLE – Active-low output
DS
DATA STROBE – Active-low output signal, that during
AS
ADDRESS STROBE – Active-low output signal that
Not connected.
DATA AND SIZE ACKNOWLEDGE – Active-low input
signals that allow asynchronous data transfers and
dynamic bus sizing between the MC68332 and external
devices.
an automatic vector during an interrupt acknowledge
cycle.
signal that identifies the bus cycle as part of an
indivisible read-modify-write operation.
a read cycle, indicates that an external device should
place valid data on the data bus. During the write cycle,
DS indicates that valid data is on the data bus.
indicates that a valid address is on the address bus.
indicate the number of bytes remaining to be
transferred during this cycle.
MC68332 internal system clock.
eescale S
Fr
59EXTALEXTERNAL CLOCK INPUT – External clock input for
the MC68332 MCU device.
60
61, 62+5V+5 VOLT INPUT POWER
63, 64GNDGROUND
M68332BCC/D5-6MOTOROLA
REV 1
HALT
HALT – Active-low input/output signal that suspends
external bus activity, to request a retry when used with
BERR
DATA STROBE – Active-low output signal, that during
a read cycle, indicates that an external device should
place valid data on the data bus. During the write cycle,
DS indicates that valid data is on the data bus.
BERR
BUS ERROR – Active-low input signal that indicates
that an erroneous bus operation is being attempted.
BKPT
DSCLK
QUOT
RESET
IFETCH
DSI
/
RESET – Active-low input/output signal for initiating a
/
BREAKPOINT – An active-low input signal that places
the CPU32 in background debug mode.
DEVELOPMENT SYSTEM CLOCK – Serial input clock
for background debug mode.
FREEZE – Output signal that indicates that the CPU32
has entered background debug mode.
QUOTIENT OUT – Output signal that furnishes the
quotient bit of the polynomial divider for test purposes
system reset.
INSTRUCTION FETCH – Active-low output signal that
indicates when the CPU is performing an instruction
word pre-fetch and when the instruction pipeline has
been flushed.
DEVELOPMENT SERIAL IN – Serial data input for
background debug mode.
Fr
9+5V+5 VOLT INPUT POWER
10
M68332BCC/D5-7MOTOROLA
REV 1
IPIPE
/
DSO
INSTRUCTION PIPE – Active-low output signal used to
track movement of words through the instruction
pipeline.
DEVELOPMENT SERIAL OUT – Serial output for
background debug mode.
For More Information On This Product,
Go to: www.freescale.com
Page 64
Freescale Semiconductor, Inc.
Table 5-4. J9 RS-232C Serial Communication Connector Pin Assignments
Signal Mnemonic
Pin Number
1XMITTRANSMIT DATA – RS-232C serial output data.
2GNDGROUND
3RCVRECEIVE DATA – RS-232C serial input data.
4+10V+10 VOLTS DC – Output voltage that may be used to
SUPPORT INFORMATION
Signal Name And Description
drive RS-232C handshake lines.
nc...
, I
or
emiconduct
eescale S
Fr
M68332BCC/D5-8MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 65
Freescale Semiconductor, Inc.
APPENDIX A
APPENDIX A
S-RECORD INFORMATION
The S-record format for output modules was devised for the purpose of encoding programs or
data files in a printable format for transportation between computer systems. The transportation
process can thus be visually monitored and the S-records can be more easily edited.
S-RECORD CONTENT
When viewed by the user, S-records are essentially character strings made of several fields which
nc...
, I
identify the record type, record length, memory address, code/data and checksum. Each byte of
binary data is encoded as a 2-character hexadecimal number; the first character representing the
high-order 4 bits, and the second the low-order 4 bits of the byte.
or
emiconduct
eescale S
Fr
The five fields which comprise an S-record are shown below:
TYPE RECORD LENGTH
ADDRESS
CODE/DATA
CHECKSUM
Where the fields are composed as follows:
Printable
Field
type 2 S-records type -- S0, S1, etc.
record
length
address 4,6,or 8 The 2-, 3-, or 4-byte address at which the data field is to be loaded
code/data 0-n From 0 to n bytes of executable code, memory-loadable data, or
Characters Contents
2 The count of the character pairs in the record, excluding type and
record length.
into memory.
descriptive information. For compatibility with teletypewriters, some
programs may limit the number of bytes to as few as 28 (56 printable
characters in the S-record).
checksum 2 The least significant byte of the one’s complement of the sum of the
values represented by the pairs of characters making up the records
length, address, and the code/data fields.
M68332BCC/D A-1 MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 66
Freescale Semiconductor, Inc.
APPENDIX A
Each record may be terminated with a CR/LF/NULL. Additionally, an S-record may have an
initial field to accommodate other data such as line numbers generated by some time-sharing
systems. An S-record file is a normal ASCII text file in the operating system of origin.
Accuracy of transmission is ensured by the record length (byte count) and checksum fields.
S-RECORD TYPES
Eight types of S-records have been defined to accommodate the several needs of the encoding,
transportation and decoding functions. The various Motorola upload, download and other
records transportation control programs, as well as cross assemblers, linkers and other filecreating or debugging programs, utilize only those S-records which serve the purpose of the
program. For specific information on which S-records are supported by a particular program, the
user’s manual for the program must be consulted. 332Bug supports S0, S1, S2, S3, S7, S8, and
nc...
S9 records.
, I
or
emiconduct
eescale S
Fr
An S-record format module may contain S-records of the following types:
TypeDescription
S0The header record for each block of S-records, The code/data.field may contain any descriptive
information identifying the following block of S-records. The address field is normally zeros.
S1A record containing code/data and the 2-byte address at which the code/data is to reside.
S2A record containing code/data and the 3-byte address at which the code/data is to reside.
S3A record containing code/data and the 4-byte address at which the code/data is to reside.
S5A record containing the number of S1, S2, and S3 records transmitted in a particular block. This
count appears in the address field. There is no code/data field.
S7A termination record for a block of S3 records, The address field may optionally contain the 4-
byte address of the instruction to which control is passed. There is no code/data field.
S8A termination record for a block of S2 records. The address field may optionally contain the 3-
byte address of the instruction to which control is passed. There is no code/data field.
S9A termination record for a block of S1 records. The address field may optionally contain the 2-
byte address of the instruction to which control is passed. If not specified, the first entry point
specification encountered in the object module input will be used. There is no code/data field.
Only one termination record is used for each block of S-records. S7 and S8 records are usually
used only when control is to be passed to a 3 or 4 byte address. Normally, only one header
record is used, although it is possible for multiple header records to occur.
M68332BCC/DA-2MOTOROLA
REV 1
For More Information On This Product,
Go to: www.freescale.com
Page 67
nc...
, I
or
Freescale Semiconductor, Inc.
APPENDIX A
S-RECORDS CREATION
S-record format files may be produced by dump utilities, debuggers, linkage editors, cross
assemblers or cross linkers. Several pro- grams are available for downloading a file in S-record
format from a host system to a microprocessor-based system.
EXAMPLE
Shown below is a typical S-record format module, as printed or displayed:
The module consists of one S0 record, four S1 records, and an S9 record.
The S0 record is comprised of the following character pairs:
S0S-record type S0, indicating that it is a header record.
06Hexadecimal 06 (decimal 6), indicating that six character pairs (or ASCII bytes) follow.
00
00
48
44
52
1BThe checksum.
The first S1 record is explained as follows:
S1S-record type S1, indicating that it is a code/data record to be loaded/verified at a 2-byte
13Hexadecimal 13 (decimal 19), indicating that 19 character pairs, representing 19 bytes
Four-character, 2-byte, address field; zeros in this example.
ASCII H, D and R - "HDR".
address.
of binary data, follow.
00
00
M68332BCC/DA-3MOTOROLA
REV 1
Four-character, 2-byte, address field; hexadecimal address 0000, where the data which
follows is to be loaded.
For More Information On This Product,
Go to: www.freescale.com
Page 68
Freescale Semiconductor, Inc.
APPENDIX A
The next 16 character pairs of the first S1 record are the ASCII bytes of the actual program
code/data. In this assembly language example, the hexadecimal opcodes of the program are
written in sequence in the code/data fields of the S1 records:
(The balance of this code is continued in the code/data fields of the
remaining S1 records and stored in memory.)
2AThe checksum of the first S1 record.
The second and third S1 records also each contain $13 (19) character pairs and are ended with
checksums 13 and 52 respectively. The fourth S1 record contains 07 character pairs and has a
checksum of 92.
The S9 record is explained as follows:
S9S-record type S9, indicating that it is a termination record.
03Hexadecimal 03, indicating that three character pairs (3 bytes) follow.
00
00The address field, zeros.
FCThe checksum of the S9 record.
Each printable character in an S-record is encoded in a hexadecimal (ASCII in this example)
representation of the binary bits which are actually transmitted. For example, the first S1 record
above is sent as: