Fujitsu DevKit16 User manual

FUJITSU MICROELECTRONICS EUROPE
Development tools for 16LX Family
DevKit16
User Guide
Version
VersionVersion
Version
1.28

DEVELOPMENT TOOLS FOR 16LX FAMILY
DevKit16 User Guide

Table of Content
What is in this Guide.........................................................................................................................4
What is not included in this guide ...............................................................................................5
Where to find news, options, next beans, next CPU boards, latest FAQ and support ...........5
What is included in DevKit16...........................................................................................................6
Hardware .......................................................................................................................................6
Software..........................................................................................................................................6
DevKit16 Features and Technical Specification ............................................................................8
5 in 1 combo of HW features........................................................................................................8
Additional HW features................................................................................................................8
Open HW architecture..................................................................................................................9
Getting Started ................................................................................................................................10
Technical requirements to run software...................................................................................10
HW installation............................................................................................................................10
Default settings for SOFTUNE ..................................................................................................11
Default settings for Processor Expert(TM)...............................................................................12
DevKit16 SW overview...............................................................................................................12
Softune WorkBench....................................................................................................................12
PROCESSOR EXPERT(TM)....................................................................................................12
SW installation ............................................................................................................................15
Get it running ..............................................................................................................................16
Design application with Processor Expert(TM) and run it using Softune Workbench monitor
debugger.......................................................................................................................................16
Run first application using Softune WorkBench and FUJITSU monitor debugger............16
Run first application using Processor Expert(TM)and its Debugger&Kernel ........................17
Processor Expert tutorial............................................................................................................19
Create your own tutorial (step by step).....................................................................................19
Application Debug ..........................................................................................................................22
Software debuggers.....................................................................................................................22

Benefits of DevKit16 for software debugging..........................................................................23
Softune Workbench and Fujitsu monitor debugger..............................................................24
Processor Expert(TM) debug kernel features .............................................................................25
Flash It!...........................................................................................................................................27
Overview of DevKit16 FLASH programming tool .................................................................27
Installing the FLASH programming tool..................................................................................28
Installing the FLASH programming tool..................................................................................28
Starting the FLASH programming tool....................................................................................28
Description of controls................................................................................................................28
Commonly used settings of the controls....................................................................................30
Necessary Devkit16 mainboard HW settings............................................................................31
How to burn user program into the FLASH............................................................................31
How to burn the SOFTUNE debug monitor.............................................................................32
How to burn the PE debug kernel.............................................................................................33
How to burn the CPU FLASH without Devkit16.....................................................................34
Running burned program ..........................................................................................................35
FlashTool commands - parameters ...........................................................................................35
Notes .............................................................................................................................................35
Error Messages:...........................................................................................................................36
Processor Expert beans IntFLASH and ExtFLASH – runtime support of FLASH access
and design time checks................................................................................................................37
CPU board for MB90F543 description..........................................................................................38
CPU Board overview...................................................................................................................38
Connectors ...................................................................................................................................39
Jumpers, buttons and switches .................................................................................................42
Default jumper settings...............................................................................................................45
Main board description...................................................................................................................46
Main board overview..................................................................................................................46
Memories......................................................................................................................................48
FPGA............................................................................................................................................48
CAN interfaces.............................................................................................................................48
UART interfaces..........................................................................................................................48
LED Diodes..................................................................................................................................49
Audio amplifier and speaker......................................................................................................49
Connectors ...................................................................................................................................50

