REKLAMA

Fujitsu_FlashKit_Programmer_v2_9.rar

MB90F546GS - Jak zaprogramować, pytanie początkującego.

Dla potomnych http://www.fujitsu.com/downloads/MICRO/fma/pdfmcu/PCW16e.pdf .................. Tutaj schemat programatora i soft do programowania.


Pobierz plik - link do postu
  • Fujitsu_FlashKit_Programmer_v2_9.rar
    • sMB90F553_Verify.mhx
    • aMB90F594.mhx
    • sMB90F523_Verify.mhx
    • sMB90F543.mhx
    • aMB90F562.mhx
    • aMB91F109.mhx
    • sMB90F548.mhx
    • sMB90F598_Verify.mhx
    • sMB90F497.mhx
    • aMB90F583.mhx
    • aMB90F553.mhx
    • Serial.cfg
    • sMB90F549.mhx
    • sMB89P935.mhx
    • sMB90F523.mhx
    • sMB90F553.mhx
    • sMB90F562_Verify.mhx
    • aMB90F548.mhx
    • sMB90F549_Verify.mhx
    • sMB91F109.mhx
    • sMB90F594_Verify.mhx
    • aMB90F543.mhx
    • sMB90F583.mhx
    • aMB90F549.mhx
    • aMB90F574.mhx
    • sMB90F428_Verify.mhx
    • aMB90F591.mhx
    • aMB90F568.mhx
    • sMB90F583_Verify.mhx
    • sMB90F548_Verify.mhx
    • aMB90F598.mhx
    • sMB90F591_Verify.mhx
    • sMB90F497_Verify.mhx
    • sMB90F574_Verify.mhx
    • sMB90F574.mhx
    • aMB89P935.mhx
    • sMB90F568_Verify.mhx
    • sMB90F562.mhx
    • aMB91F361.mhx
    • aMB90F497.mhx
    • sMB90F428.mhx
    • sMB90F591.mhx
    • sMB90F594.mhx
    • sMB91F109_Verify.mhx
    • sMB90F58_Verify.mhx
    • sMB90F598.mhx
    • aMB90F428.mhx
    • sMB90F568.mhx
    • sMB90F543_Verify.mhx


Fujitsu_FlashKit_Programmer_v2_9.rar > Warranty.txt

Warranty and Disclaimer


To the maximum extent permitted by applicable law, Fujitsu Mikroelektronik GmbH restricts its warranties and its liability for the FlashKit and all its deliverables (eg. software, application examples, target boards, evaluation boards, 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, Fujitsu Mikroelektronik GmbH disclaims all warranties and liabilities for the performance of the Product and any consequential damages in cases of unauthorised decompiling and/or reverse engineering and/or disassembling. Note, the FlashKit and all its deliverables are intended and must only be used in an evaluation laboratory environment.

1. Fujitsu Mikroelektronik 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 Mikroelektronik 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 Mikroelektronik GmbH´s entire liability and the customer´s exclusive remedy shall be, at Fujitsu Mikroelektronik 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 Mikroelektronik 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 Mikroelektronik GmbH, or abuse or misapplication attributable to the customer or any other third party not relating to Fujitsu Mikroelektronik GmbH.

3. To the maximum extent permitted by applicable law Fujitsu Mikroelektronik 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 Mikroelektronik GmbH´s and its suppliers´ liability is restricted to intention and gross negligence.

NO LIABILITY FOR CONSEQUENTIAL DAMAGES

To the maximum extent permitted by applicable law, in no event shall Fujitsu Mikroelektronik 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.


Fujitsu_FlashKit_Programmer_v2_9.rar > SerProg.pdf

2.9
Version

FUJITSU MICROELECTRONICS EUROPE

Development tools for 8L, 16LX and FR Families

Flash-Kit
Serial
Programmer
UNIS, spol. s r. o.,
Jundrovská 33, 624 00 Brno

Warranty and Disclaimer
To the maximum extent permitted by applicable law, Fujitsu Mikroelektronik GmbH restricts its
warranties and its liability for the FlashKit and all its deliverables (eg. software, application
examples, target boards, evaluation boards, 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, Fujitsu Mikroelektronik GmbH disclaims all
warranties and liabilities for the performance of the Product and any consequential damages in
cases of unauthorised decompiling and/or reverse engineering and/or disassembling. Note, the
FlashKit and all its deliverables are intended and must only be used in an evaluation
laboratory environment.
1.

Fujitsu Mikroelektronik 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
Mikroelektronik 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 Mikroelektronik GmbH´s entire liability
and the customer´s exclusive remedy shall be, at Fujitsu Mikroelektronik 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 Mikroelektronik 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 Mikroelektronik GmbH, or abuse or misapplication attributable
to the customer or any other third party not relating to Fujitsu Mikroelektronik GmbH.

3.

To the maximum extent permitted by applicable law Fujitsu Mikroelektronik 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 Mikroelektronik GmbH´s
and its suppliers´ liability is 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.

0 Contents
0

Contents ...................................................................... 1

1

Introduction.................................................................. 1
Asynchronous programming mode ...................................................................................1
Synchronous programming mode .....................................................................................2
Serial programmer Features ..............................................................................................3
Technical Specification of the box ....................................................................................3

2

Installation ................................................................... 4
The " printer driver on LPT port " issue..............................................................................4
Minimum requirements to PC ...........................................................................................4
Known problems and limitations.......................................................................................5
Flashkit serial programmer directory overview ................................................................5
Uninstallation ....................................................................................................................6
Default option settings.......................................................................................................7

3

Serial programmer PC software .................................. 8
Description of controls ......................................................................................................9
Meaning of buttons and status lines ..................................................................................9
Main menu.......................................................................................................................10
Options and settings ........................................................................................................11
Editing the memory .........................................................................................................15
Command line parameters...............................................................................................16
Using the programmer in batch files ...............................................................................21
Configuration file for serial programmer ........................................................................24

4

Serial Programmer box.............................................. 26
Front panel.......................................................................................................................26
Rear panel........................................................................................................................29

5

Firmware update ....................................................... 31

6

Programming the Devkit16 ........................................ 33
Programming Devkit16 in asynchronous mode ..............................................................33
Programming Devkit16 in synchronous mode ................................................................34

7

Supported CPUs ....................................................... 35

8

Customer registration ................................................ 41

F2MC-16LX family .........................................................................................................35
FR family – MB91F109 ..................................................................................................38
FR family – MB91F361 ..................................................................................................39
F2MC-8L family ..............................................................................................................40

FLASHKIT serial programmer registration form ...........................................................41

Contents

1

9

Trouble shooting........................................................ 42

10 Revisions and changes ............................................. 43
Appendix A...................................................................... 45
11 Timing diagrams........................................................ 45
12 Communication protocols (16LX family) .................... 47
Bi-ROM protocol ............................................................................................................47
Communication with kernel – asynchronous mode ........................................................51
Communication with kernel - synchronous mode...........................................................55

13 Communication protocols (8L CPUs) ....................... 60
Communication with kernel – asynchronous mode ........................................................60
Communication with kernel – synchronous mode ..........................................................64

14 Communication protocols (FR CPUs) ...................... 65
Communication with kernel – asynchronous mode ........................................................65
Communication with kernel – synchronous mode ..........................................................65

15 CRC checksum algorithms ........................................ 66
Appendix B...................................................................... 69
Schematics ..................................................................... 69
General design rules for user target boards .....................................................................69
Recommended circuit for asynchronous mode ...............................................................70
Target serial interface schematics for 16LX and FR30...................................................71
Workaround solution for “Pulldown on MD2” issue ......................................................76
Schematics for MB89P935 programming .......................................................................74

2

Contents

Chapter

1

1 Introduction
The Flash-kit serial programmer solution allows to program the Fujitsu CPUs in both
synchronous and asynchronous programming modes.

Asynchronous programming mode
In the asynchronous programming mode, the CPU is able to communicate with PC through
standard RS232 interface. So, if the RS232 line interface is provided on the user target board
and the target board CPU supports the asynchronous programming mode, no additional HW is
needed for programming the CPU – the only thing you have to do is to connect your board to
the PC. The only disadvantage of this mode is the limited programming speed – with most of
the 16LX family CPUs, the communication is running on 38400 Bd (with 16 MHz crystal –
for details, please check Chapter 7).

PC

User target board

Figure 1: Asynchronous programming mode configuration
Note: If you want to use the asynchronous programming mode with your board, please
include the „Serial interface logic recommendation“ schematic, which can be found in the
Appendix of this manual, into your board schematics. This recommendation ensures
compatibility of your board with the serial programming software.

Introduction

1

Synchronous programming mode
For the synchronous programming mode, the serial programmer box must be used. Basically,
this box converts the data from RS232 port or parallel port to synchronous data stream that is
fed into the target system. No additional HW must be included on the user target board – the
serial programmer box connects directly to the dedicated CPU pins. The biggest advantage of
this mode is the high-speed communication – when using the PC parallel port, the effective
communication speed is as high as 340 kbit/s.

Serial programmer box
PC

User target board

Figure 2: Synchronous programming mode configuration
Note: If you want to use the synchronous serial programming mode with your board, please
include one of the following connectors into your board schematics (the one on the left side is
for a 16LX family CPU, the one on the right side is for the target board with a MB89P935
CPU). More details about the recommended schematics can be found in Appendix B.
Warning: Before starting the design of your target board, please read the paragraph “General
design rules for user target boards” in Appendix B carefully!

*P00 1

2 P01**

MD0 3

4 MD2

/RST 5

6 SIN

SOT 7

8 SCK

VCC 9

P37 1

2 P40

MOD0 3

4 P41

10 GND

/RST 5
SOT (P31) 7

6 SIN (P32)
8 SCK (P30)

VCC 9

*P80 for MB90F47x
**P81 for MB90F47x
SIN, SOT, SCK used corresponding to
chapter 7

2

12 P43

NC 13

16LX CPU

10 GND

P42 11

14 MOD1 (+9V)

MB89P935 CPU
The programming cable
connection for MB89P935
can be found in chapter 4,
page 25

Introduction

Serial programmer Features


Supported CPUs: 8L family, 16LX family and FR families



The serial programmer SW supports both synchronous and asynchronous programming



The synchronous programming is supported by programmer box



The box can be connected to the PC using both serial or parallel port



The box to target communication speed is 500kbit/s



Batch mode programming (interactive or non-interactive) is provided by the serial
programmer SW



The box firmware can be updated easily using the serial port



Support for both 5V and 3V CPUs is provided by the box



Box can provide supply to the target system

Technical Specification of the box


Dimension: 126mm x 90mm x 22 mm



Weight: 0.3 kg



Operational temperature range: 0-55°C, storage temperature range: 0-70°C



Power supply voltage: 9V
The polarity of the power supply is arbitrary.
The input voltage is restricted to 9VDC. Higher input voltages can permanently
damage the box, or the power supply and lead to malfunction.



Power supply current (with no target board connected): 100 mA



Power supply current (with target board connected): 200 mA max

We recommend to connect a dedicated power supply to the target board.
Only this way you can prevent the programmer box power supply circuitry from being
overloaded incidentally. However, if you decide to use the separate power supply for both the
programmer box and your target board, uncheck the “Supply target” option in the main
window of the serial programmer.

Introduction

3

Chapter

2

2 Installation
The installation of the Serial Programmer software is easy. Just run the SETUP.EXE program
from the installation CD and you will be guided through the rest of the installation process
automatically.
Important note: In Windows NT/2000, the Flashkit serial programmer must be installed by
user who is logged into the system as an administrator. After instalation, the administrator
also have to run the Flashkit serial programmer for the first time. This ensures the correct
installation of the parallel port drivers into the system.

The " printer driver on LPT port " issue
In Windows NT/2000, it is not possible to have a printer driver set for the same LPT port,
which is used by Flashkit SW.
If a printer driver is set for printing on the same LPT port, which is selected for synchronous
communication via LPT in Flash-kit, the " Error opening device (Reason:error while opening
port/device) " message will appear everytime when " Connect " function is invoked.
Solution:
After installing the Flashkit programmer SW, go to the Windows Start menu and select
" Settings | Printers " . For every printer installed on your computer, do the following steps:
1. right-click on the printer and select " Properties "
2. in the " Properties " dialog, select tab " Ports "
3. if the printer uses the same LPT port that you want to use in Flash-kit programmer,
select another LPT port for the printer. If your computer has only one LPT port, you
must select the port " FILE: " ; all your printer outputs will be then redirected to a file.

Minimum requirements to PC







4

Windows 95/98/NT 4.0/2000
32MB RAM (64MB recommended)
one standard serial port for communication with the target system or the programmer
box
one standard parallel port for high-speed communication with the target system via
programmer box
Screen resolution 800x600
ComCtl32.dll version 4.70 or higher

Installation

Known problems and limitations
If you have problems with the parallel port communication functionality, please check the
following things:
1. Make sure the parallel port type is set to standard " SPP " in BIOS (equivalent names
for this are " AT " or " Output only " on some machines)
2. On some machines, even if you select " SPP " parallel port type, Windows keep using
the ECP port driver. In this case, you must change the driver to standard " Printer port " .
The port driver can be changed by the following steps: In the Windows " Start menu " ,
select " Settings | Control Panel " . In Control panel, select " System " . In the " System
Properties " Windows, select tab " Device Manager " . Expand the item " Ports " , double
click on the " ECP port " item to invoke the " ECP Port Properties " Window. Here,
select the " Driver " tab. Click on the " Update Driver " button and in the " Update Device
Driver " Wizard, select the " Display a list of all the drivers in a specific location... "
In the follwing dialog, select the " Show all hardware " option and from the " (Standard
port types) " category, select the " Printer Port " item. Ignore the warning messages and
just finish the driver update - for this, you may need the Windows Installation CDROM (but often, the necessary driver file can be found in the Windows SYSTEM
directory).
Note: These steps can be done only in Win9x/2000. NT have a different procedure for
changing the printer port driver. However, we have never experienced problems with
the ECP driver in WinNT
3. On some machines, Windows 9x sometimes set the parallel port name to " LPT2 " , even
if you have only one parallel port. Make sure that in the " System properties " (Start
menu | Settings | Control panel | System), the printer port is displayed as " Printer Port
(LPT1) " . If you have " Printer Port (LPT2) " there, you must set the Flashkit parallel
port setting to " LPT2 " as well.
4. In WinNT/2000, make sure there is no printer driver set for printing on the LPT port
that you want to use with Flashkit (see installation notes in this file)
5. In WinNT/2000, make sure the Flashkit was installed properly with the Administrator
rights (see installation notes)
If you fail to find a solution for parallel port communication problems, set the " Generate
Report File " option in the Flashkit SW to " yes " . Then select the Synchronous communication
via LPT option and press " Connect " . Then, send the generated " Log file " to the Flashkit
support at microcontroller_info@fme.fujitsu.com.

Flashkit serial programmer directory overview
Installed Flash-kit contains the following files and directories:
Directories:
• Kernels - includes configuration file and kernel binary files.
Files:





