Table with pin description for connector X2, X3 added
2005-01-18 V1.4, Tka, table in chapter 6.3 corrected
2005-01-31 V1.4, Tka, version number in bookmarks corrected
To the maximum extent permitted by applicable law, Fujitsu Microelectronics Europe GmbH restricts
its warranties and its liability for the “STARTERKITMB91302” Board and all its deliverables (eg.
software include or header files, application examples, target boards, evaluation boards, engineering
samples of IC’s etc.), its performance and any consequential damages, on the use of the Product in
accordance with (i) the terms of the License Agreement and the Sale and Purchase Agreement under
which agreements the Product has been delivered, (ii) the technical descriptions and (iii) all
accompanying written materials. In addition, to the maximum extent permitted by applicable law,
ujitsu Microelectronics Europe GmbH disclaims all warranties and liabilities for the performance of
F
the Product and any consequential damages in cases of unauthorised decompiling and/or reverse
engineering and/or disassembling.
Note: The “STARTERKITMB91302” Board and all its deliverables are intended and must only
be used in an evaluation laboratory environment.
1. Fujitsu Microelectronics Europe GmbH warrants that the Product will perform substantially in
accordance with the accompanying written materials for a period of 90 days form the date of
receipt by the customer. Concerning the hardware components of the Product, Fujitsu
Microelectronics Europe GmbH warrants that the Product will be free from defects in material
and workmanship under use and service as specified in the accompanying written materials
for a duration of 1 year from the date of receipt by the customer.
2. Should a Product turn out to be defect, Fujitsu Microelectronics Europe GmbH´s entire liability
and the customer’s exclusive remedy shall be, at Fujitsu Microelectronics Europe GmbH´s
sole discretion, either return of the purchase price and the license fee, or replacement of the
Product or parts thereof, if the Product is returned to Fujitsu Microelectronics Europe GmbH in
original packing and without further defects resulting from the customer’s use or the transport.
However, this warranty is excluded if the defect has resulted from an accident not attributable
to Fujitsu Microelectronics Europe GmbH, or abuse or misapplication attributable to the
customer or any other third party not relating to Fujitsu Microelectronics Europe GmbH.
3. To the maximum extent permitted by applicable law Fujitsu Microelectronics Europe GmbH
disclaims all other warranties, whether expressed or implied, in particular, but not limited to,
warranties of merchantability and fitness for a particular purpose for which the Product is not
designated.
4. To the maximum extent permitted by applicable law, Fujitsu Microelectronics Europe GmbH´s
and its supplier’s liability are restricted to intention and gross negligence.
NO LIABILITY FOR CONSEQUENTIAL DAMAGES
To the maximum extent permitted by applicable law, in no event shall Fujitsu
Microelectronics Europe GmbH and its suppliers be liable for any damages whatsoever
(including but without limitation, consequential and/or indirect damages for personal
injury, assets of substantial value, loss of profits, interruption of business operation,
loss of information, or any other monetary or pecuniary loss) arising from the use of
the Product.
Should one of the above stipulations be or become invalid and/or unenforceable, the remaining
stipulations shall stay in full effect
The “STARTERKITMB91302” is a multifunctional starterkit for the Fujitsu 32-Bit Flash
microcontroller MB91302series. It can be used stand alone for software development and
testing or as a target board to work with the emulator system. The board enables the
designer to start immediately with the software development before his own final target
system is available.
The “STARTERKITMB91302” comes with the following parts
-“STARTERKITMB91302” and Softune Workbench monitor debugger
-Serial cable D-Sub 9 pin male-female (1:1)
-Power-Supply
-Printed version of the user guide for “STARTERKITMB91302”
-“STARTERKITMB91302” CD-ROM
-Microcontroller CD-ROM V3.5 or higher
-Addendum sheet with latest important instructions
2.2 Features
The starterkit is being delivered with the MB91302APFF-G-020-BND-E1 microcontroller and
a monitor debugger installed already in the external flash.
<Supports MB91302series in FPT-144P-M12 package
<On-board 64Mbit Flash and 64Mbit SDRAM
<In-Circuit serial Flash programming
<Integrated Softune Workbench monitor debugger
<All resources available for evaluation on connectors
<All 144 pins routed to connectors
<15 MHz main-crystal
<Two UART Interfaces (UART0, 1)
<8 User LEDs, optional: alphanumeric standard LC-Display connectable instead of LEDs
<Reset-button, Reset-LED
<5 User-buttons configurable for INT0, INT3, ADTG, TIN1 and NMI
<6-9V (500mA) unregulated external DC power supply
<3V on-board voltage regulator with power status-LEDs
<Graphic-Controller board support:
<96pin + 48pin VG connector
<Power-supply (+5V, +3V3, +2V5)
This board must only be used for test applications
The “STARTERKITMB91302” supports microcontroller members of the MB91301series.
It can be used as a stand-alone evaluation board or as a target board for emulator debugger.
The evaluation board supports the following package: FPT-144P-M12
The board is supplied with a socket 15MHz crystal as main oscillation clock. Using the
internal PLL of the LC, internal clock rates up to 60MHz can be achieved.
Two separate RS232 transceivers are available to connect the on-chip UART0 and UART1
to 9-pin D-Sub connectors (X5, X7). The transceivers generate the adequate RS232 levels
for receive (RXD) and transmit (TXD) lines. Either the DTR line or the CTS line can be
selected with jumpers (JP15, JP17, JP21) to generate a system reset. The RTS signal can
be shortcut to CTS using the jumpers JP12 and JP18.
The external flash memory is programmed with a monitor-debugger, which uses UART0
(UART”A”; X5) for communication and to download the user-application.
If the board is used as an emulator target board, the microcontroller must be removed from
the PCB and a socket (NQPACK144SE) must be soldered instead. The following
configuration has to be used:
Emulation main unit: MB2198-01
DSU cable: MB2198-10
Probe Cable: MB2198-101
Socket/ Header:NQPACK144SE + HQPACK144SE
All pins of the microcontroller are connected to the edge connectors XPIN1 to XPIN4.
Furthermore, on X2 and X3 Fujitsu graphic-controller starterkits (daughter boards) can be
connected.
The on-board voltage regulator allows the user to connect an unregulated DC input voltage
between +6V to +9V (500mA). Also the power-supply voltages for an optional graphiccontroller starterkit are generated. In this case the input voltage should be +8V to +9V
(1500mA). In case of any modifications of the board, care should be taken that the total
power consumption will not damage the regulator.
There are six push buttons on the board, used for Reset, External Interrupts INT0 and INT3,
Trigger for A/D-converter (ADTG) and Reload-Timer1 (TIN1) and a non-maskable interrupt
(NMI) – used for Abort function of Softune Workbench monitor debugger.
Eight user-LEDs are connected via a 220 Ohm pull-down resistor network to Port PG0-PG7.
Parallel to the LEDs the connector X4 can be used to connect a standard alphanumeric
display. If neither LEDs nor LCD are required, the resistor network can be removed to free
the port.
The jumper JP1 (MD0) can select the operating mode of the microcontroller.
The STARTERKITMB91302 contains a universal AC/DC power-supply adapter. Before
connecting the power-supply to the starterkit ensure the correct configuration of the powersupply:
1. Voltage selection to 9V
2. Appropriate DC plug (2
3. Adjust correct polarity:
nd
largest plug is most suitable) is plugged into the socket.
+GND
After these settings are checked the supply is ready to be used with the
STARTERKITMB91302.
Carefully remove the board from the shipping carton. Check if there are any damages first
before power on the starterkit.
For the power supply a DC input voltage of 6V-9V/500mA is recommended (8V9V/1500mA if graphic sub-boards are used). The positive voltage (+) must be
connected to the shield, and ground (GND) must be connected to the centre of the
connector X1!
The following picture shows the default jumper settings as a short reference. For details
please check the chapter 4.1 Jumpers and Switches.
COM1 port
Basic set-up configuration with default jumper settings and power LEDs
After power-on push the blue reset button RESET (SW6) to ensure proper start-up. After
power-on the green power status LEDs (D22, D14, D12, D7, D10, D16) should be on. If the
LEDs do not light switch off the power supply and check the default jumper settings. The red
reset LED (D19) must be off.
By default, the evaluation board is equipped with a MB91302A-020 and the external Flash is
pre-programmed with the Softune Workbench monitor-debugger V1.02, 60MHz CPU clock
(CLKB), 30MHz Peripheral clock (CLKP), 30MHz Bus clock (CLKT):
MonDebStarterkit91302_15MHz_CLKT30_V102
The monitor-debugger enables the user to debug his own application software located in the
external SDRAM. After power-on the monitor debugger starts and finally D9, D10 are
switched on to display that the debugger is working.
In case the monitor debugger detects any errors during start-up a status will be displayed on
the 8 user LEDs. See chapter 6.2.3 “Advanced Debug Information” for more details.
3.1.3 Use as Emulation Target Board for Emulator MB2198-01
The “STARTERKITMB91302” can also be used as an emulator target board. In this case the
user must unsolder the MCU MB91302A-020, U1 and solder a socket instead
(NQPack144SE). The probe cable must be mounted to the socket, no MCU must be inserted
in this case. Take care of pin 1 marking onto the socket and fix the probe cable with screws.
Do not use other probe cable than MB2198-101 only!
Connect the probe cable to the emulation pod. Check all DIP-switch-settings of the
evaluation board and the emulation pod.
For the power on sequence the emulator system must be switched on first. Then switch on
the evaluation board. Please look at the corresponding user manuals for the emulator how to
set up the emulator system. After the power on the Reset-LED of the emulator must be off
and the Vcc-LED (D22) must be on. If the Reset-LED is still on, check the Vcc voltage
switch-settings of the emulator system and the power supply of the evaluation board.
For more details please check the following application notes for MB2198-01
Fujitsu supplies a full working 32bit development environment with the
“STARTERKITMB91302” called Softune Workbench V6. The Softune Workbench also
supports a monitor debugger which is pre-programmed into the external Flash memory of
the “STARTERKITMB91302”. To develop own software and to work with the Monitor
Debugger of the “STARTERKITMB91302” the Softune Workbench development
environment must be installed first. Follow the instructions for successful installation of the
Softune Workbench.
1. Before starting the installation setup ensure that you are logged in with
administrator or poweruser permissions, otherwise the Softune installation will
fail! Be aware that Softune does not support multi-user support. Therefore install- and
user login must be the same.
2. Browse on the starterkit CD-ROM into the directory Software\SWBInstall and start
the setup.exe
You can also start the installation using a browser by opening the index.html of the
CD-ROM. Use the link “Software\Softune Workbench\” in the left side frame.
3. Follow the installation instructions
4. For the default installation path it is recommended to use c:\Softune32
5. After the installation is finished, Softune Workbench for FR can be started via the
Windows “Start” menu
6. When Softune Workbench is started the following window will be shown
Chapter 4 Quick Project Start-up / Test “STARTERKITMB91302”
4Quick Project Start-up / Test “STARTERKITMB91302”
To open a project with Softune Workbench and to work with the monitor debugger, Softune
Workbench must be started first. To open a project the following steps must be taken.
1. Ensure that no other windows application is using the COM1 port
2. Ensure correct jumper setting of JP1 position 1-2 (MCU Operating Mode)
3. Ensure correct jumper setting of JP15 position closed (RTS/CTS shortcut)
4. Ensure that the “STARTERKITMB91302” is connected via serial cable (X5, UART0)
with COM1 of the PC.
Open the test-project using the <File>, <Open Workspace> dialog. Browse into the
folder c:\..\software\examples\StarterkitMB91302_Test\ and select the file
StarterkitMB91302_Test.wsp
5. Ensure that the configuration “MONDEBUGGER” is selected! Start the Monitor
Debugger by double click on MonDeb115KCOM1 in the following menu
MONDEBUG
If a different COM port is used please use MonDebug115COM2.sup for COM2 or
right-click on the “MonDeb115KCOM1” and select change. Follow the wizard to
modify settings.
Chapter 4 Quick Project Start-up / Test “STARTERKITMB91302”
6. Now the debugger starts and a download progress bar is shown indicating that the
application program is downloaded to the “STARTERKITMB91302”.
7. After downloading the application successfully into the external SDRAM of the
“STARTERKITMB91302” the following Softune Workbench screen is shown. The
debugger offers now versatile features as “Run continuously, Step-In, Step-over,
Step-out, ..” which can be used via the Icon list. Using the right mouse button opens
a context menu offering more settings as “Set Breakpoints, …”.
Context dialog
8. Use the button “Run Continuously” to start the application and use the “NMI” button
on the “STARTERKITMB91302” to Abort the Continuous program execution. Two
times a running light should be shown now on the 8 user LEDs and if a terminal
(115KB, 8N1) is connected to UART1 (X7) of the starterkit, a string is output
corresponding to the pushed user button (INT0, INT3, ADTG, TIN1).
Note:
The command “Abort” to stop program execution is not supported by the
Softune Workbench monitor debugger and might cause malfunction of the
debugger if used. To “Abort” program execution use the button “NMI” on the
“STARTERKITMB91302”.
9. For more details about Softune Workbench monitor debugger please check chapter
This chapter describes all jumpers and switches, which can be modified, on the
“STARTERKITMB91302”. The default setting is shown with a grey shaded area. All jumpers
and switches are named directly on the board, so it is very easy to set the jumpers according
to the features.
5.1 Jumper Overview
JumperDescription / Function Type
JP1 Mode-selection, MD0 Jumper 3 pol
JP2 AVCC Jumper 2 pol
JP3 SW INT0 Jumper 2 pol
JP4 AVRH Jumper 3 pol
JP5 SW INT3 Jumper 2 pol
JP6 SW ADTG Jumper 2 pol
JP7 AVSS Jumper 2 pol
JP8 SW TIN1 Jumper 2 pol
JP9 SW NMI Jumper 2 pol
JP11 Reset Jumper 2 pol
JP12 UART A (RTS-CTS) Jumper 2 pol
JP13 UARTA TxD (SOT0) Jumper 2 pol
JP14 UARTA RxD (SIN0) Jumper 2 pol
JP15 UARTA DTR/RTS Jumper 2 pol
JP16 DTR/DTR Jumper 2 pol
JP17 Reset by UARTA / UARTB Jumper 2 pol
JP18 UARTB (RTS-CTS) Jumper 2 pol
JP19 UARTB TxD (SOT1) Jumper 2 pol
JP20 UARTB RxD (SIN1) Jumper 2 pol
JP21 UARTB DTR/RTS Jumper 2 pol
JP22 MCU_VCC Jumper 2 pol
Additional to the internal Power-On-Reset the microcontroller can be reset by an external
Reset-circuit (Voltage-Monitor) and by the UARTs, too.
JP15, JP21 Either the DTR-line or the RTS-Line of UART”A” or UART”B” can be used
to generate a system-reset.
JP17 This jumper selects whether the DTR/RTS line from UART”A” or UART”B”
will generate a system-reset.
JP11 open this jumper if no external Reset shall be generated.
In this case only the internal reset is active (e.g.: power-on)
JP16The polarity of the DTR/RTS line can be invert by this jumper. Remove the jumper in order to disable the reset logic.
Jumper Setting Description
JP15 (DTR / RTS “A”)
1-2 DTR of UART”A” is selected
2-3 RTS of UART”A” is selected
1-2 UART”A” is used to generate Reset
JP17 (UART”A”/”B”)
2-3 UART”B” is used to generate Reset
1-2 DTR of UART”B” is selected
JP21 (DTR / RTS “B”)
2-3 RTS of UART”B” is selected
Closed External Reset generation is active
JP11 (Main Reset)
Open No external Reset generation
1-2 No polarity inversion for the DTR/RTS signal
JP16 (Polarity)
2-3 Polarity inversion for the DTR/RTS signal
Default: JP11 = closed, JP15, JP16, JP17 and JP21 are not set
By default, the external Reset generation is active. The Reset by UART is disabled.
Note:
While a reset signal is asserted the red Reset-LED D19 is lit. During normal operation,
this LED should be off! If JP16 (Polarity) is set, than JP15 and JP17 or JP21 have to be
set, too. If the reset LED is steadily on, check the power supply input voltage and the
settings for the reset-generation by UART.
The following figure shows the power connection jack X1. This connector is used to connect
an external unregulated DC power supply voltage (6V-9V DC) to the evaluation board.
Connector X1:
Shield is connected
Centre is connected to ground (GND)
It is recommended to use 6V in order to keep the power dissipation to a minimum.
Otherwise, an additional heat sink for the linear voltage regulator might be necessary.
NOTE:
If an optional graphic board will be connected, then the power supply has to be 8V-9V DC.
6.2 Edge connector (XPIN1, XPIN2, XPIN3, XPIN4)
All pins of the microcontroller are directly connected to XPIN1 to XPIN4 as follows:
Connector MCU Pins
XPIN1 1, 5, 9, …, 141
XPIN2 3, 7, 11, …, 143
XPIN3 2, 6, 10, …, 142
XPIN4 4, 8, 12, …, 144
On the PCB, the corresponding pin numbers of the LC are written next to the connector pins.
6.3 UART”A”, UART”B” connector (X5, X7)
Two 9-pin D-Sub female connectors are used
for the serial interface UART”A” and UART”B”.
TXD is the transmit output, RXD is the receive input.
The DTR or RTS signal can be used to generate a reset.
Eight LEDs are reserved for user-application. In order to disconnect the LEDs from the
related microcontroller port, the resistor network N1 can be removed.
Instead of the user-LEDs one alphanumeric LC-Display (optional) can be connected.
Make sure Softune Workbench for FR is installed on your PC and the
“STARTERKITMB91302” is ready to use (power-on (X1), serial connection (X5) to COM1 of
the PC). Refer to Chapter 3 for details on the hardware and software installation.
7.1 Introduction to Softune Workbench
Start Softune Workbench. Select <File> <Open Workspace> to load the first example
“StarterkitMB91302_test.wsp”. All examples can be found in the folder \software\examples
on the starterkit CD-ROM. It is recommended to copy this folder to the local hard-drive. In
the project tree on the left side, you can open the “source”-folder which contains the sourcefiles registered to this project. A double-click on one of the files will invoke the built-in editor,
which supports syntax-highlighting, tags and various other functions.
Softune Workbench main window
Note:
You may customize the editor by a right-click on the editor window.
Whenever you modify the source-files, you have to re-compile and link the related files to
produce a valid loadmodule (ABS-file). This is done using the MAKE-function. MAKE
invokes the assembler, C-compiler and linker for FR whenever necessary (only modified files
will be re-compiled).
If you wish to re-compile the entire project regardless of any changes, you can use the
BUILD-function. To check for syntax-errors on a specific source-file, use the
COMPILE/ASSEMBLE function.
These three functions are available on the button-bar or from the main menu (Project –
Compile / Make / Build / Abort).
Click on MAKE or BUILD. Messages from the individual language tools will be fed into the
output window at the bottom of the main screen. If the tool chain (C-compiler X Assembler X Linker) was completed successfully, the message “No Error” will appear.
If you get any errors during compilation, an appropriate message will be generated. Try this
with a simple syntax-error (e.g. delete a semicolon “;” from the end of a C-line) and click on
MAKE again. You will now see a message like this:
*** C:\StarterkitMB91302\MonDebStarterkit91302_Test\Src\main.c(81) E4065B: expected a ";"
*** C:\StarterkitMB91302\MonDebStarterkit91302_Test\Src\main.c(104) W1012B: warning: parsing
restarts here after previous syntax error
1 error detected in the compilation of
"C:\StarterkitMB91302\MonDebStarterkit91302_Test\Src\main.c".
------------------------------
Error detected.
------------------------------
To locate the position in the source-file, where the error has occurred, double-click on the
message. The editor will open the appropriate source-file, indicating the error highlighted in
red, depending on the customise settings of the editor. Correct the error and re-compile the
project as explained above.
If more errors occurred, you can go through the error list step by step using the menu “Edit –
Top/Previous/Next/Bottom Error” or using the appropriate buttons which have the same
functions:
Note:
To get on-line help about a specific error, select the error message and press F1. In
many cases, you can get some useful hints how to solve the problem. Of course, you
can also use the HELP-menu anytime during development or debugging.
In any case the settings done in the template must be checked and
have to be
adjusted to the specific needs and settings of the final application. The template is
THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU
PONSIBILITY OR LIABILITY FOR ANY ERRORS
Chapter 7 Getting Started
7.2 Project Start-up
In order to allow a quick and smooth project start-up Fujitsu Microelectronics Europe
supplies a template project as a reference. The easiest way to start a new project is to make
a copy of the template project and use this copy as a start-up. The template includes the
latest start91302.asm file, MCU headerfile, IRQ table, basic linker and C-Compiler settings.
Note:
providing an example for building up a new project.
MICROELECTRONICS ACCEPTS NO RES
OR/ELIGIBILITY FOR ANY PURPOSES. (C) Fujitsu Microelectronics Europe GmbH
Create a new project:
1. In order to start a new user-project use the “Template” project
2. Copy the folder Template and rename the folder to e.g. my_application
3. Enter the folder “my_application”
Rename “template.prj” into “my_application.prj”
Rename “template.wsp” into “my_application.wsp”
With this selection the project is linked to be used with the Softune Workbench monitor
debugger. Corresponding linker settings are done for the memory map in order to avoid
overwriting of the sections which are used by the monitor debugger. The code is linked in
this configuration for external SDRAM, otherwise it is not possible to debug code with the
Softune Workbench monitor debugger. Additionally the MACRO SWBMonDeb is
switched on in the assembler settings. This affects settings in start91302.asm which are
mandatory to work with the Softune Workbench monitor debugger.
Note:
Always check the memory map of the linker settings and ensure that this memory
map is suitable for the application and target system in use. Additionally the .mp1
file should be checked to ensure correct settings.
8. Check MCU settings in the module start91302.asm. Be careful regarding any
modifications. If the peripheral clock speed is modified it can happen that the
communication between Softune Workbench and monitor debugger is lost. In the
module start91302 some basic MCU settings are done and some initial data copy
transfers are performed for specific data sections e.g INIT. Check if the macro
“SWBMonDeb” is enabled (default) in the Assember options (<Project>, <Setup
Project>, <Assembler>, category <Define Macro>.
9. Check module vectors.c if any interrupts are used for proper vector table set-up.
10. Write application code in the module main.c or add any other module to the project.
11. Write and modify source code and settings corresponding to the needs of the
application. Finally use “Make”, or “Build” to compile and link the project. The
generated output files can be found in the sub-folder MONDEBUGGER of the project
folder. The *.mhx file (Motorola S-Record) is located in the ABS sub-folder.
Note:
Always check the memory map of the linker settings and ensure that this
memory map is suitable for the application and target system in use.
Additionally the *.mp1 file should be checked to ensure correct settings. Do
12. Start Softune Monitor Debugger via the “Debug” Command
13. After the project is built and debugged successfully switch to the active configuration
STANDALONE
Use Active configuration STANDALONE
14. With this selection the project is linked to work in external flash memory. Check that
the macro “SWBMonDeb” is switched off (default) in the Assember options
(<Project>, <Setup Project>, <Assembler>, category <Define Macro>.
This configuration will not work with the Softune Workbench monitor debugger In this
configuration the code is linked to work in external Flash memory, only.
15. Use “Make”, or “Build” to compile and link the project for external Flash memory.
The generated output files can be found in the sub-folder STANDALONE of the
project folder. The *.mhx file (Motorola S-Record) is located in the ABS sub-folder.
Note:
Always check the memory map of the linker settings and ensure that this
memory map is suitable for the application and target system in use.
Additionally the *.mp1 file should be checked to ensure correct settings.
16. Program the generated *.mhx file (Motorola S-Record) with the Flash programming
utility into the external Flash. See Chapter 9 “Programming the external Flash
Memory” for more details.
Note:
It is not possible to use the Softune Workbench monitor debugger with this
configuration because no code can be debugged which is located in external
Flash. Also this configuration does not support special debugger settings,
which are disabled for this configuration. The file monitor .asm can be
removed from the link list to free address areas which are normally used by the
monitor debugger.
Whenever you have created a valid load module successfully, you can switch from the
development mode to the debugging mode of Softune Workbench.
Basically, there are 3 types of debugging systems supported :
1. The software simulator: This type of debugger is always present and does not
require any special hardware extensions. The simulator will cover the FR-core
features, but no peripheral functions. Therefore, you can use the simulator to
verify program flow, check for dynamic errors, look at the generated assembler
code , etc. .
2. The monitor debugger: This debugger type requires an evaluation board like the
“STARTERKITMB91302” connected to one of the COM-ports of your PC.
Therefore, make sure the evaluation board connected and powered-up as
described before. Explanations in this manual refer to the monitor debugger only.
3. The emulator debugger: The in-circuit-emulator (ICE) is a system, which allows a
connection to any target system using a probe-cable. The appropriate system for
the MB91302A series is the MB2198-01 system. More information about this
system can be found on Fujitsus website.
Which debugger is used for the actual project can be configured in the project tree as shown
below or in the “Project – Setup Project – Debug” menu. By default (blue marked icon), the
monitor debugger is selected for MB91302A-020 project examples :
The default settings for the monitor debugger are : COM-Port 1, 115Kbaud, 8N1. If you wish
to change the COM-port, please right-click on the “MonDeb115KCOM1” entry and select
change.
Note:
If you change the baudrate or use a different crystal frequency , you have to change
the UART-settings in the debugging kernel source project, re-compile and flash the
new kernel to your “STARTERKITMB91302” first. The project can be found in
Software\SWBMonitorDebugger. All settings are done in the module u_io.asm (see
chapter 6.6.3 for more information).
If these settings are correct, start your debugging session :
Make sure you have connected the “STARTERKITMB91302” and your monitor-kernel is
stored in the external flash memory of the “STARTERKITMB91302”. Then power up and
reset the starterkit. Check the following configurations:
1. Correct CPU Mode selection (JP1 1-2)
After Power on the Monitor debugger indicates via the 8 user-LEDs the current
status. The following status indications exist. Ensure that the CPU is working in
normal RUN Mode (Jumper JP1 position 1-2)
JP1 right most position 1-2
2. Correct start-up of the monitor debugger
In case of any other status indication push the reset button or check chapter 6.6.1 for
detailed information.
Start the debugger by double clicking the “MonDeb115KCOM1” entry in the project/debug
tree - or by using “Debug – Start Debug” from the menu. You should see a progress bar
indicating the download process.
If no process is indicated an error message will occur (“e.g. Invalid communication status”).
Double-check the settings again as explained above. Also make sure the evaluation-board is
powered on, ready to use and the RS232-cable is connected properly. Also see the troubleshooting section in the appendix.
After starting the debugger, the source window will be opened which contains locate-arrows
for each (possible) source-line, the original source-code,
Figure 1: SWB Debugging window
Breakpoint-indicators and the assembler code (in “mixed view”). The current program
position will be indicated by a yellow line. Use right-click in the source window to configure
the view (add/remove control characters, View Mixed source code, Breakpoint …)
Note:
You can choose “mixed view” from the context menu (right-click) to display source
and assembly code at the same time. The command “go to current” will take you to
the active code line!
GO: Executes the program continuously from the memory location pointed to by the
current program counter (PC) until a termination factor occurs.
STEP IN: Executes the program stepwise according to the listing in the source
window (steps in C- or ASM). Note that interrupts are disabled during step execution !
STEP OVER: Executes the program stepwise except call-instructions (which will be
executed until return). Interrupts are not disabled during a continuous CALL...RETURN
execution.
STEP OUT: Executes the program continuously to the parent function (until
RETURN). Interrupts are enabled. Note, that debug information is required for this function.
EXECUTE UNTIL CURSOR: Automatically sets a breakpoint at the actual cursor
position and executes continuously until this breakpoint, which will be deleted
afterwards.
Each valid code line in a debugger window automatically has a locator (blue arrow) and a
breakpoint-option (circle). Note that some C-lines may not be displayed with locators and
breakpoints, because the compiler has created “optimized” assembler-code. Select “mixed
view” in order to check the compiler output.
Instead of single-steps, you may also use the arrows to directly execute your program until a
certain line of your source-code :
BORT: Forcibly terminates execution. This button is not fully supported by the
A
monitor debugger and may cause malfunction if used to abort “continuous
operation” of the MCU.
This command button can only be used to abort single code line operations
Example: for(k=DELAY_CONSTANT; k>0; k--);
Use the button NMI on the “STARTERKITMB91302” for ABORT function.
To ABORT continuous execution on the “STARTERKITMB91302”, you have to
use the NMI button on the “STARTERKITMB91302”.
7.4 Advanced Monitor Debugger Features
TOGGLE BREAKPOINT: Sets or deletes breakpoint at the current source line:
To set or delete a breakpoint, click the circles at the beginning of a source-line.
Aindicates an active breakpoint. Hit “Run Continuously” to execute code until
reaching this line. A list of all breakpoints can be found under the “Debug – Breakpoint”
menu. 255 Software-Breakpoints (using TRAP replacement) are possible.
Note:
To set breakpoints at positions which are currently not visible (e.g. because the source
window of that module is not open), you can also enter a symbolic label directly in the
“Breakpoint” menu. Example: Enter “main” in the address-field and confirm. The new
breakpoint will automatically be assigned to the address of the “main()”-function.
REGISTER WINDOW: Displays the CPU-register window. Updated registers appear
in red. Setup in context menu defines which Registers should be displayed.
WATCH WINDOW: Displays the current variables to „watch“. Double-click on any
variable in your code then specify watch in context menu to add to watch window. All listed
variables in a watch window can be displayed in any number format. Use Edit to directly
change the contents.
MEMORY WINDOW: Displays memory areas in various formats defined by Setup
(context menu). Changing of address/data is possible when debugger is not executing.
Note:
If you modify the ROM-area (200.0000’H to 27F.FFFF’H) it can affect the currently
loaded program !
The memory window can be very helpful to check the registers or the frame memory of the
connected graphic controller !
DISASSEMBLER: Disassembles the content of the code memory beginning from
actual PC position and displays the result in a separate window. Individual
assembler-lines can be changed using the „inline assemble“-function.
DEBUG - STACK: Displays the current stack contents in terms of function calls.
Parameters, if any, are displayed in brackets.
DEBUG - VECTOR: Reads out and displays the actual interrupt-vector table. Use the „jump“
function to display any code areas pointed to by an interrupt vector (e.g. interrupt service
routines used in your program).
DEBUG - CALL: This function can be used to „call“ any routine defined in your code when
the debugger is on hold.
DEBUG – LOAD TARGET FILE: Starts a new download of the current load module (ABS
file). Usually this function will be executed automatically after starting the debugger (defined
in debug settings ; see „Project-Setup-Debug“). However, this function can be useful to reinitialize the debugger for the current debug session.
VIEW - SYMBOL: This function displays all (global) symbols of the current project.
Information about the type (char, integer etc.) and the location (address in RAM or register)
can be shown using „detail“.
VIEW - LOCAL: Similar to View-Symbol, but only local variables of the current function are
shown.
VIEW - COMMAND: From this window, the debugger can be controlled using a command
line input. All GUI functions are available as individual commands.
Example:
Run continuously
Step
examine PDRG
set break main
Dump/Halfword 0x2000000..0x20000FF
Shortcuts to complex commands can be defined (“alias”) and parameter strings can be
substituted by variables.
A set of commands can be combined to a “macro”. Aliases and macros can be defined
using the command window context menu.
Example: restart: set register PC=2000000
set break main
run continuously
In order to document or save debugging details such as memory contents, all outputs fed to
the command console can be written to a file (“logging”).
A whole “program” of commands (incl. flow control) can be written to a PRC-file and
executed. Procedure-files are simple text-files with the extension “.PRC” and can be created
by the Softune Workbench editor or any other text editor. To execute a procedure-file, use
the command window menu or the “file-open” menu during debugging.
Note:
Procedure-files can be very helpful to configure the debug-environment automatically,
perform automated tests (e.g. when a new C-module has to be tested) or to enhance
basic emulator functions such as breakpoints. Using a procedure file, breakpoints
can be defined dynamically depending on program conditions. See the “Command
Reference Manual” (on-line help) for detailed information about the available
command and parameter syntax. Some procedure files exist already included in the
example project directory.
Valid load module files can only be achieved if the language tool configuration is appropriate.
The most convenient way to create own projects is to copy the provided Template-Projects
from the example-directory and use it as “blank sheet”.
If the Softune Monitor debugger is being used the following memory areas are reserved by
the monitor debugger and must not be used by the application.
Memory Map of Softune Workbench Monitor debugger
MonDebStarterkit91302_15MHz_CLKT30_V102
Memory Type Used for Area(s) Sections
Internal CPU Data*
RAM
External Flash 8MB*
memory
External Flash 8MB* Debug Kernel 0x0F:C000-*
Stack, Data 0x3F000-*
0x3F707
Flash Testpattern 0x8.0000-*
0x8.0003
STACK, DATA
Flash_Test_Pattern
(default 0xaa5555aa)
CODE, CONST
0x0F:DEB6
External Flash 8MB* Vector Table 0x0F:FC00-*
INTVECT
0x0F:FFFF
Note:
Be aware that the memory map may depend on the debugger version and any
modifications of the debugger made by the user. The current version of Flash
programming tool just supports programming the memory area 0x08.0000 – 0x0F.FFFF
Memory map of Monitor debuggerMonDebStarterkit91302_15MHz_CLKT30_V102
Note:
The following chip select areas are used by the Softune monitor debugger and must
not be used or overlap with other chip select areas:
Always check the Linker Settings (“Project – Setup Project – Linker – Disposition”) to make
sure the following memory map is applied according to the project configuration:
Recommended linker settings for “STARTERKITMB91302” for debugging
Memory Type Used for Area(s) Sections
Data RAM, Variables, Stack 0x3F800-
DATA, INIT, STACK
0x3FFFF
External SDRAM 64MBCode, Const 0x200:0000-
CODE = ROM1
0x20F:FBFF
External SDRAM 64MBCode 0x210:0000..
CODE = ROM2
0x27F:FFFF
External SDRAM 64MBIRQ Vector
Table
External Flash 8MB* Code, Const 0x08.0004-
0x020FFC000x020FFFFF
INTVECT =
INTVECT_AREA
CODE, CONST
0x0F.FBFF
0x10.00000x7F.FFFF*
Note:
The current version of Flash programming tool just supports programming the
memory area 0x08.0000 – 0x0F.FFFF
Linker Settings for MB91302A-020 Debug configuration
Recommended linker settings for “STARTERKITMB91302” without Monitor Debugger
Memory Type Used for Area(s) Sections
Data RAM Variables, Stack 0x3F000..
DATA, INIT, STACK,
0x3FFFF
External SDRAM 64MBCode, Data 0x200:0000..
CODE, DATA
0x27F:FFFF
External Flash 8MB* Code, Const 0x08:0000..
CODE, CONST
0x7F:FFFF*
Note:
The current version of Flash programming tool just supports programming the
memory area 0x08.0000 – 0x0F.FFFF
Linker Settings for MB91302A-020 Standalone configuration
Note:
In any case all settings must be checked and corrected corresponding to specific
application requirements. Also check settings in the start91302.asm initialisation file!
Use the linker mapping list (e.g. *.mp1 file) to check the final memory allocation.
The following chip select areas are used by the Softune monitor debugger and must
not be used or overlap with other chip select areas:
CS0 – external Flash 0x0000.0000 – 0x007F.FFFF
CS6 – SDRAM 0x0200.0000 – 0x027F.FFFF
Make sure, the correct Target MCU (“Project – Setup Project - MCU” menu)
•
MB91302A is selected.
•Use the correct linker settings as outlined above depending on your target
MCU and the target area (embedded flash or external RAM).
•Use the provided templates to make sure the sections are located correctly.
•Always check the *.mp1 file (use right mouse click on top *.abs file in the
project window of Softune Workbench and select “open list file”) to see the
used sections and address areas!
•The following Chip select areas are used by the Softune monitor debugger and
must not be used or overlap with other chip select areas:
CS0 – external Flash 0x0000.0000 – 0x007F.FFFF
CS6 – SDRAM 0x0200.0000 – 0x027F.FFFF
Note:
Be aware that the Softune Workbench monitor debugger is only able to debug code
which is located in RAM! It is not possible to debug code located in Flash memory!
7.6 Provided Examples
On the “STARTERKITMB91302” CD-ROM and on the MCU website some example projects
are provided. The projects can be found in \Software\Examples and are regularly updated on
the website. Please check http://www.fme.gsdc.de/gsdc.htm
version.
Use the “Template” project as a reference to start your own application software. The
“Template” project offers a quick start-up and includes basic MCU initialisation files and tools
settings (e.g. linker memory map).
Note:
In any case all settings must ALWAYS be checked and corrected corresponding to
specific application requirements. Be aware that the Softune Workbench monitor
debugger is only able to debug code located in RAM! It is not possible to debug code
located in Flash memory!
7.7.1 Status Indication of Monitor Debugger after Reset
After power-on the monitor debugger indicates via the 8 user-LEDs the current
status. The following status indications exist. Ensure that the CPU is working in
normal RUN Mode (Jumper JP1 position 1-2)
to enable programming
-Push the Reset button (blue button “Reset”, SW6)
-If the debugger started correctly the 8 user-LEDs show the following pattern:
O O O O O O
D10 D1 Monitor Debugger running, all tests passed
-In case the Monitor Debugger detected any error during start-up the 8 user-LEDs
show a special initialisation status code:
-
O O O O O O OMonitor Debugger started, but all tests and
D10 D1 settings failed
O O O O O O OClock settings done (CLKB, CLKP, CLKT)
D10 D1
O O O O O OExternal Bus Interface for SDRAM and Flash
O O O O O O OCache initialised (if enabled in debugger
source code, default is disabled)
D10 D1
O O O O O OStandby Control Register initialised
D10 D1
StarterkitMB91302
Chapter 7 Getting Started
O O O O O OUART initialised (115Kbaud, 1N8)
D10 D1
O
O O O OUART initialisation started but no return
from this function
D10 D1
O O O O O O OStart SDRAM Memory test
D10 D1
O O O O O OSDRAM memory test, Error
D10 D1
O O O O O OSDRAM Memory test finished, no Error
D10 D1
O O O O OFlash Memory test, Error
D10 D1
O O O O O OFlash Memory test finished, all tests passed,
no Errors
D10 D1
7.7.2 Memory Map of Softune Workbench Monitor Debugger
When using the monitor debugger take care that the application is not using the same
memory area which is used by the monitor debugger. The following areas are used by the
debugger version “MonDebStarterkit91302_15MHz_CLKT30_V102”
Memory Map of Softune Workbench Monitor debugger
MonDebStarterkit91302_15MHz_CLKT30_V102
Memory Type Used for Area(s) Sections
Internal CPU Data
RAM
Stack, Data 0x3F000-
0x3F707
STACK, DATA
External Flash 8MB*
memory
External Flash 8MB* Debug Kernel 0x0F:C000-
Flash Testpattern 0x8.0000-
0x8.0003
Flash_Test_Pattern
(default 0xaa5555aa)
CODE, CONST
0x0F:DEB6
External Flash 8MB* Vector Table 0x0F:FC00-
INTVECT
0x0F:FFFF
Note:
Be aware that the memory map may depend on the debugger version and any
modifications of the debugger made by the user.
Memory map of Monitor debugger MonDebStarterkit91302_15MHz_CLKT30_V102
7.7.3 User Configuration of the Softune Workbench Monitor Debugger
In some cases it might be necessary to modify the monitor debugger (e.g. change crystal
frequency, change UART baud rate or use UART1 instead of UART0). For this purpose the
source of the monitor debugger can be found in the directory
oArea Select Register ASR6 for CS6 (ASR6 = 0x0200.0000)
oArea Control Register ACR6 for CS6 (ACR6 = 0x7868)
64Mbyte (0x0200.0000 - 0x027F.FFFF)
32bit
single access
Enable Prefetch
Write Enable
Big endian
Type SDRAM/FCRAM
oArea Wait Register AWR6 for CS6 (AWR0 = 0x1159)
RAS/CAS delay 1 cycle
CAS latency 1 cycle
Read to Write cycles 2 cycles
Write recover cycles before next read command 2 cycles
Write recover cycles 3 cycles
RAS active time 1 cycle
RAS precharge 2 cycles
oMemory Control Register MCRA (MCRA = 0x07)
8 columns
single write
4 banks for burst write
4 active banks
oRefresh Control Register (RCR = 0xe247)
RCR=0xe247 ->0xe24F ( to power-on SDRAM I/F)
oChip Select Enable Register CSER (CSER = 0x41)
CSER = 0x41 (enable CS0, CS6)
oPort Function Registers PFRx (to enable control signals used by external bus)
PFR8 = 0xE0
PFR9 = 0x7E
Please check the corresponding readme.txt of the debugger project to get more details
about the monitor debugger and latest information. For most modifications of the debugger it
is sufficient to modify the file u_io.asm including all basic hardware related initialisations.
Note:
The monitor debugger requests shortcut between RTS/CTS. Otherwise a
communication error will be displayed!
The current version of Flash programming tool only supports the programming of the
memory area 0x08.0000 – 0x0F.FFFF! Check the Fujitsu website for any possible
updates.
If creating new projects, be sure not to use the following functions, which are reserved for
the Starterkit:
<Chip Selects:
CS0 is used for the external 8Mbyte Flash memory (0x0000.0000 – 0x7F.FFFF)
CS6 is used for the external 8Mbyte SDRAM (0x0200.0000 – 0x027F.FFFF)
This Chip select areas must not overlap with any other defined chip select areas!
<Port PG4-PG7 is used to display the debugger status information on the user LEDs
The ports PG4..7 are initialised to output.
<UART0 used for monitor debugger and flash programming
<NMI used for Abort function
<The following memory areas are reserved for the monitor debugger as minimum
Memory Map of Softune Workbench Monitor debugger
MonDebStarterkit91302_15MHz_CLKT30_V102
Memory Type Used for Area(s) Sections
Internal CPU Data
RAM
External Flash 8MB*
memory
External Flash 8MB* Debug Kernel 0x0F:C000-
Stack, Data 0x3F000-
0x3F707
Flash Testpattern 0x8.0000-
0x8.0003
STACK, DATA
Flash_Test_Pattern
(default 0xaa5555aa)
CODE, CONST
0x0F:DEB6
External Flash 8MB* Vector Table 0x0F:FC00-
INTVECT
0x0F:FFFF
Note:
Be aware that the memory map may depend on the debugger version and any
modifications of the debugger made by the user.
Memory map of Monitor debuggerMonDebStarterkit91302_15MHz_CLKT30_V102
Note:
Be aware that the Softune Workbench monitor debugger is only able to debug code
which is located in RAM! It is not possible to debug code located in Flash memory!
Note:
The current version of Flash programming tool only supports the programming of the
memory area 0x08.0000 – 0x0F.FFFF! Check the Fujitsu website for any possible
updates.
To program the Monitor Debugger Kernel of the Softune Workbench monitor Debugger or
any other application into the external flash following steps must be taken.
Note:
The current version of the flash programming utility only allows to program the
external flash memory in the area 0x8.0000 to 0x0F.FFFF
1. To install the Flash Programming utility on the PC the following steps must be taken
a. Copy folder “Software\FlashProgramming” from the starterkit CD-ROM to the
hard drive of the PC, recommended c:\Softune32\FlashProgramming
b. Start Flash Programming tool by double click flash.exe within the copied
folder: C:\..\FlashProgramming\FR65e\flash.exe
2. Open the Flash programming Utility by double click the flash.exe file
3. Select CPU type, Clock frequency, Hex File as shown in the following figure
a. Target Microcontroller: MB91F302-FPS-15MHz
b. Crystal Frequency: 15.0MHz
c. Hex File: ModDeb91302_15MHz_CLKT30_v12.mhx
Use button “Open” and browse to
c:\..\Software\MonitorDebugger\ModDeb91302_15MHz_CLKT30_v12.mhx
a
b
c
4. Connect “STARTERKITMB91302” (X5) by serial cable with PC COM1
6. Power-on “STARTERKITMB91302” (Supply voltage at X1)
7. Push Reset button SW6 on “STARTERKITMB91302” and check that LED flashes
Reset
If reset button is pushed LED D19 must flash.
8. Use <Full Operation> button of flash.exe programming tool. The following dialog will
be displayed:
9. Push Reset (blue button “Reset”, SW6 on “STARTERKITMB91302”) (red LED D19
must flash if button is pressed)
10. Click OK button in dialog
11. After programming the Monitor Debugger successfully, the following dialog occurs
and LED D9 on the Starterkit is flashing. Click OK button in dialog to finish
programming.
Starterkit does not power-on correctly.
Some or all of the power LEDs (D7, D10,
D12, D14, D16, D22) do not lit up.
Starterkit stays in reset.
LED D19 (Reset indicator) ligths up
permanently.
The communication from Softune
Workbench to the evaluation board fails
(Communication errors)
The windows of the debugger are empty. * This is due to a wrong (maybe old) file path
When trying to program the application to
the embedded flash, the programmer
stops at first address with “loading error” !
Hardware units such as LEDs, user
buttons, UART0, 1 are not working.
LCD at parallel LCD port does not work
Graphic sub-board does not work Check power supply 8-9V/1500mA. Reduce
For more information see the Softune Workbench on-line help, the provided manuals, last
minute information and additional or updated documentation on our web-site.
Check voltage supply and jumpers :
The voltage on DC-Power plug should be in the
range of 6-9V. The plug should have + on shield
and – on the center. The power supply should be
able to supply at least 500mA. To support both, the
“STARTERKITMB91302” and a graphic sub-board
the supply should be able to supply 1500mA.
* The LEDs should light up after switching on the
board. Use a multimeter to see whether 5V,3.3V
and 2.5V are present on the Vcc/GND test
measurement points MP1, 2, 3, 5, 6 and X8.
Check jumper positions according to chapter 4.1
(especially : JP1) !
Remove all user extensions of the starterkit
LED D19 (Reset) should flash. If D19 lights up
permanently, the voltage is too low (below 2.9V) Increase the voltage supply and check available
supply current to solve the problem.
Remove all user extensions on the board to avoid
any shortcuts or leakage current!
Make sure your COM-port number and the
baudrate settings are correct (see debugger
introduction). The default COM-port is 1 and the
default baudrate is 115KBaud.
Make sure no other programs are using the same
COM-port on your PC. Close all other applications
(e.g. Flash programmer utilities, terminals etc.)
* Check if RTS/CTS is closed on the CPU module
(check jumper JP12, 13, 14 are closed).
* Use only a RS232 extension 1:1 cable
information. Closing all windows in the debugger
and re-open should fix the problem.
* You are probably trying to program a program to
the flash which is linked for the external RAM area.
Check for details the linker memory map and the
linker output mapping file *.mp1 file.
Make sure you have enabled these units on the
evaluation board using the appropriate jumpers
(e.g. JP3, 6, 5, 8, 9 for LEDs). See the provided
examples and the hardware manual for information
on how to control the peripherals.
Adjust the potentiometer P1 to adjust contrast of
LCD. Remove resistor network N1
- MB2198-01 Emulation and Debugging AN-910028-xx-MB2198emu.pdf
with Softune
12.2 Manuals
<MB91301 Hardware Manual
<MB91302A Datasheet
<FR Family C-Compiler Manual
<FR Family Instruction Manual
StarterkitMB91302
<FR Family Assembler Manual
<FR Family Simulator Manual
<FR Family Linkage Kit Manual
<FR Family Softune Workbench Manual
Note :
Updated information of application notes, manuals, datasheets, software tools
example projects, headerfiles, … can be found on the technical MCU web-site:
http://www.fme.gsdc.de/gsdc.htm