Switches........................................................................................................................................53
Jumpers........................................................................................................................................55
The Mainboard Programmer‘s Reference....................................................................................61
Register addresses and chip selects............................................................................................61
Interrupts.....................................................................................................................................61
Simulated CPU ports (P0, P1, P2, P3 of Fujitsu FLASH CPU)..............................................62
Add-on FPGA ports....................................................................................................................63
Add-on FPGA output-only port.................................................................................................64
User UART...................................................................................................................................65
I2C.................................................................................................................................................67
Keyboard controller....................................................................................................................70
LED display .................................................................................................................................71
FPGA EEPROM .........................................................................................................................71
System control registers..............................................................................................................73
Default jumper settings...............................................................................................................81
What to do if ...................................................................................................................................82
Get the most from DevKit16 ...........................................................................................................84
Download the current SW and HW updates............................................................................84
Check the net for newest beans..................................................................................................84
DevKit16 Power Supply Requirements ..........................................................................................85
Warranty and Disclaimer ...............................................................................................................86
Revision and Error List ..................................................................................................................88
Appendix..........................................................................................................................................90

4
44
4
What is in this Guide
What you’ll find inside this guide and few words about its
organization
evKit16 is designed to help you to design applications with FUJITSU
16LX MCU family members. This guide should lead you – step by
step - to get your results soon. You could print a copy of this document
for further use, when you start work with the DevKit16 boards.
DevKit16 provides a lot of features, so this guide introduces them using top-
down approach. The guide describes how to use DevKit16 for the 16LX series
MCU, allowing to get acquainted with the methods for developing and
debugging 16LX-driven applications.
Chapter 2: What is included in DevKit16 provides brief information which
HW and SW tools are included in package.
Chapter 3: DevKit16 features and technical specification provides
necessary technical and operational information
Chapter 4: Getting Started explains how to run your first application on
DevKit16 including all steps and HW and SW installation.
Chapter 5: Debug application explains methods how to debug your
application on DevKit16.
Chapter 6: FLASH It! explains how to store final application in DevKit16
CPU or external FLASH.
Chapter 7,8: CPU Board Description and Main board Description provide
explanation how to control the DevKit16 configurations and detailed
description of CPU and main board including all DIP switches, jumpers and
connectors.
Chapter 9: Introduction to SW tools explains, what the DevKit16 SW tools
could do for you.
Chapter
1
D

5
55
5
Chapter 10: Main board Programmers Reference includes description of
FPGA registers and their function.
Chapter 11: How to… includes hints for DevKit16 operation, which you
should check before call technical support.
Chapter 12: Get the most from DevKit16 provides hints and tips how to
benefit from DevKit16 and its options
Chapter 13: Power supply requirements
Chapter 14: Revisions and errors list
Appendix includes schematics of DevKit16 and other technical references
WHAT IS NOT INCLUDED IN THIS GUIDE
This guide is not detailed manual for the CPU, parts and software tools. Please
find more in the following resources:
MCU, Softune Workbench and tools – FUJITSU Micros CD ROM (Ver 3.0 or higher)
Processor Expert(TM) and tools – DEVKIT16 Software CD ROM
Parts and other HW components – datasheets of their producers
WHERE TO FIND NEWS, OPTIONS, NEXT BEANS,
NEXT CPU BOARDS, LATEST FAQ AND SUPPORT
Please visit DevKit16 WEB site www.processorexpert.com/devkit16 for news
and giveaways. You could also register in order to obtain news by mail.
For MCUs and Fujitsu technologies please visit FUJITSU WEB site
www.fujitsu-fme.com.
When you need additional CPU personality board please call your nearest
FUJITSU subsidiary or authorized FUJITSU distributor. You should specify:
•version of CPU you need
•whether you need CPU to be soldered or mounted in a socket. Socket version is
provided in order to allow use of FUJITSU emulator

6
66
6
What is included in
DevKit16
Brief overview of what you’ll find inside DevKit16 package
DevKit16 package contains both HW boards and SW tools on CD.
HARDWARE
The DevKit16 HW includes
•CPU personality board (default for MB90F543 MCU)
•Main board
•Serial cable to connect PC and DevKit16
When you need additional CPU board please call your nearest FUJITSU
subsidiary or authorized FUJITSU distributor. According to your request there
are available CPU boards with soldered CPU or with 100pin socket. Socket
versions are intended to support FUJITSU emulator.
SOFTWARE
Two CDs are included in package.
•CD 1: FUJITSU Micros Documentation & Software
•CD 2: DevKit16 Software
CD 1 includes all the
•MCUs informations
•Softune Workbench with C compiler, assembler, linker and other tools.
CD 2 provides tools for Rapid Application Development support on DevKit16.
Chapter
2