SerProg.exe : The Flash-kit executable
SerProg.ini : The Flash-kit initialization file
SerProg.pdf : The Flash-kit manual
RegistrationForm.rtf : An editable copy of the customer registration form, which can
be found in this manual (chapter " Customer registration " ).

Installation

5




















Firmware_v17.mhx : Current firmware for the programmer box (for information about
firmware updates, check the " Firmware update " chapter of the manual)
myoptions.abc : command line option file, common for all example *.bat files
Example1.bat : Read FLASH memory from MB90F543 from addr FF0000 to FF0FFF
(length 1000) and save it into file test.bin. The CPU is connected via serial cable
(asynchronous communication) to COM1, the CPUfrequency is 4MHz.
Example2.bat : The task is the same as in Example 1 - Read FLASH 1. We have only
one CPU (MB90F543) with crystal 4MHz connected to PC with serial cable to COM1,
so we can put this values into the options file MyOptions.abc and use this
configuration many times.
Example3.bat : Now we have got the (for us important) content of the FLASH (from
previous examples). And now we want to copy this into another CPU. We replace the
CPU board and run this batch file:
Example4.bat : We want only clear the FLASH in the CPU.
Example5.bat : We try to clear sectors 0 and 2.
Example6.bat : We have an application compiled in *.mhx, *.ehx or *.ihx file, e.g.
TEST.MHX. We want to clear used sectors (by the program), burn it into the FLASH
and verify if the FLASH really contain our code. The compiled file is stored in
directory C:\TEST.
Example7.bat : We have an application compiled in *.mhx, *.ehx or *.ihx file, e.g.
TEST.MHX. The FLASH is cleared, we want to burn code into the FLASH and verify
if the FLASH really contain our code. The compiled file is stored in directory
C:\TEST.
Example8.bat : We want to be only sure that FLASH contain our last code. We don’t
need to programm FLASH again, we can compare user program and FLASH. We will
compare the file TEST.MHX stored in directory C:\TEST with the FLASH.
Multiflash.bat : Example of batch file for programming multiple CPUs with retrieving
status
Test.bin : Binary file used in Example3.bat
UninstIO.exe:
UninstMem.exe:
Uninst.isu : These files are needed for proper uninstallation of Serial programmer
Windows paraller port driver

Uninstallation
From " Control Panel " (Start | Settings | Control Panel) run " Add/Remove programs " . Select
" Flashkit serial programmer " from the list and click on the button " Add/Remove " . Flashkit
will be automatically removed from your computer.

6

Installation

Default option settings
After the installation, the programmer is ready for use with the MB90F543 in the
asynchronous mode. The other options are set to the following values:




Frequency = 4MHz (this is the frequency of crystal used on the target board)
COM port = COM1, LPT port = LPT1
Supply target CPU = ON

The options (Main menu | Settings) are set this way:
1. Tab „CPU reset & mode“
• Reset timing = 600 ms
• Reset generated by COM port = ON
• CPU reset – COM port option =RTS line for reset, DTR for mode select
• Reset line – logic level = low
• CPU mode line – logic level = low
2. Tab „Synchronous mode“
• Comparing – synchronous mode = Full compare
• CPU Operating Mode after Auto Program = Programming mode
• Trigger pulses = don’t generate
3. Tab „Common“
• Connect included in Auto Program command = OFF
• Auto Program – Erase only used sectors = ON
• Blank check after command „Connect“ = ON
• Check user file for forbidden addresses = ON
• Generate report file = OFF
• Report file name = {installation path}\Report.log
• Number of trials for connect to target CPU = 5
• Path to binary files = {installation path}\Kernels\
If the „Connect“ function fails although your target board is connected properly to the PC and
to the power supply, please check the „Reset generated by COM port“ option. In the
asynchronous mode, it must be ON. Also check the „CPU reset – COM port option“, „Reset
line“ and „CPU mode line“ settings – they must correspond to the hardware of your board.

Installation

7

Chapter

3

3 Serial programmer PC
software
The Serial Programmer software has two parts: the PC front-end and the communication &
FLASH programming kernel, which is downloaded into the user target board CPU internal
RAM everytime the „Connect“ function is invoked in the PC-frontend. In this chapter, only
the PC front-end software is described.
After starting the serial programmer, a window similar to the following will appear:

8

Serial programmer PC software

Description of controls











Select communication channel – here you can select, which port will be used for
communication with the user board or the programmer box.
CPU – select the target CPU
Frequency – Select the actual external clock frequency of the CPU. The relationship
between this frequency and the communication baud rates used for the programmer
operations is shown in the tables with UART interface specifications in Chapter 6 –
Supported CPUs.
Speed – the communication speed (baud rate), which will be used when the
“Asynchronous - COM port” communication channel is selected. If the selected CPU
supports changing the PLL setting in the asynchronous mode, the “Speed” list will offer
several baud rates.
COM Port – Select the COM port where you have a serial cable for communication
LPT Port – Select the LPT port where you have a parallel cable for communication
Note: when choosing the crystal frequency, remember that the maximum used external
frequency must not exceed the specifications in the corresponding microcontroller
datasheet.
Supply target CPU – if the serial programmer box is used, this option can be checked if
the user wishes to supply his target board from the programmer box.

Meaning of buttons and status lines


Status lines
• User file – Displays the currently selected user file
• Action – Displays current action
• Status - Displays status of the last action



Buttons – these actions are also in Main menu (see below)
• Open file – opens file in Motorola S-format or Intel format
• Connect - Downloads the communication & FLASH programming kernel into RAM.
Checkbox appears depending on " Reset the CPU " settings.
• Read and Compare - Compares data from the currently opened user file with the data
in the FLASH memory. If a difference is found, user is informed about it.
• Write file – Writes the user program into the FLASH memory.
• Auto program – This button invokes the „Erase blocks“- „Write file“ and „Read &
compare“ functions. It will erase only those blocks of FLASH memory, which aren‘t
blank and which are used by the user file. If the “Connect” function wasn’t invoked
previously, it is invoked too. After the FLASH is written and verified, the target CPU
mode is changed to single chip mode and the CPU is reset, so the user code starts
running.
• Erase chip – Erases whole FLASH
• Erase blocks – erases only selected sectors.
• Blank check – checks if the sectors are blank (erased).

Serial programmer PC software

9



Lock FLASH – This function is enabled only if the selected CPU has the code
security feature. Locking the FLASH disables reading from the FLASH – the value
0FFH is read from all FLASH addresses. If the FLASH is locked, it can be unlocked
only by the “Erase whole” function.
Note: The FLASH is not really locked until the next CPU reset! So if you lock the
FLASH, you will be still able to work with it normally, until you reset the CPU.

Main menu









10

File
• Open file – opens file in Motorola S-format or Intel format
• Open binary file – opens any binary file. You are prompted for specifying the
destination FLASH memory address where the binary file will be burned to.
• Save memory – displays dialog where you specify the address and the length of the
memory, which will be saved into the disk in binary format. Then you must select the
file name and its location.
• Read and Compare - Compares data in Motorola S-Record/Intel hex file and data in
FLASH memory. If a difference is found, user is informed about it.
• Write file – Writes the user program into the FLASH memory.
• Auto program - It encapsulates the buttons „Erase blocks“, „Write file“ and „Read &
compare“. It will erase only those blocks of FLASH memory, which aren‘t blank and
which are used. If the “Connect” function wasn’t invoked previously, it is invoked too.
After the FLASH is written and verified, the target CPU mode is changed to single
chip mode and the CPU is reset, so the user code starts running.
• Exit – closes the Serial programmer
Edit
• Edit memory – displays dialog where you specify the address and the length of the
memory, which will be edited. For more detailed description of this function see the
„Editing memory“ paragraph.
• Show file information – displays window where the information about used FLASH
memory is displayed.
FLASH commands
• Erase chip – Erases whole FLASH
• Erase blocks – erases only selected sectors.
• Blank check – checks if the sectors are blank (erased).
• Lock FLASH – Locks the FLASH – access to the FLASH is restricted (enabled only
if the selected CPU supports this feature).
Options
• Settings – displays dialog box with settings of Serial Programmer. See chapter
Options & Settings.
Help
• Contents – Displays help file SerProg.pdf, which should be stored in the same
directory as the Serial Programmer.
• About – displays the About box
• Firmware version – if the box is connected to the PC, this function displays the
version number of the programmer box firmware. If the box is not connected to the PC
or is not working properly, the firmware version is displayed as “unknown”.

Serial programmer PC software

Options and settings


Page CPU reset & mode
For the asynchronous serial programming mode, the RS232 lines DTR and RTS can
optionally be used to reset the MCU and to switch the operation mode of the MCU
automatically. The “CPU reset & mode” page is used to configure these lines for the
desired mode of operation:







Reset timing – duration of the reset impulse, generated on the DTR line for resetting
target CPU
Reset generated by COM port – for asynchronous programming if the target CPU is
reset by DTR or RTS line (checked) or manually (unchecked)
CPU reset – COM port option – select one of two options of target CPU reseting in
the asynchronous mode. One option is DTR line for reset and RTS for CPU mode
select (default) and the second one is RTS line for reset and DTR for CPU mode
select. Select the right option for your hardware.
Reset line – logic level – the logic level of the reset line (DTR or RTS) when the CPU
is not in reset
CPU mode line - logic level – the logic level of CPU mode line (RTS or DTR) when
the target CPU is in programming mode.

With the settings above, the timing diagram of the RTS line (used for resetting the target
board or programmer box) and DTR line (in asynchronous mode, used for choosing the mode
of the target CPU) is shown on the following figure:

Serial programmer PC software

11

log.“1”

400 ms

Serial programmer run time

RTS

DTR

When the “Connect” button is pressed, the target CPU is reset by the RTS line. In this case,
the length of the reset pulse is 400 ms (this value was chosen in the CPU reset & mode tab of
the Option settings dialog). The DTR line is set to log. “0”, so the CPU mode is set to
“Asynchronous serial programming” mode. The DTR stays low until you exit the serial
programmer SW (note, that log. “0” corresponds to positive voltage on the RS232 line, while
the log “1” to negative voltage).
If you are interested about the detailed timing of the serial programming pins, check the
Apendix A, where the timing diagrams for the CPUs supported by the Serial programmer SW
is included.
Note: For proper function of the reset line function and CPU mode selection line function, the
target board must have the appropriate HW support of these functions. Therefore, when
designing the target board, include the „Recommended circuit for asynchronous mode“ or
“Target serial interface” schematic, that can be found in the appendix of this manual, to your
board schematics.
Recommendation: Although it is possible to use both the RTS and DTR lines for the reset
line or mode selection line functions, for timing reasons it is better to use the RTS line for
reset and DTR line for mode change. However, if you need the RTS line for implementing the
HW flowcontrol (handshaking) on your board, it is more convenient to use the DTR line for
resetting the board.
Note: Some Fujitsu tools (Devkit16, Flash-CAN-100) support currently just the “Reset via
DTR” function. For details, please check the corresponding manuals.
Page Synchronous mode
• Comparing – synchronous mode – when programming in synchronous mode,
comparing (verifying) of the user file (data) can be done by:
1. Full compare – data from target CPU are transferred into the PC and there
compared with user file
2. Only CRC – special kernel is downloaded into the target CPU and only CRCs of
FLASH memory (where the user file is located) are transferred into the CPU. Here
they are compared with locally computed CRC. This method is faster for
comparing big applications or whole FLASH. It can be slower for small
applications.

12

Serial programmer PC software



CPU Operating Mode after Auto Program – these radio buttons can be used for
setting the state of the CPU mode pins after the “Auto Program” operation is finished.
1. Programming mode – after “Auto Program” operation, the states of the CPU mode
pins are not changed. Thus, it is possible to invoke other operations without the
need for the “Connect” operation (which downloads the kernel into the CPU)
2. Tristate - after “Auto Program”, the CPU mode pins are put into the third state
(they are “released”). Thus, the resulting mode depends on the default levels,
which are set by the target board pullups/pulldowns.
3. Single chip mode – the CPU is set to the single chip mode after “Auto Program” is
finished, then it is reset, so the burned application is run.
• Trigger pulses – these radio buttons can be used for switching on the generation of
pulses on the box programming connector PIO1 pin. This feature can be utilized by
16LX target boards that are have an external watchdog, which must be triggered
during the programming not to cause unwanted CPU resets. Note – for 8L family, this
feature is not supported.
1. Don’t generate pulses – the pulses are not generated. This is the default value. If
you don’t need generating the pulses, please leave this option set this way, because
generation of the pulses slows all the programming operations down a little bit
2. Generate pulses with period ... ms – the pulses are generated with the chosen
period

Serial programmer PC software

13



Page Common
• Connect included in Auto Program command – every Auto Program causes
connection process. Useful when programming more CPUs.
• Auto Program - Erase only used sectors – erases only used sectors by user program.
Other sectors are unchanged.
• Blank check after command " Connect " – every command „Connect“ causes
command „Blank check“ of the FLASH.
• Check user file for forbidden addresses - Some CPUs have an area in the FLASH
memory whose rewriting may cause preventing from further reading/programming of
the FLASH. Recommended value is checked. If it is enabled and the user program
contains data for these areas, user can choose if the data will be filtered or not.

• Generate report file – creates file Report.log with every step of programming.
Useful when there are some problem with Serial Programmer. It can help developers
for finding the problems out. File is stored in the directory where the Serial
Programmer is installed.
• Report filename – filename include the absolute path where the report file will be
saved.
• Number of trials for connects to target CPU - set the number of times the
programmer SW tries to connect with the target CPU. Minimal value is 2,
recommended value is between 5 and 10.
• Path to binary files – path where the binary files (ie. kernels) are stored.
Remark: All settings in dialog Options are stored in the windows system directory. The name
of the file is SerProg.INI.

14

Serial programmer PC software

Editing the memory
The memory edit function serves for manual changes of the FLASH memory content. You
can modify both erased cells (cells with value 0FFH) or already programmed memory cells. If
you change the erased cells only during your editing, these cells are programmed
immediately. But if you change a cell which has been programmed already (its value is
different from FF), then the modified FLASH sector must be loaded into the PC memory,
erased and filled with modified content. For this to be done, you have to invoke the „apply
changes” function (by Save changes in menu Memory).
Edit window:

Local menu:


Memory
• Save changes – when you are finished with modifying FLASH memory, apply
changes using this command.
• Fill… - here is the possibility of filling edited memory with certain pattern for
selected part of edited memory. The content of the memory is changed only in PC, to
save the modified memory use command Save changes.

Starting addr – Starting address of filled memory
End addr – Ending address of filled memory
Pattern – With this value the selected range of memory is filled
OK – confirms the the fill
Cancel – no fill is applied

Serial programmer PC software

15

