Specifications written in this document are believed to be accurate, but are not guaranteed 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.
This document assumes that you already have a solid knowledge of the following:
•The software tools used for building your application (assembler, linker, C compiler).
•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 Programming Lan-guage 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 programming is not required.
Typographic conventions for syntax
This manual uses the following typographic conventions:
StyleUsed for
BodyBody text.
Keyword
ParameterParameters in API functions.
SampleSample code in program examples.
Sample commentComments in program examples.
Reference
GUIElementButtons, dialog boxes, menu names, menu commands.
EmphasisVery important sections.
Text that you enter at the command prompt or that appears on
the display (that is system functions, file- or pathnames).
Reference to chapters, sections, tables and figures or other documents.
Flasher ATE is a programming tool for micro controllers with on-chip or external flash memory. Flasher ATE is designed for programming flash targets in stand-alone mode or remote
controlled via a PC.
Flasher ATE connects to a PC using the USB / Ethernet / RS232 interface, running Windows
7, Windows 8 or Windows 10. In stand-alone mode, Flasher ATE can be driven by telnet
interface, or via the RS232 interface (handshake control or ASCII interface). Flasher ATE
has a 20-pin connector, which supports various interfaces. JTAG or SWD are supported
natively. Other interfaces are available via adapters, sold separately.
1.1.1 Features of the Flasher ATE
•Supports up to 10 individual channels.
•Stand-alone programmer (Once set up, Flasher can be controlled without the use of
a PC program).
•Flexible power supply (USB, DC).
•128 MB memory for storage of target program on each module.
•Data files can be updated via the integrated FTP server.
•Various target interfaces
Supported cores
ARM7/ARM9/Cortex-M, AVR
MEGA, AVR Tiny, AVR XMEGA,
MSP430, Power PC e200z0,
PIC16, PIC18, RX610, RX621,
RX62N, RX62T, RX64, RH850,
STM8
Supported
target interfaces
ICSP, I2C,
JTAG, PDI, SPI,
SWD, SWIM,
UART
Flash programming speed
(depending on target hardware)
up to 300 Kbytes/ second
1.1.2 Working environment
General
The Flasher ATE can be operated from a PC with an appropriate software like J-Flash or
in stand-alone mode.
Host System
IBM PC/AT or compatible CPU: 486 (or better) with at least 128MB of RAM, running Microsoft Windows 7, Windows 8, or Windows 10. It needs to have a USB, Ethernet, or RS232
interface available for communication with the Flasher ATE.
Power supply
The system is powered via the mainboard. The supply voltage needs to be in the range
from 4.8V to 5.25V. If the supply voltage exceeds these limits, the mainboard immediately
shuts down the power supply for the connected modules for safety reasons.
5V via Flasher ATE Bus (VCC5V)100 mA (no target power supply)
5V via Flasher ATE Bus (VCC5V)220 mA (target power supply with 100mA)
Note
Many USB power supplies have a high drop on the supply voltage if they operate at
their power limit. We recommend the DC connector and a DC power supply when
operating the Flasher ATE.
Flasher PC-software (J-Flash)
The latest version of the J-Flash software, which is part of the J-Link software and documentation package, can be downloaded from our website:
https://www.segger.com/jlink-software.html For more information about using J-Flash,
please refer to UM08003_JFlash.pdf (J-Flash user guide) which is also available for download on our website.
Universal Flash Loader Configurator software
The latest version of the Universal Flash Loader Configurator software can always be downloaded from our website:
https://www.segger.com/downloads/flasher
This software is only needed if your CPU requires the usage of the Universal Flash Loader.
Flasher ATE Getting Started
There is an additional Flasher ATE Getting Started (AN08007) available which can be downloaded here: https://www.segger.com/downloads/flasher.
The Flasher ATE has been designed to be used in conjunction with automated test equipment (ATE). It is modular and scalable from 1 to 10 individual programming modules.
The Flasher ATE mainboard and the modules are powered either by a dedicated power
connector (VMAIN) or by USB. The power source may not be switched while the Flasher
ATE is running.
For target power supply, the Flasher ATE offers two options. Additionally, a power discharge
option is available. The target is electrically isolated from the mainboard’s power supply.
The first option is to use the VTGT connector. It is possible to provide any voltage between
3 and 15V, however the target interface is limited to 1.2V - 5V signal voltage. The VTGT
connector is directly coupled to the target, so any electrical isolation has to be done in the
external power supply.
The second option is to use the module’s internal power source VCC5V, which is able to
deliver up to 100mA to the target.
The power discharge option applies, when the operation has finished. A 39 ohms resistor
is used to discharge any remaining charge on the target’s capacitors. As the thermal load
of the resistor is limited, the target’s capacity may not exceed 27mF at 15V or 250mF at
5V supply voltage.
Note
Flasher ATE programming modules provide functional isolation among each other.
Do not use with hazardous voltages to avoid risk of electrical shock and fire.
The Flasher ATE comes with an additional Ethernet interface to communicate with the host
system. The Flasher ATE has a built-in webserver which allows some basic setup of the
emulator, e.g. configuring a default gateway which allows using it even in large intranets.
2.2.1 Connecting for the first time
When connecting Flasher ATE for the first time, it attempts to acquire an IP address via
DHCP. The recommended way for finding out which IP address has been assigned to Flasher
ATE is to use the J-Link Configurator. The J-Link Configurator is a small GUI-based utility
which shows a list of all emulators that are connected to the host PC via USB and Ethernet.
For more information about the J-Link Configurator, please refer to UM08001_JLink.pdf (JLink / J-Trace user guide), chapter Setup, section J-Link Configurator.
The picture shows the J-Link Configurator with the detected Flasher ATEs. Select the one
you want to configure.
You may configure your Flasher ATE to use your preferred IP setting. This is done by selecting the Flasher ATE in the list, opening the context menu with a right click on the list
entry, and choosing Configure from the context menu. Enter your required IP settings in
the dialog box that opens up, e.g. as shown in the next picture. Confirm the IP settings
by pressing OK.
If your computer is connected to a wireless LAN, some routers do not forward the
broadcast messages used to find the Flasher ATE from LAN to WLAN. In that case
either use a LAN connection for your computer or connect the Flasher ATE via USB to
your computer and choose the Flasher ATE in the list of connected USB devices.
The Flasher ATE is able to operate in the following modes:
•remote controlled mode
•handshake mode
Definition of remote-controlled mode
The remote-controlled mode is the recommended mode of operation. The Flasher ATE will
receive its commands via an interface and will report the results to the caller. That is how
the caller can check if the programming was done successfully or not.
Definition of handshake mode
The stand-alone mode is controlled the 3 handshake lines.
2.3.1 Remote-controlled mode
The remote-controlled mode provides a way to integrate the Flasher ATE into a production
environment and control it via a communication protocol. Therefore two physical interfaces
can be used: ethernet or RS232. In this setup, the Flasher ATE provides detailed status
information which can be used to verify the success of the programming sequence, optimize the production setup, and identify errors. The following picture shows the Flasher ATE
integration into a production environment.
In order to use Flasher in “remote-controlled mode”, it has to be configured first, as described in Setting up Flasher for remote-controlled mode on page 31.
2.3.2 Handshake mode
The handshake mode provides a simple way to start the flashing of the connected targets.
The pins 1, 4, 5 and 7 of the RS232 connector can be used to e.g. connect a start button
and two indicator LEDs for programming control. The following picture show the Flasher
ATE internal logic and the signal states during the programming sequence.
Note
The Flasher ATE will not provide any detail error codes during this mode. We recommend to use the remote controlled mode for mass production.
In order to use Flasher in “handshake mode”, it has to be configured first, as described in
Setting up Flasher for handshake mode on page 33.
The Flasher ATE stores the configuration and programming data on its internal memory.
This can be accessed with an FTP-client. Each module has capacity of approximately 126MB
for data and configuration files.
The files are stored on the Flash Modules. They are mounted via the mainboard in subfolders named “Module.xxx”, with xxx being the number in the flash module chain, e.g.
“Module.001” for the first module. The first module next to the mainboard is assigned the
number one and the last module is assigned the number ten.
The Flasher ATE includes an UART to TCP transceiver. Each module is accessible via a
connection to a module-specific TCP port.
ModuleTCP port
#141
#242
#343
#444
#545
#646
#747
#848
#949
#1050
While the transceiver is switched off, status messages from the module are sent out to the
terminal. If the transceiver is active, incoming data on pin 17 on the debug interface is sent
to the TCP connection, and incoming data on the TCP connection is sent to pin 5 on the debug interface. The parameters for the UART configuration are handed over when activating
the transceiver mode with the command #TERMINAL <module(s)> <Baudrate>,<Databit-s>,<Parity>,<Stopbits> on page 67.
Note
The transceiver cannot be enabled while the module is programming. Also programming, erasing etc. can not be started if the transceiver mode is active.
31CHAPTER 3Setting up Flasher ATE for remote-controlled
mode
3.1 Setting up Flasher ATE for remote-controlled
mode
In order to set up the Flasher ATE for the remote-controlled mode it needs to be configured
once using the J-Flash software. For more information about J-Flash, please refer to the
J-Flash User Guide.
After starting J-Flash, open the appropriate J-Flash project for the target the Flasher ATE
shall be configured for, by selecting File -> Open Project. If J-Flash does not come with
an appropriate sample project for the desired hardware, a new project needs to be created
by selecting File -> File -> New Project.
After the appropriate project has been opened / created, the data file which shall be programmed needs to be loaded, by selecting File -> Open. After this J-Flash should look
like in the screenshot below.
32CHAPTER 3Setting up Flasher ATE for remote-controlled
mode
Before downloading the configuration (project) and program data (data file) to the Flasher
ATE, both files need to saved to disk by File -> Save Flasher Config File and File ->
Save Flasher Data File.
Next, upload the configuration file and the data file with an FTP client into the Flasher ATE
module folder(s). If the J-Flash tool also generates a .pex file this also needs to be loaded
into the module folder(s). But it must be located in a subfolder which must be named like
your project. E.g. if your project is named MyTest with the project files MyTest.cfg and
MyTest.dat, then the subfolder must be named MyTest.
From now on, the Flasher ATE can be used in stand-alone mode (without host PC interaction)
for stand-alone programming.
33CHAPTER 3Setting up Flasher ATE for handshake mode
3.2 Setting up Flasher ATE for handshake mode
In order to set up the Flasher ATE for the handshake mode it needs to be configured once
using the J-Flash software. For more information about J-Flash, please refer to the J-FlashUser Guide.
Please follow the steps in chapter Setting up Flasher for remote-controlled mode on page 31
first.
In addition you have to tell the Flasher ATE which project shall be programmed. Therefore
you can directly edit the FLASHER.ini file in each modules folder, or connect to the Flasher
ATE and use the “#select” command.
The FLASHER.ini file might look like as follows if your project is named MyTest:
As an alternative to the stand-alone mode, configured via J-Flash, there is the Universal
Flash Loader mode. While the normal stand-alone mode relies on using the debug interface
of the device, the Universal Flash Loader mode uses device or vendor specific programming
interfaces and protocols and therefore it is independent of the CPU core.
3.3.1 Preparing manually
The Universal Flash Loader uses an initialization file (*.UNI), a device specific flash programming algorithm (*.PEX) and a data file (*.HEX, *.MOT, *.BIN or *.DAT).
3.3.1.1 Configuration
The initialization file basically is split into three parts. The first part, the section [DEVICE],
controls the generic behavior of the Universal Flash Loader. It specifies which protocol
driver and data file to use. It allows enabling and configuring target power and it defines
which actions to perform. The second part consists of one or more [BANKx] sections, which
contain information about the memories. The third part, the section [CONFIG], includes
configuration settings for the protocol driver.
If set to a value >0, power is applied to the target. The value defines the delay (in ms)
after enabling the target power supply and before starting to communicate with the target.
If set to 1, the chip erase function is called for erasing the chip.
Note
Do not enable this setting if the flash programming algorithm does not support chip
erase.
[TASKS]
CheckBlank
Defines if a blank check should be performed before erasing a sector.
Erase
Defines if the sector should be erased before programming.
Program
Defines if the sector should be programmed.
Verify
Defines if the sector should be verified after programming.
Secure
Defines if the device should be secured or protected against read-out after verifying.
[DEVICE]
Algo
File name of the flash programming algorithm. This file is provided by SEGGER and will
typically support a series of devices.
Data
File name of the data file to program. The flasher supports the Flasher DTA, the Intel HEX,
the Motorola S-Record and the binary file format. Flasher DAT files are generated by J-Flash
and offer high performance together with high flexibility. The other file formats produce a
small overhead, because they have to be parsed before the data can be programmed.
Offset
Offset to apply when programming a binary data file. Unless specified differently, binary
files start at offset 0x00000000.
[BANKx]
x blocks with configuration data for the flash banks. All three parameters (Base, Size and
Sect) are mandatory.
This section includes specific configuration data for the flash programming algorithm.
There are no general parameters.
Note
The data file must be organized in ascending address order. Gaps can be included. But
descending addresses will result in programming errors. You can sort the data files by
loading them into the J-Flash tool and saving it as a new file.
The RL78/G10 devices do not require any configuration data.
3.3.1.5 Configuration Data for Renesas RL78 (except RL78/G10)
BaudRate
The baud rate used for programming. Possible values are 115,200, 250,000, 500,000 and
1,000,000.
ClearConfigOnConnect
If this is set to 1, the first sector holding the configuration is cleared on connect. This will
especially reset the clock configuration to its default value allowing a higher programming
speed.
Security
Security configuration byte:
ItemContents
Bit 7Fixed to 1
Bit 6Fixed to 1
Bit 5Fixed to 1
Bit 4
Bit 3Fixed to 1
Bit 2
Bit 1
Bit 0Fixed to 1
Programming disable flag
(1: Enable programming, 0: Disable programming)
The interface mode (0 = low speed / 1 = high speed) used for communication.
ROP
Read out protection configuration byte: Depending on the target, 0x00 or 0xAA.
SectorSize
Sector size: Depending on the target: “64” for low density flash memory, “128” for medium
or high density flash memory.
Pins are connected as follows:
Flasher InterfaceSignal
Pin 1VCCT
Pin 2VCCT
Pin 4GND
Pin 6GND
Pin 8GND
Pin 9SWIM
Pin 10GND
Pin 12GND
Pin 14GND
Pin 15Reset
Pin 16GND
Pin 18GND
Pin 20GND
Note
As the STM8’s option bytes are part of the data image, the data image must not enable
the read out protection for the device in order to allow verification after programming.
The read out protection can be set finally by enabling the step “Secure”. This function
only changes the ROP option byte to the appropriate value.
In order to set up Flasher for the Universal Flash Loader mode, a PC utility called SEGGER
Universal Flash Loader Configurator is available for download.
The Universal Flash Loader Configurator comes with a large list of devices and flash programming algorithms. If you are going to use a device from one of the supported families
which currently is not available in the utility, feel free to contact the support.
The functionality for downloading configuration and data files to the Flasher PRO is built-in.
For the Flasher ATE, the files need to be manually exported using “Save Flasher UNI file…”
and then transferred to the appropriate modules via FTP.
The Flasher ATE supports programming of serial numbers. In order to use the serial number
programming feature, the J-Flash project to be used as well as some files on the Flasher
ATE (depending on the configuration) need to be configured first.
In general, Flasher ATE supports two ways of programming a serial number into the target:
1. Programming continuous serial numbers. Serial number is 1-4 bytes in size. Start serial
number, increment, serial number size and address is configured in the J-Flash project.
2. Programming custom serial numbers from a serial number list file. Start line into serial
number list file to get next serial number bytes, line increment, serial number size and
address is configured in J-Flash project. Serial number list file needs to be specified
and created by user.
Some generic information on how to setup Flasher ATE & the J-Flash project for serial
number programming are provided below.
Note
Full serial number programming support has been introduced with V4.51d of the JFlash software and the Flasher firmware that comes with it.
4.1.1 Serial number settings
In order to enable the programming of serial numbers in stand-alone mode, the J-Flash
project has to be configured to enable programming a serial number at a specific address.
This is done by enabling the Program serial number option as shown in the screenshot
and table below:
SettingMeaning
AddressThe address the serial number should be programmed at.
The length of the serial number (in bytes) which should be programmed.
If no serial number list file is given, J-Flash allows to use a 1-4
byte serial number. In case 8 is selected as length, the serial
number and its complementary are programmed at the given address.
Page 48
48CHAPTER 4Serial number programming
SettingMeaning
In case a serial number list file is given, Flasher ATE will take the
serial number bytes from the list file.
If a serial number in the list file does not define all bytes of Len
the remaining bytes are filled with 0s. No complements etc. are
added to the serial number.
In case no serial number list file is given, Next SN is the next serial number which should be programmed. The serial number is
always stored in little endian format in the flash memory.
Next SN
IncrementSpecifies by how much Next SN is incremented.
In case a serial number list file is given, Next SN describes the
line of the serial number list file where to read the next serial
number bytes from. Flasher ATE starts counting with line 0, so
in order to start serial number programming with the first line of
the SNList.txt, Next SN needs to be set to 0.
4.1.2 Continuous Serial numbers
The Flasher ATE can generate serial numbers. Therefore the project can be configured to
use teh serial number feature (see on page 47). The Flasher ATE will use the first serial
number for the first programmed device. Then the increment is added to the serial number
and this is used for the next programming sequence. The next serial number is stored in
the SERIAL.TXT file on each flash module. So the serial number is also power cycle safe. If
the file is missing at start up time, the number 0 is used for the first target.
To avoid doubled serial numbers with the Flasher ATE using more than one flash module
there are two options:
•Use an increment of the channel number, e.g. if you have 5 flash modules, use an
increment of 5 as well as 5 different SERIAL.TXT files at beginning of production.
•Use different serial number areas, e.g. if you have 5 flash modules, use an increment of
1 as well as 5 different SERIAL.TXT files at beginning of production. For the first module,
use the range from 1 to 1000, for the second 1001 to 2000 and so on.
The SERIAL.TXT file contains the value Next SN in ASCII notation, e.g. 1234 if the next
serial number is 1234.
Note
The serial number in SERIAL.TXT will also be incremented serial number programming
is disabled, to make sure that for the Flasher ATE logfile there is a reference for which
programming cycle passed and which did not. As long as serial number programming
has not been enabled in the J-Flash project, Flasher ATE does not merge any serial
number data into the image data to be programmed.
4.1.3 Serial number list file
In order to program custom serial numbers which can not be covered by the standard
serial number scheme provided by J-Flash (e.g. when programming non-continuous serial
numbers or having gaps between the serial numbers), a so called serial number list file
needs to be created by the user.
The SERIAL.TXT file needs to contain the values for the serial numbers in ASCII notation.
Each line in the file must contain one serial number.
Example
An 8-byte serial number should be programmed at address 0x08000000.
The associated serial number list in teh file should look as follows:
0102030455667788
The number of bytes to read per line is configured via the Len option in J-Flash. For more
information, please refer to Serial number settings on page 47.
Which line Flasher will read at the next programming cycle is configured via the Next SN
option in J-Flash. For more information, please refer to Serial number settings on page 47.
In this case, Next SN needs to be set to 0, since programming should be started with the
serial number bytes defined in the first line of the file.
Note
If the number of bytes specified in a line of the serial number list file is less than
the serial number length defined in the project, the remaining bytes are filled with
0s by Flasher ATE.
Note
If the number of bytes specified in a line of the serial number list file is greater than
the serial number length defined in the J-Flash project, the remaining bytes will be
ignored by Flasher ATE.
4.1.4 Programming process
The Flasher ATE will increment the serial number in SERIAL.TXT by the value defined in
Increment after each successful programming cycle.
For each programming cycle, the FLASHER.LOG file on the Flasher ATE flash module is
updated and contains the value from SERIAL.TXT that has been used for the programming
cycle.
Note
The serial number in SERIAL.TXT will also be incremented if serial number programming is disabled, to make sure that for the Flasher ATE logfile there is a reference
for which programming cycle passed and which did not. As long as serial number
programming has not been enabled in the J-Flash project, the Flasher ATE does not
merge any serial number data into the image data to be programmed.
4.1.5 Sample setup
Below, a small example is given on how to setup Flasher ATE for serial number programming. In the following example, 4-byte serial numbers starting at 1234567 (0x12D687)
shall be programmed at address 0x08001000.
Defining serial number address, length and start value
In the J-Flash project the following needs to be defined:
Downloading configuration, data and serial number to the Flasher ATE.
After setting up the rest of the configuration (Target interface etc.) and selecting an appropriate data file, the configuration, data, and serial number file needs to be downloaded
into Flasher ATE via FTP client.
52CHAPTER 4Limiting the number of programming cycles
4.2 Limiting the number of programming cycles
The Flasher ATE provides a mechanism to limit the number of programming cycles that can
be performed in stand-alone mode with the configuration that is stored on the Flasher ATE.
To make use of this feature, a file called Cntdown.txt needs to be placed on the Flasher
ATE module folder. This file simply contains a decimal number (32-bit unsigned integer)
that describes how many programming cycles can be performed with the current setup.
Note
The number in the Cntdown.txt is only updated on a successful programming cycle.
Programming cycles that failed do not affect the Cntdown.txt.
4.2.1 Changed fail/error LED indicator behavior
In case a Cntdown.txt is found at boot time, the fail/error LED of Flasher behaves different
from normal. If the number of programming cycles left is 10 or below, the following will
happen:
•The red error/fail LED will be lit for 1 second
•After this, it will blink/toggle x times @ 5 Hz, indicating the number of programming
cycles left. (blinking 5 times for 5 cycles left, …)
In stand-alone mode the Flasher ATE supports patch files which allows to patch the content
of the data to be programmed. Before starting programming process in stand-alone mode,
the Flasher ATE will look for a file named Patches.txt being present on the Flasher ATE
module. This file includes the patches. If this file is present, the number in Serial.txt
describes the line number of the Patches.txt that will be used for the current cycle (line
counting starts at 0).
Each line in the Patches.txt can hold up to 4 patches, where each patch can be up to
32 bytes in length.
Syntax
Each line begins with <NumPatches> followed by each patch <Addr>,<NumBytes>:<Data>
in sequence and separated by commas. So the syntax for <NumPatches> = 4 would be as
follows:
The FTP server provides easy access to the files on the internal file system. The server
supports a maximum of 2 simultaneous connections and works with all common FTP clients.
For the Flasher ATE, the FTP server is the only way to access files on the modules. Here
the root directory is a virtual directory and cannot be written to. It contains a subdirectory
for each module.
The module next to the mainboard is the first one and is mounted as MODULE.001 and the
last module is mounted as Module.010.
The FTP server allows you to upload or download the target configuration and data files.
The Flasher ATE setup files can also be uploaded or downloaded to the module folders.
The Flasher ATE writes a log file for executed operations. This can be found in the modules
folder and downloaded from there.
Note
The file system on the Flasher ATE supports only 8.3 file names. Meaning 8 characters
for the name and 3 characters for the file extension.
The IP setup is described here: Setting up the IP interface on page 20.
6.1.1 Access data
Anonymous access to the FTP server is limited to read-only access to the file system.
For write access, special login credentials have to be used:
Login: admin
Password: 1234
Note
The access data for read/write access can not be modified and it is intended to be
used only as a convenience feature to avoid unintended modification of the Flasher’s
file system. It is not meant as a security feature.
The Flasher ATE comes with a built-in web server, which provides a web interface for information and network configuration. For the network, the IP address settings can be changed
and a nick name can be assigned to the device.
Additionally, the web interface provides information about the status of the integrated operating system, the IP stack and the target hardware. The Flasher ATE’s web interface furthermore allows monitoring of the individual modules.
The IP setup is described here: Setting up the IP interface on page 20.
There are three ways to remote control the Flasher ATE operation:
•Via Handshake lines: 3 lines on the serial interface are used:
1 line is an input and can be used to start operation,
2 lines are outputs and serve as busy and status signals.
The Flasher ATE can be remote-controlled by automated testers without the need of a
connection to a PC. Therefore the Flasher ATE is equipped with additional hardware control
functions, which are connected to the SUBD9 male connector, normally used as RS232
interface to PC.
The following diagrams show the internal remote control circuitry of Flasher:
Pin No.FunctionDescription
A positive pulse of any voltage between 5 and 30V
with duration of min. 30 ms starts “Auto” function
1START
4BUSY
5GNDCommon Signal ground.
7OK
Note
As the Flasher ATE is a modular system, using the handshake remote control START
always triggers the “Auto” function of every connected module. The BUSY line is signaled as long as any module is still busy and the OK line only reports “OK” in case
of every module has successfully completed the operation. We recommend using the
(Clear / Program / Verify) on falling edge of pulse.
The behavior of the “Auto” function depends on the
project settings, chosen in J-Flash at the Produc-tion tab.
As soon as the “Auto” function is started, BUSY
becomes active, which means that transistor is
switched OFF.
This output reflects result of last action. It is valid
after BUSY turned back to passive state. The output
transistor is switched ON to reflect OK state.
Once set up using J-Flash, the Flasher ATE can be driven by any application or just a simple
terminal using ASCII commands.
Every known command is acknowledged by the Flasher ATE and then executed. After command execution, the Flasher ATE sends an ASCII reply message.
Note
There are situations where the execution of a known command is rejected with
#NACK:ERRxxx if Flasher ATE is currently busy and the received command is not allowed to be sent while Flasher ATE is busy
8.3.2 General command and reply message format
•Any ASCII command has to start with the start delimiter #.
•Any ASCII command has to end with simple carriage return (’\r’, ASCII code 13).
•Commands can be sent upper or lower case.
8.3.3 General usage
Reply messages must be considered in each case. In general, a new command must not be
sent before a reply for the last one has been received. The least the “#ACK” needs to be
received by the controlling application before sending a new command for a flash module
not yet executing a command.
For the Flasher ATE, all commands triggering a flash programming function (#AUTO, #CAN-CEL, #ERASE, #PROGRAM, #VERIFY) may be used for other modules, before the current operation has been finished. Please note that in this case the overall finish indicator “#DONE”
will be sent when all commands have been executed.
When a flash programming function has finished, the debug logic of the MCU is disabled
(power down) and the target interface of the module is switched off (tristated).
8.3.4 Settings for ASCII interface via RS232
Flasher is driven via a RS232 serial port with the following initial interface settings:
•9600 baud
•8 data bits
•no parity
•1 stop bit
The baud rate can be changed by using the #BAUDRATE command.
8.3.5 Settings for ASCII interface via Telnet
A client application can connect to the Flasher ATE via Telnet on port 23. Find below a
screenshot of Flasher which is remote controlled via Telnet:
Some additional data are transferred via an additional telnet connection (target channel)
for each module. These data may be helpful for the project setup. In the normal operation
these channels are not required.
The table below gives an overview about the commands which are supported by the current
version of the Flasher ATE firmware. Click on the names for a detailed description:
Commands to the Flasher ATE
#BAUDRATE<Baudrate>
#AUTO <Module1>[,<Module2>]
#AUTO NOPATCH <Module1>[,<Module2>]
#AUTO PATCH <Module1>[,<Module2>] [number of patches],[address],[number of
The #AUTO command behaves exactly as the external remote control input.
Usually, the following command sequence will be performed when receiving the #AUTO
command:
•The Flasher ATE erases the target CPU (if not blank)
•The Flasher ATE programs the target CPU
•The Flasher ATE verifies the target CPU
Depending on the settings chosen in the Production tab in the J-Flash tool, this sequence
can differ from the one shown above.
Command structure:
#AUTO [module1][, module2][, module3]
Alternatively the modules can be replaced:
•*, will execute the auto command using all modules selected by the latest executed
selmodule command.
•all, will execute the auto command using all modules which can be detected.
Results of the Flasher ATE:
ResultMeaning
#OKsuccessfully done
if any error occurred during operation. xxx represents the
#ERRxxx
During execution of the #AUTO command, Flasher ATE automatically sends “status” messages via the terminal connection to reflect the state of execution.
error code, normally replied to Flasher ATE PC program.
#ERRxxx message may be followed by an additional error
text.
The #AUTO NOPATCH command allows to ignore an existing patch file for the programming.
The background about this is that the 3-wire handshake protocol shall be able to patch
data files, too. So the default behavior of the #auto command is that an existing patch file
(patch.txt in the module folder) is applied to a data if the #auto command is executed.
Flasher ATE responds with
•#OK if no error occurred
•#ERRxxx if any error occurred during operation. xxx represents the error code, normally
replied to Flasher PC program. The #ERRxxx message may be followed by an additional
error text.
For further information about the usage of the #AUTO PATCH command please refer to Patchfile support on page 54.
The #AUTO PATCH command allows patching of the content of the data to be programmed.
Flasher ATE responds with
•#OK if no error occurred
•#ERRxxx if any error occurred during operation. xxx represents the error code, normally
replied to Flasher PC program. The #ERRxxx message may be followed by an additional
error text.
For further information about the usage of the #AUTO PATCH command please refer to Patchfile support on page 54.
This command can be sent in order to change the baud rate of the Flasher ATE ’s RS232
interface used for communication. <Baudrate> is expected in decimal format. The Flasher
ATE supports baud rates form 1.200 to 115.200 bit/s.
Command structure:
#Baudrate [Baudrate]
Results of the Flasher ATE:
ResultMeaning
#OKsuccessfully done
#ERR255: Invalid pa-
rameters
#ERR255: Baudrate is
not supported
the baud rate parameter is invalid, e.g. contains not
parseable characters
the selected baud rate is not supported by the Flasher ATE,
e.g. it is to fast or slow.
Example sequence:
Command send to
the Flasher ATE
#BAUDRATE 115200
Note
After sending the #BAUDRATE command you will first have to wait until the Flasher ATE
responds with the #OK message. It is recommended wait further 5ms before sending
the next command with the new baud rate in order to give the Flasher ATE the time
to change the baud rate.
This command can be used instead of #AUTO to program a target without erasing the target
before programming and without performing a final verification.
Command structure:
#PROGRAM [module1][,module2][,module3]
Flasher ATE will reply the following sequence of messages:
This command turns on the RTT connection for the given modules.
Command structure:
#RTTON [module1][,module2][,module3] [RTT channel],[RTT control block address], [Number Down Buffers], [Number Up Buffers]
Example sequence:
Command send to
the Flasher ATE
#RTTON 1,2,3
0,0x20001000,3,3
The target data are transferred via an additional telnet connection. The telnet connection
for module 1 is available on port 41 up to module 10 on port 50.
The select command expects the following parameters:
ParameterMeaning
The [Project Name] specifies the name of file pair without extensions (.CFG and .DAT) on the Flasher ATE modules which
Project Name
should be selected. Flasher saves the selected configuration and
data file in the FLASHER.INI file. So this selection is remembered
even after power-cycling the Flasher ATE.
This command can be sent any time, even during other command execution. Flasher ATE
responds with its current state. All defined state messages are described under Repliesfrom Flasher ATE on page 92.
This command is used to select one or more modules on a Flasher ATE system. The module
numbers are separated by a comma. If all modules shall be selected, the keyword “all” can
be used (#SELMODULE ALL) instead of a list with all module numbers.
The TERMINAL command expects the following parameters:
ParameterMeaning
Baudrate
Data bits
Parity
Stop bitsThe stop bits parameter supports currently only 1 stop bit.
The baudrate of the UART which can be between 600 and
115,200 bits per second.
The data bits of an UART byte. The data bits parameter supports
currently only 8 bit.
Parity can be
1) N (no parity),
2) E (even parity) or
3) O (odd parity).
Example sequence:
Command send to
the Flasher ATE
#TERMINAL 1,2,3
115200,8,E,1
The target data are transferred via an additional telnet connection. The telnet connection
for module 1 is available on port 41 up to module 10 on port 50.
If you want to turn off the UART terminal mode use the parameter off.
Reply on the main channel
(RS232 or telnet connection)
#ACK
#OK
Reply on the target
channel (telnet connection
to flash module)
Command structure:
#TERMINAL [module1][,module2][,module3] off
Example sequence:
Command send to
the Flasher ATE
#TERMINAL 1,2,3 off
Reply on the main channel
(RS232 or telnet connection)
#ACK
#OK
Reply on the target
channel (telnet connection
to flash module)
Note
The terminal feature uses the following pins: Pin 5 = Flasher-Tx (out), Pin 17 = Flasher-Rx (in).
The reply messages from Flasher ATE follow the same data format as commands. Any reply
message starts with ASCII start delimiter #, ends with simple carriage return (ASCII code
13) and is sent in uppercase. In contrast to commands, replies can be followed by a de-
scriptive message, which gives more detailed information about the reply. This description
is sent in mixed case. The #OK reply, for example, is such a reply. It is followed by a string
containing information about the performance time needed for the operations:
The following reply messages from Flasher ATE are defined:
8.3.6.2.1 #ACK
Flasher replies with #ACK message on reception of any defined command before the command itself is executed.
8.3.6.2.2 #NACK
Flasher replies with #NACK, if an undefined command was received.
8.3.6.2.3 #OK
Flasher replies with #OK, if a command other than #STATUS or #RESULT was executed and
ended with no error.
8.3.6.2.4 #OK:<Data>
Flasher replies with #OK:<Len>:<Data> if a #FREAD command was executed. <NumBytes>
is the number of bytes which could be read. This value may differ from the number of
requested bytes, for example if more bytes than available, were requested. <NumBytes>
and <Data> are send in hexadecimal format (for <Data>: two hexadecimal characters per
byte).
8.3.6.2.5 #STATUS:<data>
The Flasher ATE replies with its current state.
The following status messages are currently defined:
MessageDescription
#STATUS:READY
#STATUS:CONNECTING
#STATUS:INITIALIZING
#STATUS:UNLOCKINGUnlocking flash sectors.
#STATUS:ERASING
#STATUS:PROGRAMMING
#STATUS:VERIFYING
Flasher is ready to receive a new command.
Flasher initializes connection to target
CPU.
Flasher performs self check and internal
init.
Flasher is erasing the flash of the target
device.
Flasher is programming the flash of the
target device.
The Flasher ATE reports the result of an operation on a specific module. If the operation
has been completed successfully, it will report the outcome with a single message of this
type followed by the last result of the operation.
8.3.6.2.7 #DONE
For the Flasher ATE, getting a result from a module does not necessarily mean, the Flasher
ATE is in idle state. Therefore, this message is being sent, once all operations are finished
and all modules are back in idle state.
A typical sequence for using the Flasher ATE is as follows:
J-Link / Flasher ATE Mainboard V1 telnet-shell.
J-Link / Flasher ATE Mainboard V1 compiled Mar 15 2018 12:28:43
#SELMODULE 1,2
#ACK
#SELECTED:1,2
#AUTO *
#ACK
#RESULT:1:#ERR255:Error while flashing
#RESULT:2:#OK (Total 2.653s, Erase 0.327s, Prog 1.960s, Verify 0.234s)
#DONE
8.3.6.2.8 #ERRxxx <Data>
If any command other than #STATUS or #RESULT was terminated with an error, Flasher ATE
cancels the command and replies with an error message instead of #OK message.
Some error codes may be followed by colon and an additional error text.
For example:
#ERR007:CANCELED.
The error code numbers are described in the following table:
MessageDescription
#ERR007
#ERR008
#ERR009Failed to allocate memory.
#ERR010Failed to open file.
#ERR011Failed to read file.
#ERR012Failed to write file.
#ERR013Failed to delete file.
#ERR098Failed to delete file.
#ERR098
#ERR099
#ERR101
#ERR102Could not open the data file.
#ERR255
Flasher received #CANCEL command and
has canceled the current operation.
Flasher is already busy with execution of
previous command.
Could not allocate memory for device specific algorithm.
Device specific algorithm is not yet supported by this firmware version. Please
check for an update.;
Could not find device programming algorithm.
Undefined error occurred. This reply is followed by an error string.
Flasher has a JTAG connector compatible with ARM’s Multi-ICE. The JTAG connector is a
20 way Insulation Displacement Connector (IDC) keyed box header (2.54mm male) that
mates with IDC sockets mounted on a ribbon cable.
9.1.1 Pinout JTAG
The following table lists the Flasher JTAG pinout.
PINSIGNALTYPEDescription
This is the target reference voltage. It is used to check if the
target has power, to create the logic-level reference for the
1VTrefInput
2VsupplyNC
3nTRSTOutput
5TDIOutput
7TMSOutput
9TCKOutput
11RTCKInput
13TDOInput
15RESETI/O
input comparators and to control the output logic levels to
the target. It is normally fed from Vdd of the target board
and must not have a series resistor.
This pin is not connected to Flasher ARM. It is reserved for
compatibility with other equipment. Connect to Vdd or leave
open in target system.
JTAG Reset. Output from Flasher ARM to the Reset signal of
the target JTAG port. Typically connected to nTRST of the
target CPU. This pin is normally pulled HIGH on the target to
avoid unintentional resets when there is no connection.
JTAG data input of target CPU. It is recommended that this
pin is pulled to a defined state on the target board. Typically
connected to TDI of target CPU.
JTAG mode set input of target CPU. This pin should be pulled
up on the target. Typically connected to TMS of target CPU.
JTAG clock signal to target CPU. It is recommended that this
pin is pulled to a defined state of the target board. Typically
connected to TCK of target CPU.
Return test clock signal from the target. Some targets must
synchronize the JTAG inputs to internal clocks. To assist in
meeting this requirement, you can use a returned, and retimed, TCK to dynamically control the TCK rate. Flasher ARM
supports adaptive clocking, which waits for TCK changes to
be echoed correctly before making further changes. Connect
to RTCK if available, otherwise to GND.
JTAG data output from target CPU. Typically connected to
TDO of target CPU.
Target CPU reset signal. Typically connected to the RESET
pin of the target CPU, which is typically called “nRST”,
“nRESET” or “RESET”.
This pin is not connected in Flasher ARM. It is reserved for
17DBGRQNC
5V-Target
19
supply
Pins 4, 6, 8, 10, 12, 14, 16, 18, 20 are GND pins connected to GND in Flasher ARM. They
should also be connected to GND in the target system.
Output
compatibility with other equipment to be used as a debug
request signal to the target system. Typically connected to
DBGRQ if available, otherwise left open.
This pin is used to supply power to some eval boards. Typically left open on target hardware.
9.1.2 Pinout SWD
The 20-pin connector of Flasher is also compatible to ARM’s Serial Wire Debug (SWD)
interface.
The following table lists the Flasher ATE SWD pinout.
PINSIGNALTYPEDescription
This is the target reference voltage. It is used to check if the
target has power, to create the logic-level reference for the
1VTrefInput
2VsupplyNC
3Not UsedNC
5Not usedNC
7SWDIOI/OSingle bi-directional data pin.
9SWCLKOutput
11Not usedNC
13SWOOutput
input comparators and to control the output logic levels to
the target. It is normally fed from Vdd of the target board
and must not have a series resistor.
This pin is not connected in Flasher ATE. It is reserved for
compatibility with other equipment. Connect to Vdd or leave
open in target system.
This pin is not used by Flasher ATE. If the device may also
be accessed via JTAG, this pin may be connected to nTRST,
otherwise leave open.
This pin is not used by Flasher ATE. If the device may also be accessed via JTAG, this pin may be connected to TDI,
otherwise leave open.
Clock signal to target CPU.
It is recommended that this pin is pulled to a defined state
of the target board. Typically connected to TCK of target
CPU.
This pin is not used by Flasher ATE. This pin is not used by
Flasher ATE when operating in SWD mode. If the device may
also be accessed via JTAG, this pin may be connected to
RTCK, otherwise leave open.
Serial Wire Output trace port. (Optional, not required for
SWD communication.)
Target CPU reset signal. Typically connected to the RESET
15RESETI/O
17Not usedNCThis pin is not connected in Flasher ATE.
5V-Target
19
supply
Pins 4, 6, 8, 10, 12, 14, 16, 18, 20 are GND pins connected to GND in Flasher ATE. They
should also be connected to GND in the target system.
Output
pin of the target CPU, which is typically called “nRST”,
“nRESET” or “RESET”.
This pin is used to supply power to some eval boards. Typically left open on target hardware.
9.1.3 Target power supply
Pin 19 of the connector can be used to supply power to the target hardware. Supply voltage is 5V, max. current is 400mA. The output current is monitored and protected against
overload and short-circuit.
Power can be controlled via the ASCII command interface on page 64 or by enabing power
supply in the project configuration.
We strongly advise following the recommendations given by the chip manufacturer. These
recommendations are normally in line with the recommendations. Please refer to the the
appropriate tables depending on the core:
•Pinout JTAG on page 95
•Pinout SWD on page 96
In case of doubt you should follow the recommendations given by the semiconductor manufacturer.
9.2.1 Pull-up/pull-down resistors
Unless otherwise specified by developer’s manual, pull-ups/pull-downs are recommended
to be between 2.2 kOhms and 47 kOhms.
9.2.2 RESET, nTRST
The debug logic is reset independently from the CPU core with nTRST. For the core to
operate correctly it is essential that both signals are asserted after power-up.
The advantage of having separate connection to the two reset signals is that it allows the
developer performing software debug to setup breakpoints, which are retained by the debug
logic even when the core is reset. (For example, at the reset vector address, to allow the
code to be single-stepped as soon as it comes out of reset). This can be particularly useful
when first trying to bring up a board with a new ASIC.
The JTAG Isolator can be connected between Flasher ATE and JTAG adapter, to provide
electrical isolation. This is essential when the development tools are not connected to the
same ground as the application. For more information about the JTAG Isolator, please refer
to J-Link JTAG Isolator User Manual (UM08010) which can be downloaded from our website.
9.3.1.1 Pinout
The following table shows the target-side pinout of the JTAG Isolator adapter.
PinSignalTypeDescription
1VCCOutputThe target side of the isolator draws power over this pin.
2VCCOutputThe target side of the isolator draws power over this pin.
JTAG Reset. Output from Flasher ATE to the Reset signal of
3nTRSTOutput
5TDIOutput
7TMSOutput
9TCKOutput
11RTCKInput
13TDOInput
15RESETI/O
17N/CN/CThis pin is not connected on the target side of the isolator.
19N/CN/CThis pin is not connected on the target side of the isolator.
the target JTAG port. Typically connected to nTRST of the
target CPU. This pin is normally pulled HIGH on the target to
avoid unintentional resets when there is no connection.
JTAG data input of target CPU. It is recommended that this
pin is pulled to a defined state on the target board. Typically
connected to TDI of target CPU.
JTAG mode set input of target CPU. This pin should be pulled
up on the target. Typically connected to TMS of target CPU.
JTAG clock signal to target CPU. It is recommended that this
pin is pulled to a defined state of the target board. Typically
connected to TCK of target CPU.
Return test clock signal from the target. Some targets must
synchronize the JTAG inputs to internal clocks. To assist in
meeting this requirement, you can use a returned, and retimed, TCK to dynamically control the TCK rate.
JTAG data output from target CPU. Typically connected to
TDO of target CPU.
Target CPU reset signal. Typically connected to the RESET
pin of the target CPU, which is typically called “nRST”,
“nRESET” or “RESET”.
Pins 4, 6, 8, 10, 12, 14, 16, 18, 20 are connected to GND.
9.3.2 J-Link Needle Adapter
To connect to the Flasher ATE via programming interface the J-Link Needle Adapter is recommended.
Why to choose the J-Link Needle Adapter:
1. No additional connector required on your PCB
2. Very small footprint
3. High reliability spring pins for secure connections
4. Designed with 3 locating pins, so the adapter can not be connected the wrong way
5. No external power supply required! The J-Link Needle Adapter comes with the option
to power the target hardware via J-Link.
These features make the J-Link Needle Adapter the perfect solution for production purposes.
The pinout of the J-Link Needle Adapter is based on the pinout of the needle adapter by TagConnect. Please note, that both pinouts are not identical since the J-Link Needle Adapter
comes with a 5V-supply pin.
As you can see on the image below, the three locating pins ensure, that the adapter cannot
be connected to the PCB the wrong way.
Moreover, the two “legs” on each side of the connector guarantee a stable and secure
contact between pins and the PCB.
The J-Link Needle Adapter can be connected to J-Link via the 20-pin 0.1’’ JTAG to a 10-pin needle connector.
9.3.3 Flasher RX 14-pin Adapter
Flasher ATE itself has a 20-pin JTAG connector mounted but comes with a 14-pin adapter
for Renesas RX devices. This adapter also enables Flasher ATE to optionally power the connected target hardware. On the adapter there is a jumper which allows selection between