7
77
7
•Fujitsu Monitor Debugger for MB90F543 to provide debug for Softune on
DevKit16
•Processor Expert(TM)
•Bean Wizard
•Processor Expert(TM) Debug Kernel for MB90F543
•DevKit16 FLASH Programming tool

8
88
8
DevKit16 Features
and Technical
Specification
This chapter introduces features of DevKit16 and provides
necessary technical and operational information for
DevKit16.
he FUJITSU DevKit16 concentrates the combination of five most
requested HW development kits features:
5 IN 1 COMBO OF HW FEATURES
•Standard Starter Kit
•FLASH Development Kit
•CAN Development Kit
•Application Board
•Rapid Hardware Prototyping
ADDITIONAL HW FEATURES
•Open HW architecture
•Keeps CPU resources available for user
•Supports single chip debug for CPUs from 16LX family with External Bus
Interface
•Supports jumperless CPU mode control
Chapter
3
T

9
99
9
•provides large RAM and FLASH with fast download and programming
•provides additional peripheral devices – PC keyboard interface, EEPROM, LED
Display, I2C
•Optional low level HW debug support (breakpoints, trace)
OPEN HW ARCHITECTURE
•Two buses for 16LX family members are defined: Interface Bus and Device Bus
•Interface Bus provides compatibility for Main board
•Device bus is located on CPU board and provides compatibility with use of CPU
peripherals
•This allows to provide low cost CPU personality boards, which are compatible
with the Interface and Device Bus and reflects different MCU pin layout
•Expansion buses/connectors: User Prototype connector with user chip select and
bus signals, FPGA User Programmable Pins (40), CPU AD converter connector
•Upgradable FPGA content
Warning: this kit must only be used for test applications in a
laboratory environment.

10
1010
10
Getting Started
Introduction to DevKit16 philosophy and how to run your
first application on DevKit16 including all steps of HW and
SW installation.
evKit16 is designed as a low cost but highly functional development
platform for FUJITSU 16LX MCU family. It is not a high end
emulator but it provides significant advantages for MCUs with
External Bus Interface. In combination with powerful software tools
including debuggers it provides enough capacity for fast application
development.
TECHNICAL REQUIREMENTS TO RUN SOFTWARE
Please check the specifications which are already available for Fujitsu Softune
WorkBench on FUJITSU CD ROM. The Processor Expert(TM) conditions are
available in its README.TXT file.
HW INSTALLATION
Please remove carefully CPU board and the Main board from antistatic boxes
and connect them according the photo.
Chapter
4
D
Power supply
(regulated, 9-12V,
center
p
in=GND
)
RS-232

11
1111
11
Check if all switches and jumpers match the settings as described below in
Default Settings for Softune. If there are changes please first check
www.processorexpert.com/devkit16 for the latest version of this guide and
correct the settings according it.
Check if your power supply match specifications in Power Supply
Requirements chapter. If these requirements are matched, please connect
power supply to CPU board power supply connector.
When power is on, you should easily check if
•Red LED on CPU board lights on
•Green LED on Main board lights on without blinking
When you experience something different, please check your power supply
or try to find solution in chapter How to... When this step went OK, switch
power off and connect DevKit16 with PC using attached cable to USER
(FPGA) UART and a free serial port on PC, which is not used by other
device in PC.
DEFAULT SETTINGS FOR SOFTUNE
For a quick reference, take a look at the following pictures, that shows the
(default) setting of the Mainboard and 90F543 CPU board for Softune. For more
detailed description, see the figures of CPU board for 90F543 and Mainboard
layout in the "CPU Board for MB90F543 description" and "Mainboard
description" chapters.
!
!!
!