Command line parameters
To be able to use the programmer in a non-interactive mode (e.g., from a batchfile), all the
programmer commands and options can be invoked directly from the command line. The
description of all these command line parameters can be found in the following paragraphs.
Note: all the parameters are case sensitive!
Programming mode
-pm A|SC|SL
• A – Asychronous – via COM port
• SC – Synchronous – via COM port
• SL – Synchronous – via LPT port
Select device
-dev name
where name = name of the CPU (the name specified in configuration file)
External clock frequency
-c clock
where clock = 4, 8 or 16 (MHz)
Speed – communication speed (baud rate) in asynchronous programming mode
-speed speed
where speed = 9600 (e.g.) or any other value supported by the selected CPU
Select PC communication port
-p port
where port = COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3
DTR line reset function and RTS line mode setting function configuration
-reset
In the asynchronous programming mode, this parameter is used for automatic generation of
reset pulse on the DTR line. When this parameter is used, also the -modelevel and –resetlevel
parameters are processed (if present). If the -modelevel or –resetlevel parameters are not
specified on the command line, the values are taken from the controls “Reset line - logic
level“ or “CPU mode select – logic level“ in the Options dialog box.
If the –reset parameter is not used in the asynchronous mode, the user must reset the CPU
manually before running the Serial programmer.
Note: the Serial programmer does not issue any prompt for resetting the CPU !
In the synchronous mode, this parameter is ignored.
- modelevel level
CPU mode select logic level – RTS/DTR (see command resetbyRTS) line is used for setting
programming mode – set logic level of CPU mode line when the target CPU is in
programming mode. The level can be 0 or 1.
This parameter is used only when the –reset command is present and the asynchronous
programming mode is chosen.

16

Serial programmer PC software

- resetlevel level
Reset default level - the logic level of the DTR/RTS (see command resetbyRTS) line when the
CPU is in reset. The level can be 0 or 1.
This parameter is used only when the –reset command is present and the asynchronous
programming mode is chosen.
-resetbyRTS
when using this command the RTS line is used for reset and the DTR line for CPU mode
select. Otherwise (default) RTS is used for CPU mode select and DTR line for reset.
This parameter is used only when the –reset command is present and the asynchronous
programming mode is chosen.
-resettiming value
where value is a decimal number, e.g. 150, which specifies the duration of the reset pulse in
milliseconds.
For asynchronous mode, this parameter is used only when the –reset command is present.
In synchronous mode, this parameter is used all the time.
If this command is not present, the default value from the “Options” dialog box is used.
CPU Operating Mode after Auto Program
-cpumode P|T|S
where meaning is:
• P - Programming mode (default)
• T - Tristate
• S - Single chip mode
This parameter is used only in synchronous mode. If this command is not present, the default
value is prog. In asynchronous mode is ignored. For more details see chapter Options and
settings, Page CPU reset & mode
Watchdog trigger pulses generation
-wd period
where period = 5, or 10 or 50 (the number represents the watchdog trigger pulses period in
ms)
Select path for user data
-d directory
where directory = path to the directory containing the user files (files, that the user wants to
burn into the FLASH)

Serial programmer PC software

17

Select path for binary files used internally by the programmer SW
-b binpath
where binpath = Full path to directory where binary files are (kernels, etc.)
Erase chip
-erase
Note: this command has no parameters
Erase sector
-esec nr
where nr = the number of the sector to be erased. nr can be in the range (0, N), where N is
dependent on the CPU type –e.g., with the MB90F543, the N=4
Command
-comm V, W, WV, A, R
• V – verify
• W – write
• WV – write & verify
• A – auto program (erase, write, verify)
• R – read memory and write the content into the binary file or Motorola-S file (only if the
data file has .mhx extension).
Source data or target file
-data file
where file = name of the file in binary or Motorola S-format. The file must be stored in
directory specified by parameter –d datapath. If the file is binary file, the
parameters binary and starting address must be present.
Binary file
-binary
Defines source data as pure binary file (it is not Motorola S-format nor Intel HEX format).
The serial programmer expects parameter Starting address (see the description of
“-addr”)
Starting address
-addr address
where address is hexadecimal number, e.g. FE0000 – This parameter specifies the starting
address for command read memory (see the description of “-comm R” )
Data length
-len length
where length is hexadecimal number, e.g. A0 or 100000. This parameter specifies the length
of the read memory for command “read memory” (-comm R)
Options file
-o filename
where filename is full path to options file. This file can be used for storing all the previous
parameters, so the user does not have to write them all again when running the programmer
from the command line for several times.

18

Serial programmer PC software

Supply target
-supplytarget value
where the value can be 0 or 1. If the value is 1 then the target CPU is supplied by
programmer, otherwise the target CPU must have own supply.
Generate report file
-report
Specifies to generate a Report.log file, which is recording every step of programming. Useful
when there are some problem with Serial Programmer. It can help developers to fix problems.
File is stored in the directory where the Serial Programmer is installed.
Set the report filename
-reportname filename
The filename is the absolute path where the report will be stored (if the command –report is
present)
Disable filter for dangerous/forbidden memory areas
-disablefilter
Some CPUs have an area in the FLASH memory whose rewriting may prevent further
reading/programming of the FLASH (e.g., the security vector on the MB91F361 – if value
different from FFFFFFFFH is written to it, the CPU will not enter the serial programming
mode anymore). For protecting these areas from unintended writing, the Flashkit programmer
SW filters out all the user data designated to these areas. The filtering can be switched off by
the -disablefilter switch
Note: For every CPU, the memory areas protected by this filter are configured in the
SERIAL.CFG file (section “Forbidden Count”). For details about the SERIAL.CFG file, see
the “Configuration file for serial programmer“ part of this chapter.
Batch files examples:
Example 1 – Read FLASH 1
Read FLASH memory from MB90F543 from addr FF0000 to FF0FFF (length 1000) and save
it into file test.bin. The CPU is connected via serial cable (asynchronous communication) to
COM1, the CPU frequency is 4MHz.
The batch file should contain:
SerProg.exe -dev MB90F543 -pm A -c 4 -p COM1 -comm R -data test.bin
-addr FF0000 -len 1000

Example 2 - Read FLASH 2
The task is the same as in Example 1 – Read FLASH 1.
We have only one CPU (MB90F543) with 4MHz crystal connected to PC via serial cable to
COM1. The values can be put into the options file MyOptions.abc and use this configuration
many times.
The Options file MyOptions.abc should contain:
-dev MB90F543 -pm A -c 4 -p COM1 –reset –resetlevel 1 –modelevel 0

Serial programmer PC software

19

The “–reset –resetlevel 1 –modelevel 0” commands are used for configuration of

the automatically generated reset impulse.
The batch file should contain:
SerProg.exe -o myoptions.abc -comm R -data test.bin -addr FF0000
–len 1000

Example 3 – Auto program binary file into the FLASH
Now we have got the (for us important) content of the FLASH (from previous examples). And
now we want to copy this into another CPU. We replace the CPU board and run this batch
file:
SerProg.exe -o
-addr FF0000

myoptions.abc

-comm

A

-data

test.bin

-binary

Example 4 – Erase whole FLASH
We want only clear the FLASH in the CPU.
The batch file should contain:
SerProg.exe -o myoptions.abc -erase

Example 5 – Erase specified sectors
We try to clear sectors 0 and 2.
The batch file should contain:
SerProg.exe -o myoptions.abc –esec 0 –esec 2

Example 6 – Auto program user code
We have an application compiled in *.mhx, *.ehx or *.ihx file, e.g. TEST.MHX. We want to
clear used sectors (by the program) ,burn the program into FLASH and verify if the FLASH
really contains the code. The compiled file is stored in directory C:\TEST.
The batch file should contain:
SerProg.exe –o myoptions.abc -comm A -data TEST.mhx –d C:\TEST

Example 7 – Write user code and verify
We have an application compiled in *.mhx, *.ehx or *.ihx file, e.g. TEST.MHX. The FLASH
is cleared, we want to burn code into the FLASH and verify if the FLASH really contain our
code. The compiled file is stored in directory C:\TEST.
The batch file should contain:
SerProg.exe –o myoptions.abc -comm WV -data TEST.mhx –d C:\TEST

Example 8 – Verify user code with the FLASH
We want to be only sure that FLASH contain our last code. We don’t need to programm
FLASH again, we can compare user program and FLASH. We will compare the file
TEST.MHX stored in directory C:\TEST with the FLASH.
The batch file should contain:
SerProg.exe –o myoptions.abc -comm V -data TEST.mhx –d C:\TEST

20

Serial programmer PC software

Using the programmer in batch files
Serial programmer batch mode is provided for cases when user interaction is not necessary or
should be minimized, e.g. during final production of the user application. For this purpose, all
the serial programmer functions are accessible by command line switches.
When the Serial programmer execution completes in the command line mode, it returns the
status of the last action to the operating system. The list of all the status values follows:
Value
0
1
2
3
4
5
6
7
8
9
10
11
12
13

Comment
no error
error in option file
wrong input parameter
cannot open file with kernel
cannot open user file
cannot open communication device
cannot connect to target CPU
communication with kernel failed
cannot erase FLASH
error during writing into the FLASH
error during reading from the FLASH
error during verifying data
unknown error
disk I/O error

Example of a batch file testing the return values. This batch file is used for programming of
multiple CPUs.
@echo off
:start
choice start next programming
if errorlevel 2 goto end
echo programming...
start /w SerProg.exe -o myoptions.abc -esec 0 -esec 2
:: Remark: do the ERRORLEVEL checks in descending order
if errorlevel 13 goto error13
if errorlevel 12 goto error12
if errorlevel 11 goto error11
if errorlevel 10 goto error10
if errorlevel 9 goto error9
if errorlevel 8 goto error8
if errorlevel 7 goto error7
if errorlevel 6 goto error6
if errorlevel 5 goto error5
if errorlevel 4 goto error4
if errorlevel 3 goto error3
if errorlevel 2 goto error2
if errorlevel 1 goto error1
if errorlevel 0 goto error0
:: actions according to error-code
:: continue if no error occurred, otherwise display error

Serial programmer PC software

21

echo undef
exit
:error0
echo successful.
goto start
:error1
echo Error : error in option file
goto end
:error2
echo Error : wrong input parameter
goto end
:error3
echo Error : cannot open file with kernel
goto end
:error4
echo Error : cannot open user file
goto end
:error5
echo Error : cannot open communication device
goto end
:error6
echo Error : canot connect to target CPU
goto end
:error7
echo Error : communication with kernel failed
goto end
:error8
echo Error : cannot erase FLASH
goto end
:error9
echo Error : error during writing into the FLASH
goto end
:error10
echo Error : error during reading from the FLASH
goto end
:error11
echo Error : error during verifying data
goto end
:error12
echo Error : unknown error
goto end
:error13

22

Serial programmer PC software

echo Error : Disk IO error
goto end
:end
echo end

Serial programmer PC software

23

Configuration file for serial programmer
In the configuration file Serial.cfg, the description of all the currently supported CPUs is
stored. When the Serial programmer starts, it automatically loads and analyzes this file, which
allows adding new CPUs to the programmer just by modifying this configuration file– it is
just a matter of appending a new [CPU] record to the file and providing a communication
kernel for that CPU.
Warning: Do not modify this file unless you really know what you are doing!
An example of this configuration file is given here:
;comments start with the ‘;’
;all commands are case sensitive
[CPU]
Name= cpu_name

//name of the CPU

AsynchroKernel=filename
//relative path to kernel for asynchr. programming
AsynchroSpeed=speed
//communication speed with asynchro kernel
SynchroKernel=filename
//relative path to kernel for synchronous programming
CRCKernel=filename
//kernel name for CRC computing - for synchronous programming
HardWired=Yes/No
//reset vector - Hardwired yes/no
CPUMode=value
3-P00, 4-P01
3Volts=Yes/No

//bits : 0- MD0, 1-MD2, 2-RESET (when the cpu is not in reset),
//Yes = the CPU is supplied with 3 Volts, No = with 5 Vols

KernelFilterLow=value (HEX)
KernelFilterHigh=value (HEX)

//memory range where the kernel will be in the RAM,
//other adresses will be removed

CPUFreqCount=number //number of possible CPU frequences – decimal number
//repeat it “number”time:
CPUFreq=freq
//Frequency [MHz] decimal (e.g. 4, 8, 16)
Rate=Speed
//comunication speed (4800, 9600, ...) for curent
Frequency
FlashBaseAddr=FE0000
FlashBlocks=number
From=000000
Length=10000

//Start address of the FLASH – HEX value
//number of blocks in FLASH – decimal value
//number-times:
//offset of block from beginning of the FLASH (HEX)
//size of the block (HEX)

BIROMType=value
DownloadToRAM=Command_nr
Run= Command_nr
BIROMResponds=yes/no

//Burn-in-ROM commands
//BIROMType=8, 16, 17 or 32
//command number for Download to RAM (HEX)
//command number for Run programm from RAM (HEX)
//if the BiROM responds or not. Default yes

SecurityFeature=yes/no
SecurityAddr=address
SecurityValue=value

//if the CPU has the security feature
//next 2 lines only if the SecurityFeature=yes
//address (HEX) where to write Value
//Value – one byte (HEX) which locks the FLASH
//Now, here goes the list of areas of memory in the
//FLASH whose programming is forbidden, since their
//programming would prevent further
//reading/programming of the FLASH. Any user data
//designated to these areas will be “filtered out”.
//(Note: for disabling the filtering, the
//commandline switch “-disablefilter” can be used

ForbiddenCount=value

24

//number of dangerous memory blocks (DEC)

Serial programmer PC software

StartAddr=value
EndAddr=value

//repeat these two lines " ForbiddenCount " times
//starting address of the memory area(HEX)
//ending address of the memory area(HEX)

Serial programmer PC software

25

Chapter

4

4 Serial Programmer box
The serial programmer box must be used for the synchronous programming mode. In this
chapter, the basic description of the box can be found.

Front panel

1
2
3
4

5

6

1. Programming connector
This connector is used for connecting the target system. The pinout of this connector is
designed in a way that it allows using a flat ribbon cable with crimp connectors on both ends –
see the following figure for the connection schema of the cable:
Edge Connector 2x7
1
2
3
4
5
6
7
8
9
10
11
12
13
14

26

P00
P01
MD0
MD2
RTX
SIN
SOT
SCLK
VCC
GND
MD1
PIO1
PIO2
+9V

DB15 (Crimp version) Male
1
9
2
10
3
11
4
12
5
13
6
14
7
15
8
VCC

Serial Programmer box

The states of the connector pins during and before/after programming of a 16LX device can
be found in the following table:
DB15
Con.

Edge
con.

pin nr.

pin nr.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

1
3
5
7
9
11
13
2
4
6
8
10
12
14

Pin
Name

State before/after
programming

State during
programming

P00
MD0
RTX
SOT
TVcc
MD1
PIO2
Vcc
P01
MD2
SIN
SCLK
GND
PIO1
Vpgm

Hi-Z (with pull up)
Hi-Z (with pull up)
Hi-Z (with pull up)
Input (with pull-up)
0V / 3V or 5V (*)
Hi-Z (with pull-up)
Input (with pull-up)
+5V
Input (with pull-up)
Hi-Z (with pull up)
Output (level 0)
Output (level 0)
GND
Input (with pull-up)
9V

