Segger Flasher 5 PRO Product information sheet

A product of SEGGER Microcontroller GmbH
Flasher 5 PRO
Document: UM05009
Software version: 2.16
Revision: 0
Date: July 11, 2019
User & Reference Guide
Tool for serial in circuit
programming of
microcontrollers with on-chip
flash memory
www.segger.com

2
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
Disclaimer
Specifications written in this document are believed to be accurate, but are not guar-
anteed to be entirely free of error. The information in this manual is subject to
change for functional or performance improvements without notice. Please make sure
your manual is the latest edition. While the information herein is assumed to be
accurate, SEGGER Microcontroller GmbH (SEGGER) assumes no responsibility for any
errors or omissions. SEGGER makes and you receive no warranties or conditions,
express, implied, statutory or in any communication with you. SEGGER specifically
disclaims any implied warranty of merchantability or fitness for a particular purpose.
Copyright notice
You may not extract portions of this manual or modify the PDF file in any way without
the prior written permission of SEGGER. The software described in this document is
furnished under a license and may only be used or copied in accordance with the
terms of such a license.
©2010 - 2019 SEGGER Microcontroller GmbH, Monheim am Rhein / Germany
Trademarks
Names mentioned in this manual may be trademarks of their respective companies.
Brand and product names are trademarks or registered trademarks of their respec-
tive holders.
Contact address
SEGGER Microcontroller GmbH
Ecolab-Allee 5
40789 Monheim am Rhein
Germany
Tel.+49-2173-99312-0
Fax.+49-2173-99312-28
E-mail: support@segger.com1
Internet: http://www.segger.com
1.By sending us an email your (personal) data will automatically be processed. For further
information please refer to our privacy policy which is available at:
https://www.segger.com/legal/privacy-policy/.

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
3
Manual versions
This manual describes the current software version. If any error occurs, inform us
and we will try to assist you as soon as possible.
Contact us for further information on topics or routines not yet specified.
Print date: July 11, 2019
Software Revision Date By Description
2.16 0 190711 MD Updated the company name and the copyright information.
2.10 0 141006 MD Initial version.

4
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
5
About this document
Assumptions
This document assumes that you already have a solid knowledge of the following:
• The software tools used for building your application (assembler, linker, C com-
piler)
• The C programming language
• The target processor
• DOS command line
If you feel that your knowledge of C is not sufficient, we recommend The C Program-
ming Language by Kernighan and Richie (ISBN 0-13-1103628), which describes the
standard in C-programming and, in newer editions, also covers the ANSI C standard.
How to use this manual
This manual explains all the functions and macros that the product offers. It assumes
you have a working knowledge of the C language. Knowledge of assembly program-
ming is not required.
Typographic conventions for syntax
This manual uses the following typographic conventions:
Style Used for
Body Body text.
Keyword Text that you enter at the command-prompt or that appears on
the display (that is system functions, file- or pathnames).
Parameter Parameters in API functions.
Sample Sample code in program examples.
Sample comment Comments in program examples.
Reference Reference to chapters, sections, tables and figures or other docu-
ments.
GUIElement Buttons, dialog boxes, menu names, menu commands.
Emphasis Very important sections.
Table 1.1: Typographic conventions