12
1212
12
DEFAULT SETTINGS FOR PROCESSOR EXPERT(TM)
Softune Workbench and Processor Expert(TM) DevKit16 settings for debugger
are compatible with one exception: serial line reset is inverted so J1 (serial line
reset polarity selection) must be in the 1-2 position for Softune, but in the 2-3
position for PE. Serial line reset is used for remote reset of DevKit16 by both
environments.
The jumper J10 (MSEL) is not used in the current versions of PE kernel or
Softune monitor debugger. In the future, there might be a version of an universal
kernel, that will support both Softune and PE debuggers. Then, the J10 will have
to be SHORT when using the Softune debugger and OFF with the PE.
DEVKIT16 SW OVERVIEW
You will need to install both Softune and Processor Expert(TM) to run the
following examples on DevKit16. Please see DevKit16 Features and technical
specification to check, if your PC match software requirements. Please also
check latest revision list for Softune tools and readme.txt for Processor
Expert(TM).
SOFTUNE WORKBENCH
Softune Workbench provides all the classic tools. In order to use it for
application debug on DevKit16, FUJITSU Monitor Debugger must be installed
in Main board FLASH to establish communication between PC and the
debugged target application.
PROCESSOR EXPERT(TM)
Processor Expert(TM) provides its own workbench
including debugger. For the program compilation it uses
Softune tools – compiler, assembler, linker- as command
line tasks.
This workbench features component oriented application
creation, CPU knowledge system, components library,
design time constraints to verify CPU and other HW
settings before use it in runtime.
Main task of Processor Expert(TM) is to manage CPU and other HW resources
and to allow you virtual prototyping and design.
Code generation from beans, ability to maintain user and generated code, event
based structure significantly reduce effort in comparison with classic tools.
Component = bean is the essential encapsulation of functionality. For instance
TimerInt bean encapsulates all CPU resources on appropriate CPU, which are
able to provide timing and hardware interrupt. MB90F543 CPU provides up to
W
hat is Processor
Expert ?
Component oriented
application design
Management of MCU
and Devkit16
resources
Generation of C
sources helps to build
your apps quickly !

13
1313
13
21 such resources, which you can choose using TimerInt property Timer
according to the required timing parameters and accuracy in property Interrupt
period.
Figure: Selecting a CPU timing resource for the TimerInt bean
Figure: Setting the interrupt period of the TimerInt bean
If you need
functionality, you can
choose appropriate
bean and PE offers the
possible MCU resources

14
1414
14
On Processor Expert(TM) beans palette you’ll find many components, which we
call Embedded Beans(TM). This component were selected to cover the most
required functionality usually used for microcontroller applications – from
handling port bit operations, external interrupts, timer modes up to serial
asynchronous/synchronous communications, A/D converter, I2C, CAN and etc.
Bean provides clear interface, which can be controlled by an user in design time
using Beans Inspector. Beans Inspector has several pages for bean properties,
methods and events.
By setting the bean properties, user defines future behavior of the bean in
runtime. PE checks your setting in desing time - including timing and generated
code !
User can also choose which methods will be included in an application, because
they are needed - and which not.
Events, if used, can be raised by interrupt from HW resource (timer, SIO,..) or
by pure software reason (overflow,..) in application runtime. You can enable or
disable interrupts using bean methods and define priority for raise of event and
for executing its ISR – Interrupt Service Routine. HW ISR provided by bean
handles reason of interrupt. If the interrupt vector is shared by two (or more)
resources then this ISR provides identification of resource. Then user is notified
by calling of user event handling code.
CPU bean has special meaning - you can use more instances of it, and each of
these instances can hold different setting. This makes the application design time
with Processor Expert and any microcontroller very short. First choose and
setup CPU bean, add another ones, modify their properties, select methods and
events and choose Codesign. Processor Expert generates all code from beans
according your settings, which is well commented. You can choose View | View
All Generated Sources and in viewer, the CPU module with resources
initialization part and other beans modules appears.
This is of course only part of application code, which was created by „virtual
application engineer“- Processor Expert(TM) CPU knowledge system and
solution bank. Solution bank is created from hand written and tested code
optimized for efficiency. This solutions are selected and configured in code
generation process.
Choose View | View/Edit Main&Event code and two modules appear in editor
– pregenerated main and event module. Enter your code to desired events,
provide main code, add existing sources – and build application using classic
tools (select Tools | Make from the main menu) – compiler, assembler, load to
DevKit16, debug it before final burn-in – these are typical steps when working
with Processor Expert(TM).
Another beans help you to include pictures, files, sounds, stringlists to your
application very quickly.
Bean properties,
methods and events
Use events to build ISRs
fast
CPU bean
PE as a virtual
application engineer
Share your code with
your virtual application
engineer !
Pictures, files and
sounds in your
application