OC (level 0)
OC (level 0)
OC (level 1 via pull-up)
Input (with pull-up)
3V or 5V (*)
OC (level 1 via pull-up)
Input / Output
+5V
Input / Output
OC (level 1 via pull-up)
Output
Output
GND
Output
9V

State after**
" Auto Program "
command
Hi-Z (with pull-up)
OC (level 1 via pull-up)
OC (level 1 via pull-up)
Input (with pull-up)
3V or 5V (*)
OC (level 1 via pull-up)
OC (level 0)
+5V
Input (with pull-up)
OC (level 0)
Output (level 0)
Output (level 1)
GND
Input (with pull-up)
9V

(*) Output voltage depends on selected device type. Zero voltage level is available on this pin
after reset of the serial programmer box only.
(**) The state after Auto Program depends on the value of the „CPU Operating Mode after
Auto Program“ setting in the options. The values displayed in this table hold for „Single chip
mode“ value of this option.
The Hi-Z state stands for an tristate-output pin in the high impedance state. All the Hi-Z pins
have the 10k pullups on them, so the logic level is defined.
The OC means „open collector“ – the pin is either in the log. „0“ state, or in the weak log. „1“
(high-impedance output with the pullup 10k).
The input pins have a 10k pullup resistor attached to them, so the logic level is defined even
if no device is attached to the programmer.
The Power pins are used for powering the target system (or powering the programmer from
the target system). If the target system is powered from the programmer, the voltage on the
TVCC is dependent on the CPU that is being programmed – if a 3V CPU is chosen, the
TVCC pin is switched to 3V after „Connect“ is pressed. Also, all the other programming
interface output signals are switched to the 3V logic levels.
The Vpgm pin provides a +9V programming voltage needed for programming the 8-bit
MCUs (e.g., the MB89P935). The +9V programming voltage is present always on this pin.
Note: tables with programming connector pin states for other CPU families can be found in
Chapter 7 – Supported CPUs.

Serial Programmer box

27

2. Mode switch
The programmer can operate in two modes:
Standard
SW update – in this mode, the firmware of the programmer can be updated. For the updating
the SW, the asynchronous serial programming mode of the serial programmer can be used –
for details, check the instructions that will come with the new version of the SW.
These modes can be selected by the mode switch. In the leftmost position, the “SW update” mode
is selected. In the rightmost position, the “Standard” mode is selected.
For avoiding an accidental mode switching, the switch is sunk in the box so you must use a
screwdriver when changing the mode.
Note: in fact, the switch has 3 positions. However, the Standard mode is selected when the switch
is in the middle or the third (rightmost) position.
3. Ready/Busy LED
This 2-color LED indicates, whether the programmer is executing some operation, is ready for
operation, or in some other state (e.g., is in the „SW update“ mode):
• LED is green: the programmer is ready for operation
• LED is red: the programmer is busy (is transmitting/receiving data)
• LED is off: the programmer is in a third state – this can be caused by the „SW update“
mode chosen, improper version of the firmware SW or some HW fault inside the box
4. 3V voltage indication
If the user selects a 3V CPU in the serial programmer software, this diode goes ON when the
„Connect“ button is pressed.
Note: The 3V operating voltage is selected by default (after the programmer is switched ON),
so if a 3V board is connected to the programmer, it is not damaged by supply voltage
provided on the box programming connector.
5. 5V voltage indication
If the user selects a 5V CPU in the serial programmer software, this diode goes ON when the
„Connect“ button is pressed.
6. „Power ON“ LED
This LED goes ON when the power voltage is applied to the programmer box.
Remember that the programmer can be powered either by the input power voltage connector,
or from the target board.

28

Serial Programmer box

Rear panel

7
8
9
7. Power supply connector
The power supply can be plugged into this connector. The programmer power supply circuitry
allows using power supply connectors of both polarities (with GND on the shield or in the
center). The voltage of the power supply should be set to 9V.
GND or +9V
+9V or GND

8. RS232 interface connector
This connector is used for connecting the programmer box to the PC serial port. The pinout of
the connector is following:
1: NC
2: RX
3: TX
4: DTR (Reset)
5: GND
6: DSR
7: RTS
8: CTS
9: NC

DB9 Female (crimp version)
1
6
2
7
3
8
4
9
5

DB9 Male (crimp version)
CD
DSR
RXD
RTS
TXD
CTS
DTR
RI
GND

1
6
2
7
3
8
4
9
5

RS232 extension cable schematics

A standard extension cable for 9-pin COM port can be used for connecting the programmer
box to the PC. The cable schematics is on the picture on the right. From this cable, the serial
programmer box requires these signals: RXD, TXD, RTS, CTS, DTR and GND.

Serial Programmer box

29

9. Parallel port connector
This connector is used for connecting the programmer box to the PC parallel port. Pinout of
the connector is following:
1: /STROBE
2: PD0
3: PD1
4: PD2
5: PD3
6: PD4
7: PD5
8: PD6
9: PD7
10: /ACK
11: BUSY
12: PEO
13: SELIN
14: /AFEED
15: /ERROR
16: /INIT
17: /SEL
18-25: GND
A standard parallel port extension cable can be used for connecting the programmer to the PC.
Schematics of the cable is on the following picture:
DB25 Male

DB25 Female
1
14
2
15
3
16
4
17
5
18
6
19
7
20
8
21
9
22
10
23
11
24
12
25
13

/STROBE
/AUTOFD
D0
/ERROR
D1
/INIT
D2
/SEL
D3
GND
D4
GND
D5
GND
D6
GND
D7
GND
/ACK
GND
BUSY
GND
PE
GND
SELIN

1
14
2
15
3
16
4
17
5
18
6
19
7
20
8
21
9
22
10
23
11
24
12
25
13

The serial programmer box requires all the signals from the parallel interface to work
properly.

30

Serial Programmer box

Chapter

5

5 Firmware update
The firmware of the programmer box can be easily updated by the Serial Programmer SW. If
you download the MHX file with the firmware update, you have to do the following steps:
1.
2.
3.
4.

Connect the serial programmer box to the PC COM port using serial cable
Set the „Mode switch“ to „SW update“ mode.
Run the Serial Programmer SW
In the programmer main window, set the „Select communication channel“ option to
„Asynchronous – COM port“, „CPU“ to MB90F543 and „Frequency“ to 8MHz – see the
settings on the following picture:

Firmware update

31

5. In the main menu, select “Options | Setting”. Dialog box with various setting appears. The
settings must be as on the following picture (“Reset timing”: 600 ms, “Reset generated by
COM port”: checked, “CPU reset – COM port option”: DTR line for reset, RTS for mode
select, “Reset line – logic level”: Low, “CPU mode line – logic level”: Low).

6. In the programmer main window, press the „Open file“ button and select the MHX file
containing the firmware update. Note: the current version of the firmware can be found in
the file " Firmware_Vx.MHX " , where „x“ stands for the current firmware version. This file
resides in the directory, where the Flashkit software was installed
7. Press the „Auto program“ button
8. After programming is successfully finished, set the „Mode switch“ back to the „Normal“
mode. Now, your programmer box is ready to use!

32

Firmware update

Chapter

6

6 Programming the Devkit16
In this chapter, you will find information about how to interface the Flashkit serial
programmer with the Devkit16. For informations about programming the other Fujitsu boards,
please check the user’s manuals of these boards.

Programming Devkit16 in asynchronous mode
1. Connect the PC serial (RS232) cable to the USER UART of the Devkit16 Mainboard
2. For setting for CPU FLASH programming mode, change the “Mainboard system
configuration DIP switch” SW1 to the following configuration:
ON

1

2

3

4

5

6

7

8

3. Set the J1 jumper to the 2-3 position (this is for the “Reset line-logic level”=Low setting)
4. In the programmer main window, set the „Select communication channel“ option to
„Asynchronous – COM port“. Then select the „CPU“ and “Frequency” options (in
accordance with the CPU and crystal used on your CPU board), e.g.: MB90F543, 4MHz.
5. In the main menu, select “Options | Setting”. Dialog box with various setting appears. The
settings must be as on the following picture (“Reset timing”: 600 ms, “Reset generated by

Programming the Devkit16

33

COM port”: checked, “CPU reset – COM port option”: DTR line for reset, RTS for mode
select, “Reset line – logic level”: Low, “CPU mode line – logic level”: Low).
6. Open the file with your application (Motorola/Intel HEX or binary)
7. Press the „Connect“ button, then the „Autoprogram“ button
8. Set the “Mainboard system configuration DIP switch” SW1 to the following configuration
to switch the CPU to the single chip mode:
ON

1

2

3

4

5

6

7

8

9. After resetting the board, your application should be running

Programming Devkit16 in synchronous mode
To be able to program the CPU of the Devkit16, you have to disconnect the Devkit16 CPU
board from the mainboard first. This is because the FPGA on the Devkit16 mainboard
controls the MD0-MD2 and P00-P01 lines of the CPU.
After disconnecting the CPU board from the Mainboard, do the following steps:
1. Connect the programmer box by the programming cable to the K7 connector of the
Devkit16 CPU board.
2. Change the CPU board DIP switches SW3 to the following configuration:
ON

1

3.
4.

5.
6.
7.

34

2

3

4

5

6

7

8

This will connect the /RST line of the target programming connector to the CPU /RST pin.
Check the jumpers J7, J8 and J9. These jumpers select, which serial port (UART0 or
UART1) is used for the synchronous programming of the CPU. E.g., with CPU
MB90F543, these jumpers should be set to the “1-2” position.
In the programmer main window, set the „Select communication channel“ option to
„Synchronous – COM port“ (or “Synchronous – LPT port” in case you want to use the
high-speed parallel port communication). Then select the „CPU“ and “Frequency” options
(in accordance with the CPU and crystal used on your CPU board), e.g.: MB90F543,
4MHz. If you wish to use a separate power supply for your CPU board, uncheck the
“Supply target CPU” option.
Open the file with your application (Motorola/Intel HEX or binary)
Press the „Connect“ button, then the „Autoprogram“
After the programming is finished, the target CPU mode is changed automatically to the
single chip mode and the CPU is reset, so your application should start running.

Programming the Devkit16

Chapter

7

7 Supported CPUs
F2MC-16LX family
In the following table, you can find the list of all the supported CPUs from this family and the
pins they use for setting the serial programming mode:
CPU
MB90F428PF
MB90F497PFM
MB90F497GPFM
MB90F523PFV
MB90F543GPF
MB90F543PF
MB90F546GPF
MB90F548PF
MB90F548GPF
MB90F549PF
MB90F553PF
MB90F562PFM
MB90F562BPFM
MB90F568PFM
MB90F574PFV
MB90F583PF
MB90F591PF
MB90F594APF
MB90F598PF

Pin
name
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0
MD 2,1,0

Pin No.
51,50,49
21,20,18
21,20,18
87,88,89
51,50,49
51,50,49
51,50,49
51,50,49
51,50,49
51,50,49
51,50,49
21,20,18
21,20,18
21,20,18
87,88,89
51,50,49
51,50,49
51,50,49
51,50,49

Logic
level
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0
1,1,0

Pin
name
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00
P00

Pin
No.
85
25
25
95
85
85
85
85
85
85
85
25
25
25
95
85
85
85
85

Logic
level
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Pin
name
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01
P01

Pin
No.
86
26
26
96
86
86
86
86
86
86
86
26
26
26
96
86
86
86
86

Logic
level
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**
0*, 1**

* .. asynchronous programming
** .. synchronous programming

Supported CPUs

35

The UART interfaces used for the serial asynchronous programming mode and the CPU pin
numbers are shown in the following table:
CPU type
MB90F428PF
MB90F497GPFM
MB90F497PFM
MB90F523PFV
MB90F543PF
MB90F543GPF
MB90F546GPF
MB90F548PF
MB90F548GPF
MB90F549PF
MB90F553PF
MB90F562BPFM
MB90F562PFM
MB90F568PFM
MB90F574PFV
MB90F583PF
MB90F591PF
MB90F594APF
MB90F598PF

UART
used
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART0
UART1
UART1
UART1
UART0
UART0
UART0
UART0
UART1

SIN
pin

SOT

P01

P00

88
60
60
X
21
21
21
21
21
21
20
14
14
14
9
18
16
16
21

89
62
62
X
24
24
24
24
24
24
19
15
15
15
10
19
14
14
24

86
26
26
96
86
86
86
86
86
86
86
26
26
26
96
86
86
86
86

85
25
25
95
85
85
85
85
85
85
85
25
25
25
95
85
85
85
85

Baud rates* [Bd]
Kernel
Programming
download
4800
9600
4800
9600, 19200, 38400
4800
9600, 19200, 38400
Asynchro mode not supported
4800
9600
4800
9600, 19200, 38400
4800
9600, 19200, 38400
4800
9600
4800
9600, 19200, 38400
4800
9600
4800
9600
4800
9600
4800
9600
4800
9600
4800
9600
4800
9600
4800
9600
4800
9600
4800
9600

*The baud rates are specified for 4 MHz external clock (crystal) frequency. For other clock
frequencies (8 MHz or 16 MHz), the baud rates must be multiplied by factor of 2 or 4.

36

Supported CPUs

The UART interfaces used for the serial synchronous programming mode and the CPU pin
numbers are shown in the following table:
CPU type
MB90F428PF
MB90F497PFM
MB90F497GPFM
MB90F523PFV
MB90F543PF
MB90F543GPF
MB90F546GPF
MB90F548PF
MB90F548GPF
MB90F549PF
MB90F553PF
MB90F562PFM
MB90F562BPFM
MB90F568PFM
MB90F574PFV
MB90F583PF
MB90F591PF
MB90F594APF
MB90F598PF

UART
used
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART1
UART0
UART1
UART1
UART1
UART0
UART0
Serial I/O
Serial I/O
UART1

SIN
pin
88
60
60
11
21
21
21
21
21
21
20
14
14
14
9
18
24
24
21

SOT

SCK

P01

P00

89
62
62
12
24
24
24
24
24
24
19
15
15
15
10
19
26
26
24

90
61
61
13
22
22
22
22
22
22
18
60
60
60
11
20
25
25
22

86
26
26
96
86
86
86
86
86
86
86
26
26
26
96
86
86
86
86

85
25
25
95
85
85
85
85
85
85
85
25
25
25
95
85
85
85
85

Note

Asynchro mode not supported

Warning: the P01 pin is used as an output of the handshake signal, which ensures that the
high-speed synchronous communication between the box and target CPU is possible.
Therefore, there should not be any hard-wired logic value on the P01 CPU pin in the
synchronous mode. If you have any DIP switch or jumper connected to the P01 pin on your
board, make sure these are OFF in the serial synchronous programming mode !
NOTE: The recommended schematics for the user target board serial interface can be found
in Appendix B.

Supported CPUs

37

FR family – MB91F109
In the following table, you can find the list of all the supported CPUs from this family and the
pins they use for setting the serial programming mode:
CPU
MB91F109PF

Pin
name
MD 2,1,0

Pin No.
21,20,19

