MCF5206eLITE Evaluation Board User’s Manualapplication-notes.digchip.com/314/314-68822.pdf · MCF5206eLITE Evaluation Board User’s Manual ... 2.2.2.1. Hard RESET Button. ... 3.1.11
Post on 24-Apr-2018
216 Views
Preview:
Transcript
MCF5206eLITEEvaluation BoardUser’s Manual
Rev. 2
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
1
DISCLAIMER
The information in this manual has been carefully examined and is believed to be entirely reliable. However, noresponsibility is assumed for inaccuracies. Furthermore, Motorola reserves the right to make changes to anyproduct(s) herein to improve reliability, function, or design. The M5206eLITE board is not intended for use inlife and/or property critical applications. Here, such applications are defined to be any situation in which anyfailure, malfunction, or unintended operation of the board could, directly, or indirectly, threaten life, result inpersonal injury, or cause damage to property. Although every effort has been made to make the supplied softwareand its documentation as accurate and functional as possible, Motorola Inc. will not assume responsibility for anydamages incurred or generated by this product. Motorola does not assume any liability arising out of the applicationor use of any product or circuit described herein, neither does it convey any license under its patent rights, if any,or the rights of others.
WARNING
THIS BOARD GENERATES, USES, AND CAN RADIATE RADIOFREQUENCY ENERGY AND, IF NOT INSTALLED PROPERLY,MAY CAUSE INTERFERENCE TO RADIO COMMUNICATIONS.AS TEMPORARILY PERMITTED BY REGULATION, IT HASNOT BEEN TESTED FOR COMPLIANCE WITH THE LIMITSFOR CLASS A COMPUTING DEVICES PURSUANT TO SUBPARTJ OF PART 15 OF FCC RULES, WHICH ARE DESIGNED TOPROVIDE REASONABLE PROTECTION AGAINST SUCHINTERFERENCE. OPERATION OF THIS PRODUCT IN ARESIDENTIAL AREA IS LIKELY TO CAUSE INTERFERENCE,IN WHICH CASE THE USER, AT HIS/HER OWN EXPENSE, WILLBE REQUIRED TO CORRECT THE INTERFERENCE.
Motorola is a registered trademark of Motorola Inc.IBM PC and IBM AT are registered trademarks of IBM Corp.All other trademark names mentioned in this manual are the registered trademark of their respective owners.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
2
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
3
TABLE OF CONTENTS
CHAPTER 1 1-1
1.1 INTRODUCTION .................................................................................................................................. 71.2 GENERAL HARDWARE DESCRIPTION ........................................................................................... 71.3 SYSTEM MEMORY .............................................................................................................................. 81.4 SERIAL COMMUNICATION CHANNELS ......................................................................................... 81.5 PARALLEL I/O PORTS ......................................................................................................................... 81.6 PROGRAMMABLE TIMER/COUNTER ............................................................................................. 81.7 SYSTEM CONFIGURATION ............................................................................................................... 81.8 INSTALLATION AND SETUP ............................................................................................................. 9
1.8.1. Unpacking .......................................................................................................................................... 91.8.2. Preparing the Board for Use ............................................................................................................. 91.8.3. Providing Power to the Board ........................................................................................................... 91.8.4. Selecting Terminal Baud Rate ......................................................................................................... 101.8.5. The Terminal Character Format ..................................................................................................... 101.8.6. Connecting the Terminal .................................................................................................................. 101.8.7. Using a Personal Computer as a Terminal ..................................................................................... 10
1.9 SYSTEM POWER-UP AND INITIAL OPERATION ......................................................................... 121.10 M5206eLITE JUMPER SETUP .................................................................................................................. 12
1.10.1. Jumper JP2 - This jumper selects between -CS0 to Flash or off-board connector J1 .................... 121.10.2. Jumper JP1 – DRAM SIMM voltage selection – 5V or 3.3V........................................................... 121.10.3. Jumper JP3 - This jumper selects between BDM & JTAG operation of the MCF5206e ................ 131.10.4. Jumper JP4 - This jumper selects between 3.3V or 5V supply to the BDM cable ........................... 131.10.5. Jumper JP5 - This jumper allows current measurements of the MCF5206e to be taken ................ 13
1.11 USING THE BDM................................................................................................................................ 13
CHAPTER 2 2-1
2.1 WHAT IS dBUG? ................................................................................................................................. 142.2 OPERATIONAL PROCEDURE .......................................................................................................... 15
2.2.1. System Power-up ............................................................................................................................. 152.2.2. System Initialization ........................................................................................................................ 16
2.2.2.1. Hard RESET Button. .................................................................................................................................. 162.2.2.2. Software Reset Command. ......................................................................................................................... 162.2.2.3. USER Program. .......................................................................................................................................... 16
2.2.3. System Operation ............................................................................................................................. 172.3 TERMINAL CONTROL CHARACTERS........................................................................................... 172.4 dBUG COMMAND SET ...................................................................................................................... 18
2.4.1. AS - Assemble AS ...................................................................................................................... 182.4.2. BC - Compare Blocks of Memory BC ....................................................................................... 202.4.3. BF - Block of Memory Fill BF ..................................................................................................202.4.4. BM - Block Move BM ...............................................................................................................212.4.5. BR - Breakpoint BR ..................................................................................................................222.4.6. BS - Block Search BS ................................................................................................................232.4.7. DATA - Data Conversion DATA ...............................................................................................242.4.8. DI - Disassemble DI .................................................................................................................242.4.9. DL - Download Serial DL ........................................................................................................252.4.10. Go - Execute GO ......................................................................................................................252.4.11. GT - Execute Until a Temporary Breakpoint GT......................................................................262.4.12. HELP - Help HE .......................................................................................................................262.4.13. IRD - Internal Registers Display IRD ......................................................................................262.4.14. IRM - Internal Registers MODIFY IRM ..................................................................................272.4.15. MD - Memory Display MD ......................................................................................................272.4.16. MM - Memory Modify MM ....................................................................................................282.4.17. RD - Register Display RD ........................................................................................................282.4.18. RM - Register Modify RM ........................................................................................................292.4.19. RESET - Reset the board and dBUGRESET ...........................................................................292.4.20. SET - Set Configuration SET....................................................................................................302.4.21. SHOW - Show Configuration SHOW.......................................................................................30
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
4
2.4.22. STEP - Step Over ST ................................................................................................................312.4.23. SYMBOL - Symbol Name ManagementSYMBOL ..................................................................312.4.24. TRACE - Trace Into TR ............................................................................................................322.4.25. UPDBUG - Update the dBUG Image UPDBUG .....................................................................322.4.26. UPUSER - Update User Code In Flash UPUSER ...................................................................33
2.5 TRAP #15 FUNCTIONS ............................................................................................................................ 342.5.1. OUT_CHAR..................................................................................................................................... 342.5.2. IN_CHAR......................................................................................................................................... 352.5.3. CHAR_PRESENT ............................................................................................................................ 362.5.4. EXIT_TO_dBUG ............................................................................................................................. 36
CHAPTER 3 3-1
3.1 THE PROCESSOR AND SUPPORT LOGIC ...................................................................................... 373.1.1. The Processor .................................................................................................................................. 373.1.2. The Reset Logic ............................................................................................................................... 373.1.3. The -HIZ Signal ............................................................................................................................... 373.1.4. The Clock Circuitry ......................................................................................................................... 383.1.5. Watchdog Timer (BUS MONITOR) ................................................................................................. 383.1.6. Interrupt Sources ............................................................................................................................. 383.1.7. Internal SRAM ................................................................................................................................. 383.1.8. The MCF5206e Registers and Memory Map .................................................................................. 383.1.9. Reset Vector Mapping ...................................................................................................................... 393.1.10 -TA Generation ................................................................................................................................ 393.1.11 Wait State Generator ....................................................................................................................... 40
3.2 THE ASYNCHRONOUS DRAM SIMM ............................................................................................ 403.3 FLASH ROM ........................................................................................................................................ 40
3.3.1. JP2 Jumper and User’s Program .................................................................................................... 403.4 THE SERIAL COMMUNICATION CHANNELS .............................................................................. 40
3.4.1. The MCF5206e UARTs .................................................................................................................... 403.4.2. Motorola Bus (M-Bus) Module ........................................................................................................ 41
3.5 THE PARALLEL I/O PORT................................................................................................................. 413.6 THE CONNECTORS AND THE EXPANSION BUS ......................................................................... 41
3.6.1. The Terminal Connector J9 ............................................................................................................. 413.6.2. The Auxiliary Serial Communication Connector P2 ....................................................................... 413.6.3. The M-Bus/I2C Connector J5 ........................................................................................................... 423.6.4. Processor Expansion Bus J1 & J2 ................................................................................................... 423.6.5. The Debug Connector J3 ................................................................................................................. 453.6.6. The 5V Tolerant GPIO Connector J10 ............................................................................................ 463.6.7 The GPIO Open Collector Driver Connector J11 ........................................................................... 463.6.8. Asynchronous DRAM SIMM Connections CN1 .............................................................................. 47
APPENDIX A PALLV16V8 CODE – PALASM4 ...................................................................................................... 49
APPENDIX B SCHEMATICS .................................................................................................................................... 51
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
5
TABLES
TABLE 1 – JP2, CS0 SELECT ................................................................................................................................................ 12TABLE 2 – JP1, DRAM SIMM VOLTAGE SELECTION ........................................................................................................... 12TABLE 3 – JP3, BDM OR JTAG OPERATION......................................................................................................................... 13TABLE 4 – JP4, 3.3V OR 5V SUPPLY FOR THE BDM I/F ........................................................................................................ 13TABLE 5 – JP5, CURRENT MEASUREMENT OF THE MCF5206e ................................................................................................ 13TABLE 6 - dBUG COMMANDS .............................................................................................................................................. 18TABLE 7 - THE M5206eLITE MEMORY MAP ......................................................................................................................... 39TABLE 8 - THE J9 (TERMINAL) CONNECTOR PIN ASSIGNMENT.................................................................................................. 41TABLE 9 - THE J4 CONNECTOR PIN ASSIGNMENT..................................................................................................................... 42TABLE 10 - THE J5 CONNECTOR PIN ASSIGNMENT................................................................................................................... 42TABLE 11 - THE J1 CONNECTOR PIN ASSIGNMENT................................................................................................................... 43TABLE 12 - THE J2 CONNECTOR PIN ASSIGNMENT................................................................................................................... 44TABLE 13 - THE J3 CONNECTOR PIN ASSIGNMENT................................................................................................................... 45TABLE 14 - THE J10 CONNECTOR PIN ASSIGNMENT................................................................................................................. 46TABLE 15 - THE J11 CONNECTOR PIN ASSIGNMENT................................................................................................................. 46TABLE 16 - THE CN1 CONNECTOR PIN ASSIGNMENT............................................................................................................... 47
FIGURES
FIGURE 1 BLOCK DIAGRAM OF THE BOARD ...............................................................................................................................7FIGURE 2 PIN ASSIGNMENT FOR J4 (TERMINAL) CONNECTOR. ................................................................................................... 10FIGURE 3 SYSTEM CONFIGURATION ........................................................................................................................................ 11FIGURE 4 JUMPER AND CONNECTOR PLACEMENT ...................................................................................................................... 11FIGURE 5 FLOW DIAGRAM OF dBUG OPERATIONAL MODE. .................................................................................................... 15
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
6
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
7
INTRODUCTION TO THE M5206eLITE BOARD
1.1 INTRODUCTION
The M5206eLITE is a versatile single board computer based on MCF5206e ColdFire® Processor. It may be usedas a powerful microprocessor based controller in a variety of applications. With the addition of a terminal, itserves as a complete microcomputer system for development/evaluation, training and educational use. To have afully functional system, all that is required is an RS-232 terminal (or a PC with terminal emulation software) anda regulated 5V power supply.
It is possible to expand the memory and I/O capabilities of this board by connecting additional hardware via theMicroprocessor Expansion Bus connectors, although it may be necessary to add bus buffers to accomodate additionalbus loading.
Furthermore, provisions have been made on the printed circuit board (PCB) to permit configuration of the boardin a way which best suits an application. Options available are: up to 32M bytes of ADRAM (FPM or EDO – notfitted), 1M byte (256Kx32) FSRAM, Timers, general purpose I/O, an MBus(I2C) slave device (real-time clock)and 1M byte (512Kx16) of Flash EEPROM. All of the processor’s signals are also available via connectors J1 andJ2 for expansion purposes.
1.2 GENERAL HARDWARE DESCRIPTION
The M5206eLITE board provides FSRAM, Flash ROM, RS232 and all the built-in I/O functions of the MCF5206efor learning and evaluating the attributes of the MCF5206e. The MCF5206e is a member of the ColdFire® familyof processors. It is a 32-bit processor with up to 32 bits of addressing and 32 lines of data. The processor has eight32-bit data registers, eight 32-bit address registers, a 32-bit program counter and a 16-bit status register.
The MCF5206e has a System Integration Module referred to as SIM. The module incorporates many of thefunctions needed for system design. These include programmable chip-select logic, system protection logic,general purpose I/O and interrupt controller logic. The chip-select logic can select up to eight memory banks orperipherals in addition to two banks of ADRAMs. The chip-select logic also allows a programmable number ofwait-states to allow the use of slower access memory (refer to MCF5206e User’s Manual by Motorola for detailedinformation about configuration of the SIM - system integration module.) The M5206eLITE board only usesthree of the available chip selects to access the Flash EEPROM, FSRAM and the extra GPIO. The on-chipADRAM controller can be used to control one ADRAM SIMM module of up to 32M bytes of ADRAM (theADRAM SIMM is not fitted to the board, but can easily be added by the user), both -RAS lines and all four –CASlines are used. All other functions of the SIM are available to the user.
A hardware watchdog timer (Bus Monitor) circuit is included in the SIM that monitors the bus activities. If abus cycle is not terminated within a programmable time, the watchdog timer will assert an internal transfererror signal to terminate the bus cycle. A block diagram of the board is shown in Figure 1.
Figure 1 Block Diagram of the board
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
8
1.3 SYSTEM MEMORY
There is one on board Flash EEPROM (U4), which is configured in hardware to be 16-bits wide. The M5206eLITEcomes with the AM29LV800BB Flash EEPROM programmed with debugger/monitor firmware(dBUG). TheAM29LV800BB Flash EEPROM is 8Mbits giving a total of 1M byte (512Kx16) of Flash memory. This versionof dBUG monitor only supports AM29LV800BB Flash EEPROM.
There is one 72-pin SIMM socket for ADRAM (ADRAM SIMM not fitted).
The MCF5206e processor has 8K bytes organized as 2048x32 bits of internal SRAM.
The internal cache of the MCF5206e is a non-blocking 4k-Byte Direct-Mapped Instruction Cache. The ROMMonitor currently does not utilize the cache, but programs downloaded with the ROM Monitor can use the cache.
1.4 SERIAL COMMUNICATION CHANNELS
The MCF5206e has 2 UART’s with independent baud rate generators. The signals of channel one are passedthrough external Driver/Receivers to make the channel compatible with RS-232. UART1 is used by the debuggerfor the user to access with a terminal. The UART1 channel is the “TERMINAL” channel used by the debugger forcommunication with external terminal/PC. The “TERMINAL’ baud rate is set at 19200. The signals of channeltwo are passed directly to connector J4, where they can be used for 5V serial communications.
The MCF5206e also incorporates the M-Bus module, which is compatible with the MBus(I2C) standard. Connectedto the MBus(I2C) bus as a slave device, is a Dallas Semiconductor real time clock and NVRAM (64 bytes) device,U17 – DS1307Z. At manufacture this device is programmed with the time and date which is battery backed up(BT1). This can be read back or written, using the M5206eLITE MBus(I2C) sample code provided on the ColdFireweb site – http://www.motorola.com/ColdFire/.
1.5 PARALLEL I/O PORTS
The MCF5206e processor offers one 8-bit general-purpose parallel I/O port. Each pin can be individuallyprogrammed as input or output. The parallel port bits PP(3:0) are multiplexed with PST(3:0) and PP(7:4) aremultiplexed with DDATA(3:0). The Pin Assignment Register (PAR) controls both nibbles of the parallel port.After reset, all pins are configured as PST and DDATA pins to allow real time trace and debug. Apart from the on-chip GPIO there are two memory mapped bus transceivers (U14 & U15) controlled via chip select 3. TransceiverU14 is configured for output only and drives a 7-segment LED display, which provides status information aboutthe board. One line of U14 (A7) also drives the direction control signal of transceiver U15. This allows thedeveloper to use U15 for input or output. Input is limited to 5V signals via connector J10 on the board. Outputhowever can be either 3.3V at connector J10, or a much higher voltage supplied by external hardware on pin 9 ofJ11. Connector J11 is driven by an open collector device, U16 – ULN2803A, allowing high drive I/O.
1.6 PROGRAMMABLE TIMER/COUNTER
The MCF5206e has two built in general-purpose 16-bit timer/counters. These timers are available to the user. Thesignals for the timers are available on the J1 and J2 connectors. The signals for timer/counter 0 are multiplexedwith the DMA request signals DREQ0 (TIN1) and DREQ1 (TOUT1). The functionality of these pins is programmedvia the PAR register (Pin Assignment Register) during initialization of the processor. However, timer 0 is availableto the user as an internal counter/timer, e.g. for an RTOS system clock.
1.7 SYSTEM CONFIGURATION
The M5206eLITE board requires the following items for minimum system configuration (Figure 3):
1. The M5206eLITE board (provided).2. Regulated power supply, 5V with minimum of 1.5 Amps.3. RS-232C compatible terminal or a PC with terminal emulation software.4. Serial communication cable (not provided).5. Macraigor BDM cable (part of the Mentor toolkit provided with the board).
Refer to next sections for the initial setup.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
9
1.8 INSTALLATION AND SETUP
The following sections describe all the steps needed to prepare the board for operation. Please read the followingsections carefully before using the board. When the board is set up for the first time, ensure that all jumpers are inthe default locations. The standard configuration does not require any modifications. After the board is setup in itsstandard configuration, you may use the BDM cable by following the instructions provided in the followingsections.
1.8.1. Unpacking
Unpack the computer board from its shipping box. Save the box for storing or reshipping. Refer to the followinglist and verify that all the items are present. You should have received:
• M5206eLITE Single Board Computer• M5206eLITE User’s Manual, this documentation• One Macraigor BDM cable (part of the Mentor toolkit)• MCF5206e User’s Manual• ColdFire Programmer’s Reference Manual• Motorola Literature CDROM• Getting Started Documentation
From participating Third Party Tool Developers - faxbacktrial forms & trial software on CD
• Mentor Graphics - Microtec Product Division - BDMcable, Trial Compiler & “XRAY4” Debugger
• Software Development Systems - Trial“SingleStep” Debugging Software
• Noral Micrologics - Faxback trial form for a BDMbased debugging cable & a mouse mat
• Diab Data - Trial compiler tool chain• Embedded Support Tools (EST) - Faxback trial
form for debugging hardware & “VisionClick”software
• WindRiver Systems - trial compiler toolchain &RTOS
• Green Hills Software - Trial compiler toolchain &debugging suite
• Accelerated Technology - Trial “Nucleus+” RTOS
WARNING
AVOID TOUCHING THE MOS DEVICES. STATIC DISCHARGE CAN ANDWILL DAMAGE THESE DEVICES.
Once you verified that all the items are present, remove the board from its protective jacket. Check the board forany visible damage. Ensure that there are no broken, damaged, or missing parts. If you have not received all theitems listed above or they are damaged, please contact Williams Electronic Design immediately(irbwilliams@compuserve.com). Each board carries a 12 months return to manufacturer warranty – whether theboard is repaired or replaced is at the manufacturers discretion.
1.8.2. Preparing the Board for Use
The board as shipped is ready to be connected to a terminal and a power supply without any need for modification.However, follow the steps below to ensure proper operation from the first time you apply the power. Figure 4shows the placement of the jumpers and the connectors, which you need to refer to in the following sections. Thesteps to be taken are:
a. Connecting the power supply.b. Connecting the terminal.
1.8.3. Providing Power to the Board
Connector J8 is a screw terminal connector. The board accepts 5V DC (regulated) at 1.5 Amps via this connector.Power supplied to the processor passes through jumper JP5. This does not include resistors used to pull-up signalsattached to the processor. Jumper JP5 can be removed and with the use of a current meter, can be used to performpower analysis of the MCF5206e.
Contact No. Voltage1 +5V2 Ground
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
10
1.8.4. Selecting Terminal Baud Rate
The serial channel of MCF5206e that is used for serial communication has a built in timer used by the ROMMONITOR to generate the baud rate used to communicate with a terminal. It can be programmed to a number ofbaud rates. After the power-up or a manual RESET, the ROM Monitor firmware configures the channel for 19200baud. After the ROM Monitor is running, the SET command may be issued to choose any baud rate supported bythe ROM Monitor. Refer to Chapter 2 for the discussion of this command.
1.8.5. The Terminal Character Format
The character format of the communication channel is fixed at power-up or RESET of the board. The characterformat is 8 bits per character, no parity, and one stop bit. You need to ensure that your terminal or PC is set to thisformat.
1.8.6. Connecting the Terminal
The board is now ready to be connected to a terminal. Use an RS-232 serial cable to connect the PC to theM5206eLITE. The cable should have a 9-pin female D-sub connector at one end and a 9-pin male D-sub connectorat the other end. Connect the 9-pin male connector to the J9 connector on the M5206eLITE. Connect the 9-pinfemale connector to one of the available serial communication channels normally referred to as COM1 (COM2,etc.) on the IBM PC or compatible. Depending on the kind of serial connector on the back of your PC, theconnector on your PC may be a male 25-pin or 9-pin. You may need to obtain a 9-pin-to-25-pin adapter to makethe connection. If you need to build an adapter, refer to Figure 2 that shows the pin assignment for the 9-pinconnector on the board.
1.8.7. Using a Personal Computer as a Terminal
You may use your personal computer as a terminal provided you also have a terminal emulation software such asPROCOMM, KERMIT, QMODEM, Windows 95 Hyper Terminal or similar packages. Then connect as describedin 1.8.6 Connecting the Terminal.
Once the connection to the PC is made, you are ready to power-up the PC and run the terminal emulation software.When you are in the terminal mode, you need to select the baud rate and the character format for the channel.Most terminal emulation software packages provide a command known as “Alt-p” (press the p key while pressingthe Alt key) to choose the baud rate and character format. Make sure you select 8 bits, no parity, one stop bit, seesection 1.8.5 The Terminal Character Format. Then, select the baud rate as 19200. Now you are ready to applypower to the board.
Figure 2 Pin assignment for J4 (Terminal) connector.
1. Data Carrier Detect, Output (shorted to pin 6).2. Receive Data, Output from board (receive refers to terminal side).3. Transmit Data, Input to board (transmit refers to terminal side).4. Data Terminal Ready, input (not connected – could be shorted to pins 1 & 6).5. Signal Ground.6. Data Set Ready, Output (shorted to pin 1).7. Request to Send, input.8. Clear to send, output9. Not connected.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
11
Figure 3 System Configuration
Figure 4 Jumper and connector placement
/MBus
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
12
1.9 SYSTEM POWER-UP AND INITIAL OPERATION
When the cables are connected, power may be applied to the board. After power is applied the dBUG monitorprogram initializes the board, then displays the power-up message on the terminal. The amount of memorypresent will also be displayed.
Hard Reset
FSRAM Size: 1M
Copyright 1997-1999 Motorola, Inc. All Rights Reserved.
ColdFire® MCF5206e EVS Debugger Vx.x.x (xxx 199x xx:xx:xx:)
Enter ‘help’ for help.
dBUG>
The board is now ready for operation under the control of the debugger as described in Chapters 2. If you donot get the above response, perform the following checks:
1. Make sure that the power supply is set to the correct voltage and current levels and isproperly connected to the board.
2. Check that the terminal and board are set for the same character format and baud.
3. Press the black RESET (S1) button to ensure that the board has been initializedproperly.
If you are not receiving the proper response, your board may have been damaged. Contact Williams ElectronicDesign (irbwilliams@compuserve.com) for further help.
1.10 M5206eLITE Jumper Setup
The jumpers on the board are discussed in Chapter 3. However, a brief discussion of the jumper settingsfollows:
1.10.1. Jumper JP2 - This jumper selects between -CS0 to Flash or off-board connector J1
Table 1 – JP2, -CS0 select
JP2 Function
1 and 2 Flash ROM U4 (default)
2 and 3 Header (J1)
1.10.2. Jumper JP1 – ADRAM SIMM voltage selection – 5V or 3.3V
This jumper allows the selection of either 5V or 3.3V supply to the ADRAM SIMM. The default is 5V.
Table 2 – JP1, ADRAM SIMM Voltage SelectionJP1 Function
1 and 2 5V supply (default)
2 and 3 3.3V supply
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
13
1.10.3. Jumper JP3 - This jumper selects between BDM & JTAG operation of the MCF5206e
Table 3 – JP3, -BDM or JTAG Operation
JP3 Function
1 and 2 BDM operation (default)
2 and 3 JTAG operation
1.10.4. Jumper JP4 - This jumper selects between 3.3V or 5V supply to the BDM cable
As the Macraigor BDM cable, supplied as part of this evaluation kit, is a 3.3V cable, 3.3V is the default setting.
Table 4 – JP4, -3.3V or 5V supply for the BDM I/F
JP4 Function
1 and 2 5V supply
2 and 3 3.3V supply (default)
1.10.5. Jumper JP5 - This jumper allows MCF5206e current consumption to be measured
With the jumper fitted, current is supplied to the MCF5206e processor as normal. With the jumper removed, acurrent meter can be connected to pins 1 & 2 of the jumper to measure the current required by the MCF5206e.
Table 5 – JP5, -Current measurement of the MCF5206e
JP3 Function
1 and 2 Jumper fitted (default)
1.11 USING THE BDM
The MCF5206e has a built in debug mechanism referred to as BDM (Background Debug Mode). The M5206eLITEboard has the necessary connector, J3, to facilitate this connection.
In order to use BDM, simply connect the 26-pin IDC header to the J3 connector. No special setting is needed.Refer to the BDM section of the MCF5206e User’s Manual for additional instructions.
IMPORTANT: There is no key to protect the BDM cable from being rotated and plugged in incorrectly. Toprevent hooking up the BDM cable incorrectly, the position of pin 1 is clearly marked on the board and is denotedby a red strip on the cable.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
14
CHAPTER 2
USING THE MONITOR/DEBUG FIRMWARE
The M5206eLITE Computer Board has a resident firmware package that provides a self-contained programmingand operating environment. The firmware, named dBUG, provides the user with monitor/debug, disassembly,program download, and I/O control functions. This Chapter is a description of the dBUG package, including theuser interface and command structure.
2.1 WHAT IS dBUG?
dBUG is a resident firmware package for the ColdFire® family Computer Boards. The firmware (stored in one512Kx16 Flash ROM device) provides a self-contained programming and operating environment. The user interactswith dBUG through pre-defined commands that are entered via an RS232 terminal.
The user interface to dBUG is the command line. A number of features have been implemented to achieve an easyand intuitive command line interface.
dBUG assumes that an 80x24 character dumb-terminal is utilized to connect to the debugger. For serialcommunications, dBUG requires eight data bits, no parity, and one stop bit, 8N1. The baud rate is 19200 baudwhich can be changed after power-up.
The command line prompt is “dBUG> “. Any dBUG command may be entered from this prompt. dBUG does notallow command lines to exceed 80 characters. Wherever possible, dBUG displays data in 80 columns or less.dBUG echoes each character as it is typed, eliminating the need for any “local echo” on the terminal side.
In general, dBUG is not case sensitive. Commands may be entered either in upper or lower case, depending uponthe user’s equipment and preference. Only symbol names require that the exact case be used.
Most commands can be recognized by using an abbreviated name. For instance, entering “h” is the same asentering “help”. Thus, it is not necessary to type the entire command name.
The commands DI, GO, MD, STEP and TRACE are used repeatedly when debugging. Therefore dBUG allowsfor repeated execution of these commands with minimal typing. After a command is entered, simply press<RETURN> or <ENTER> to invoke the command again. The command is executed as if no command lineparameters were provided.
An additional function called the “TRAP 15 handler” allows the user program to utilize various routines withindBUG. The TRAP 15 handler is discussed at the end of this chapter.
The operational mode of dBUG is demonstrated in Figure 5. After the system initialization, the board waits for acommand-line input from the user terminal. When a proper command is entered, the operation continues in one ofthe two basic modes. If the command causes execution of the user program, the dBUG firmware may or may notbe re-entered, depending on the operation of the user’s code. In the alternate case, the command will be executedunder control of the dBUG firmware, and after command completion, the system returns to command entry mode.
During command execution, additional user input may be required depending on the command function.
For commands that accept an optional <width> to modify the memory access size, the valid values are:.B 8-bit (byte) access.W 16-bit (word) access.L 32-bit (long) access
When no <width> option is provided, the default width is .W, 16-bit.
The core ColdFire® register set is maintained by dBUG. These are listed below:A0-A7D0-D7PCSR
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
15
All control registers on ColdFire® are readable only via the supervisor-programming model, and thus not accessiblevia dBUG. User code may change these registers, but caution must be exercised as changes may render dBUGuseless.
A reference to “SP” actually refers to “A7”.
2.2 OPERATIONAL PROCEDURE
System power-up and initial operation are described in detail in Chapter 1. This information is repeated here forconvenience and to prevent possible damage.
2.2.1. System Power-up
a. Be sure the power supply is connected properly prior to power-up.
b. Make sure the terminal is connected to TERMINAL (J9) connector.
c. Turn power on to the board.
Figure 5 Flow Diagram of dBUG Operational Mode.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
16
2.2.2. System Initialization
The act of powering up the board will initialize the system. The processor is reset and dBUG is invoked.
dBUG performs the following configurations of internal resources during the initialization. The instruction cacheis invalidated and disabled. The Vector Base Register, VBR, points to the Flash. However, a copy of the exceptiontable is made at address $30000000 in FSRAM. To take over an exception vector, the user places the address ofthe exception handler in the appropriate vector in the vector table located at 0x30000000, and then points theVBR to 0x30000000.
The Software Watchdog Timer is disabled, Bus Monitor enabled, and internal timers are placed in a stop condition.Interrupt controller registers initialized with unique interrupt level/priority pairs.
After initialization, the terminal will display:
Hard Reset
FSRAM Size: 1M
Copyright 1997-1999 Motorola, Inc. All Rights Reserved.
ColdFire® MCF5206e EVS Debugger Vx.x.x (xxx 199x xx:xx:xx:)
Enter ‘help’ for help.
dBUG>
If you did not get this response check the setup. Refer to Section 1.9 SYSTEM POWER-UP AND INITIALOPERATION. Note, the date ‘xxx 199x xx:xx:xx’ may vary in different revisions.
Other means can be used to re-initialize the M5206eLITE Computer Board firmware. These means are discussedin the following paragraphs.
2.2.2.1. Hard RESET Button.
Hard RESET is the black push button switch (S1) located in the corner of the board. Depressing this switch causesall processes to terminate, resets the MCF5206e processor and board logic and restarts the dBUG firmware.Pressing the RESET button would be the appropriate action if all else fails.
2.2.2.2. Software Reset Command.
dBUG does have a command that causes the dBUG to restart as if a hardware reset was invoked. The commandis “RESET”.
2.2.2.3. USER Program.
The user can return control of the system to the firmware by recalling dBUG via his/her program. Instructions canbe inserted into the user program to call dBUG via the TRAP 15 handler.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
17
2.2.3. System Operation
After system initialization, the terminal will display:
Hard Reset
FSRAM Size: 1M
Copyright 1997-1999 Motorola, Inc. All Rights Reserved.
ColdFire® MCF5206e EVS Debugger Vx.x.x (xxx 199x xx:xx:xx:)
Enter ‘help’ for help.
dBUG>
and waits for a command.
The user can call any of the commands supported by the firmware. A standard input routine controls the systemwhile the user types a line of input. Command processing begins only after the line has been entered and followedby a carriage-return.
NOTES
1. The user memory is located at addresses $30020000-$300FFFFF, $300FFFFF is themaximum FSRAM address of the memory installed on the board. When first learningthe system, the user should limit his/her activities to this area of the memory map.Address range $30000000-$3001FFFF is used by dBUG.
2. If a command causes the system to access an unused address (i.e., no memory orperipheral devices are mapped at that address), a bus trap error will occur. This resultsin the terminal printing out a trap error message and the contents of all the MCF5206ecore registers. Control is returned to the dBUG monitor.
2.3 TERMINAL CONTROL CHARACTERS
The command line editor remembers the last five commands, in a history buffer, which were issued. They can berecalled and then executed using control keys.
Several keys are used as a command line edit and control functions. It is best to be familiar with these functionsbefore exercising the system. These functions include:
a. RETURN (carriage- return) - will enter the command line and causes processing to begin.b. Delete (Backspace) key or CTRL-H - will delete the last character entered on the terminal.c. CTRL-D - Go down in the command history buffer, you may modify then press enter key.d. CTRL-U - Go up in the command history buffer, you may modify then press enter key.e. CTRL-R - Recall and execute the last command entered, does not need the enter key to be pressed.
For characters requiring the control key (CTRL) , the CTRL should be pushed and held down and then the otherkey (H,D,U or R) should be pressed.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
18
2.4 dBUG COMMAND SET
Table 6 lists the dBUG commands. Each of the individual commands is described in the following pages.
Table 6 - dBUG CommandsCOMMAND
DESCRIPTION SYNTAX PAGEMNEMONIC
AS ASSEMBLE AS <addr> <instruction> 18
BC BLOCK COMPARE BC<FIRST><SECOND><LENGTH> 20
BF BLOCK FILL BF<WIDTH> BEGIN END DATA 20
BM BLOCK MOVE BM BEGIN END DEST 21
BS BLOCK SEARCH BS <WIDTH> BEGIN END DATA 22
BR BREAKPOINT BR ADDR <-R> <-C COUNT> <-T TRIGGER> 23
DATA DATA CONVERT DATA VALUE 24
DI DISASSEMBLE DI <ADDR> 24
DL DOWNLOAD SERIAL DL <OFFSET> 25
GO EXECUTE GO <ADDR> 25
GT Go TILL BREAKPOINT GT <ADDR> 26
HELP HELP HELP <COMMAND> 26
IRD INTERNAL REGISTER DISPLAY IRD <MODULE.REGISTER> 26
IRM INTERNAL REGISTER MODIFY IRM <MODULE.REGISTER> <DATA> 27
MD MEMORY DISPLAY MD <WIDTH> <BEGIN> <END> 27
MM MEMORY MODIFY MM <WIDTH> ADDR <DATA> 28
RD REGISTER DISPLAY RD <REG> 28
RM REGISTER MODIFY RM REG DATA 29
RESET RESET RESET 29
SET SET CONFIGURATIONS SET OPTION <VALUE> 30
SHOW SHOW CONFIGURATIONS SHOW OPTION 30
STEP STEP (OVER) STEP 31
SYMBOL SYMBOL MANAGEMENT SYMBOL <SYMB> <-A SYMB VALUE> <-R SYMB> <-C | L | S> 31
TRACE TRACE(INTO) TRACE <NUM> 32
UPDBUG UPDATE DBUG UPDBUG 32
UPUSER UPDATE USER FLASH UPUSER 33
VERSION SHOW VERSION VERSION 33
2.4.1. AS - Assemble AS
Usage: AS <addr> <instruction>
The AS command assembles instructions. The value for addr may be an absolute address specified as ahexadecimal value, or a symbol name. Instruction may be any valid instruction for the target processor.
The assembler keeps track of the address where the last instruction’s opcode was written. If no address isprovided to the AS command and the AS command has not been used since system reset, then AS defaults tothe beginning address of user-space for the target board.
If no instruction is passed to the AS command, then AS prompts with the address where opcode will be written,and continues to assemble instructions until the user terminates the AS command by inputting a period, “.”.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
19
The inline assembler permits the use of case-sensitive symbols defined by equate statements and labels whichare stored in the symbol table. The syntax for defining symbols and labels is as follows:
Symbol equ value
Symbol: equ value
Symbol .equ value
Symbol: .equ value
Label: instruction
Label:
Constants and operands may be input in several different bases:
0x followed by hexadecimal constant
$ followed by hexadecimal constant
@ followed by octal constant
% followed by binary constant
digit decimal constant
The assembler also supports the different syntax’s capable for the indexed, displacement and immediateaddressing modes:
(12,An) or 12(An)
(4,PC,Xn) or 4(PC,Xn)
(0x1234).L or 0x1234.L
Examples:
To assemble one ‘move’ instructions at the next assemble address, the command is:
as move.l #0x25,d0
To assemble multiple lines at 0x30112000, the command is:
as 12000
then:
0x30112000: start: nop
0x30112002: nop
0x30112004: lsr.l #1,d0
0x30112006: cmp #4,d0
0x30112008: beq start
0x3011200A:
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
20
2.4.2. BC - Compare Blocks of Memory BC
Usage: BC first second length
The BC command compares two contiguous blocks of memory the first block starting at address ‘first’, thesecond block starting at address ‘second’, both of length ‘length’. If the blocks are not identical, then theaddresses of the first mismatch are displayed. The value for addresses ‘first’ and ‘second’ may be an absoluteaddress specified as a hexadecimal value or a symbol name. The value for length may be a symbol name or anumber converted according to the user defined radix, normally hexadecimal.
Examples:
To verify that the code in the first block of user FLASH space (128K) is identical to the code in user ADRAMspace, the command is,
bc 20000 FFE20000 30020000
2.4.3. BF - Block of Memory Fill BFBFBFBFBF
Usage: BF<width> begin end data
The BF command fills a contiguous block of memory starting at address begin, stopping at address end, with thevalue data. Width modifies the size of the data that is written.
The value for addresses begin and end may be an absolute address specified as a hexadecimal value, or a symbolname. The value for data may be a symbol name, or a number converted according to the user defined radix,normally hexadecimal.
This command first aligns the starting address for the data access size and then increments the address accordinglyduring the operation. Thus, for the duration of the operation, this command performs properly aligned memoryaccesses.
Examples:
To fill a memory block starting at 0x30010000 and ending at 0x30040000 with the value 0x1234, the commandis:
bf 30010000 30040000 1234
To fill a block of memory starting at 0x00010000 and ending at 0x0004000 with a byte value of 0xAB, thecommand is:
bf.b 30010000 30040000 AB
To zero out the BSS section of the target code (defined by the symbols bss_start and bss_end), the command is:
bf bss_start bss_end 0
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
21
2.4.4. BM - Block Move BMBMBMBMBM
Usage: BM begin end dest
The BM command moves a contiguous block of memory starting at address begin, stopping at address end, to thenew address dest. The BM command copies memory as a series of bytes, and does not alter the original block.
The value for addresses begin, end, and dest may be an absolute address specified as a hexadecimal value, or asymbol name. If the destination address overlaps the block defined by begin and end, an error message is producedand the command exits.
Examples:
To copy a block of memory starting at 0x30040000 and ending at 0x30080000 to the location 0x00200000, thecommand is:
bm 30040000 30080000 200000
To copy the target code’s data section (defined by the symbols data_start and data_end) to 0x00200000, thecommand is:
bm data_start data_end 200000
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
22
2.4.5. BR - Breakpoint BRBRBRBRBR
Usage: BR addr <-r> <-c count> <-t trigger>
The BR command inserts or removes breakpoints at address addr. The value for addr may be an absolute addressspecified as a hexadecimal value, or a symbol name. Count and trigger are numbers converted according to theuser-defined radix, normally hexadecimal.
If no argument is provided to the BR command, a listing of all defined breakpoints is displayed.
The -r option to the BR command removes a breakpoint defined at address addr. If no address is specified inconjunction with the -r option, then all breakpoints are removed.
Each time a breakpoint is encountered during the execution of target code, its count value is incremented by one.By default, the initial count value for a breakpoint is zero, but the -c option allows setting the initial count for thebreakpoint.
Each time a breakpoint is encountered during the execution of target code, the count value is compared against thetrigger value. If the count value is equal to or greater than the trigger value, a breakpoint is encountered andcontrol returned to dBUG. By default, the initial trigger value for a breakpoint is one, but the -t option allowssetting the initial trigger for the breakpoint.
If no address is specified in conjunction with the -c or -t options, then all breakpoints are initialized to the valuesspecified by the -c or -t option.
Examples:
To set a breakpoint at the C function main(), the command is:
br _main
When the target code is executed and the processor reaches main(), control will be returned to dBUG.
To set a breakpoint at the C function bench() and set its trigger value to 3, the command is:
br _bench -t 3
When the target code is executed, the processor must attempt to execute the function bench() a third time beforereturning control back to dBUG.
To remove all breakpoints, the command is:
br -r
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
23
2.4.6. BS - Block Search BSBSBSBSBS
Usage: BS<width> begin end data
The BS command searches a contiguous block of memory starting at address begin, stopping at address end, forthe value data. Width modifies the size of the data that is compared during the search.
The value for addresses begin and end may be an absolute address specified as a hexadecimal value, or a symbolname. The value for data may be a symbol name, or a number converted according to the user defined radix,normally hexadecimal.
This command first aligns the starting address for the data access size, and then increments the address accordinglyduring the operation. Thus, for the duration of the operation, this command performs properly aligned memoryaccesses.
Examples:
To search for the 16-bit value 0x1234 in the memory block starting at 0x30040000 and ending at 0x30080000 thecommand is:
bs 30040000 30080000 1234
This reads the 16-bit word located at 0x00040000 and compares it against the 16-bit value 0x1234. If no match isfound, then the address is incremented to 0x30040002 and the next 16-bit value is read and compared.
To search for the 32-bit value 0xABCD in the memory block starting at 0x30040000 and ending at 0x30080000,the command is:
bs.l 30040000 30080000 ABCD
This reads the 32-bit word located at 0x30040000 and compares it against the 32-bit value 0x0000ABCD. If nomatch is found, then the address is incremented to 0x30040004 and the next 32-bit value is read and compared.
To search the BSS section (defined by the symbols bss_start and bss_end) for the byte value 0xAA, the commandis:
bs.b bss_start bss_end AA
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
24
2.4.7. DATA - Data Conversion DDDDDAAAAATTTTTAAAAA
Usage: DATA data
The DATA command displays data in both decimal and hexadecimal notation.
The value for data may be a symbol name or an absolute value. If an absolute value passed into the DATAcommand is prefixed by ‘0x’, then data is interpreted as a hexadecimal value. Otherwise data is interpreted as adecimal value.
All values are treated as 32-bit quantities.
Examples:
To display the decimal equivalent of 0x1234, the command is:
data 0x1234
To display the hexadecimal equivalent of 1234, the command is:
data 1234
2.4.8. DI - Disassemble DIDIDIDIDI
Usage: DI <addr>
The DI command disassembles target code pointed to by addr. The value for addr may be an absolute addressspecified as a hexadecimal value, or a symbol name.
Wherever possible, the disassembler will use information from the symbol table to produce a more meaningfuldisassembly. This is especially useful for branch target addresses and subroutine calls.
The DI command attempts to track the address of the last disassembled opcode. If no address is provided to the DIcommand, then the DI command uses the address of the last opcode that was disassembled.
Examples:
To disassemble code that starts at 0x30040000, the command is:
di 30040000
To disassemble code of the C function main(), the command is:
di _main
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
25
2.4.9. DL - Download Serial DLDLDLDLDL
Usage: DL <offset>
The DL command performs an S-record download of data obtained from the serial port. The value for offset isconverted according to the user defined radix, normally hexadecimal.
If offset is provided, then the destination address of each S-record is adjusted by offset. The DL command checksthe destination address for validity. If the destination is an address below the defined user space (0x00000000-0x00020000), then an error message is displayed and downloading aborted.
If the S-record file contains the entry point address, then the program counter is set to reflect this address.
Examples:
To download an S-record file through the serial port, the command is:
dl
To download an S-record file through the serial port, and adjust the destination address by 0x40, the command is:
dl 0x40
2.4.10. Go - Execute GOGOGOGOGO
Usage: GO <addr>
The GO command executes target code starting at address addr. The value for addr may be an absolute addressspecified as a hexadecimal value, or a symbol name.
If no argument is provided, the GO command begins executing instructions at the current program counter.
When the GO command is executed, all user-defined breakpoints are inserted into the target code, and the contextis switched to the target program. Control is only regained when the target code encounters a breakpoint, illegalinstruction, or other exception, which causes control to be handed back to dBUG.
Examples:
To execute code at the current program counter, the command is:
go
To execute code at the C function main(), the command is:
go _main
To execute code at the address 0x30040000, the command is:
go 30040000
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
26
2.4.11. GT - Execute Till a Temporary Breakpoint GTGTGTGTGT
Usage: GT <addr>
The GT command executes the target code starting at address in PC (whatever the PC has) until a temporarybreakpoint as given in the command line is reached.
Example:
To execute code at the current program counter and stop at breakpoint address 0x30010000, the command is:
GT 30010000
2.4.12. HELP - Help HEHEHEHEHE
Usage: HELP <command>
The HELP command displays a brief syntax of the commands available within dBUG. In addition, the address ofwhere user code may start is given. If command is provided, then a brief listing of the syntax of the specifiedcommand is displayed.
Examples:
To obtain a listing of all the commands available within dBUG, the command is:
help
The help list is longer than one page. The help command displays one full screen and then asks for an input todisplay the rest of the list.
To obtain help on the breakpoint command, the command is:
help br
2.4.13. IRD - Internal Registers Display IRDIRDIRDIRDIRD
Usage: IRD <module.register>
This commands displays the internal registers of different modules inside the MCF5206e. In the command line,the module refers to the module name where the register is located and the register refers to the specific registerneeded.
The registers are organized according to the module to which they belong. The available modules on theMCF5206e are SIM, UART1, UART2, TIMER, M-Bus, ADRAMC, and Chip-Select. Refer to MCF5206eUser’s Manual.
Example:
ird sim.sypcr ;display the SYPCR register in the SIM module.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
27
2.4.14. IRM - Internal Registers MODIFY IRMIRMIRMIRMIRM
Usage: IRM module.register data
This commands modifies the contents of the internal registers of different modules inside the MCF5206e. Inthe command line, the module refers to the module name where the register is located, register refers to thespecific register needed, and data is the new value to be written into that register.
The registers are organized according to the module to which they belong. The available modules on theMCF5206e are SIM, UART1, UART2, TIMER, M-Bus, ADRAMC, Chip-Select. Refer to MCF5206e User’sManual.
Example:
irm timer.tmr1 0021 ;write 0021 into TMR1 register in the TIMER module.
2.4.15. MD - Memory Display MDMDMDMDMD
Usage: MD<width> <begin> <end>
The MD command displays a contiguous block of memory starting at address begin and stopping at address end.The value for addresses begin and end may be an absolute address specified as a hexadecimal value, or a symbolname. Width modifies the size of the data that is displayed.
Memory display starts at the address begin. If no beginning address is provided, the MD command uses the lastaddress that was displayed. If no ending address is provided, then MD will display memory up to an address thatis 128 beyond the starting address.
This command first aligns the starting address for the data access size, and then increments the address accordinglyduring the operation. Thus, for the duration of the operation, this command performs properly aligned memoryaccesses.
Examples:
To display memory at address 0x30040000, the command is:
md 30040000
To display memory in the data section (defined by the symbols data_start and data_end), the command is:
md data_start
To display a range of bytes from 0x30040000 to 0x30050000, the command is:
md.b 30040000 30050000
To display a range of 32-bit values starting at 0x30040000 and ending at 0x30050000, the command is:
md.l 30040000 30050000
This command may be repeated by simply pressing the carriage-return (Enter) key. It will continue with theaddress after the last display address.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
28
2.4.16. MM - Memory Modify MMMMMMMMMM
Usage: MM<width> addr <data>
The MM command modifies memory at the address addr. The value for address addr may be an absolute addressspecified as a hexadecimal value, or a symbol name. Width modifies the size of the data that is modified. Thevalue for data may be a symbol name, or a number converted according to the user defined radix, normallyhexadecimal.
If a value for data is provided, then the MM command immediately sets the contents of addr to data. If no valuefor data is provided, then the MM command enters into a loop. The loop obtains a value for data, sets the contentsof the current address to data, increments the address according to the data size, and repeats. The loop terminateswhen an invalid entry for the data value is entered, i.e., a period.
This command first aligns the starting address for the data access size, and then increments the address accordinglyduring the operation. Thus, for the duration of the operation, this command performs properly aligned memoryaccesses.
Examples:
To set the byte at location 0x30010000 to be 0xFF, the command is:
mm.b 30010000 FF
To interactively modify memory beginning at 0x30010000, the command is:
mm 30010000
2.4.17. RD - Register Display RDRDRDRDRD
Usage: RD <reg>
The RD command displays the register set of the target. If no argument for reg is provided, then all registersare displayed. Otherwise, the value for reg is displayed.
Examples:
To display all the registers and their values, the command is:
rd
To display only the program counter, the command is:
rd pc
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
29
2.4.18. RM - Register Modify RMRMRMRMRM
Usage: RM reg data
The RM command modifies the contents of the register reg to data. The value for reg is the name of the register,and the value for data may be a symbol name, or it is converted according to the user defined radix, normallyhexadecimal.
dBUG preserves the registers by storing a copy of the register set in a buffer. The RM command updates the copyof the register in the buffer. The actual value will not be written to the register until target code is executed.
Examples:
To change register D0 to contain the value 0x1234, the command is:
rm D0 1234
2.4.19. RESET - Reset the board and dBUG RESETRESETRESETRESETRESET
Usage: RESET
The RESET command attempts to reset the board and dBUG to their initial power-on states.
The RESET command executes the same sequence of code that occurs at power-on. This code attempts to initializethe devices on the board and dBUG data structures. If the RESET command fails to reset the board to yoursatisfaction, cycle the power or press the reset button.
Examples:
To reset the board and clear the dBUG data structures, the command is:
reset
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
30
2.4.20. SET - Set Configuration SETSETSETSETSET
Usage: SET option <value>
SET
The SET command allows the setting of user configurable options within dBUG. The options are listed below. Ifthe SET command is issued without option, it will show the available options and values.
The board needs a RESET after this command in order for the new option(s) to take effect.
baud - This is the baud rate for the first serial port on the board. All communications between dBUG and the useroccur using either 9600 or 19200 bps, eight data bits, no parity, and one stop bit, 8N1. Do not choose 38400 baud.
base - This is the default radix for use in converting number from their ASCII text representation to the internalquantity used by dBUG. The default is hexadecimal (base 16), and other choices are binary (base 2), octal (base8), and decimal (base 10).
Examples:
To see all the available options and supported choices, the command is:
set
To set the baud rate of the board to be 19200, the command is:
set baud 19200
Now press the RESET button (RED) or RESET command for the new baud to take effect. This baud will beprogrammed in Flash ROM and will be used during the power-up.
2.4.21. SHOW - Show Configuration SHOSHOSHOSHOSHOWWWWW
Usage: SHOW option
SHOW
The SHOW command displays the settings of the user configurable options within dBUG. Most options configurablevia the SET command can be displayed with the SHOW command. If the SHOW command is issued without anyoption, it will show all options.
Examples:
To display all the current options, the command is:
show
To display the current baud rate of the board, the command is:
show baud
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
31
2.4.22. STEP - Step Over STSTSTSTST
Usage: STEP
The ST command can be used to “step over” a subroutine call, rather than tracing every instruction in the subroutine.The ST command sets a breakpoint one instruction beyond the current program counter and then executes thetarget code.
The ST command can be used for BSR and JSR instructions. The ST command will work for other instructions aswell, but note that if the ST command is used with an instruction that will not return, i.e. BRA, then the temporarybreakpoint may never be encountered and thus dBUG may not regain control.
Examples:
To pass over a subroutine call, the command is:
step
2.4.23. SYMBOL - Symbol Name Management SYMBOLSYMBOLSYMBOLSYMBOLSYMBOL
Usage: SYMBOL <symb> <-a symb value> <-r symb> <-c|l|s>
The SYMBOL command adds or removes symbol names from the symbol table. If only a symbol name is providedto the SYMBOL command, then the symbol table is searched for a match on the symbol name and its informationdisplayed.
The -a option adds a symbol name and its value into the symbol table. The -r option removes a symbol name fromthe table.
The -c option clears the entire symbol table, the -l option lists the contents of the symbol table, and the -s optiondisplays usage information for the symbol table.
Symbol names contained in the symbol table are truncated to 31 characters. Any symbol table lookups, either bythe SYMBOL command or by the disassembler, will only use the first 31 characters. Symbol names are casesensitive.
Examples:
To define the symbol “main” to have the value 0x30040000, the command is:
symbol -a main 30040000
To remove the symbol “junk” from the table, the command is:
symbol -r junk
To see how full the symbol table is, the command is:
symbol -s
To display the symbol table, the command is:
symbol -l
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
32
2.4.24. TRACE - Trace Into TRTRTRTRTR
Usage: TRACE <num>
The TRACE command allows single instruction execution. If num is provided, then num instructions are executedbefore control is handed back to dBUG. The value for num is a decimal number.
The TRACE command sets bits in the processors’ supervisor registers to achieve single instruction execution,and the target code executed. Control returns to dBUG after a single instruction execution of the target code.
Examples:
To trace one instruction at the program counter, the command is:
tr
To trace 20 instructions from the program counter, the command is:
tr 20
2.4.25. UPDBUG - Update the dBUG Image UPDBUPDBUPDBUPDBUPDBUGUGUGUGUG
Usage: UPDBUG
The UPDBUG command is used for updating the dBUG image in Flash. When updates to the MCF5206e EVSdBUG are available, the updated image is downloaded to address 0x30020000. The new image is placed intoFlash using the UPDBUG command. The user is prompted for verification before performing the operation.Use this command with extreme caution, as any error can render dBUG, and thus the board, useless!
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
33
2.4.26. UPUSER - Update User Code In Flash UPUSERUPUSERUPUSERUPUSERUPUSER
Usage: UPUSER <number of sectors>
The UPUSER command places user code and data into space allocated for the user in Flash. There are six sectorsof 128K each available as user space. To place code and data in user Flash, the image is downloaded to address0x30020000, and the UPUSER command issued. This command programs all six sectors of user Flash space.Users access this space starting at address 0xFFE20000. To program less than six sectors, supply the number ofsectors you wish to program after the UPUSER command.
Examples:
To program all 6 sectors of user FLASH space, the command is:
upuser or upuser 6
To program only 128K of user FLASH space, the command is:
upuser 1
2.4.27 VERSION - Display dBUG Version VERSION
Usage: VERSION
The VERSION command display the version information for dBUG. The dBUG version number and build dateare both given.
The version number is separated by a decimal, for example, “v1.1”. The first number indicates the version of theCPU specific code, and the second number indicates the version of the board specific code.
The version date is the day and time at which the entire dBUG monitor was compiled and built.
Examples:
To display the version of the dBUG monitor, the command is:
version
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
34
2.5 TRAP #15 Functions
An additional utility within the dBUG firmware is a function called the TRAP 15 handler. The user program toutilize various routines within the dBUG, to perform a special task, and to return control to the dBUG can callthis function. This section describes the TRAP 15 handler and how it is used.
There are four TRAP #15 functions. These are: OUT_CHAR, IN_CHAR, CHAR_PRESENT, andEXIT_TO_dBUG.
2.5.1. OUT_CHAR
This function ( function code 0x0013) sends a character, which is in lower 8 bits of D1, to terminal.
Assembly example:
/* assume d1 contains the character */
move.l #$0013,d0 Selects the function
TRAP #15 The character in d1 is sent to terminal
C example:
void board_out_char (int ch)
{
/* If your C compiler produces a LINK/UNLK pair for this routine,
* then use the following code which takes this into account
*/
#if l
/* LINK a6,#0 — produced by C compiler */
asm (“ move.l 8(a6),d1”); /* put ‘ch’into d1 */
asm (“ move.l #0x0013,d0”); /* select the function */
asm (“ trap #15”); /* make the call */
/* UNLK a6 — produced by C compiler */
#else
/* If C compiler does not produce a LINK/UNLK pair, the use
* the following code.
*/
asm (“ move.l 4(sp),d1”); /* put ‘ch’into d1 */
asm (“ move.l #0x0013,d0”); /* select the function */
asm (“ trap #15”); /* make the call */
#endif
}
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
35
2.5.2. IN_CHAR
This function (function code 0x0010) returns an input character (from terminal) to the caller. The returnedcharacter is in D1.
Assembly example:
move.l #$0010,d0 Select the function
trap #15 Make the call, the input character is in d1.
C example:
int board_in_char (void)
{
asm (“ move.l #0x0010,d0”); /* select the function */
asm (“ trap #15”); /* make the call */
asm (“ move.l d1,d0”); /* put the character in d0 */
}
2.5.3. CHAR_PRESENT
This function (function code 0x0014) checks if an input character is present to receive. A value of zero is returnedin D0 when no character is present. A non-zero value in D0 means a character is present.
Assembly example:
move.l #$0014,d0 Select the function
trap #15 Make the call, d0 contains the response (yes/no).
C example:
int board_char_present (void)
{
asm (“ move.l #0x0014,d0”); /* select the function */
asm (“ trap #15”); /* make the call */
}
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
36
2.5.4. EXIT_TO_dBUG
This function (function code 0x0000) transfers the control back to the dBUG, by terminating the user code. Theregister context are preserved.
Assembly example:
move.l #$0000,d0 Select the function
trap #15 Make the call, exit to dBUG.
C example:
void board_exit_to_dbug (void)
{
asm (“ move.l #0x0000,d0”); /* select the function */
asm (“ trap #15”); /* exit and transfer to dBUG */
}
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
37
CHAPTER 3
HARDWARE DESCRIPTION AND RECONFIGURATION
This chapter provides a functional description of the M5206eLITE board hardware. With the description givenhere and the schematic diagrams provided at the end of this manual, the user can gain a good understanding of theboard’s design. In this manual, an active low signal is indicated by a “-” preceding the signal name.
3.1 THE PROCESSOR AND SUPPORT LOGIC
This part of the Chapter discusses the ColdFire processor and general supporting logic on the M5206eLITEboard.
3.1.1. The Processor
The microprocessor used in the M5206eLITE is the highly integrated MCF5206e, 32-bit processor. The MCF5206euses a ColdFire® processor as the core with 4k-Byte Direct-Mapped Instruction Cache, two UART channels, two16-bit Timers, 8K bytes of SRAM, Motorola M-Bus Module supporting the MBus(I2C) bus, one-byte wide parallelI/O port and the supporting integrated system logic. All the registers of the core processor are 8-bit, 16-bit, or 32bits wide. All the data and address registers are 32 bit wide. This processor communicates with external devicesover a 32-bit wide data bus, D31-D0 with support for 8 and 16-bit ports. This chip can address the entire 4G Bytesof memory space using internal chip-select logic that can mask memory block sizes from 64K to 2G individually.All the processor’s signals are available through 80way Samtec connectors, J1 and J2. Refer to section 3.6 for pinassignments.
The MCF5206e has an IEEE JTAG-compatible port and BDM port. These signals are available at port J3. Theprocessor also has the logic to generate up to eight (8) chip selects, -CS0 to -CS7, and support for ADRAM (FPMor EDO).
3.1.2. The Reset Logic
The reset logic provides system initialization under two modes. Under system power-up and when the RESETswitch, S1 (black switch), is active. The power-on generates the Master RESET by asserting -RSTI and –HIZ thatcauses total system reset. The RESET switch also generates a Master Reset that resets the entire processor.
U8 is used to produce an active low power-on RESET signal which feeds the MCF5206e (U7) along with thepush-button RESET. The MAX708TCSA (U8) device generates the system reset (-RESET).
dBUG performs the following configurations of internal resources during the initialization. The instruction cacheis invalidated and disabled. The Vector Base Register, VBR, points to the Flash. However, a copy of the exceptiontable is made at address $30000000 in FSRAM. To take over an exception vector, the user places the address ofthe exception handler in the appropriate vector in the vector table located at $30000000, and then points the VBRto $30000000.
The Software Watchdog Timer is disabled, Bus Monitor enabled, and internal timers are placed in a stop condition.Interrupt controller registers initialized with unique interrupt level/priority pairs. The parallel I/O port is configuredfor PST and DDATA to allow some third party BDM cables to give real-time trace and debug functionality.
3.1.3. The -HIZ Signal
The –HIZ signal is actively driven by the MAX708TCSA (U8). This signal is available for monitor on J1. Theuser should be very careful before driving this signal as it puts all processor signals in to a tri-state condition. Thiscan only really be useful if the user wants to completely disable the MCF5206e and allow another device to drivethe bus, which might more elegantly be achieved via the bus arbitration signals –BR, -BG and –BD, all alsoavailable on connector J1.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
38
3.1.4. The Clock Circuitry
The M5206eLITE uses a 54MHZ-oscillator (U9) to provide the clock to CLK pin of the processor and connectorJ1 for any synchronous external hardware that might require the same clock as the MCF5206e.
3.1.5. Watchdog Timer (BUS MONITOR)
A bus cycle is initiated by the processor providing the necessary information for the bus cycle (e.g. address, data,control signals, etc.) and asserting the -CS or -RAS low. Then, the processor waits for an acknowledgment (-TAor -ATA signal) from the addressed device before it can complete the bus cycle. It is possible (due to incorrectprogramming) that the processor attempts to access part of the address space that physically does not exist. In thiscase, the bus cycle will go on forever, since there is no memory or I/O device to provide an acknowledgmentsignal, and the processor will be in an infinite wait state. The MCF5206e has the necessary logic built into the chipto watch the duration of the bus cycle. If the cycle is not terminated within the preprogrammed duration the logicwill internally assert a Transfer Error signal. In response, the processor will terminate the bus cycle and an accessfault exception (trap) will take place.
The duration of the Watchdog is selected by BMT0-1 bits in System Protection Register. The dBUG initializesthis register with the value 00, which provides for a 1024 system clock time-out.
3.1.6. Interrupt Sources
The ColdFire® family of processors can receive interrupts for seven levels of interrupt priorities. When theprocessor receives an interrupt which has higher priority than the current interrupt mask (in the status register), itwill perform an interrupt acknowledge cycle at the end of the current instruction cycle. This interrupt acknowledgecycle indicates to the source of the interrupt that the request is being acknowledged and the device should providethe proper vector number to indicate where the service routine for this interrupt level is located. If the source ofinterrupt is not capable of providing a vector, it’s interrupt should be set up as an autovector interrupt whichdirects the processor to a predefined entry in the exception table (refer to the MCF5206e User’s Manual).
The processor goes to a service routine via the exception table. This table is in the Flash and the VBR points to it.However, a copy of this table is made in the RAM starting at $30000000. To set an exception vector, the userplaces the address of the exception handler in the appropriate vector in the vector table located at $30000000, andthen points the VBR to $30000000.
The MCF5206e has three external interrupt request lines. You can program the external interrupt request pins toa interrupt priority-level signals (-IPL[2:0]) or predefined interrupt request pins (-IRQ7, -IRQ4, -IRQ1). TheM5206eLITE configures these lines as predefined interrupt request pins. There are also eight internal interruptrequests from DMA0, DMA1, Timer1, Timer2, Software watchdog timer, UART1, UART2, and MBUS. Eachinterrupt source, external and internal, can be programmed for any priority level. In the case of identical prioritylevels, a second relative priority between 0 to 3 will be assigned.
The software watchdog is programmed for Level 7, priority 2 and uninitialized vector. The UART1 is programmedfor Level 3, priority 2 and autovector. The UART2 is programmed for Level 3, priority 1 and autovector. The M-Bus is at Level 3, priority 0 and autovector. The Timers are at Level 5 with Timer 1 with priority 3 and Timer 2with priority 2 and both for autovector.
The -IRQ1, -IRQ4 & -IRQ7 lines of the MCF5206e are not used on this board. However, the -IRQ1 is programmedfor Level 1 with priority 1 and autovector. The user may use this line for an external interrupt request. Refer toMCF5206e User’s Manual for more information about the interrupt controller.
3.1.7. Internal SRAM
The MCF5206e has 8K bytes of internal memory. This memory is mapped to 0x20000000 and is not used by thedBUG. It is available to the user.
3.1.8. The MCF5206e Registers and Memory Map
The memory and I/O resources of the M5206eLITE are divided into two groups, MCF5206e Internal and Externalresources. All the I/O registers are memory mapped.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
39
The MCF5206e has built in logic and up to eight chip-select pins (-CS0 to -CS7) which are used to enable externalmemory and I/O devices. In addition there are two -RAS lines for ADRAM’s. There are registers to specify theaddress range, type of access, and the method of -TA generation for each chip-select and -RAS pin. These registersare programmed by dBUG to map the external memory and I/O devices.
The M5206eLITE uses chip-select zero (-CS0) to enable the Flash ROM (refer to Section 3.3.). The M5206eLITEuses -RAS1, -RAS2, -CAS0, -CAS1, -CAS2, and -CAS3 to enable the ADRAM SIMM module (not populated -refer to Section 3.2), -CS2 for FSRAM, and -CS3 for GPIO space.
The chip select mechanism of the MCF5206e allows the memory mapping to be defined based on the memoryspace desired (User/Supervisor, Program/Data spaces).
All the MCF5206e internal registers, configuration registers, parallel I/O port registers, DUART registers andsystem control registers are mapped by the MBAR register at any 1M-byte boundary. It is mapped to 0x10000000by dBUG. For a complete map of these registers refer to the MCF5206e User’s Manual.
The M5206eLITE board can have up to 32M bytes of 3.3V or 5V ADRAM installed. Refer to Section 3.2 for adiscussion of RAM. The dBUG is programmed in one AM29LV800BB Flash ROM which occupies 1M byte ofthe address space. The ROM Monitor uses the first 128K bytes. The following thirteen 128K byte sectors areavailable for the user. Refer to section 3.3.
Table 7 - The M5206eLITE memory map
ADDRESS RANGE SIGNAL and DEVICE
$00000000-$003FFFFF -RAS1, -RAS2, 4M bytes of ADRAM’s
$10000000-$100003FF Internal Module registers
$20000000-$20001FFF Internal SRAM (8K bytes)
$30000000-$300FFFFF* -CS2, External FSRAM (1M byte – 256Kx32)
$40000000-$40000FFFF -CS3, 64K bytes of GPIO
$FFE00000-$FFEFFFFF -CS0, 1M byte of Flash EEPROM (512Kx16)
* Installed – the level 2 cache footprint accepts Motorola’s MCM69F737TQ device and any other FSRAMwith the same electrical specifications and pinout.
All the unused areas of the memory map is available to the user.
3.1.9. Reset Vector Mapping
After reset, the processor attempts to get the initial stack pointer and initial program counter values from locations$000000-$000007 (the first eight bytes of memory space). This requires the board to have a nonvolatile memorydevice in this range with proper information. However, in some systems, it is preferred to have RAM starting ataddress $00000000. In the MCF5206e, the -CS0 responds to any accesses after reset until the CSMR0 is written.Since -CS0 is connected to Flash EEPROM’s, the Flash EEPROMs appear to be at address $00000000 whichprovides the initial stack pointer and program counter (the first 8 bytes of the Flash ROM). The initializationroutine, however, then programs the chip-select logic and locates the Flash EEPROM’s to start at $FFE00000 andthe ADRAMs to start at $00000000.
3.1.10. -TA Generation
The processor starts a bus cycle by providing the necessary information (address, R/-W, etc.) and asserting the -TS. The processor then waits for an acknowledgment (-TA) by the addressed device before it can complete thebus cycle. This -TA is used not only to indicate the presence of a device, it also allows devices with differentaccess time to communicate with the processor properly. The MCF5206e, as part of the chip-select logic, has abuilt in mechanism to generate the -TA for all external devices that do not have the capability to generate the -TAsignal on their own. The Flash EEPROM’s and ADRAM’s can not generate the -TA. Their chip-select logic isprogrammed by the ROM Monitor to generate the -TA internally after a pre-programmed number of wait states.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
40
In order to support the future expansion of the board, the -TA input of the processor is also connected to theProcessor Expansion Bus connector, J1. This allows any expansion boards to assert this line to indicate their -TAto the processor. On the expansion boards, however, this signal should be generated through an open collectorbuffer with no pull-up resistor, a pull-up resistor is included on the M5206eLITEboard. All the -TA’s from anyexpansion boards should be connected to this line.
3.1.11. Wait State Generator
The Flash EEPROM’s and ADRAM SIMM on the board may require some adjustments to match the cycle timeof the processor to make them compatible with the processor speed. To extend the CPU bus cycles for the slowerdevices, the chip-select logic of the MCF5206e can be programmed to generate the -TA after a given number ofwait states. Refer to Sections 3.2 and 3.3 information about wait state requirements of ADRAM’s and FlashEEPROM’s respectively.
3.2 THE ADRAM SIMM
The M5206eLITE has one 72-pin SIMM socket (CN1) for ADRAM SIMM. This socket supports ADRAMSIMM’s of 256Kx32, 1Mx32, 2Mx32, 4Mx32, and 8Mx32. No special configurations are needed. The dBUGwill detect the total memory installed on power-up. The SIMM access speed should be 60ns.
3.3 FLASH ROM
There is one 1Mbyte Flash EEPROM on the M5206eLITE, U4 which is 16 bits wide.
The board is shipped with one AM29LV800BB, 512Kx16-word, FLASH EEPROM for a total of 1M bytes. Thefirst 128K and last 128K are reserved by the ROM Monitor firmware. 768Kbytes are available to the user. Thechip-select signal generated by the MCF5206e (-CS0) enables this chip.
The MCF5206e chip-select logic can be programmed to generate the -TA for -CS0 signal after a certain numberof wait states. The dBUG programs this parameter to three wait-states.
3.3.1. JP2 Jumper and User’s Program
This jumper allows users to test code from boot without having to overwrite the ROM Monitor.
When the jumper is set between pins 1 and 2, the behavior is normal. When the jumper is set between pins 2 and3, the board boots from any external memory connected to connector J1. The code in the external hardware willhave to “mimic” the set up of the original hardware on the M5206eLITE board, it will also have to be the correctwidth (data port size) and speed to run with a 54MHz MCF5206e.
3.4 THE SERIAL COMMUNICATION CHANNELS
The M5206eLITE offers a number of serial communications. They are discussed in this section.
3.4.1. The MCF5206e Two UARTs
The MCF5206e has two built in UART’s, each with its own software programmable baud rate generators, onlyone channel is the ROM Monitor to Terminal output and other is available to the user at 3.3V levels. The ROMMonitor, however, programs the interrupt level for UART1 to Level 3, priority 2 and autovector mode of operation.The interrupt level for UART2 to Level 3, priority 1 and autovector mode of operation. The signals of this channelare available on connector J4. The signals of UART1 are also passed through the RS-232 driver/receiver and areavailable on a DB-9 connector J9. Refer to the MCF5206e User’s Manual for the programming and register mapof the DUART module.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
41
3.4.2. Motorola Bus (M-Bus) Module
The MCF5206e has a built in M-Bus module that allows inter-chip bus interface for a number of I/O devices. It iscompatible with industry-standard MBus(I2C) Bus. The M5206eLITE uses this module, but it is available to theuser on connectors J1 & J2. The two M-Bus signals are SDA and SCL that are available on the J5 connector.These signals are open-collector signals. However, they have pull-up resistors on the M5206eLITE. These signalsare connected to the DS1307Z real-time clock device via the MBus(I2C) bus which is used during production toinitialize the date & time in to the RTC. However the MBus(I2C) bus is not used by the dBug ROM monitor. Theinterrupt control register for M-Bus is set for Level 3, priority 0 and autovector.
3.5 THE PARALLEL I/O Port
The MCF5206e has one 8-bit parallel port. All the pins have dual functions. They can be configured as I/O or theiralternate function via the Pin Assignment register. All pins are configured as DDATA and PSTx pins by the ROMMonitor to allow some third party developer BDM cables to give real-time trace and debug information.
3.6 THE CONNECTORS AND THE EXPANSION BUS
There are 10 connectors on the M5206eLITE board which are used to connect the board to external I/O devicesand or expansion boards. This section provides a brief discussion and the pin assignments of the connectors.
3.6.1. The Terminal Connector J9
The signals on UART1 that run through RS-232 driver/receivers are used to drive the Terminal. The M5206eLITEuses a 9-pin D-sub female connector J9 for connecting the board to a terminal or a PC with terminal emulationsoftware. The available signals are a working subset of the RS-232C standard. Table 8 - The J9 (Terminal)Connector pin assignment shows the pin assignment.
Table 8 - The J9 (Terminal) Connector pin assignment
PIN NO. DIRECTION SIGNAL NAME
1 Output Data Carrier Detect (shorted to 6)
2 Output Receive data
3 Input Transmit data
4 Input Not Connected (shorted to 1 & 6 if nec.)
5 Signal Ground
6 Output Data Set Ready (shorted to 1 & 4)
7 Input Request to Send
8 Output Clear to Send
9 Not Used
3.6.2. The Auxiliary Serial Communication Connector P2
The MCF5206e has two built-in UART’s. One channel is not used by the M5206eLITE ROM Monitor and isavailable to the user. These signals are available on connectors J2 & J4. The available signals form a workingsubset of the RS-232C standard. Table 9 - The J4 Connector pin assignment shows the pin assignment for J4.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
42
Table 9 - The J4 Connector pin assignment
PIN NO. DIRECTION SIGNAL NAME
1 3.3V
2 Output Clear to Send
3 Input Request to Send
4 Output Receive Data
5 Input Transmit Data
6 Signal Ground
3.6.3. The Mbus/I2C Connector J5
The MCF5206e has a built-in Mbus/I2C module. These signals (SDA/SCL) are available on connector J5. Theavailable signals form a working Mbus/I2C serial connection. Table 9 - The J4 Connector pin assignment showsthe pin assignment for J5.
Table 10 - The J5 Connector pin assignment
PIN NO. DIRECTION SIGNAL NAME
1 5V
2 Output Serial Clock - SCL
3 Bi-Directional Serial Data - SDA
4 N.C.
5 N.C.
6 Signal Ground
3.6.4. Processor Expansion Bus J1 & J2
All the processor signals are available on 2 Samtec connectors J1 & J2. The user may refer to the data sheets forthe major parts and the schematic at the end of this manual to obtain an accurate loading capability. Tables 11-12show the pin assignment for J1 & J2 respectively.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
43
Table 11 - The J1 Connector pin assignment
PIN NO. SIGNAL NAME PIN NO. SIGNAL NAME
1 A0 80 BKPT
2 A1 79 DSO
3 A2 78 DSCLK
4 A3 77 DSI
5 GND 76 GND
6 A4 75 -RESET
7 A5 74 TCK
8 A6 73 SDA
9 A7 72 TT1
10 A8 71 TT0
11 A9 70 ATM
12 A10 69 -TS
13 A11 68 -ATA
14 A12 67 -TA
15 A13 66 SIZ0
16 A14 65 SIZ1
17 A15 64 R/-W
18 GND 63 GND
19 A16 62 CLK
20 A17 61 -HIZ
21 A18 60 N.C.
22 A19 59 -CS0_OFF
23 A20 58 -DREQ0
24 A21 57 -IPL2
25 A22 56 -IPL1
26 A23 55 -IPL0
27 D0 54 -BR
28 D1 53 -BR_HW
29 GND 52 GND
30 D2 51 -BG_HW
31 D3 50 -CS3
32 D4 49 -CS2
33 D5 48 -CS1
34 D6 47 -CS0
35 D7 46 PST0
36 D8 45 D15
37 D9 44 D14
38 D10 43 D13
39 D11 42 D12
40 GND 41 GND
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
44
Table 12 - The J2 Connector pin assignment
PIN NO. SIGNAL NAME PIN NO. SIGNAL NAME
1 D16 80 N.C.
2 D17 79 N.C.
3 D18 78 N.C.
4 D19 77 N.C.
5 GND 76 GND
6 D20 75 N.C.
7 D21 74 N.C.
8 D22 73 N.C.
9 D23 72 SCL
10 D24 71 TOUT1
11 D25 70 -JTAG
12 D26 69 N.C.
13 D27 68 VCC
14 D28 67 VCC
15 D29 66 VCC
16 D30 65 VCC
17 D31 64 N.C.
18 GND 63 GND
19 A24 62 N.C.
20 A25 61 N.C.
21 A26 60 N.C.
22 A27 59 N.C.
23 N.C. 58 TIN1
24 N.C. 57 -DREQ1
25 N.C. 56 N.C.
26 N.C. 55 -CTS2
27 PST1 54 -RTS2
28 -TEA 53 TXD2
29 GND 52 GND
30 PST2 51 RXD2
31 PST3 50 -CTS1
32 -BG 49 -RTS1
33 DDATA0 48 TXD1
34 DDATA1 47 RXD1
35 DDATA2 46 -DRAMW
36 DDATA3 45 -CAS3
37 -BD 44 -CAS2
38 -RAS0 43 -CAS1
39 -RAS1 42 -CAS0
40 GND 41 GND
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
45
3.6.5. The Debug Connector J3
The MCF5206e has a Background Debug Port, Real-Time Trace Support, and Real-Time Debug Support. Thenecessary signals are available at connector J3. Table 13 - The J3 Connector pin assignment table shows the pinassignment.
Table 13 - The J3 Connector pin assignment
PIN NO. SIGNAL NAME
1 TCK
2 -BKPT
3 Ground
4 DSCLK
5 Ground
6 No Connect
7 -RESET
8 DSI
9 +3.3 or 5 Volts (see Jumper 4)
10 DSO
11 Ground
12 PST3
13 PST2
14 PST1
15 PST0
16 DDAT3
17 DDAT2
18 DDAT1
19 DDAT0
20 Ground
21 4.7K pull down
22 No Connect
23 Ground
24 54MHZ CLK
25 +3.3 or 5 Volts (see Jumper 4)
26 -TA
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
46
3.6.6. The 5V Tolerant GPIO Connector J10
Eight extra GPIO lines are made available to the user via a memory mapped MC74LCX646 device (U15). Thisdevice is controlled via chip select 3, and supports inputs at 5V or 3.3V levels and outputs at 3.3V only. Thenecessary signals are available at connector J10. The value read or written to J10 appears on bits D16 to D23 ofthe data bus. The direction of the data on J10 is controlled by D31 at the time of the read/write to J10. Table 14 -The J10 Connector pin assignment shows the pin assignment.
Table 14 - The J10 Connector pin assignment
PIN NO. SIGNAL NAME
1 DATA 0
2 DATA 1
3 DATA 2
4 DATA 3
5 DATA 4
6 DATA 5
7 DATA 6
8 DATA 7
3.6.7 The GPIO Open Collector Driven Connector J11
Connector J11 is driven via an open collector driver. This connector is purely an output port, which via pin 9 ofconnector J11, can drive high voltage/ high drive loads. The necessary signals are available at connector J11.Table 15 - The J11 Connector pin assignment shows the pin assignment.
Table 15 - The J11 Connector pin assignment
PIN NO. SIGNAL NAME
1 DATA 0
2 DATA 1
3 DATA 2
4 DATA 3
5 DATA 4
6 DATA 5
7 DATA 6
8 DATA 7
9 Open Collector Voltage Input
10 R.T.C. – Square Wave Output
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
47
3.6.8. ADRAM SIMM Connections CN1
All the ADRAM signals are available on 1x 72 pin connector CN1. The user may refer to the data sheets forvarious manufacturers SIMM’s and the schematic at the end of this manual to obtain an accurate loading capability.Table 16 - The CN1 Connector pin assignment shows the pin assignment for CN1.
Table 16 - The CN1 Connector pin assignment
PIN NO. SIGNAL NAME PIN NO. SIGNAL NAME
1 VSS 72 VSS
2 DQ0 71 N.C.
3 DQ16 70 PD4
4 DQ1 69 PD3
5 DQ17 68 PD2
6 DQ2 67 PD1
7 DQ18 66 N.C.
8 DQ3 65 DQ15
9 DQ19 64 DQ31
10 VCC 63 DQ14
11 N.C. 62 DQ30
12 A0 61 DQ13
13 A1 60 DQ29
14 A2 59 VCC
15 A3 58 DQ28
16 A4 57 DQ12
17 A5 56 DQ27
18 A6 55 DQ11
19 A10 54 DQ26
20 DQ4 53 DQ10
21 DQ20 52 DQ25
22 DQ5 51 DQ9
23 DQ21 50 DQ24
24 DQ6 49 DQ8
25 DQ22 48 -N.C.
26 DQ7 47 -W
27 DQ23 46 N.C.
28 A7 45 -RAS1
29 N.C. 44 -RAS0
30 VCC 43 -CAS1
31 A8 42 -CAS3
32 A9 41 -CAS2
33 -RAS3 40 -CAS0
34 -RAS2 39 VSS
35 N.C. 38 N.C.
36 N.C. 37 N.C.
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
48
Notes
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
49
APPENDIX A PALLV16V8 code – PALASM4
TITLE U10_BUS_ARBITRATION_&_GPIO
PATTERN P00001
REVISION 1
DATE 19th January 1999
AUTHOR Pete Highton
COMPANY Motorola SPS (c) 1999
CHIP U10 PALCE16V8
PIN 1 CLK COMBINATORIAL
PIN 2 /BR COMBINATORIAL
PIN 3 /BR_HW COMBINATORIAL
PIN 4 /BD COMBINATORIAL
PIN 5 /CS3 COMBINATORIAL
PIN 6 U15OP COMBINATORIAL
PIN 7 NC COMBINATORIAL
PIN 8 NC COMBINATORIAL
PIN 9 /WR COMBINATORIAL
PIN 10 GND
PIN 11 NC
PIN 12 /BG_HW COMBINATORIAL ; O/P
PIN 13 /BG COMBINATORIAL ; O/P
PIN 14 /IORD COMBINATORIAL ; O/P
PIN 15 /IOWR COMBINATORIAL ; O/P
PIN 16 /U15_OE COMBINATORIAL ; O/P
PIN 17 NC COMBINATORIAL
PIN 18 NC COMBINATORIAL
PIN 19 /RD COMBINATORIAL ; O/P
PIN 20 VCC
EQUATIONS
RD = /WR
IORD = CS3*/WR ; GPIO Read enable
IOWR = CS3*WR ; GPIO write enable
U15_OE = U15OP + IORD ; If device is O/P, permanent OE when read
; Bus arbitration...
BG = (BD + (BR * /BR_HW)) ; External hardware has priority
BG_HW = BR_HW * /BG ; Bus grant to the target H/W
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
50
Notes
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
51
APPENDIX B Schematics
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
52
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
53
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
54
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
55
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
56
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
57
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
58
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
59
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
60
Notes
Fre
esc
ale
Se
mic
on
du
cto
r, I
Freescale Semiconductor, Inc.
For More Information On This Product, Go to: www.freescale.com
nc
...
top related