15
1515
15
HW resources on Main board for instance PC-AT Keyboard interface
encapsulation are also „beaned“ .
Other beans could be obtained on www.processorexpert.com/devkit16 or
created by yourself from your existing sources, for instance FFT (Fast Fourier
transform). Another beans can accumulate other existing beans – they can
inherit their properties, methods events.
Imagine that you want share a bean with other developers. And such a bean can
drive LED segment display. Because it is used often for different hardware
configurations – on different CPU pins – then it must be portable and indepedent
on CPU resources – port pins on which it is connected. To refresh it a timer is
needed, also portable.
Such beans are called SW beans. SW beans can be pure SW beans (FFT) or can
inherit even multiple beans, which encapsulate HW resources. The advantage is
independence on physical layer, portability and share of once written and tested
code.
For our example we simply choose BitIO, BitsIO or ByteIO and TimerInt beans
from delivered bean library as parents. New LED display bean will provide
properties of bean reference type for this bean. This allows in design time for
new bean access its parents properties and define physical connection pins or
timer resources. Additionally new bean will have its own properties and
methods. Methods can be constructed using parent beans methods. The same
situation is with events.
Don’t be afraid about the complexity of this – simply choose from Processor
Expert Tools menu Beans Wizard tool, which arranges all for you. You should
only enter the code of methods and events, save new bean and install it on Beans
Palette or share it with others. The interested beans could be offered for other
users using DevKit16 support WEB site.
Additional information about Processor Expert and beans libraries please find in
its online help or in www.processorexpert.com site.
SW INSTALLATION
Each software – Softune and Processor Expert(TM) has its own installation. You
should find 16bit tools full installation on FUJITSU Softune CD and run its
setup.exe. On DevKit16 CD choose directory “Install” and run setup.exe.
Installation will navigate you, for documentation reading you need to install also
Acrobat Reader and Microsoft compressed help support.
Design your own beans
and share it with others
Beans Wizard
Build your own beans
from other ones using
inheritance