Logic
level
1,1,0

Pin
name
P20

Pin
No.
28

Logic
level
0

Pin
name
P21

Pin
No.
29

Logic
level
0*, 1**

* .. asynchronous programming
** .. synchronous programming
The UART interfaces used for the serial asynchronous programming mode and the CPU pin
numbers are shown in the following table:
CPU type
MB91F109PF

UART
used
UART0

SI
pin
79

SO
Pin
80

P20
Pin
28

P21
Pin
29

Baud rates* [Bd]
Kernel download
Programming
19200
19200

*The baud rates are specified for 12.5 MHz external clock (crystal) frequency. For the clock
frequency 25 MHz, the baud rates must be multiplied by factor of 2.
The UART interfaces used for the serial synchronous programming mode and the CPU pin
numbers are shown in the following table:
CPU type
MB91F109PF

UART
used
UART0

SI
pin
79

SO
Pin
80

SC
Pin
81

P20
Pin
28

P21
Pin
29

Note

Warning: the P21 pin is used as an output of the handshake signal, which ensures that the
high-speed synchronous communication between the box and target CPU is possible.
Therefore, there should not be any hard-wired logic value on the P21 CPU pin in the
synchronous mode. If you have any DIP switch or jumper connected to the P21 pin on your
board, make sure these are OFF in the serial synchronous programming mode !

38

Supported CPUs

FR family – MB91F361
In the following table, you can find the list of all the supported CPUs from this family and the
pins they use for setting the serial programming mode:
CPU
MB91F361

Pin
name
MD 2,1,0

Pin No.
113,112,111

Logic
level
0,0,0

BOOT
pin
P93

BOOT
pin No.
46

BOOT pin
logic level
1

The UART interfaces used for the serial asynchronous programming mode and the CPU pin
numbers are shown in the following table:
CPU type
MB91F361

UART
used
UART0

SIN
pin
152

SOT
Pin
153

Baud rates* [Bd]
Kernel download
Programming
9600
115200

*The baud rates are specified for 4 MHz external clock (crystal) frequency. Other crystal
frequencies are not supported
Note: Synchronous mode is not supported with this CPU

Supported CPUs

39

F2MC-8L family
In the following table, you can find the list of all the supported CPUs from this family and the
pins they use for setting the serial programming mode:
CPU
MB89P935

Pin
name
MOD 1,0

Pin No.
6,5

Logic
level
1,1

Pin
name
P40
P41
P42
P43

Pin
No.
22
23
24
25

Logic
level
1
1
0
1

Pin
name
P37

Pin
No.
11

Logic
level
0*, 1**

* .. asynchronous programming
** .. synchronous programming
Note: The MOD1 pin must be set to +9V to enable writing to ROM. Otherwise, the ROM can
be only read.
The UART interfaces used for the serial asynchronous programming mode and the CPU pin
numbers are shown in the following table:
CPU type
MB89P935

UART
used
UART0

SI
pin
17

SO
Pin
18

Baud rates* [Bd]
Kernel download
Programming
2400
2400

*The baud rates are specified for 2 MHz external clock (crystal) frequency. For the clock
frequencies of 4 or 8 MHz, the baud rates must be multiplied by factors of 2 or 4, respectively.
The UART interfaces used for the serial synchronous programming mode and the CPU pin
numbers are shown in the following table:
CPU type
MB89P935

UART
used
UART0

SI
pin
17

SO
Pin
18

SC
Pin
19

Note

Warning: the P40 pin is used as an output of the handshake signal, which ensures that the
high-speed synchronous communication between the box and target CPU is possible.
Therefore, there should not be any hard-wired logic value on the P40 CPU pin in the
synchronous mode. If you have any DIP switch or jumper connected to the P40 pin on your
board, make sure these are OFF in the serial synchronous programming mode !
NOTE: The recommended schematics for the user target board serial interface can be found
in Appendix B.

40

Supported CPUs

Chapter

8

8 Customer registration
To register, please fill this form and send it by email to the following address:
microcontroller_info@fme.fujitsu.com.
Note:
1. Boldface indicates required fields.
2. An editable copy of this form can be found in the file " RegistrationForm.rtf " , which
resides in the Flashkit installation directory.

FLASHKIT serial programmer registration form
Fujitsu Microelectronics Europe GmbH
Marketing Microcomponents
Am Siebenstein 6-10
63303 Dreieich-Buchschlag, Germany
Tel.: (++49) (0)6103-690-0
Fax: (++49) (0)6103-690-122
This registration form can be used to register your FlashKit software. After your registration
you will be informed about new versions of the FlashKit software. Please take care that your
personal information given here is correct and complete.
First name:
Surname:
Company:
Department:
Address:
City:
State/Province:
ZIP/Postal code:
Country:
Phone:
Fax:
Email address:
Local Fujitsu or Distribution Sales Office (where Flashkit was bought):
Serial number of FlashKit:
Current Version of FlashKit PC Software:
Current Version of FlashKit Firmware:

Customer registration

41

Chapter

9

9 Trouble shooting
Error
Kernel was not downloaded check the settings and cables
Error in communication – bad
CRC
Error while opening port/device

Error while closing port/device
Not supported
Error during transfering
Time out
Error during programming the
FLASH - FLASH is not erased or
FLASH may be damaged
Error during erasing the FLASH FLASH is NOT erased (FLASH
may be damaged)
Error on communication line.
Kernel returned unexpected
command

42

What happened and what to do
The CPU doesn’t respond. Make sure you have
selected correct CPU. Check the communication
cable.
During transferring data via communication cable
data were repeatedly damaged. Check if the cable is
properly connected to PC and CPU
The specified COM/LPT port cannot be opened. It
can be used by another application – close that
application.
If the LPT port can’t be opened, check if:
the Flash-kit SW was installed with
Administrator rights. If unsure, please reinstall
the Flash-kit with Administrator rights
the LPT port type in BIOS is set to “SPP”
there are no conflicting Windows drivers on the
LPT port
An error occurred when the port has been closed
The kernel doesn’t support some command. You
probably have the different versions of Serial
Programmer and Kernels
During data transfer via communication cable data
were repeatedly damaged. Check if the cable is
properly connected to PC and CPU
The kernel doesn’t respond. Make sure you have
selected correct CPU. Check the communication
cable.
Data cannot be written into the FLASH. FLASH is
not erased or FLASH may be damaged. This error
appears also when the FLASH is locked!
Error during erasing the FLASH – FLASH is NOT
erased (FLASH may be damaged)
During transferring data via communication cable
data were damaged. Check if the cable is properly
connected to PC and CPU

Trouble shooting

Chapter

10
10
Date
15.01.2001
23.04.2001

24.04.2001

18.06.2001

9.07.2001

31.07.2001
02.01.2002
13.01.2003

Revisions and changes

Revision – Errors
This version of the manual is distributed with the Flashkit
programmer 1.4
In Appendix B, the following changes were made:
Paragraph “Recommended circuit for asynchronous
mode”, page 63 – the text was changed in order to be
more comprehensive
paragraph “Schematics for MB89P935 programming”,
page 67 – the figure of the target programming
connector had no description on pin 14
In Appendix B, the following changes were made:
added paragraph “General design rules for user target
boards”
All the schematics revised to comply with these design
rules
The following changes were made:
the description of the new features in Flashkit SW ver.
2.0 was added into the manual (see chapter 3)
new CPUs, supported by the Flashkit version 2.0c,
added into chapter 7 – “Supported CPUs”
Chapter 2 “Installation” was extended to contain all the
known installation problems
on page 25, the programming cable schematics was
corrected. On page 2, an explanation note was added to
the MB89P935 connector
The following changes were made:
in Appendix B, the chapter “Workaround solution for
Pulldown on PIO2 issue” was added.
In chapter 4, the name “Serial interface connector” was
changed to “Programming connector” to keep
consistency with the rest of the manual, where this name
was used for this connector, while the name “Serial
interface connector” was used only in Chapter 4. ]
the “Warranty and Disclaimer” was updated

Revised version
V2.0
V2.1

V2.2

V2.3

V2.4

Several minor errors corrected from V2.4.
V2.5
Several minor errors corrected from V2.5.
V2.6
In Command line parameters: new command line parameter V2.7
CPU Operating Mode after Auto Program (-cpumode)
Revisions and changes

43

29/01/2003

09/03/2004

44

The following changes were made:
V2.8
In chapter Timing diagrams note added (timing diagram
is for asynchronous mode)
Changed all notices about the latest firmware (file
Firmware_v17.mhx)
In Appendix B: Schematics “The target serial interface
recommendation – version with the transistors” changed
– fixed generating MD2 signal (added resistor R9 to the
base of the transistor T6)
In chapter F2MC-16LX family table for asynchronous
programming updated (kernel communication speeds
for MB497PFM).
In chapter Command line parameters incorrect case for
V2.9
parameter Watchdog trigger pulses generation fixed
(correct form is -wd).
In chapter Using the programmer in batch files added one
return error code („13 – disk I/O error“) and updated batch
example.

Revisions and changes

Appendix A
11

Timing diagrams

Timing Chart for each pin of microcontrollers other than MB90F474 and MB90F476:
The MB90F562, MB90F568, MB90F497 and MB90F428/A do not have the HSTX pin.

HSTX

H

H

RSTX

L

4 tcp
tcp

H

MD0

L
H

MD1

MD2

tcp

L

H

tcp

L

tcp × 250

P00

H

tcp

L

P01

H

tcp × 250
tcp

L

SIN

H
L

tcp × 500

Data

Minimum values of setup time and hold time of each signal for rising edge of RSTX signal
Note: This timing diagram is for asynchronous programing, for synchronous programming the
level of pin P01 must be high during reset (for more details see table for F2MC-16LX family in the
Chapter 7 Supported CPUs)

Appendix A

45

Timing Chart for Each Pin of MB90F474 and MB90F476:
H

RSTX

L

4 tcp
tcp

H

MD0

L
H

MD1

MD2

tcp

L

H

tcp

L

tcp × 250

P80

H

tcp

L

P81

H

tcp

tcp × 250

L

SIN0

H

tcp × 500

Data

L

Minimum values of setup time and hold time of each signal for rising edge of RSTX signal

46

Timing diagrams

12

Communication protocols
(16LX family)

In the following text, the communication protocols used by the Serial Programmer software
within the 16LX family are described.
For basic understanding of how the FLASH programming is done within the 16LX family,
it is important to know that the 16LX CPUs have an in-built ROM memory called BiROM,
which is activated only in the Serial programming mode. In this memory, there is a short code,
that can be used for downloading and executing another program in the CPU internal RAM.
Since the Bi-ROM code has no ability for programming the FLASH, it can be used only for
dowloading of a more sophisticated code, that can be then used for FLASH programming. In
case of the Flashkit programmer, we call this „more sophisticated code“ as „kernel“. In the
following paragraphs, the communication protocols used by the Bi-ROM code and our kernel
are described.

Bi-ROM protocol
The F²MC-16LX Flash MCU contains a burn-in ROM (BiROM) program that supports a
proprietary protocol to allow downloading of a user program to on-chip RAM memory
(step 1). The user program is then able to manipulate on-chip Flash memory as required
(step 2).
Two basic serial modes are supported, synchronous serial and asynchronous serial. It is not
important to the protocol which serial mode is in use.
The below diagram illustrates the context.

BI-ROM

BI-ROM

990hex

RAM

RS232 to PC

FLASH
1) Load RAM with LOADER Module

UART

RS232 to PC

UART

990hex

RAM

FLASH
2) Program Flash out of RAM

The following text describes the commands, which are supported by the BiROM of the 16LX
Flash MCUs in order to generate an own programming environment.

Communication protocols (16LX family)

47

As already mentioned, two basic serial modes are supported, synchronous serial and
asynchronous serial. After reset of the MCU, the mode pins and two port pins select the
programming mode respectively. It is not important to the protocol which serial mode is in
use. However, communications settings obviously vary:
Synchronous
Asynchronous

8 data bits, external clock (500kbs max)
8 data bits, 1 stop bit, no parity, baud rate: (mcu clk / 4) / (8 x 13 x 2)
(4800 @ 4MHz, 9600 @ 8MHz, 19200 @ 16MHz)

Follow the sequences in the examples to download and execute the user program. Once the
user program is running, the BiROM is no longer active and all further communication is user
defined. To allow compatibility with all devices, it is important that the user program uses the
minimum of resources. Therefore, we recommend your program uses the following memory
map:
Memory Map
0100 – 016F
0170 – 017F
0180 – 018F
0190 – end of RAM

Variables
Stack
Registers (bank 0)
User program code and write buffer (512B max)

Common Pin Settings
Pin Name
MD2,1,0
P00
P01

Logic Level Description
QFP100
QFP120
110
Programming mode
51,50,49
87,88,89
0
Programming mode
85
95 (J19/21)*)
0
Async, 4800, 8bit, 1 stop, no parity
86
96 (J19/20) *)
1
Clk Sync, Ext clock (500kbs max)
Vss
Power supply
81
91 (J19/25) *)
Vcc
Power supply
84
94 (J19/22) *)
*)
Pin numbers in brackets refer to the QFP120 Flash-Test-Board (FLASH-EVA2-120P-M13)
Commands
Byte 0
Byte 1
Byte 2
Byte 3
Byte 4
Byte n
765432107654321076543210765432107654321076543210
Command
Address
Address
Count
Count
Data/Checksum
7-0
15-8
7-0
15-8
7-0
7-0
Command
Address
Count
Data
Checksum

48

Various actions, see table below.
Start address of RAM download code
Number of bytes to transfer. 1 = 1 byte.
Data bytes sent
Cumulative sum

Communication protocols (16LX family)

Commands
Description
0 0 0 1 1 - - - 18 Communication
check
0 0 0 0 0 - - - 00 Download
0 1 0 0 0 - - - 4x Execute

Comment
General communications check
User program is downloaded to RAM
User program is executed. Address and count ignored (address
fixed to 0990h (0190h MB90560))

Command Responses
Byte 0
7 6 5 4 3 2 1 0
Command Resp
7-4
3-0
Resp

Status response from MCU (bits 7-4 return bits 7-4 of command byte)

Response
Description
- - - - 0 0 0 1 x1 OK
- - - - 0 0 1 0 x2 Command Error

Comment

EXAMPLES
General Communications Check
This command is in fact used for initailizing the communication with the BI-ROM. The PC
sends the byte 18H, and if the BI-ROM is ready, it responses with the byte 11H.
PC
MCU

18
11

Download (00h)

PC
MCU

command /
address
00
09
90

count
00

02

data
01

chk
02

resp

9E
01

This example downloads 2 data bytes, 01hex and 02hex onto RAM location 990hex. See also the
cumulated checksum 9Ehex and response from the MCU.
Execute (40h)

PC
MCU

command /
address
40
xx
Xx

count
00

00
no response, jump is immediate

Communication protocols (16LX family)

49