6
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
EMBEDDED SOFTWARE
(Middleware)
emWin
Graphics software and GUI
emWin is designed to provide an effi-
cient, processor- and display control-
ler-independent graphical user
interface (GUI) for any application that
operates with a graphical display.
embOS
Real Time Operating System
embOS is an RTOS designed to offer
the benefits of a complete multitasking
system for hard real time applications
with minimal resources.
embOS/IP
TCP/IP stack
embOS/IP a high-performance TCP/IP
stack that has been optimized for
speed, versatility and a small memory
footprint.
emFile
File system
emFile is an embedded file system with
FAT12, FAT16 and FAT32 support. Var-
ious Device drivers, e.g. for NAND and
NOR flashes, SD/MMC and Compact-
Flash cards, are available.
USB-Stack
USB device/host stack
A USB stack designed to work on any
embedded system with a USB control-
ler. Bulk communication and most stan-
dard device classes are supported.
SEGGER TOOLS
Flasher
Flash programmer
Flash Programming tool primarily for micro con-
trollers.
J-Link
JTAG emulator for ARM cores
USB driven JTAG interface for ARM cores.
J-Trace
JTAG emulator with trace
USB driven JTAG interface for ARM cores with
Trace memory. supporting the ARM ETM (Embed-
ded Trace Macrocell).
J-Link / J-Trace Related Software
Add-on software to be used with SEGGER’s indus-
try standard JTAG emulator, this includes flash
programming software and flash breakpoints.
SEGGER Microcontroller GmbH develops and distrib-
utes software development tools and ANSI C software
components (middleware) for embedded systems in sev-
eral industries such as telecom, medical technology,
consumer electronics, automotive industry and indus-
trial automation.
SEGGER’s intention is to cut software development time
for embedded applications by offering compact flexible and easy to use middleware,
allowing developers to concentrate on their application.
Our most popular products are emWin, a universal graphic software package for embed-
ded applications, and embOS, a small yet efficient real-time kernel. emWin, written
entirely in ANSI C, can easily be used on any CPU and most any display. It is comple-
mented by the available PC tools: Bitmap Converter, Font Converter, Simulator and
Viewer. embOS supports most 8/16/32-bit CPUs. Its small memory footprint makes it
suitable for single-chip applications.
Apart from its main focus on software tools, SEGGER develops and produces programming
tools for flash micro controllers, as well as J-Link, a JTAG emulator to assist in develop-
ment, debugging and production, which has rapidly become the industry standard for
debug access to ARM cores.
Corporate Office:
http://www.segger.com
United States Office:
http://www.segger-us.com

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
7
1 Introduction......................................................................................................................9
1.1 Flasher overview .....................................................................................10
2 Working with Flasher .....................................................................................................13
2.1 Connecting Flasher to the PC.....................................................................14
2.2 Using the Flasher PC software ...................................................................15
2.3 Using the serial link to program in circuit ....................................................25
2.4 Operating Flasher in stand-alone mode.......................................................26
2.5 Error messages .......................................................................................27
3 Remote control...............................................................................................................31
3.1 Overview................................................................................................32
3.2 Handshake control ...................................................................................33
3.3 ASCII command interface ......................................................................... 34
3.4 Reply messages from Flasher ....................................................................37
4 Batch mode....................................................................................................................39
4.1 Introduction............................................................................................ 40
4.2 List of commands ....................................................................................41
4.3 Examples ...............................................................................................44
5 Hardware .......................................................................................................................47
5.1 Target interface for M16C/62, M16C26P, M16C/80, M32C and R32C ...............48
5.2 Serial target interface circuitry ..................................................................51
5.3 Target interface for other systems .............................................................52
5.4 CRC calculation used in Flasher and PC software .......................................... 53
6 Support ..........................................................................................................................55
6.1 Trouble shooting......................................................................................56
6.2 Known limitations ....................................................................................57
6.3 Contacting support ..................................................................................58
7 Glossary.........................................................................................................................59
Table of Contents

8
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
9
Chapter 1
Introduction
This chapter gives a short overview about the features of the Flasher.

10 CHAPTER 1 Introduction
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
1.1 Flasher overview
Flasher is a programming tool for microcontrollers with on-chip flash memory. It is
designed for programming flash targets with the Flasher software or in stand-alone
mode. Flasher connects to a PC using the USB/Ethernet/RS-232 interface, running
Microsoft Windows 2000, Windows XP, Windows 2003, Windows Vista, Windows 7 or
Windows 8. In stand-alone mode, Flasher can be driven by the start/stop button, or
via the RS-232 interface (handshake control or ASCII interface). Flasher interfaces to
target via a 10-pin connector.
1.1.1 Supported microcontrollers
• M16C/1N series
• M16C/26 series
• M16C/24 series
• M16C/26; M16C26A series
• M16C/28; M16C28B series
• M16C/29 series
• M16C/56 series
• M16C/57 series
• M16C/57 series
• M16C/62 series
• M16C/62P series
• M16C/64 series
• M16C/65 series
• M16C/6N series
• M16C/6S series
• M16C/6V series
• M16C/80 series
• M32C/83; M32C/84; M32C/85; M32C/86; M32C/88; M32C/95 series
• R8C/14; R8C/15; R8C/18; R8C/19; R8C/22; R8C/23; R8C/24; R8C/25; R8C/26;
R8C/27; R8C/28;
• R8C/29; R8C/2C; R8C/2D, R8C/3x series
• R32C series
• M79 series
For detailed information on supported flash chips please check www.segger.com/
flashmcus.htm
1.1.2 Features
• Easy to use Windows software
• Serial in target programming supported
• Programming / Clearing / Verifying / Read back supported; High speed program-
ming
• User or boot area selectable (read only in serial mode)
• 128 MByte flash memory to store target program
• Can be used in a production environment
• PC software for batch mode processing, allowing usage in automated test sys-
tems.
• Remote control functions for automated testers
• Flasher 5 PRO can be controlled an accessed via RS-232 or Ethernet.
1.1.3 Working environment
Host System
IBM PC/AT or compatible. CPU: 486 (or better) with at least 8Mb of RAM, running
Windows 95 / 98 / 2000 / Vista / Windows 7 or Windows 8. It needs to have an RS-
232 or Ethernet interface available for communication with Flasher.

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
11
Power supply
Flasher requires a 5V power supply over its USB connector, minimum current con-
sumption is about 80mA. You may use the power supply which comes with the tool or
may power it from a USB port from your PC. Flasher is NOT protected against polarity
reversion on the supply input. Please avoid excess voltage over 6.0V.
Flasher can be supplied from the target, if the target is operated from 4.5 to 5V.
Installing the Flasher PC-software
The latest PC software FLASHER.EXE is available from the download pages on our
website: http://www.segger.com.
In order to use the software, simply copy it onto your hard drive and start the exe-
cutable which will guide you through the installation process.