16
1616
16
GET IT RUNNING
After successful installation, switch the power supply of DevKit16 on, check the
red power LED on the CPU and connection with PC. When the Devkit16 with
its default settings (see fig. 2) is connected to the PC, it is held in the reset state –
the LED diode D11 is shining until the debug session in Softune is started.
Before the next step you can try to move the J1 jumper to the 2-3 position, so the
D11 goes off and on the Mainboard LED display, the Fujitsu Monitor Debugger
version number in the form of “X.X.” appears (the current version number in
the time of writing this manual was “1.3.”). Then you can put the J1 back to
1–2 position.
If the version number is not in the form of “X.X.” (the last point is important),
it means that there is the Processor Expert kernel or other program burned in the
Mainboard FLASH. In such a case, you must burn the Fujitsu debug monitor
into the Devkit16 - please refer to the chapter 6 (Flash It), paragraph “How to
burn Fujitsu debug monitor”.
DESIGN APPLICATION WITH PROCESSOR
EXPERT(TM) AND RUN IT USING SOFTUNE
WORKBENCH MONITOR DEBUGGER
Run Processor Expert(TM), choose Open existing project from startup screen and
select under PE\Projects\Demo.Leds\LEDS.pe. Please choose Options |
Environment and Project Options. This opens Options window on
Environment options page. Uncheck item „Succesful Make and Build
automatically starts PE debug“ and confirm OK.
Choose Tools | Build or Ctrl-B. After successful Build choose Tools | Fujitsu
Softune Workbench (default hot key F11). After Softune Workbench starts,
you could notice that the same project is open in Softune.
RUN FIRST APPLICATION
USING SOFTUNE WORKBENCH AND FUJITSU
MONITOR DEBUGGER
In Softune Workbench, build the project using Ctrl-F8. Project settings for
debugger are prepared for you, the only thing you must set up are the debug
communication properties - in Project | Setup, page Debug – select the setup
name from the Build setup name list, in the next dialogs, choose “Monitor
debugger”, COM1 or COM2, 9600Bd, Auto load …, and click Finish.
Note: in the Processor Expert™ installation, there is also the 38400 Bd version
of the Fujitsu debug monitor available, but the 9600 Bd version is burned to the
Devkit16 by default.
After setting the communication properties, select Debug | Start Debug and
wait till debugging session is started. If it went OK, you should see window with

17
1717
17
Start.asm with marked position of Program Counter. Run program using F5
shortcut key. You should see diagnostic LEDs blinking in various manner.
If there is a communication error message, please check your connection with
the DevKit16. For further information please check Softune documentation and
chapter What to do if...
RUN FIRST APPLICATION USING PROCESSOR
EXPERT(TM)AND ITS DEBUGGER&KERNEL
To use debug capabilities of Processor Expert(TM) for 16LX family including
high speed (115200Bd) download, we need to burn Processor Expert(TM) Debug
Kernel to DevKit16 Main board FLASH instead of Fujitsu Monitor Debugger.
In Processor Expert(TM) choose Tools | Burn PE Debug Kernel IR. This will
run DevKit16 FLASH Programming tool with correct parameters in Auto
program mode. For more detailed description about burning the PE debug
kernel, refer to chapter 6, section “How to burn the PE debug kernel”).
You should change the Main board System Configuration DIP switch as
follows:
•setting for CPU FLASH programming mode
•Set the J1 jumper to the 2-3 position
Note: the CPU FLASH is not being programmed, this mode is used only to
access Main board FLASH
Then, press OK. If everything went OK, the message box „Run burned
program?“ appears. Then choose button „Don’t Run“. For troubleshooting
please check the DevKit16 FLASH Programming Tool chapter or How to...
one.
Note, that you should use similar way to burn the FUJITSU Softune
Monitor Debugger back to Main board FLASH. In Processor Expert
menu choose Tools | Burn Fujitsu monitor to Ext.Flash
1 2 3 4 5 6 7 8
ON

18
1818
18
Now you should change Main board System configuration DIP switch as
follows:
•setting for CPU external bus mode, FLASH in UMB
Now, load the „Demo.LEDs“ project in Processor Expert. Check if there is no
reported error after project loads, press F9 shortcut key, which starts codesign,
builds the project and starts the debugger. You should see the disassembler
window with Start.asm and actual PC position after start. Choose Debug | Run
or Ctrl-F9 to run program.
If it is running correctly you should see demo with diagnostic LEDs on Main
board.
If there is an error – Processor Expert provides approach to detect it. Double
click on error message(s) inside error window. If the reason is a component,
you’ll be navigated to it by selecting bean in Project panel and opening its Bean
Inspector. Item related to error is marked by red color, so related Inspector’s
page and its item could be located.
The usual problem appears when you install Softune to another then
recommended default path.
Error: Application not found: xxxxxx is reported.
Path to Softune tools should be correctly set - see Project panel CPUs, double
click on active CPU icon, Beans Inspector | Compiler, property Tools
Directory.
More please find inside Processor Expert(TM) Help.
1 2 3 4 5 6 7 8
ON
Table of contents
Other Fujitsu Tools manuals