Note
When you select the Burn-IN ROM mode for the CPU, and you try to program the upper
Flash memory area with code executed in RAM the situation is as follows:
In Burn-IN ROM mode the Burn-IN ROM is always visible at FF0000-FFFFFF. So you
cannot program the page FF directly. Therefore Bit 3 of the FMCS register is used. Bit 3 of
the FMCS register is used as a upper memory enable. To program the page FF, you have to
set this bit first. After this the page FF will be mapped to page FE.

50

Communication protocols (16LX family)

Communication with kernel – asynchronous mode
If the asynchronous communication is chosen in the serial programmer SW (the
„Asynchronous – COM port“ option is selected in the „Select communication channel“
radiobox), the communication protocol looks like the one on the following picture:
Start

Get number of
tries (eg., 5)
Send command,
parameters and CRC
Receive response
from target CPU
Yes
Timeout

Decrement
number of tries

Zero ?

No

Yes

No
Yes
NACK ?

Communication
error

No
Receive data and
CRC from target CPU

No

CRC
Yes
Success

End
What does this diagram mean ?
The PC frontend communicates with the kernel, which was downloaded to the CPU RAM
after the „Connect“ function was invoked, using various commands. A general command can

Communication protocols (16LX family)

51

optionally contain parameters and is always appended with CRC checksum of the command
and parameters.
The command, its parameters and the CRC are sent as one „packet“ to the target CPU. After
the last byte of this „packet“ is sent, a response from target CPU is expected. If the target does
not response for a certain period of time, the timeout is caused and the whole operation is
repeated. The number of repetitions (5), which is in the diagram, is just for illustration
purposes, its value was „hardwired“ in the software after some experiments with
reliability/speed of error detection.
If the target CPU responds, it can send NACK to indicate a CRC check error, or a valid
response. The valid response forms also a „packet“. First byte of this „packet“ is always the
same command that the target CPU replies to. The other bytes are dependent on the type of
command issued, but the last bytes are always the CRC checksum.
If the PC SW receives a „NACK“ response, it repeats the whole operation of sending the
command „packet“. The same thing happens in case the PC receives valid response, but its
CRC check fails. If the CRC check is OK, the processing of the command successfully
finishes.
The formats of „packets“ used in the asynchronous communication is described in the
following paragraphs. Note that there are 2 kinds of CRC checksum in the asynchronous
communication, denoted as „CRC24“ and „CRC16x“. The algorithms for computing these
CRCs are described in the part „CRC checksum algorithms“ of this chapter.
General command for target CPU
Byte 0
Command nr.

Byte 1..n
Parameters

Byte n+1
CRC24 7-0

Byte n+2
CRC24 15-8

Byte n+3
CRC24 23-16

Remark: CRC24 is computed from Command and all the parameters
General response from target CPU
When the transmission is successful:
Byte 0
Byte 1..n
Byte n+1
Command nr. Returned data CRC16x 7-0

Byte n+2
CRC16x 15-8

In case of corrupted data on the transmission line (the target CPU receives the command
packet, but its CRC check fails):
Byte 0
NACK - $F9

52

Communication protocols (16LX family)

Here goes the detailed description of data sent in the various command packets:
Blank check – Command nr. = $EC
Checks if the specified block of memory is erased (filled with $FF):
Parameters:
Byte 1
Start addr 7-0

Byte 2
Start addr
15-8

Byte 3
Start addr
23-16

Byte 4
End addr 70

Byte 5
End addr
15-8

Byte 6
End addr
23-16

Returned data:
Byte 1
STATUS
STATUS

$FF – specified memory range is erased
otherwise - specified memory range is NOT erased

Erase chip – Command $EF
Erases whole chip.
Parameters:
Byte 1
Addr 7-0

Byte 2
Addr 15-8

Byte 3
Addr 23-16

Where “Addr” is the base address of the FLASH memory.
Returned data:
Byte 1
STATUS
STATUS

0 – chip is erased
otherwise - chip cannot be erased

Erase sector – Command $ EE
Erases only one sector of the FLASH memory
Parameters:
Byte 1
Addr 7-0

Byte 2
Addr 15-8

Byte 3
Addr 23-16

Where “Addr” is the starting address of the FLASH sector.
Returned data:
Byte 1
STATUS

Communication protocols (16LX family)

53

STATUS

0 – sector is erased
otherwise - sector cannot be erased

Write FLASH – Command $ED
Parameters:
Byte 1
Byte 2
Byte 3
Start addr 7-0

Start addr
15-8

Start addr
23-16

Byte 4

Byte 5

Length 7-0

Length 15-8

Byte
6..Length-1
Data

Remark:
Size of the packet cannot be greater than input buffer of the target CPU (see command Kernel
buffer length)
Returned data:
Byte 1
STATUS
STATUS

0 – FLASH memory has been programmed
otherwise – error during programming FLASH memory

Read FLASH – Command $F2
Read data from FLASH memory. Address range is specified by start address and length of
the block.
Parameters:
Byte 1
Start addr 7-0

Byte 2
Start addr
15-8

Byte 3
Start addr
23-16

Byte 4
Length 7-0

Byte 5
Length 15-8

Returned data:
Bytes
1..Length
Data

Kernel buffer length – Command $FE
Tests if the kernel is running and returns the size of internal buffer for incomming commands.
No parameters
Returned data:
Byte 1
Length
Length – Length of the input buffer for current target CPU.

54

Communication protocols (16LX family)

Communication with kernel - synchronous mode
When the „Synchronous – COM port“ or Synchronous – LPT port“ option is selected in the
„Select communication channel“ radiobox, the synchronous communication is chosen. Here,
the situation is a little bit more complicated, because there is the programmer box in the data
path between the PC and target CPU. The programmer box is used as a bi-direction retransmitter in most case, but there are few dedicated commands that can be used for
controlling the box functions (e.g., for setting the target system voltage levels or lighting-up
the LED diodes).
In the synchronous mode, when the „Connect“ button is pressed, the following initialization
sequence is done by the PC software:
Start

Find the selected
communication port

Reset programmer
box via comm. line

Send 3 bytes: 2
bytes packet length
($0001) and one
dummy byte

End

Basically, after the „Connect“ button is pressed, the box is reset by the reset line of the
selected communication port. Then the PC SW sends a „dummy“ packet to the selected port.
The box (if present) is waiting for this packet on both the parallel and serial ports to find
which port will be used for further communication. Note that no response is submitted by the
box. If the box is not connected, the timeout error will be issued during the following
communication (after the initialization sequence, commands for setting the LED lights &
target CPU voltage levels are issued).
The commands in the synchronous mode are issued in the following sequence:

Communication protocols (16LX family)

55

Start

Send command and
parameters

Yes

Timeout

No
No

Expecting
data from
box?
Yes
Receive data from
programmin box

Receive command
number from
programmin box

Yes
Timeout
Communication
error

No
Success

End
Note that no repeating is used in case of error and no CRC check is used when communicating
with the box. This solution was chosen to achieve to maximum programming speed – when
communicating by the parallel port, there all the CPU time is used for the communication a
FLASH programming purposes. Without the CRC, the effective programming speed while
programming large block of data can be as high as 320 kbit/s. If the CRC computation, which
is quite time consuming should take place during FLASH programming, the programming
speed would be cut to half.
The format of the command and response packets used in the synchronous communication
is described in the following paragraphs:

56

Communication protocols (16LX family)

General command for the programmer box
Byte 0
Packet length 7-0

Byte 1
Packet length 15-8

Byte2
Box command

Byte 3..n
Parameters

General response from programmer box
Byte 0
Packet length 7-0

Byte 1
Packet length 15-8

Byte 2.. Packet length+1
Returned Data

Remark: if the programmer box has nothing to return, then Returned data are 1 byte long and
the content is “Box command” (the same command that the box replies to).

Commands for programmer box:
Prepare for executing kernel for target CPU – Command $F0
Before the kernel in the target CPU is executed, this command must be called just before the
kernel is started.
No parameters
Returned data:
Byte 2
$F0
Forward data to target CPU – Command $F7
Serves for sending (in synchronous mode) data into the target system. Also returns the
response from the target CPU.
Parameters:
Byte 1
Response
length 7-0

Byte 2
Response
length 15-8

Byte 3..n
Data for
target CPU

Response length – number of bytes returned by the target CPU.
Returned data:
If response length is 0, returned data are:
Byte 2
$F7
Otherwise:
Byte 2..Response length+1
Data from target CPU

Communication protocols (16LX family)

57

Forward data from target CPU to PC – Command $F6
Reads data from target CPU.
Parameters:
Byte 1
Response
length 7-0

Byte 2
Response
length 15-8

Response length – number of bytes which the target CPU will return
Returned data:
Byte 2..Response length+1
Data from target CPU
Set target CPU and supply mode – Command $F5
Sets the pins for serial programming mode, supply voltage and supply source.
Parameters:
Byte 1
Mode1

Byte 2
Mode2

Mode1:
Bit 0
Bit 1
Pin MD0 Pin MD2










Bit 2
Reset
line

Bit 3
Pin P00

Bit 4
Pin P01

Bit 5
Voltage
3/5V

Bit 7
Power
supply
info

Pin MD0: state of this pin
Pin MD2: state of this pin
Reset line: controls reset line for the target CPU
Pin P00: state of this pin
Pin P01: state of this pin
Voltage: 1 = 5V, 0 = 3V
Supply target: 1 = do not supply the target CPU from programmer box, 0 = supply the
target CPU
Power supply info: the mode contains the supply information

Mode2:
Bit 0
Pin MD1

Bit 1

Bit 2

Bit 3

Bit 4

Bit 5

Returned data:
Byte 2
Byte 1
$F5
Power good

58

Bit 6
Supply
target

Communication protocols (16LX family)

Bit 6

Bit 7

Power good:
If Supply target is 1 (do NOT supply target CPU) then Power good is ignored
Otherwise if the Power good is & gt; 0 then the power is not good (target CPU cannot be supplied)
Remark: To reset the target CPU this command must be called twice with right value of bit 2.
“Power supply info” should be only in the first of both command.
Set the Busy LED to ON/OFF – Command $EF
Lights green/red busy LED for displaying of the activity of the programmer box.
Parameters:
Byte 1
State
State: 1 = busy, 0 = not busy
Returned data:
Byte 2
$EF

Commands for target CPU
These commands are the same as for the asynchronous programming, but they are inserted
into the command Forward data to target CPU as the parameter. Responses from target
CPU can be read by directly by command Forward data to target CPU or Forward data
from target CPU. The better is the first one.

Special command for target CPU (synchronous mode only, special kernel)
Computing CRC of a block of data in target system – Command $F0
Kernel in the target CPU computes the CRC of specified block of memory and PC software
compares with own precomputed CRC. It is used for comparing data in the FLASH memory
and in the user program. This is useful for large user data.
Parameters:
Byte 1
Start addr 7-0
Returned data:
Byte 0
CRC16
7-0

Byte 2
Start addr
15-8

Byte 3
Start addr
23-16

Byte 4
Length 7-0

Byte 5
Length 15-8

Byte 1
CRC16
15-8

Remark: The CRC16 checksum is described in following part of this chapter.

Communication protocols (16LX family)

59

13

Communication protocols
(8L CPUs)

In the following text, the communication protocols used by kernels of the Flashkit
programmer within the 8L family are described (for description of protocols used by the CPU
boot-ROM, please check the documentation of the relevant CPU).

Communication with kernel – asynchronous mode
If the „Asynchronous – COM port“ option is selected in the „Select communication channel“
radiobox, the communication protocol looks like the one on the following picture:
Start

Get number of
tries (eg., 5)
Send command and
parameters
Receive response
from target CPU
Yes
Timeout

Decrement
number of tries

Zero ?
Yes

No

Communication
error

Receive data from
target CPU

Yes

Timeout
No
Yes
Success

End

60

Communication protocols (8L CPUs)

No

This diagram is similar to the one, which is presented in the 16LX family communication
description part, except for




CRC checksum, which is not computed nor transmitted due to the limitations of the
memory space and execution speed of the 8L family CPUs.
Address is only 16-bits number
Data length is 8-bits number

The formats of „packets“ used in the asynchronous communication is described in the
following paragraphs.
General command for target CPU
Byte 0
Command nr.

Byte 1..n
Parameters

Remark: CRC24 is computed from Command and all the parameters
General response from target CPU
When the transmission is successful:
Byte 0
Byte 1..n
Command nr. Returned data
In case of corrupted data on the transmission line (the target CPU receives the command
packet, but its CRC check fails):
Byte 0
NACK - $F9

Communication protocols (8L CPUs)

61

Here goes the detailed description of data sent in the various command packets:
Blank check – Command nr. = $EC
Checks if the specified block of memory is erased (filled with $FF):
Parameters:
Byte 1
Start addr
7-0

Byte 2
Start addr
15-8

Byte 4
End addr
7-0

Byte 5
End addr
15-8

Returned data:
Byte 1
STATUS
STATUS

$FF – specified memory range is erased
otherwise - specified memory range is NOT erased

Erase chip – Command $EF
Erases whole chip.
Parameters:
Byte 1
Addr 7-0

Byte 2
Addr 15-8

Where “Addr” is the base address of the FLASH memory.
Returned data:
Byte 1
STATUS
STATUS

0 – chip is erased
otherwise - chip cannot be erased

Erase sector – Command $ EE
Erases only one sector of the FLASH memory
Parameters:
Byte 1
Addr 7-0

Byte 2
Addr 15-8

Where “Addr” is the starting address of the FLASH sector.
Returned data:
Byte 1
STATUS
STATUS

62

0 – sector is erased
otherwise - sector cannot be erased

Communication protocols (8L CPUs)

Write FLASH – Command $ED
Parameters:
Byte 1
Byte 2
Byte 4
Start addr
7-0

Start addr
15-8

Length
7-0

Byte
5..Length-1
Data

Remark:
Size of the packet cannot be greater than input buffer of the target CPU (see command Kernel
buffer length)
Returned data:
Byte 1
STATUS
STATUS

0 – FLASH memory has been programmed
otherwise – error during programming FLASH memory

Read FLASH – Command $F2
Read data from FLASH memory. Address range is specified by start address and length of
the block.
Parameters:
Byte 1
Start addr
7-0

Byte 2
Start addr
15-8

Byte 4
Length 7-0

Returned data:
Bytes
1..Length
Data
Kernel buffer length – Command $FE
Tests if the kernel is running and returns the size of internal buffer for incomming commands.
No parameters
Returned data:
Byte 1
Length
Length – Length of the input buffer for current target CPU.

Communication protocols (8L CPUs)

63

Communication with kernel – synchronous mode
When the „Synchronous – COM port“ or Synchronous – LPT port“ option is selected,
synchronous communication is used.
The communication between PC and the programmer box is the same as with the 16LX
family. The only difference is in the commands for the target CPU.
Commands for target CPU
These commands are the same as those for the asynchronous programming, but they are
inserted into the “synchronous” command Forward data to target CPU as the parameter.
Responses from target CPU can be read by directly by command Forward data to target
CPU or Forward data from target CPU. The better is the first one.
Note: in comparison with the 16LX family, the 8-bit CPUs have no special kernel for CRC
verification of the burned memory