12 CHAPTER 1 Introduction
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
13
Chapter 2
Working with Flasher
This chapter describes functionality of Flasher and how to use it.

14 CHAPTER 2 Working with Flasher
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
2.1 Connecting Flasher to the PC
2.1.1 Using the RS-232 interface with a serial COM port
Flasher comes with a standard serial 1 by 1 interface cable with one male and one
female 9 pin SUB-D9 connector which can be used to connect the Flasher to the PC.
The pin assignment of the 9 pin SUB-D female RS-232 interface connector is as fol-
lows:
Getting started
1. Connect the Flasher to the power supply.
2. Connect the Flasher to a PC using the 1 by 1 RS-232 serial interface cable and
run the Flasher PC software FLASHER.EXE
3. Select the chosen COM port of your PC in the communication settings dialog in
the Flasher PC software by menu: "Options | Communication".
4. Set up the device via menu "Options | Device" in the PC software.
5. For in-circuit programming: Connect the Flasher to the target system via the
standard 10 pin or customized interface cable.
2.1.2 Using the RJ45 Ethernet interface
Flasher comes with an RJ54 Ethernet cable which can be used to communicate via
Ethernet. The cable can be plugged in directly into an RJ45 socket on the PC or else-
where in the LAN using hubs or switches.
Getting started
1. Connect the FLASHER to the power supply.
2. Connect the FLASHER to a PC or LAN using the RJ45 Ethernet cable and run the
Flasher PC software FLASHER.EXE
3. Select the Flasher in the communication settings dialog in the Flasher PC soft-
ware by menu: "Options | Communication". Details how to select the Flasher with
Ethernet connection are described later on in the manual.
4. Set up the device via menu "Options | Device" in the PC software.
5. For in-circuit programming: Connect the Flasher to the target system via the
standard 10pin or customized interface cable.
Pin
no. Signal Function Host signal
2 TxD Serial async. data input Serial data output (TxD)
3 RxD Serial async. data output Serial data input (RxD)
5 GND Signal ground Signal ground
Table 2.1: RS-232 signals

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
15
2.2 Using the Flasher PC software
General
Flasher comes with an easy to use Windows software. It allows reading of program
files in motorola, intel hex or binary format. The following is a screenshot of
FLASHER.EXE with loaded target program.
Setup the communication between PC and Flasher
Make sure that the power supply is connected (one of Flasher LEDs should be illumi-
nated) and that the Flasher is connected to your PC with either the 9pin 1 by 1 RS-
232 serial interface cable, or the Ethernet cable. Both interfaces can be connected at
the same time. It depends on the configuration, which interface is used to communi-
cate. The Ethernet interface is much faster than the serial RS-232 interface, but may
require additional configuration of the Flasher.
2.2.1 Setup the serial UART connection for communication
The RS-232 port of the Flasher can be used for communication to PC. You have to
select a COM port on your PC and set up the Flasher PC software to use this COM
port.
1. Connect the Flasher to a COM port of your PC via the provided serial cable.
2. Chose menu "Options | Communication" to open the setup dialog for the commu-
nication parameters.
3. Select the "UART Port" radio button.
4. In the corresponding listbox select the COM port which is connected to your
Flasher. You may chose COM1 to COM20. If this does not match any of your COM
ports, you may try to assign a port number in the range from 1 to 20 in your Sys-