64

Communication protocols (8L CPUs)

14

Communication protocols
(FR CPUs)

In the following text, the communication protocols used by kernels of the Flashkit
programmer within the FR family are described (for description of protocols used by the CPU
boot-ROM, please check the documentation of the relevant CPU).

Communication with kernel – asynchronous mode
The asynchronous communication is exactly the same as the one presented in the 16LX
family communication description part, except for


Addresses are 32-bits number

Communication with kernel – synchronous mode
The synchronous communication is exactly the same as the one presented in the 16LX family
(except that addresses in the commands for the target CPU, which are 32-bits long)

Communication protocols (FR CPUs)

65

15

CRC checksum algorithms

CRC16x
This 16-bit CRC is returned from the target CPU in the asynchronous programming mode.
The algorithm for computing it (written in Object Pascal for better readability) is following:
(***************************************************************)
(*xor16calc
calculates CRC from block of data
Parameters:
initCRC
- initial value for CRC
buf
- starting address of data block
len
- length of the data block
*)
(***************************************************************)
function.xor16calc(initCRC :word; buf :PCHAR; len :word) :word;
begin
{$R-}
while (len & gt; 0) do begin
initCRC:=((initCRC shl 5) or (initCRC shr 11)) xor BYTE(buf^);
dec(len);
inc(buf);
end;
result:=initCRC;
{$R+}
end;

66

CRC checksum algorithms

CRC24
The 24-bit CRC is sent to the target CPU in the asynchronous programming mode.
Remark: CRC for target CPU is first of all computed by function xor16calc and the result
is passed to this function xor16compl3.
(***************************************************************)
(*xor16compl3
calculates advanced CRC from basic CRC (xor16Calc) - easy for
checking for target system
Parameters:
x16
- CRC
*)
(***************************************************************)
function.xor16compl3(x16:word):longword;
var
b1,b2,b3 : byte;
res : longword;
begin
x16 := ((x16 shl 5) OR (x16 shr 11));
b1 := x16 AND $FF;
x16 := x16 XOR b1;
res := b1;
x16
b2
x16
res

:=
:=
:=
:=

((x16 shl 5) OR (x16 shr 11));
x16 AND $FF;
x16 XOR b2;
res OR ( longword(b2) shl 8 );

x16 := ((x16 shl 5) OR (x16 shr 11));
b3 := x16 AND $FF;
res := res OR ( longword(b3) shl 16 );
Result := res;
end;

CRC checksum algorithms

67

CRC16
This CRC is used in the synchronous mode by the special CRC kernel for comparing data in
the FLASH with the user data file.
It is standard 16-bit CRC (generating polynom is x16+ x12 +x5 + 1). The following source
code is taken from the document “GZIP file format specification version 4.3“, copyright ©
1996 L. Peter Deutsch. (Note: permission is granted to copy and distribute this document for
any purpose and without charge, including translations into other languages and incorporation
into compilations, provided that the copyright notice and this notice are preserved, and that
any substantive changes or deletions from the original are clearly marked.)
A pointer to the latest version of this and related documentation in HTML format can be
found at the URL ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html.
unsigned long crc_table[256];
/* Table of CRCs of all 8-bit messages. */
int crc_table_computed = 0; /*Flag: has the table been computed? Initially false.*/
void make_crc_table(void)
{
unsigned long c;
int n, k;

/* Make the table for a fast CRC. */

for (n = 0; n & lt; 256; n++) {
c = (unsigned long) n;
for (k = 0; k & lt; 8; k++) {
if (c & 1) {
c = 0xedb88320L ^ (c & gt; & gt; 1);
} else {
c = c & gt; & gt; 1;
}
}
crc_table[n] = c;
}
crc_table_computed = 1;
}
/* Update a running crc with the bytes buf[0..len-1] and return the updated crc.
The crc should be initialized to zero. Pre- and post-conditioning (one's omplement)
is performed within this function so it shouldn't be done by the caller. Usage
example:
unsigned long crc = 0L;
while (read_buffer(buffer, length) != EOF) {
crc = update_crc(crc, buffer, length);
}
if (crc != original_crc) error();
*/
unsigned long update_crc(unsigned long crc, unsigned char *buf, int len)
{
unsigned long c = crc ^ 0xffffffffL;
int n;
if (!crc_table_computed)
make_crc_table();
for (n = 0; n & lt; len; n++) {
c = crc_table[(c ^ buf[n]) & 0xff] ^ (c & gt; & gt; 8);
}
return c ^ 0xffffffffL;
}
/* Return the CRC of the bytes buf[0..len-1]. */
unsigned long crc(unsigned char *buf, int len) {return update_crc(0L, buf, len); }

68

CRC checksum algorithms

Appendix B
Schematics
General design rules for user target boards
The following rules must be kept when designing the user target board in order to allow the
board interoperability with Flashkit serial programmer.
Target board with asychronous programming mode only
1. The asynchronous programming mode requires an RS232 interface to be included on the
user target board. There are no special requirements for the RS232 interface design, but in
order to utilize the „automatic reset & mode setting“ function of the Flashkit programmer
SW, we recommend to design the RS232 interface according to the schematic, which can
be found in the paragraph „ Recommended circuit for asynchronous mode“
2. If an external watchdog is used on the user target board, there must be a way to disable it
(by a jumper or a switch) during serial programming of the CPU.
Target board with synchronous programming mode
1. The most important rule to keep in mind is that the following pins of the programmer box
programming connector work in the „open collector“ mode: P00 (pin 1), MD0 (pin 2),
MD1 (pin6), MD2 (pin 10) and RTX (pin3). Since the „open collector“ drivers inside the
serial programmer box use 10k pullup resistors, the signals connected to these pins on
your target board MUST NOT be pulled down by any jumper, switch or resistor smaller
than 50k during the serial programming.
Warning: Take care, a pull down resistor of 50k or higher might not be sufficient to
guarantee the correct low level specified in the Datasheet of the corresponding
microcontroller for normal operation mode! So it is recommended to assign a jumper, to
disconnect the pull-down resistor in case of serial synchronous programming.
Note: For target boards that already have pulldown resistor & lt; 50k on the MD2 pin (16LX
CPU) or MOD0-1 pins (8L CPU), the Flashkit programmer software version 2.0 can be
used. This version implements a workaround solution, which utilizes a modified
programming cable – for further details, see the chapter „Workaround solution for
Pulldown on MD2 issue“.
2. It is possible to design the user target board in a way that it supports both the synchronous
and asynchronous programming mode – the recommended schematics for serial interface
of such a board can be found in the paragraph „Target serial interface schematics for
16LX and FR30“
3. If an external watchdog is used on the user target board, there must be a way to disable it
(by a jumper or a switch) during serial programming of the CPU. If this is not possible,
then the box programming connector pin PIO1 can be used to trigger the watchdog during
the programming. The generation of the watchdog trigger pulses can be activated in the
Options menu, tab „Synchronous mode“.
Warning: the watchdog trigger pulses generation function is not supported for the 8L
family!

Appendix B

69

Recommended circuit for asynchronous mode
This schematics is recommended as the RS232 serial interface for user target boards. It can be
considered as an option, which makes the usage of our Serial programmer SW even more
comfortable in the case the user wants to use the asynchronous mode programming only.
In this case the additional hardware can be used, in order to switch to serial programming
mode automatically, using the RTS and DTR handshake lines of the RS232 interface, which
are controlled by the Flashkit software. The following schematics shows such an additional
hardware, where:
the RTS line of the RS232 interface is used for the board reset,
the DTR line of the RS232 interface is used for the mode selection
1

2

100n

C23

2

D

IC13
V+

6

K6

GND
5
9
4
8
3
7
2
6
1

PCGND
PCDTR
PCCTS
PCTXD
PCRTS
PCRXD
PCDSR
CAN 9 Z 90

J9

GND
1

CTS_PC
TX_PC
RTS_PC
RX_PC
DTR_PC

T1OUT
T2OUT

13
8

J2

T1IN
T2IN

R1IN
R2IN

R1OUT
R2OUT

VCC

+5V
16

GND100n

C1+
C1C2+
C2-

V-

C24 100n
14
7

C25

3

GND

C21

1
3
4
5

4

100n
D

C22 100n

11
10 CTS
12
9

SOT

SOT

SIN

SIN

DTR
VCC

VCC MAX232A

15

J1

R1
1k

GND
1

VCC
C

R3
1k

2
/RST

IC2A
SN74HC125
3

VCC
R2
1k

R3
1k

C
MD0

GND

T1
BC850
R24

MD1
4

VCC

R25 10k
10k

10k
R5

5

IC2B
SN74HC125
6

MD2

R4
1k
10

GND
B
9

GND

B

IC2C
SN74HC125
8

P00

13

GND

12

IC2D
SN74HC125
11

P01

GND
Title

RS232 serial interface logic recommendation

A
Size

Number

1

A4
Date:
File:
1

70

2

5-Jan-2001
D:\Designs\Unis\Pcb\Serprog\SerProg.Ddb
3

Schematics

Revision
Sheet of
Drawn By:

3
Tomas Dulik

4

A

Target serial interface schematics for 16LX and FR30
The following schematics contain the circuitry that supports both the asynchronous and
synchronous programming modes withing the 16LX and FR CPU families.
The asynchronous programming interface is composed from the connector K1, RS232
interface IC1, the gates IC2A-IC2D and the transistor T1.
The transistor T1 is used for resetting the target board by the RTS_PC signal of the RS232
interface. The jumper J5 can be used for enabling or disabling this function. The jumper J1 is
used for cases where the PC front-end software, which is used with the user target board
application, requires a loopback on the RTS/CTS signals.
The gates IC2A-IC2D can be optionally used to switch the mode from the single chip to the
serial programming mode (and back) automatically by the Serial Programmer software. For
this automatic mode switching, the DTR_PC signal is used. The jumper J4 can be used for
enabling or disabling this function.
The synchronous programming interface is composed just from the connector K2. The
signals from this connector are connected directly to the CPU pins.
The jumpers J2, J3 are used for selecting which of the two interfaces will be used – in the 1-2
position, the synchronous interface is used, otherwise the asynchronous one is selected.
There are two versions of the schematics – the first one uses the gates as decribed above, the
second one uses transistors instead of the gates IC2A-IC2D. This can save some space on the
target board PCB, especially when the double transistors in a single SMD package are used.
The jumper J6 must be OFF in the synchronous programming mode for the
programmer box to be able to pull the MD2 signal high. For details see the paragraph
„General design rules for user target board desing“.
Note: with Flashkit programmer version 2.0 and modified programming cable, the jumper J6
can stay ON.

Schematics

71

1

2

4

3
VCC
R1
1k

/RST
K2
P00
MD0
/RST
SOT

T1
BC850
J5

1
3
5
7
9

VCC

R6

2
4
6
8
10

D

P01
MD2
SIN
SCLK

SCLK

GND

1

D

J2

BOXHEADER 5X2

SIN

R7 10k
10k

GND

K1
C

5
9
4
8
3
7
2
6
1

PCDTR
PCCTS
PCTXD
PCRTS
PCRXD
PCDSR

V+

J1
CTS_PC
TX_PC
RTS_PC
RX_PC
DTR_PC

GND

V-

100n
14
7

C2
1

T1OUT
T2OUT

13
8
C3

T1IN
T2IN

R1IN
R2IN

R1OUT
R2OUT

VCC

VCC
16

GND100n

C4
C1+
C1C2+
C2-

GND

1
3
4
5

C5

100n
100n

J3

11
10 CTS
12
9 DTR

SOT

SOT
SIN

C

VCC
MAX232A

15

J4

R2
1k

GND
1

CAN 9 Z 90

2
6

GND

PCGND

IC1

C1

1

100n

2

IC2A
SN74HC125
3

VCC
R3
1k

R4
1k
MD0

GND
MD1

B

4

VCC
10k
R8

5

IC2B
SN74HC125
6

B
MD2

10

J6

9

IC2C
SN74HC125
8

R5
1k
GND

P00

13

GND

12

IC2D
SN74HC125
11

P01

GND
A

Title
Size
A4
Date:
File:
1

2

A

Serial interface logic recommendation
Number

1 (version with gates)

24-Apr-2001
D:\Designs\Unis\Pcb\Serprog\SerProg.Ddb

Sheet of
Drawn By:

3

The target serial interface recommendation – version with the gates

72

Schematics

Revision

1
Tomas Dulik

4

1

2

3

4

VCC
R1
1k
/RST
K2
D

/RST
SOT

T1
BC850
J5

1
3
5
7
9

VCC

R6

P01
MD2

2
4
6
8
10

D

SIN
SCLK

SCK

GND

1

P00

J2

BOXHEADER 5X2

R7 10k
10k

SIN

MD0
GND
2
6

K1
5
9
4
8
3
7
2
6
1

PCGND

C

C1

PCDTR
PCCTS
PCTXD
PCRTS
PCRXD
PCDSR
CAN 9 Z 90

GND
J1

GND

100n
14
7

C2
1

CTS_PC
TX_PC
RTS_PC
RX_PC
DTR_PC

13
8
C3

VCC
16

GND100n

IC1
V+
VT1OUT
T2OUT

100n

J3
SOT
SOT
SIN

12
9

R1OUT
R2OUT

VCC

C5

100n

11
10

T1IN
T2IN

R1IN
R2IN

C4

1
3
4
5

C1+
C1C2+
C2-

1

100n

GND

DTR

C
VCC
J4

15

MAX232A

GND

R2

R3
1k

VCC

R4
1k

10k
R9
10k

MD0

R2
10k

T6
BC858

MD1

GND

MD2
J6
T6
BC858

B

R5
1k
GND

VCC

VCC

B

10k
R8
P00
T6
BC858
VCC
10k
R8

GND

P01
T6
BC858

GND

A
Title
Size

A

Serial interface logic recommendation
Number

Revision

A4
Date:
File:
1

2 (version with transistors)

4-Mar-2003
Sheet of
\\Ukropec-pc\temp\Protel99SE\Backup\Serial_Rcmdtnv21.DDB
Drawn By:

2

3

2
Tomas Dulik

4

The target serial interface recommendation – version with the transistors

Schematics

73

Schematics for MB89P935 programming
Synchronous programming mode
Using the serial programmer box, the only thing that must be added to the user target board is
the target programming connector, which is shown on the following picture:
P37 1

2 P40

MOD0 3

4 P41

/RST 5
SOT (P31) 7
VCC 9

6 SIN (P32)
8 SCK (P30)
10 GND

P42 11

12 P43

NC 13

14 MOD1 (+9V)

Asynchronous programming mode
If the user needs to program the MB89P935 using the RS-232 interface, some more parts must
be added. Since the MB89P935 is an OTP product, it does not make any sense to include the
asynchronous programming support on the user target board. For this purpose, it is better to
build a programming adapter or to get the Fujitsu programming adapter.
The schematics of such an adapter is shown on the next page.
The IC1 (MB3800) is used for generating the +9V voltage, which is necessary for burning the
CPU ROM.
The asynchronous interface logic (IC2) is the same as with the 16LX family.
Jumpers J4, J5, J6 are used for selecting whether the CPU should be programmed from the
Flashkit programmer box or from the asynchronous interface.
Jumpers J1, J2 should be ON in the asynchronous programming mode and OFF in the
synchronous mode.