16 CHAPTER 2 Working with Flasher
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
tem settings to the COM port you want to use.
After the COM port selection, press OK. The Flasher PC software and Flasher should
now communicate. The Flasher status and serial number should be visible in the
Flasher PC software.
2.2.2 Setup the Ethernet connection for communication
Using the Ethernet for communication has the advantage that download and upload
of data between the Flasher and PC is much faster. Since Flasher software version
2.10, communication between Flasher PC software and Flasher via Ethernet is sup-
ported.
A Flasher with firmware older than version 2.10 requires a firmware update which
can be done via the RS-232 port.
Initially, the Flasher retrieves its IP address from a DHPC server. Therefore, the con-
nection between the Flasher and the PC requires a LAN with an active DHCP server to
communicate unless a fixed IP address has been assigned to the Flasher.
When the Flasher and the PC are connected to a hub or switch in the same LAN with
DHCP server, the Flasher can be accessed by your PC without further configuration.
1. Connect the Flasher to a hub or switch in your LAN using the RJ45 cable. It may take
a few seconds until the Flasher gets its IP address from your DHCP server.
2. In the Flasher PC software chose menu "Options | Communication" to open the
setup dialog for communication parameters.
3. Depending on the desired connection mode select "IP Addr" or "IP S/N" radio
button. If "IP Addr" radio button is selected the Flasher PC software connects to
Flasher using the IP address of Flasher. The IP address can be specified on the
edit field on the right in the "dotted" format. If the "IP S/N" radio button is
selected the Flasher PC software uses the serial number of the Flasher to connect
to it. The serial number can be found on the label at the bottom of the Flasher.
The edit field on the right can be used to specify the serial number of the Flasher
to connect to.
4. Click "OK" button to confirm your settings.

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
17
You may click the "Search..." button to scan the network for your connected Flasher.
A list with Flasher which are found in your network is shown:
Select one Flasher in the list and click OK (or double-click on one Flasher in the list).
All available data of the selected Flasher is automatically read into the communica-
tion parameters dialog. At least the serial number and the IP address are available.
When used in a LAN with DHCP server, it is a good choice to address and identify the
Flasher by its serial number.
2.2.3 Setup the Network configuration for Flasher
It may be useful to assign a fixed IP address and a nickname to the Flasher, which
can be done by the network configuration for the Flasher.
Fixed IP addresses have to be used when the Flasher should be driven in a network
without DHCP server, for example, if it shall be directly connected to a PC or Laptop
without DHCP server. Note that with version 2.10 of the Flasher PC software, this
configuration settings can not be set from the Flasher PC software. Network configu-
ration for the Flasher from the Flasher PC software will be implemented in later ver-
sions of the Flasher PC software.
To configure the network settings of Flasher version 2.10, you have to use the built in
web-server of Flasher 5 PRO. For first time setup, connect the Flasher to a LAN with
DHCP server. To start the web server, you have to examine the IP address of the con-
nected Flasher. To get the IP address, you may use the Flasher PC software and

18 CHAPTER 2 Working with Flasher
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
retrieve the IP address from the programmer selection list as described above, or you
may start the 5PRO_UDPDiscover.exe tool which is located in the program folder of
the Flasher PC software.
After examining the IP address of the Flasher to configure, start a web browser and
enter the IP address in the address bar of your browser. Using the example above,
you have to type 192.168.11.151 in the address bar of your browser.
The browser will connect to the Flasher and show the main web-page. In the web
server window, chose the function "Network configuration" by a click of the link
shown on the left side.
When you want to assign a nickname and a fixed IP address, first enter the nickname
and press the "Save" button assigned to the nickname. Then enter the IP address
and the subnet mask and press the "Save" button assigned to the IP address set-
tings. There is no need to enter an IP address for a gateway.
When you modify the IP address and save the settings, you will lose the connection.
It is a good idea to write down the address you assigned. Be careful to assign an
address which you can reach with your PC or laptop.
The screenshot below shows a sample configuration to assign a fixed IP address and
a nickname to the Flasher:

UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
19
The sample above shows a configuration which was used to setup Flasher for a direct
connection between a laptop and Flasher. The laptop had the IP address
169.254.98.109, the IP address for Flasher has to differ from the IP address of the
PC it should be used with, but has to be in the same subnet.
2.2.4 Setup the USB connection for communication
Since the software version 2.10 Flasher supports communication via USB. Communi-
cation via USB has the advantage of being faster than communication via UART.
A Flasher with firmware older than version 2.10 requires a firmware update which
can be done via the RS-232 port.
The following steps must be followed in order to connect the Flasher to PC via USB:
1. Connect the Flasher to an USB port of your PC or to a USB hub connected to your PC
using the provided USB cable.
2. Chose menu "Options | Communication" to open the setup dialog for the commu-
nication parameters.
3. Select the "USB S/N" radio button.
4. In the corresponding edit field specify the serial number of the Flasher you want
to connect to.

20 CHAPTER 2 Working with Flasher
UM05009 User & Reference Guide for Flasher 5 PRO © 2010 - 2019 SEGGER Microcontroller GmbH
5. Click "OK" button to confirm your settings.
You may click the "Search..." button to scan the USB ports for your connected
Flasher. A list with Flasher devices which are found is shown:
Select one Flasher in the list and click OK (or double-click on one Flasher in the list).
The serial number of the selected Flasher is automatically read into the communica-
tion parameters dialog.
Table of contents