74

Schematics

1

2

4

3
+5V

L1
220uH

+5V
R10
51k

D

R11
3k

10k
R4

C1

GND

-IN
SCP
VCC
BR/CTL

100n
GND

D2

IC1

1
2
3
4

8
7
6
5

FB
OSC
GND
OUT

C8

+ C9
10u/16V

C2

1n

R13
5.1k

R5
10k

R12

1N4007 SMD

GND

MB3800

+5V

D

T1
BC850

100n

GND

GND

GND

GND

1k

C

C

100n

C3

2

IC2
V+

6

K1
5
9
4
8
3
7
2
6
1

PCGND
PCDTR
PCCTS
PCTXD
PCRTS
PCRXD
PCDSR

GND
J3

GND

C4
1

CTS_PC
TX_PC
RTS_PC
RX_PC

T1OUT
T2OUT

13
8
C5

100n
VCC

GND

/RST

DIODE SCHOTTKY

15

MAX232A

R14
1k

D1

12 SIN
9 RTS

R1OUT
R2OUT

VCC

C7

100n

11 SOT
10 CTS

T1IN
T2IN

R1IN
R2IN

VCC
16

GND100n

CAN 9 Z 90

V-

100n
14
7

C6

1
3
4
5

C1+
C1C2+
C2-

SW1
PB1720

GND

+5V
GND
R1
10k

B

+5V
R6
10k

+5V

R7 R8
10k 10k

BR/CTL

+5V

P42

2
4
6
8
10
12
14

P40
P41
P32_SIN
P30_SCK
P43
MOD1

1

1
3
5
7
9
11
13

1

P37
MOD0
/RST
P31_SOT

GND
J4

Header 2x7

30
29
28
27
26
25
24
23
22
21
GND
20
19
18
17
16
J5

IC3
VCC
P03/INT23/AN7
P02/INT22/AN6
P01/INT21/AN5
P00/INT20/AN4
P43/AN3
P42/AN2
P41/AN1
P40/AN0
AVss
P50/PWM
P30/UCK/SCK
P31/UO/SO
P32/UI/SI
Reserve

P04/INT24
P05/INT25
P06/INT26
P07/INT27
MOD0
MOD1
RST
X0
X1
GND
P37/BZ/PPG
P36/INT12
P35/INT11
P34/TO/INT10
P33/EC

1
2
3
4
5
6
7 /RST
8
9
10
GND
11

1

B

J6
4MHz
X1

22pF
C10 GND
22pF
C11 GND

R9
10k
GND

12
13
14
15

CPU socket

A

A
J1

J2
Title
R2 R3
10k 10k

Size

Programming adapter for 89P935
Number

1

A4

GND GND

Date:
File:
1

2

24-Apr-2001
Sheet of
D:\Designs\Unis\Pcb\8bit_target\8bit_target.ddbDrawn By:
3

Schematics

Revision

1

Tom Dulik
as
4

75

Workaround solution for “Pulldown on MD2” issue
In the Flashkit programmer SW version 2.0, a workaround solution is implemented for the
„Pulldown on MD2“ issue.
The " Pulldown on MD2 " issue is mentioned in the chapter „General design rules for user
target boards“ in this Appendix B. It concerns user target boards (with 16LX family CPU)
that were designed with a hardwired pulldown resistor & lt; 50kΩ connected to the MD2 CPU
line.
With such user target boards, it was impossible to use the synchronous programming mode
with the older version of Flashkit programmer, because the serial programmer box
open-collector driver of the MD2 line could not set the voltage of the MD2 line to the " high "
level, which is required for setting the CPU to serial programming mode. With the new (2.0)
version of the Flashkit serial programmer SW, it is now possible to program also boards with
a pulldown resistor hardwired to the MD2 CPU line.
The workaround solution uses a modified programming cable. The cable modification is
shown on the following picture:
14 pins flat cable connector

Cannon Male 15 pins

10 pins flat cable connector

Pin 1
10-wires
flat cable

Pin 1
14-wires flat cable

MODIFICATION - TOP VIEW

Pin 1

Wire 4 cut

The wire connection
Pin 13

76

Schematics

The cable modification in fact connects the programmer box connector pin PIO2 to the MD2
pin of the target board programming connector. Since the PIO2 pin of the box programming
connector is driven by a standard CMOS output driver (it is not an open collector), it can set
the level of the MD2 to any value even when a pullup or pulldown resistors are connected to
the MD2 pin.
Warning: this workaround solution requires to update the programmer box firmware to
version 1.7. The new version of the firmware can be found in the file
" FIRMWARE_V17.MHX " , which resides in the directory, where the Flashkit software was
installed. For instructions how to upgrade the programmer box firmware, please see the
chapter „Firmware update“ in this manual.

Schematics

77


Fujitsu_FlashKit_Programmer_v2_9.rar > License.txt

Fujitsu Software License Agreement

This legal document is an agreement between you, the end user
( " Licensee " ), and Fujitsu Microelectronics Europe GmbH ( " FME " ).

By clicking the button below marked " Yes " , by opening the packaging of
the Software, or by installing or using the Software, Licensee agrees
to be bound by the terms of this Software License Agreement (the
" Agreement " ). If Licensee is obtaining an update, then the term
" Software " also includes, and the terms and conditions of this Agreement
also apply to, any pre-existing software and data provided within
earlier Software releases, to the extent such earlier software and data
is retained by, embodied in or in any way used or accessed by the
upgraded Software provided with this Agreement. IF LICENSEE DOES NOT
AGREE TO THE TERMS OF THIS AGREEMENT, THEN CLICK ON THE BUTTON
MARKED " NO " TO TERMINATE THE DOWNLOAD OR INSTALL PROCESS,
AND (IF YOU HAVE A COPY) RETURN THE SOFTWARE AND ANY ACCOMPANYING
ITEMS TO THE PLACE FROM WHICH YOU OBTAINED THEM.

FME grants the right to use FME SOFTWARE by means of a SOFTWARE LICENSE.


1. FME Software License

FME grants to Licensee, a nonexclusive right to use the SOFTWARE on
one computer system. All SOFTWARE must be used within the country for which
the systems were licensed and must be located at a single site (within
a one-kilometer radius.) In addition, all authorized person(s) who access
and use the SOFTWARE must be within the country for which the systems were
licensed and must be located at a single site (within a one-kilometer radius
from the location of the SOFTWARE).

2. Copy Restrictions.

This SOFTWARE and documentation is protected by international copyright
laws and international treaty provisions. Unauthorized copying of the
SOFTWARE in whole or in part is expressly forbidden. Subject to these
restrictions, Licensee may
- load the SOFTWARE onto at most two (2) computers to support authorized use
- make one copy of the SOFTWARE solely for backup purposes, provided Licensee
includes all copyright and trademark notices on the back-up copy.
Licensee may not copy any part of the documentation, nor modify, adapt,
translate into any language, or create derivative works based on the
documentation without the prior written consent of FME.

3. Ownership of the Software

FME retains all right, title, and interest in the SOFTWARE and
documentation (and any copy thereof), and reserves all rights not expressly
granted to Licensee. This License is not a sale of the original SOFTWARE
or of any copy.

4. Use Restrictions

This SOFTWARE is licensed to Licensee for internal use only. Licensee
acknowledges that the scope of the licenses granted hereunder do not permit
Licensee (and Licensee shall not allow any third party) to:
- decompile, disassemble, reverse engineer or attempt to reconstruct,
identify or discover any source code, underlying ideas, underlying user
interface techniques or algorithms of the SOFTWARE by any means whatever,
or disclose any of the foregoing;
- provide, lease, lend, use for timesharing or service bureau purposes, or
otherwise use or allow others to use the SOFTWARE for the benefit of third
parties;
- modify, incorporate into or with other software, or create a derivative work
of any part of the SOFTWARE;
- disclose the results of any benchmarking of the SOFTWARE, or use such results
for its own competing software development activities, without the prior
written permission of FME;
- attempt to circumvent any user limits, maximum bean count limits or other
license, timing or use restrictions that are built in to the Software,
- as the Licensee, you cannot sell or provide source code generated
from Software in other form as a part of application binary code.


5. Transfer Restrictions

Licensee shall not sublicense, transfer or assign this Agreement or any of
the rights or licenses granted under this Agreement, except in the case of
a merger or sale of all or substantially all of Licensee's assets. In no event
you may transfer, assign, rent, lease, sell or otherwise dispose of
the software on a temporary or permanent basis except as expressly provided
herein.

6. Update Restrictions

FME may create, from time to time, updated versions of the software.
At its option, FME will make such updates available to LICENSEE and
transferees who have paid the update fee and returned the Registration Card
to FME.

7. Termination

This License is effective until terminated. This License will
terminate automatically without notice from FME if you fail to comply with
any provision of this license. Upon termination you shall destroy
the written materials and all copies of the software, including modified
copies, if any.

8. Limited Warranty

FME warrants that the software is free from any defects and bears the expressly
warranted characteristics. FME does not warrant that the software fulfills your
requirements and aims and works with other programs chosen. It is your responsibility
to obtain results aimed with the suitable software. The software is produced under
the applicable due diligence. Notwithstanding defects can not be excluded due to the
state of technique. There is no warranty for the correctness and completion of
electronic or printed databases. Warranty claims shall be excluded in case of
misconduct and mishandling. Warranty claims must be made within 6 month after
receipt of the software. In case of a warranty claim software will be send back
to FME in the original packing. Is the warranty claim justified FME will at its
option replace or repair the software.
Any other claim for damages of the Licensee shall be excluded. This exclusion shall
not apply where e.g. under the product liability law or in cases of willful misconduct,
of gross negligence, of the absence of warranted characteristics or of the fundamental
non-performance of contractual obligations, there is a legally binding liability.
However in the case of a legally binding liability, liability shall be limited to the
foreseeable damage normally covered by contract, except in case of willful misconduct
or gross neglience.


Fujitsu_FlashKit_Programmer_v2_9.rar > Readme.txt

Welcome to Flash-kit serial programmer 2.9 (Firmware 1.7)

THIS FILE INCLUDES IMPORTANT INFORMATIONS, PLEASE READ IT CAREFULLY.

Contents:
=========

INSTALLATION
WHERE TO FIND NEWS, UPDATES, UPGRADES and SUPPORT
FLASH TOOL DIRECTORY OVERVIEW
EXAMPLES
KNOWN PROBLEMS AND LIMITATIONS
DOCUMENTATION UPDATES
UNINSTALLATION


INSTALLATION
============

The Flask-kit serial programmer must be installed by user who is logged into the system as an administrator (Windows NT/2000). After instalation an administrator have to run the Flash-kit serial programmer for correct installation of the system drivers.

Minimum requirements to PC:

- Windows 95/98/NT 4.0 with installed Internet Explorer 4.01 or higher
- 32MB RAM (64MB recommended)
- one standard serial port for communication with the target system or the programmer box
- Screen resolution: minimum 800x600 with small fonts; recommended 1024x768 or higher
- You must select SMALL FONTS if you have resolution 800x600.
If you have higher resolution you can use also LARGE FONTS.
(see Control Panel | Display | Settings | (Advanced) Font size )
- ComCtl32.dll version 4.70 or higher
- Adobe Acrobat Reader version 3.0



FLASKIT SERIAL PROGRAMMER DIRECTORY OVERVIEW
=============================================

Installed Flash Tool contains the following files and directories.

Directories
KERNELS - includes configuaration file and kernel binary files.


EXAMPLES
========

Example1.bat :
Read FLASH memory from MB90F543 from addr FF0000 to FF0FFF (length 1000)
and save it into file test.bin.
The CPU is connected via serial cable (asynchronous communication) to COM1,
the CPUfrequency is 4MHz.
Example2.bat :
The task is the same as in Example 1 - Read FLASH 1.
We have only one CPU (MB90F543) with crystal 4MHz connected
to PC with serial cable to COM1, so we can put this values
into the options file MyOptions.abc and use this configuration many times.
Example3.bat :
Now we have got the (for us important) content of the FLASH (from
previous examples). And now we want to copy this into another CPU.
We replace the CPU board and run this batch file:
Example4.bat :
We want only clear the FLASH in the CPU.
Example5.bat :
We try to clear sectors 0 and 2.
Example6.bat :
We have an application compiled in *.mhx, *.ehx or *.ihx file,
e.g. TEST.MHX. We want to clear used sectors (by the program),
burn it into the FLASH and verify if the FLASH really contain our code.
The compiled file is stored in directory C:\TEST.
Example7.bat :
We have an application compiled in *.mhx, *.ehx or *.ihx file,
e.g. TEST.MHX. The FLASH is cleared, we want to burn code into
the FLASH and verify if the FLASH really contain our code.
The compiled file is stored in directory C:\TEST.
Example8.bat :
We want to be only sure that FLASH contain our last code.
We don’t need to programm FLASH again, we can compare user
program and FLASH. We will compare the file TEST.MHX stored in directory
C:\TEST with the FLASH.


KNOWN PROBLEMS AND LIMITATIONS
==============================

REVISION HISTORY
================

FlashKit 2.9:
- in batch programming when verification fails due different data in the Flash,
errorlevel reported success (value 0) although text description was correct . Fixed.
- in batch programming added new errorlevel nr. 13 for I/O error (creating files, etc.)
See multiflash.bat.

FlashKit 2.8:
- in batch programming when timeout had occured during communication with the box,
errorlevel reported success (value 0). Fixed.

FlashKit 2.7:
- PLL changing of the target CPU in the cmd line version has been fixed.

FlashKit 2.6:
_ new firmware 1.7
- pull-down resistor on P01 pin problem has been fixed
- DTR line behaviour in asynchronous mode has been fixed
- " in batch programming there was not implemented running burned application
after Auto programming. " This functionality was added plus one commandline parameter
–cpumode for synchronous programming (like in GUI mode, see Options dialog
Synchronous mode - CPU operating mode after Auto Program)
- In Asynchronous mode after Programming reset signal is generated with CPU mode
- " in batch programming there was not implemented MD2 mirroring " This functionality
was added plus one commandline parameter –md2mirror for synchronous programming
(like in GUI mode, see Options dialog Synchronous mode - Mode pin configuration)

DOCUMENTATION UPDATES
=====================

Online help is updated to revision 2.8.


UNINSTALLATION
==============

From " Control Panel " (Start | Settings | Control Panel) run " Add/Remove programs "

Select " Flashkit serial programmer " from the list and click on the button " Add/Remove " .
Flashkit will be automatically removed from your computer.

Note:
- The Flask-kit serial programmer must be uninstalled by user who is logged into the system as an administrator (Windows NT/2000).
- Microsoft stands for Microsoft Corporation.

& lt; -------- End of file -------- & gt;