Segger Flasher ATE User Manual

Flasher User Guide
Document: UM08022
Software Version: 6.32
Revision: 2
Date: June 12, 2018
A product of SEGGER Microcontroller GmbH
2
Disclaimer
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 (SEG­GER) 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.
© 2004-2018 SEGGER Microcontroller GmbH, Hilden / 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 respective holders.
Contact address
SEGGER Microcontroller GmbH
In den Weiden 11 D-40721 Hilden
Germany
Tel. +49 2103-2878-0 Fax. +49 2103-2878-28 E-mail: support@segger.com Internet: www.segger.com
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
3
Manual versions
This manual describes the Flasher device. For further information on topics or routines not yet specified, please contact us.
Print date: June 12, 2018
Manual version
Revision Date By Description
6.32 2 180205 AB
Chapter “Working with Flasher” * Added STM8 support to universal flash loader.
6.30 1 180222 AG
Chapter “Working with Flasher” * Section “Custom labels” added.
6.20 1 171130 AB
Chapter “Working with Flasher” * Section “Flasher ATE” added. Added chapter “TCP Services”
6.20 0 171121 AB
Chapter “Working with Flasher” * Section “Flasher Portable PLUS” added.
6.10a 0 160922 EL
Chapter “Introduction” * Section “Flasher Portable” updated.
6.00 0 160715 NG
Chapter “Working with Flasher” * Section “Batch Programming” added.
5.12e 0 160511 NG
Chapter “Working with Flasher” * Section “Setting up Flasher for stand-alone mode” moved. * Section “Preparing for stand-alone operation manually” added.
5.02f 0 151023 RH
Chapter “Remote control” * Section “General usage” addded.
5.02e 0 151021 EL
Chapter “Introduction” * Section “Specifications” updated for all models.
5.02f 0 151014 RH
Chapter “Working with Flasher” * Section “Programming multiple targets” addded.
4.50c 0 150611 EL
Chapter “Working with Flasher” * Section “Programming multiple targets in parallel” addded.
4.98 0 150205 AG
Chapter “Working with Flasher” * Section “Authorized flashing” added. * Section “Limiting the number of programming cycles” added. * Section “Operating Modes” updated.
4.86 0 140610 AG
Chapter “Working with Flasher” * Section “Newline encoding” added.
4.80 1 131220 AG
Chapter “Working with Flasher” * Section “Multiple File Support” updated.
4.80 0 131031 EL
Chapter “Remote control” * Section “Commands to Flasher” updated. “#FCRC” command added.
4.78 0 130917 AG
Chapter “Introduction” * Section “Features of Flasher Portable” added. Chapter “Working with Flasher” * Section “Flasher Portable” added. * Section “Multiple File Support” updated.
4.72 0 130612 EL
Chapter “Working with Flasher” * Section “Patch file support” added.
4.64a 0 130226 EL
Chapter “Working with Flasher” * Section “LED status indicators” updated.
4.63a 0 130131 EL
Chapter “Remote Control” * Section “ASCII command interface” Chapter “ASCII interface via Telnet” added.
4.62 0 130125 EL
Flasher ARM, Flasher RX and Flasher PPC manual have been combined.
5.02 0 150807 RE
New commands #FLIST and #MKDIR in ASCII command interface
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
4
Flasher User Guide (UM08022) © 2004-2018 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 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 pro­gramming 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:
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 doc­uments.
GUIElement Buttons, dialog boxes, menu names, menu commands.
Emphasis Very important sections.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
6
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
7
Table of contents
1 Introduction ..................................................................................................................10
1.1 Flasher overview .......................................................................................... 11
1.1.1 Features of the Flasher ATE ................................................................11
1.1.2 Features of Flasher ARM/PPC/RX/PRO .................................................. 11
1.1.3 Features of Flasher Portable/Flasher Portable PLUS ................................ 12
1.1.4 Working environment .........................................................................12
1.2 Specifications ...............................................................................................14
1.2.1 Specifications for Flasher ATE ............................................................. 14
1.2.2 Specifications for Flasher ARM ............................................................ 17
1.2.3 Specifications for Flasher RX .............................................................. 19
1.2.4 Specifications for Flasher PPC ............................................................. 21
1.2.5 Specifications for Flasher PRO .............................................................23
1.2.6 Specifications for Flasher Portable PLUS ............................................... 26
1.2.7 Specifications for Flasher Portable ....................................................... 29
2 Working with Flasher ..................................................................................................32
2.1 Flasher Portable PLUS ...................................................................................33
2.1.1 Housing & Buttons ............................................................................ 33
2.2 Flasher Portable ........................................................................................... 35
2.2.1 Housing & Buttons ............................................................................ 35
2.3 Flasher ATE ................................................................................................. 37
2.3.1 Power supply ....................................................................................38
2.3.2 UART to TCP transceiver .................................................................... 38
2.4 File system ..................................................................................................40
2.5 Setting up the IP interface ............................................................................ 41
2.5.1 Connecting the first time ................................................................... 41
2.6 Operating modes ......................................................................................... 42
2.6.1 J-Link mode ..................................................................................... 42
2.6.2 Stand-alone mode .............................................................................43
2.6.3 MSD mode ....................................................................................... 46
2.7 Setting up Flasher for stand-alone mode .........................................................47
2.7.1 Preparing for stand-alone operation manually ....................................... 50
2.8 Universal Flash Loader mode ......................................................................... 52
2.8.1 Preparing manually ........................................................................... 52
2.8.2 Preparing using the PC utility ............................................................. 59
2.9 Multiple File Support .....................................................................................60
2.9.1 Flasher Portable specifics ................................................................... 60
2.9.2 Example ...........................................................................................61
2.10 Custom labels ............................................................................................ 62
2.10.1 Hardware and software requirements .................................................62
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
8
2.10.2 Assigning labels .............................................................................. 62
2.10.3 Considerations ................................................................................ 63
2.11 Programming multiple targets ...................................................................... 64
2.11.1 Programming multiple targets with J-Flash ......................................... 64
2.12 Batch Programming in stand-alone mode ...................................................... 65
2.12.1 Flasher Portable specifics ..................................................................65
2.12.2 Examples ........................................................................................67
2.13 Serial number programming ........................................................................ 68
2.13.1 Serial number settings ..................................................................... 68
2.13.2 Serial number file ............................................................................69
2.13.3 Serial number list file ...................................................................... 69
2.13.4 Programming process .......................................................................70
2.13.5 Downloading serial number files to Flasher ......................................... 71
2.13.6 Sample setup ..................................................................................71
2.14 Patch file support ....................................................................................... 73
2.15 Limiting the number of programming cycles .................................................. 74
2.15.1 Changed fail/error LED indicator behavior ........................................... 74
2.15.2 Required Flasher hardware version for Cntdown.txt support .................. 74
2.16 Authorized flashing ..................................................................................... 75
2.16.1 Creating / Adding the secure area ..................................................... 75
2.16.2 Moving files to the secure area ......................................................... 75
2.16.3 Considerations to be taken when using the secure area ........................ 76
2.16.4 Required Flasher hardware version .................................................... 76
2.17 Target interfaces ........................................................................................ 77
2.18 Supported microcontrollers .......................................................................... 78
2.18.1 Flasher ...........................................................................................78
2.19 Support of external flashes ..........................................................................79
2.19.1 Flasher ARM ................................................................................... 79
2.19.2 Flasher RX ......................................................................................79
2.19.3 Flasher PPC .................................................................................... 79
2.20 Supported cores .........................................................................................80
2.20.1 Flasher ARM ................................................................................... 80
2.20.2 Flasher RX ......................................................................................80
2.20.3 Flasher PPC .................................................................................... 80
2.21 Newline encoding ....................................................................................... 81
2.22 Programming multiple targets in parallel ....................................................... 82
3 TCP Services ..............................................................................................................83
3.1 FTP Server .................................................................................................. 84
3.1.1 Access data ......................................................................................84
3.2 Web server ..................................................................................................85
4 Remote control ............................................................................................................86
4.1 Overview .....................................................................................................87
4.2 Handshake control ....................................................................................... 88
4.3 ASCII command interface ............................................................................. 90
4.3.1 Introduction ......................................................................................90
4.3.2 General command and reply message format ....................................... 90
4.3.3 General usage .................................................................................. 90
4.3.4 Settings for ASCII interface via RS232 .................................................90
4.3.5 Settings for ASCII interface via Telnet ................................................. 90
4.3.6 Commands and replies ...................................................................... 91
5 Performance ..............................................................................................................100
5.1 Performance of MCUs with internal flash memory ........................................... 101
5.1.1 Flasher ARM ................................................................................... 101
5.1.2 Flasher RX ......................................................................................101
5.1.3 Flasher PPC .................................................................................... 101
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
9
6 Hardware ...................................................................................................................102
6.1 Flasher ARM 20-pin JTAG/SWD Connector ..................................................... 103
6.1.1 Pinout JTAG .................................................................................... 103
6.1.2 Pinout SWD .................................................................................... 104
6.1.3 Target power supply ........................................................................ 105
6.2 Flasher RX 14-pin connector ........................................................................ 106
6.2.1 Target power supply ........................................................................ 107
6.3 Flasher PPC 14-pin connector ...................................................................... 108
6.4 Target board design ....................................................................................109
6.4.1 Pull-up/pull-down resistors ............................................................... 109
6.4.2 RESET, nTRST ................................................................................. 109
6.5 Adapters ................................................................................................... 110
6.5.1 JTAG Isolator .................................................................................. 110
6.5.2 J-Link Needle Adapter ...................................................................... 111
6.6 How to determine the hardware version ........................................................ 112
7 Support and FAQs ....................................................................................................113
7.1 Contacting support ..................................................................................... 114
7.2 Frequently Asked Questions .........................................................................115
8 Background information ............................................................................................116
8.1 Flash programming .....................................................................................117
8.1.1 How does flash programming via Flasher work? ...................................117
8.1.2 Data download to RAM .....................................................................117
8.1.3 Available options for flash programming ............................................. 117
8.1.4 How does the universal flash programming work? ................................117
9 Glossary ....................................................................................................................118
10 Literature and references ........................................................................................122
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
Chapter 1 Introduction
This chapter gives a short overview about the different models of the Flasher family and their features.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
11 CHAPTER 1 Flasher overview
1.1 Flasher overview
Flasher is a programming tool for microcontrollers with on-chip or external flash memory. Flasher is designed for programming flash targets with the J-Flash software or stand-alone. In addition to that Flasher can also be used as a regular J-Link. For more information about J-Link in general, please refer to the J-Link / J-Trace User Guide which can be downloaded at http://www.segger.com.
Flasher connects to a PC using the USB/Ethernet/RS232 interface (what host interfaces are available depends on the Flasher model), 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 RS232 interface (handshake control or ASCII interface). Flasher always has a 20-pin connector, which target interfaces are supported depends on the Flasher model:
Flasher ARM: JTAG and SWD are supported.
Flasher RX: JTAG is supported. Flasher comes with additional 14-pin RX adapter
Flasher PPC: JTAG is supported. Flasher comes with additional 14-pin PPC adapter.
Flasher PRO: JTAG and SWD are supported.
1.1.1 Features of the Flasher ATE
Supports up to 10 individual channels
Stand-alone JTAG/SWD programmer (Once set up, Flasher can be controlled without the use of PC program)
Flexible power supply (USB, DC)
128 MB memory for storage of target program on each module
Data files can updated via the integrated FTP server
Flasher
model
Supported cores
Supported
target
interfaces
Flash programming speed
(depending on target hardware)
Flasher ATE
ARM7/ARM9/Cortex-M Rene­sas RX610, RX621, RX62N, RX62T Power PC e200z0
JTAG, SWD
between 30-300 Kbytes/ sec­ond
1.1.2 Features of Flasher ARM/PPC/RX/PRO
Three boot modes: J-Link mode, stand-alone mode, MSD mode
Stand-alone JTAG/SWD programmer (Once set up, Flasher can be controlled without the use of PC program)
No power supply required, powered through USB
Supports internal and external flash devices
128 MB memory for storage of target program
Can be used as J-Link (emulator) with a download speed of up to 720 Kbytes/second
Data files can updated via USB/Ethernet (using the J-Flash software), via FTP, via RS232 or via the MSD functionality of Flasher
Flasher
model
Supported cores
Supported
target
interfaces
Flash programming speed
(depending on target hardware)
Flasher ARM
ARM7/ARM9/Cortex-M JTAG, SWD
between 170 and 300 Kbytes/second
Flasher RX
Renesas RX610, RX621, RX62N, RX62T
JTAG
between 30-300 Kbytes/sec­ond
Flasher PPC Power PC e200z0 JTAG up to 138 Kbytes/second
Flasher PRO
RM7/ARM9/Cortex-M Rene­sas RX610, RX621, RX62N, RX62T Power PC e200z0
JTAG, SWD
between 30-300 Kbytes/ sec­ond
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
12 CHAPTER 1 Flasher overview
1.1.3 Features of Flasher Portable/Flasher Portable PLUS
Stand-alone in-circuit-programmer (Once set up, Flasher can be controlled without the use of a PC program)
Powered by an internal rechargeable battery (standard batteries for Flasher Portable), no Laptop or external power supply required.
Multiple firmware images can be stored on Flasher
128 MB memory for storage of target program
Easy selection of image to be programmed, via button
Supported CPUs: ARM Cortex, Legacy ARM7/9, Renesas RX, Freescale PowerPC
Supports internal and external flash
Free software updates*, 1 year of support
Data files can be updated via the MSD functionality or via J-Flash
Programming speed between 30-300 Kbytes/second (actual speed depends on target hardware)
Note
Ethernet and RS232 as host interface are not available for Flasher Portable
Note
*As a legitimate owner of a SEGGER Flasher, you can always download the latest software free of charge. Though not planned and not likely, we reserve the right to change this policy. Note that older models may not be supported by newer versions of the software. Typically, we support older models with new software at least 3 years after end of life
Supported cores
Supported
target interfaces
Flash programming speed
(depending on target hardware)
ARM7/ARM9/Cortex-M JTAG, SWD between 30-300 Kbytes/second
Renesas RX610, RX621, RX62N, RX62T
JTAG between 170 and 300 Kbytes/second
Power PC e200z0 JTAG up to 138 Kbytes/second
1.1.4 Working environment
General
The Flasher can operate 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 2000, Windows XP, Windows 2003, Windows Vista, Windows 7 or Windows 8. It needs to have a USB, Ethernet or RS232 interface available for communication with Flasher.
Power supply
Flasher Portable: 3x standard AAA batteries or 5V DC, min. 100 mA via USB connector.
Flasher Portable PLUS: internal rechargeable 680mAh Li-Ion battery, min. 100 mA via USB connector.
Other Flashers: 5V DC, min. 100 mA via USB connector.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
13 CHAPTER 1 Flasher overview
Installing Flasher PC-software (J-Flash)
The latest version of the J-Flash software, which is part of the J-Link software and docu­mentation package, can always be downloaded from our website: https://www.segger.com/jlink-software.html For more information about using J-Flash please refer to UM08003_JFlashARM.pdf (J-Flash user guide) which is also available for download on our website.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
14 CHAPTER 1 Specifications
1.2 Specifications
1.2.1 Specifications for Flasher ATE
General
Supported OS
Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Microsoft Windows 8 x64 Microsoft Windows 10 Microsoft Windows 10 x64
Operating Temperature +5 °C … +60 °C
Storage Temperature -20 °C … +60 °C
Relative Humidity (non-condensing) <90% rH
Mechanical mainboard
Size (without cables) 108mm x 56mm x 20mm
Weight (without cables) 47g
Mechanical module
Size (without cables) 108mm x 35mm x 20mm
Weight (without cables) 24g
Available interfaces
USB Host interface USB 2.0, hi speed
Ethernet Host interface 10/100 MBit
RS232 Host interface RS232 9-pin
Target interface (module) JTAG 20-pin (adapters available)
JTAG Interface, Electrical
Power Supply
USB powered or via external power supply (5V), max. 3A using 10 modules
Target interface voltage (VIF) 1.2 … 5V
Target supply voltage 3 - 15V (5V with no additional supply.)
Target supply current
100 mA (VCC5V - 5V) 400 mA (VTGT - 3 … 15V)
Reset Type Open drain. Can be pulled low or tristated
Reset low level output voltage (VOL) VOL ≤ 10% of VIF
For the whole target voltage range (1.8V VIF 5V)
LOW level input voltage (VIL) VIL ≤ 40% of VIF
HIGH level input voltage (VIH) VIH ≥ 60% of VIF
For 1.8V VIF 3.6V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 10% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 90% of VIF
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
15 CHAPTER 1 Specifications
For 3.6 VIF 5V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 20% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 80% of VIF
JTAG Interface, Timing
Max. JTAG speed up to 12MHz
Data input rise time (Trdi) Trdi ≤ 20ns
Data input fall time (Tfdi) Tfdi ≤ 20ns
Data output rise time (Trdo) Trdo ≤ 10ns
Data output fall time (Tfdo) Tfdo ≤ 10ns
Clock rise time (Trc) Trc ≤ 10ns
Clock fall time (Tfc) Tfc ≤ 10ns
1.2.1.1 Supported CPU cores
The Flasher ATE supports the following CPU cores:
ARM Cortex
Cortex-M0
Cortex-M0+
Cortex-M1
Cortex-M3
Cortex-M4
ARM (legacy cores)
ARM720T
ARM7TDMI
ARM7TDMI-S
ARM920T
ARM922T
ARM926EJ-S
ARM946E-S
ARM966E-S
ARM1136JF-S
ARM1136J-S
ARM1156T2-S
ARM1156T2F-S
ARM1176JZ-S
ARM1176JZF
ARM1176JZF-S
Renesas RX
RX610
RX621
RX62G
RX62N
RX62T
Freescale Power PC
e200z0
1.2.1.2 Supported Target interfaces
The Flasher ATE supports the following target interfaces:
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
16 CHAPTER 1 Specifications
JTAG
SWD
FINE
SPD
1.2.1.3 Flasher ATE download speed
The following table lists the Flasher ATE performance values for writing to memory (RAM) via the JTAG interface:
Hardware ARM7 memory download
Flasher ARM 720 Kbytes/s (12MHz JTAG)
Note
The actual speed depends on various factors, such as JTAG, clock speed, host CPU core etc.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
17 CHAPTER 1 Specifications
1.2.2 Specifications for Flasher ARM
General
Supported OS
Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Microsoft Windows 8 x64
Operating Temperature +5 °C … +60 °C
Storage Temperature -20 °C … +60 °C
Relative Humidity (non-condensing) <90% rH
Mechanical
Size (without cables) 121mm x 66mm x 30mm
Weight (without cables) 119g
Available interfaces
USB Host interface USB 2.0, full speed
Ethernet Host interface 10/100 MBit
RS232 Host interface RS232 9-pin
Target interface JTAG 20-pin (14-pin adapter available)
JTAG Interface, Electrical
Power Supply
USB powered, 100mA for Flasher ARM. 500 mA if target is powered by Flasher ARM
Target interface voltage (VIF) 1.2 … 5V
Target supply voltage Supply voltage is 5V, max.
Target supply current max. 400mA
Reset Type Open drain. Can be pulled low or tristated
Reset low level output voltage (VOL) VOL ≤ 10% of VIF
For the whole target voltage range (1.8V VIF 5V)
LOW level input voltage (VIL) VIL ≤ 40% of VIF
HIGH level input voltage (VIH) VIH ≥ 60% of VIF
For 1.8V VIF 3.6V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 10% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 90% of VIF
For 3.6 VIF 5V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 20% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 80% of VIF
JTAG Interface, Timing
Max. JTAG speed up to 12MHz
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
18 CHAPTER 1 Specifications
Data input rise time (Trdi) Trdi ≤ 20ns
Data input fall time (Tfdi) Tfdi ≤ 20ns
Data output rise time (Trdo) Trdo ≤ 10ns
Data output fall time (Tfdo) Tfdo ≤ 10ns
Clock rise time (Trc) Trc ≤ 10ns
Clock fall time (Tfc) Tfc ≤ 10ns
1.2.2.1 Flasher ARM download speed
The following table lists the Flasher ARM performance values for writing to memory (RAM) via the JTAG interface:
Hardware ARM7 memory download
Flasher ARM 720 Kbytes/s (12MHz JTAG)
Note
The actual speed depends on various factors, such as JTAG, clock speed, host CPU core etc.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
19 CHAPTER 1 Specifications
1.2.3 Specifications for Flasher RX
General
Supported OS
Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Microsoft Windows 8 x64
Operating Temperature +5 °C … +60 °C
Storage Temperature -20 °C … +60 °C
Relative Humidity (non-condensing) <90% rH
Mechanical
Size (without cables) 121mm x 66mm x 30mm
Weight (without cables) 119g
Available interfaces
USB Host interface USB 2.0, full speed
Ethernet Host interface 10/100 MBit
RS232 Host interface RS232 9-pin
Target interface
JTAG 20-pin (shipped with 14-pin adapter for Renesas RX)
JTAG Interface, Electrical
Power Supply
USB powered, 100mA for Flasher RX. 500 mA if target is powered by Flasher RX
Target interface voltage (VIF) 1.2 … 5V
Target supply voltage
Supply voltage is 5V, max. (on the J-Link RX 14-pin adapter, the target supply volt­age can be switched between 3.3V and 5V)
Target supply current max. 400mA
Reset Type Open drain. Can be pulled low or tristated
Reset low level output voltage (VOL) VOL ≤ 10% of VIF
For the whole target voltage range (1.8V VIF 5V)
LOW level input voltage (VIL) VIL ≤ 40% of VIF
HIGH level input voltage (VIH) VIH ≥ 60% of VIF
For 1.8V VIF 3.6V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 10% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 90% of VIF
For 3.6 VIF 5V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 20% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 80% of VIF
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
20 CHAPTER 1 Specifications
JTAG Interface, Timing
Max. JTAG speed up to 12MHz
Data input rise time (Trdi) Trdi ≤ 20ns
Data input fall time (Tfdi) Tfdi ≤ 20ns
Data output rise time (Trdo) Trdo ≤ 10ns
Data output fall time (Tfdo) Tfdo ≤ 10ns
Clock rise time (Trc) Trc ≤ 10ns
Clock fall time (Tfc) Tfc ≤ 10ns
1.2.3.1 Flasher RX download speed
The following table lists the Flasher RX performance values for writing to memory (RAM) via the JTAG interface:
Hardware Flasher RX600 series memory download
Flasher RX 720 Kbytes/s (12MHz JTAG)
Note
The actual speed depends on various factors, such as JTAG, clock speed, host CPU core etc.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
21 CHAPTER 1 Specifications
1.2.4 Specifications for Flasher PPC
General
Supported OS
Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Microsoft Windows 8 x64
Operating Temperature +5 °C … +60 °C
Storage Temperature -20 °C … +60 °C
Relative Humidity (non-condensing) <90% rH
Mechanical
Size (without cables) 121mm x 66mm x 30mm
Weight (without cables) 119g
Available interfaces
USB Host interface USB 2.0, full speed
Ethernet Host interface 10/100 MBit
RS232 Host interface RS232 9-pin
Target interface
JTAG 20-pin (shipped with 14-pin adapter for Renesas PPC)
JTAG Interface, Electrical
Power Supply
USB powered, 100mA for Flasher PPC. 500 mA if target is powered by Flasher PPC
Target interface voltage (VIF) 1.2 … 5V
Target supply voltage Supply voltage is 5V, max.
Target supply current max. 400mA
Reset Type Open drain. Can be pulled low or tristated
Reset low level output voltage (VOL) VOL ≤ 10% of VIF
For the whole target voltage range (1.8V VIF 5V)
LOW level input voltage (VIL) VIL ≤ 40% of VIF
HIGH level input voltage (VIH) VIH ≥ 60% of VIF
For 1.8V VIF 3.6V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 10% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 90% of VIF
For 3.6 VIF 5V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 20% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 80% of VIF
JTAG Interface, Timing
Max. JTAG speed up to 12MHz
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
22 CHAPTER 1 Specifications
Data input rise time (Trdi) Trdi ≤ 20ns
Data input fall time (Tfdi) Tfdi ≤ 20ns
Data output rise time (Trdo) Trdo ≤ 10ns
Data output fall time (Tfdo) Tfdo ≤ 10ns
Clock rise time (Trc) Trc ≤ 10ns
Clock fall time (Tfc) Tfc ≤ 10ns
1.2.4.1 Flasher RX download speed
The following table lists the Flasher PPC performance values for writing to memory (RAM) via the JTAG interface:
Hardware Memory download
Flasher PPC 530 Kbytes/s (8 MHz JTAG)
Note
The actual speed depends on various factors, such as JTAG, clock speed, host CPU core etc.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
23 CHAPTER 1 Specifications
1.2.5 Specifications for Flasher PRO
General
Supported OS
Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Microsoft Windows 8 x64
Operating Temperature +5 °C … +60 °C
Storage Temperature -20 °C … +60 °C
Relative Humidity (non-condensing) <90% rH
Mechanical
Size (without cables) 121mm x 66mm x 30mm
Weight (without cables) 119g
Available interfaces
USB Host interface USB 2.0, full speed
Ethernet Host interface 10/100 MBit
RS232 Host interface RS232 9-pin
Target interface JTAG 20-pin (14-pin adapter available)
JTAG Interface, Electrical
Power Supply
USB powered, 100mA for Flasher PRO. 500 mA if target is powered by Flasher PRO
Target interface voltage (VIF) 1.2 … 5V
Target supply voltage Supply voltage is 5V, max.
Target supply current max. 400mA
Reset Type Open drain. Can be pulled low or tristated
Reset low level output voltage (VOL) VOL ≤ 10% of VIF
For the whole target voltage range (1.8V VIF 5V)
LOW level input voltage (VIL) VIL ≤ 40% of VIF
HIGH level input voltage (VIH) VIH ≥ 60% of VIF
For 1.8V VIF 3.6V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 10% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 90% of VIF
For 3.6 VIF 5V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 20% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 80% of VIF
JTAG Interface, Timing
Max. JTAG speed up to 12MHz
Data input rise time (Trdi) Trdi ≤ 20ns
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
24 CHAPTER 1 Specifications
Data input fall time (Tfdi) Tfdi ≤ 20ns
Data output rise time (Trdo) Trdo ≤ 10ns
Data output fall time (Tfdo) Tfdo ≤ 10ns
Clock rise time (Trc) Trc ≤ 10ns
Clock fall time (Tfc) Tfc ≤ 10ns
1.2.5.1 Supported CPU cores
The Flasher PRO supports the following CPU cores:
ARM Cortex
Cortex-A5
Cortex-A8
Cortex-A9
Cortex-R4
Cortex-R5
Cortex-M0
Cortex-M0+
Cortex-M1
Cortex-M3
Cortex-M4
ARM (legacy cores)
ARM720T
ARM7TDMI
ARM7TDMI-S
ARM920T
ARM922T
ARM926EJ-S
ARM946E-S
ARM966E-S
ARM1136JF-S
ARM1136J-S
ARM1156T2-S
ARM1156T2F-S
ARM1176JZ-S
ARM1176JZF
ARM1176JZF-S
Renesas RX
RX111
RX210
RX220
RX21A
RX610
RX621
RX62G
RX62N
RX62T
RX630
RX631
RX63N
RX63T
Freescale Power PC
e200z0
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
25 CHAPTER 1 Specifications
1.2.5.2 Supported Target interfaces
The Flasher PRO supports the following target interfaces:
JTAG
SWD
FINE
SPD
1.2.5.3 Flasher PRO download speed
The following table lists the Flasher PRO performance values for writing to memory (RAM) via the JTAG interface:
Hardware ARM7 memory download
Flasher PRO 720 Kbytes/s (12MHz JTAG)
Note
The actual speed depends on various factors, such as JTAG, clock speed, host CPU core etc.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
26 CHAPTER 1 Specifications
1.2.6 Specifications for Flasher Portable PLUS
General
Supported OS
Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Microsoft Windows 8 x64 Microsoft Windows 10 Microsoft Windows 10 x64
Operating Temperature
+5 °C … +60 °C (normal operation) +5 °C … +45 °C (battery charging)
Storage Temperature -20 °C … +45 °C
Relative Humidity (non-condensing) <90% rH
Power Supply
a) USB powered, 100mA for Flasher Portable PLUS. 500 mA if target is powered by Flasher Portable PLUS b) Rechargeable 680mAh Li-Ion battery (Sony US14500VR)
Charging via USB 70 minutes (at 1A charging current)
Mechanical
Size (without cables) 126mm x 70mm x 28mm
Weight (without cables) 140g
Available interfaces
USB Host interface USB 2.0
Target interface
Standard 20-pin 0.1“ connector (Adapters available).
Target Interface, Electrical
Target interface voltage (VIF) 1.2 … 5V
Target supply voltage
Supply voltage is 4.5V, max. (depends on the current battery voltage).
Target supply current max. 400mA
Reset Type Open drain. Can be pulled low or tristated
Reset low level output voltage (VOL) VOL ≤ 10% of VIF
For the whole target voltage range (1.8V VIF 5V)
LOW level input voltage (VIL) VIL ≤ 40% of VIF
HIGH level input voltage (VIH) VIH ≥ 60% of VIF
For 1.8V VIF 3.6V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 10% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 90% of VIF
For 3.6 VIF 5V
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
27 CHAPTER 1 Specifications
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 20% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 80% of VIF
JTAG Interface, Timing
Max. JTAG speed up to 12MHz
Data input rise time (Trdi) Trdi ≤ 20ns
Data input fall time (Tfdi) Tfdi ≤ 20ns
Data output rise time (Trdo) Trdo ≤ 10ns
Data output fall time (Tfdo) Tfdo ≤ 10ns
Clock rise time (Trc) Trc ≤ 10ns
Clock fall time (Tfc) Tfc ≤ 10ns
1.2.6.1 Supported CPU cores
The Flasher Portable PLUS supports the following CPU cores:
ARM Cortex
Cortex-A5
Cortex-A8
Cortex-A9
Cortex-R4
Cortex-R5
Cortex-M0
Cortex-M0+
Cortex-M1
Cortex-M3
Cortex-M4
ARM (legacy cores)
ARM720T
ARM7TDMI
ARM7TDMI-S
ARM920T
ARM922T
ARM926EJ-S
ARM946E-S
ARM966E-S
ARM1136JF-S
ARM1136J-S
ARM1156T2-S
ARM1156T2F-S
ARM1176JZ-S
ARM1176JZF
ARM1176JZF-S
Renesas RX
RX111
RX210
RX220
RX21A
RX610
RX621
RX62G
RX62N
RX62T
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
28 CHAPTER 1 Specifications
RX630
RX631
RX63N
RX63T
Freescale Power PC
e200z0
1.2.6.2 Supported Target interfaces
The Flasher Portable PLUS supports the following target interfaces:
JTAG
SWD
FINE
SPD
1.2.6.3 Flasher Portable PLUS download speed
The following table lists the Flasher Portable PLUS performance values for writing to memory (RAM) via the JTAG interface:
Hardware ARM7 memory download
Flasher PRO 720 Kbytes/s (12MHz JTAG)
Note
The actual speed depends on various factors, such as JTAG, clock speed, host CPU core etc.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
29 CHAPTER 1 Specifications
1.2.7 Specifications for Flasher Portable
General
Supported OS
Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Microsoft Windows 8 x64
Operating Temperature +5 °C … +60 °C
Storage Temperature -20 °C … +65 °C
Relative Humidity (non-condensing) <90% rH
Power Supply
a) USB powered, 100mA for Flasher Portable. 500 mA if target is powered by Flasher Portable b) Batteries powered (3xAAA)
Mechanical
Size (without cables) 130mm x 65mm x 25mm
Weight (without cables) 120g
Available interfaces
USB Host interface USB 2.0
Target interface
Standard 20-pin 0.1“ connector (Adapters available).
Target Interface, Electrical
Target interface voltage (VIF) 1.2 … 5V
Target supply voltage
Supply voltage is 4.5V, max. (depends on the current battery voltage).
Target supply current max. 400mA
Reset Type Open drain. Can be pulled low or tristated
Reset low level output voltage (VOL) VOL ≤ 10% of VIF
For the whole target voltage range (1.8V VIF 5V)
LOW level input voltage (VIL) VIL ≤ 40% of VIF
HIGH level input voltage (VIH) VIH ≥ 60% of VIF
For 1.8V VIF 3.6V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 10% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 90% of VIF
For 3.6V VIF 5V
LOW level output voltage (VOL) with a load of 10 kOhm
VOL ≤ 20% of VIF
HIGH level output voltage (VOH) with a load of 10 kOhm
VOH ≥ 80% of VIF
JTAG Interface, Timing
Max. JTAG speed up to 12MHz
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
30 CHAPTER 1 Specifications
Data input rise time (Trdi) Trdi ≤ 20ns
Data input fall time (Tfdi) Tfdi ≤ 20ns
Data output rise time (Trdo) Trdo ≤ 10ns
Data output fall time (Tfdo) Tfdo ≤ 10ns
Clock rise time (Trc) Trc ≤ 10ns
Clock fall time (Tfc) Tfc ≤ 10ns
1.2.7.1 Supported CPU cores
The Flasher Portable supports the following CPU cores:
ARM Cortex
Cortex-A5
Cortex-A8
Cortex-A9
Cortex-R4
Cortex-R5
Cortex-M0
Cortex-M0+
Cortex-M1
Cortex-M3
Cortex-M4
ARM (legacy cores)
ARM720T
ARM7TDMI
ARM7TDMI-S
ARM920T
ARM922T
ARM926EJ-S
ARM946E-S
ARM966E-S
ARM1136JF-S
ARM1136J-S
ARM1156T2-S
ARM1156T2F-S
ARM1176JZ-S
ARM1176JZF
ARM1176JZF-S
Renesas RX
RX111
RX210
RX220
RX21A
RX610
RX621
RX62G
RX62N
RX62T
RX630
RX631
RX63N
RX63T
Freescale Power PC
e200z0
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
31 CHAPTER 1 Specifications
1.2.7.2 Supported Target interfaces
The Flasher Portable supports the following target interfaces:
JTAG
SWD
FINE
SPD
1.2.7.3 Flasher Portable download speed
The following table lists the Flasher Portable performance values for writing to memory (RAM) via the JTAG interface:
Hardware ARM7 memory download
Flasher PRO 720 Kbytes/s (12MHz JTAG)
Note
The actual speed depends on various factors, such as JTAG, clock speed, host CPU core etc.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
Chapter 2 Working with Flasher
This chapter describes functionality and how to use Flasher.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
33 CHAPTER 2 Flasher Portable PLUS
2.1 Flasher Portable PLUS
The Flasher Portable PLUS is a portable version of SEGGERs Flasher family, which has been designed to fill the need of an extremely portable, production grade, Flash programmer used for in-field firmware updates. No need to be tethered to an outlet, it is powered by an integrated Li-Ion cell (680mAh). The Flasher Portable PLUS programs flash targets in stand-alone mode or via J-Flash PC software.
Furthermore the Flasher Portable PLUS allows the user to select between eight data images to be programmed. The images can be easily selected by using the SEL button on the front of the housing. For more information about support for multiple images, please refer to Multiple File Support on page 60. For setup and configuration purposes, the Flasher Portable PLUS connects to a PC via USB interface, running Microsoft Windows 2000, Windows XP, Windows 2003, Windows Vista, Windows 7, Windows 8 or Windows 10 and has a built-in standard 20-pin J-Link target connector.
Note
Ethernet and RS232 as host interface are not available for the Flasher Portable PLUS.
2.1.1 Housing & Buttons
The Flasher Portable PLUS comes with a display, which is for example used to represent the status of an ongoing flash progress. Furthermore, there are three buttons which allow the user to control Flasher Portable PLUS. For a detailed description of the functions, take a look at the table below:
Button Description
Program
Start programming process with the currently selected im­age.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
34 CHAPTER 2 Flasher Portable PLUS
Button Description
Select image
Select the image to be programmed next time the Program button is pressed.
Power on/off
Used to power-on / power-off the Flasher Portable PLUS. Please note that to power up the Flasher Portable PLUS, the button should be hold for at least 1 second to make sure software can boot and take control of power circuit, so the Flasher Portable PLUS keeps powered, after releasing the button.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
35 CHAPTER 2 Flasher Portable
2.2 Flasher Portable
The Flasher Portable is a portable version of SEGGERs Flasher family, which has been designed to fill the need of an extremely portable, production grade, Flash programmer used for in-field firmware updates. No need to be tethered to an outlet, it is powered by three standard AAA batteries. The Flasher Portable programs flash targets in stand-alone mode or via J-Flash PC software.
Furthermore the Flasher Portable allows the user to select between four data images to be programmed. The images can be easily selected by using the arrow buttons on the front of the housing. For more information about support for multiple images, please refer to Multiple File Support on page 60. For setup and configuration purposes, the Flasher Portable connects to a PC via USB inter­face, running Microsoft Windows 2000, Windows XP, Windows 2003, Windows Vista, Win­dows 7 or Windows 8 and has a built-in standard 20-pin J-Link target connector.
Note
Ethernet and RS232 as host interface are not available for the Flasher Portable.
2.2.1 Housing & Buttons
The Flasher Portable comes with several leds which are for example used to represent the status of an ongoing flash progress. Furthermore, there are three buttons which allow the user to control Flasher Portable. For a detailed description of the functions, take a look at the two tables below:
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
36 CHAPTER 2 Flasher Portable
LED Description
ACTIVE
GREEN. Blinks while the Flasher Portable is busy / performs operations on the target.
PASS/FAIL
GREEN/RED. Indicates, if the last flashing cycle was success­ful.
GREEN: Flashing cycle completed successfully.
RED: Flashing cycle completed with error.
1/2/3/4
GREEN: Indicates which image is currently selected for pro­gramming. For more information about multiple image sup­port, please refer to Multiple File Support on page 60.
POWER
GREEN: Indicates if Flasher is currently powered. Blinks while Flasher Portable tries to enumerate via USB.
LO BAT
1) The LED is off, meaning battery voltage is > 3.3V
2) The red LED is constant on if battery voltage is low (≤
3.3V). In this mode, Flasher still allows programming.
3) The red LED starts blinking in case of the battery voltage is below 3.0V. Flasher refuse programming attempts.
Button Description
Program
Start programming process with the currently selected im­age.
Select image
Select the image to be programmed next time the Program button is pressed.
Power on/off
Used to power-on / power-off the Flasher Portable. Please note that to power up the Flasher Portable, the button should be hold for at least 1 second to make sure software can boot and take control of power circuit, so the Flasher Portable keeps powered, after releasing the button
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
37 CHAPTER 2 Flasher ATE
2.3 Flasher ATE
The Flasher ATE is the version of SEGGERs Flasher family, which 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.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
38 CHAPTER 2 Flasher ATE
2.3.1 Power supply
2.3.1.1 Mainboard power supply
The Flasher ATE mainboard is powered either by a dedicated power connector (VMAIN) or by USB. The power source may not be switched, while the mainboard is running.
2.3.1.2 Target power supply
For target power supply, the Flasher ATE offers two options and additionally a power dis­charge option is available. The target in general 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,5V - 5V signal voltage. The VTGT connector is directly coupled to the target, so any electric 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 220 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
There is no protection against overload when using the internal power source.
2.3.2 UART to TCP transceiver
The Flasher ATE includes an UART to TCP transceiver. Each module is accessible via a connection to a module specific TCP port.
Module TCP port
#1 41
#2 42
#3 43
#4 44
#5 45
#6 46
#7 47
#8 48
#9 49
#10 50
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 pin17 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 activat­ing the transceiver mode with the command #TERMINAL <Baudrate>,<Databits>,<Pari- ty>,<Stopbits> on page 92.
Note
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
39 CHAPTER 2 Flasher ATE
The transceiver cannot be enabled, while the module is programming and vice versa.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
40 CHAPTER 2 File system
2.4 File system
The Flasher supports 8.3 filenames only (8 characters filename, 3 characters file extension). Using longer filenames may result in incorrect operation. Integrated functions, like the FTP server or the terminal server, will refuse writing files with long filenames.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
41 CHAPTER 2 Setting up the IP interface
2.5 Setting up the IP interface
Setting up the IP interface Some of the Flasher models come with an additional Ethernet interface to communicate with the host system. These Flashers also come with 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. For more information, please refer to TCP Services on page 75.
2.5.1 Connecting the first time
When connecting Flasher 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 is, to use the J-Link Configurator. The J-Link Configurator is a small GUI-based utility which shows a list of all emulator 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 (J-Link / J­Trace user guide), chapter Setup, section J-Link Configurator. The setup of the IP interface of Flasher is the same as for other emulators of the J-Link family. For more information about how to setup the IP interface of Flasher, please refer to UM08001, J-Link / J-Trace User Guide, chapter Setup, section Setting up the IP interface. For more information about how to use Flasher via Ethernet or prepare Flasher via Ethernet for stand-alone mode, please refer to Operating modes on page 42.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
42 CHAPTER 2 Operating modes
2.6 Operating modes
All Flashers except the Flasher ATE are able to boot in 3 different modes:
J-Link mode
Stand-alone mode
MSD (Mass storage device) mode
Note
The Flasher ATE only supports the stand-alone mode.
Definition J-Link mode
Flasher is connected to a PC via USB/Ethernet and controlled by a PC application (J-Flash). If there is an RS232 connection to a PC, does not have any influence on if J-Link mode is entered or not. In this mode, Flasher can be used as a J-Link and controlled by the software in the J-Link software and documentation package (J-Link Commander, J-Flash, …)
Definition Stand-alone mode
This mode is entered when there is no active USB/Ethernet connection to a host PC, e.g. if Flasher is only powered via a USB power supply.
Definition MSD mode
Entered only if Flasher Start/Stop button (on Flasher Portable the “PROG” button) is kept pressed for at least 2 seconds while connection Flasher via USB. In this mode, Flasher enumerates as a mass storage device (like an USB Stick) at the host PC. In this mode, configuration + data files can be manually placed on the Flasher and the flasher logfile can be read out.
2.6.1 J-Link mode
If you want to use Flasher for the first time you need to install the J-Link software and doc­umentation package. After installation, connect Flasher to the host PC via USB or Ethernet. For more information about how to install the J-Link software and documentation package please refer to the J-Link / J-Trace User Guide, chapter Setup which can be downloaded from https://www.segger.com/jlink-software.html.
2.6.1.1 Connecting the target system
Power-on sequence
In general, Flasher should be powered on before connecting it with the target device. That means you should first connect Flasher with the host system via USB / Ethernet and then connect Flasher with the target device via JTAG or SWD. Power-on the device after you connected Flasher to it. Flasher will boot in “J-Link mode”.
Verifying target device connection with J-Link.exe
If the USB driver is working properly and your Flasher is connected with the host system, you may connect Flasher to your target hardware. Then start the J-Link command line tool JLink.exe, which should now display the normal Flasher related information and in addition to that it should report that it found a JTAG target and the targets core ID. The screenshot below shows the output of JLink.exe.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
43 CHAPTER 2 Operating modes
2.6.1.2 LED status indicators
In J-Link mode, there are also certain LED status codes defined:
# Status of LED Meaning
0
GREEN high frequency blinking (On/Off time: 50ms => 10Hz)
Flasher is waiting for USB enumeration or eth­ernet link. As soon as USB has been enumer­ated or ethernet link has been established, the green LED stops flashing and is switched to constant green.
0
GREEN constant
Flasher enumeration process is complete and it is ready to be controlled by a PC application.
2.6.2 Stand-alone mode
In order to use Flasher in “stand-alone mode”, it has to be configured first, as described in Setting up Flasher for stand-alone mode on page 47. To boot Flasher in the “stand­alone mode”, only the power supply to Flasher has to be enabled (Flasher should not be connected to a PC). In the “stand-alone mode” Flasher can be used as a stand-alone flash programmer.
Note
Flasher can only program the target device it was configured for. In order to program another target device, you have to repeat the steps described in Setting up Flasher for stand-alone mode on page 47.
2.6.2.1 LED status indicators
Progress and result of an operation is indicated by Flasher’s LEDs. The behavior is different for J-Link and stand-alone mode. For a definition of the different modes, please refer to Operating modes on page 42.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
44 CHAPTER 2 Operating modes
The following table describes the behavior of the LEDs in stand-alone mode.
# Status of LED Meaning
0
GREEN constant
Flasher waits for a start trigger to perform an oper­ation in stand-alone mode.
1
GREEN slow blinking
Flashing operation in progress:
Erasing (slow blinking on/off time: 80 ms => 6.25 Hz)
Programming (slow blinking on/off time: 300ms => ~1.67 Hz)
Verifying (slow blinking, on/off time: 100ms => 5 Hz)
2
GREEN: constant RED: off or constant
GREEN constant, RED off: Operation successful. GREEN constant, RED constant: Operation failed Goes back to state #0 automatically, but in case of operation failed, RED remains on until state #1 is entered the next time.
Older Flasher models have a different behavior. The following serial number ranges behave different from the table above Flashers with the following serial number ranges behave different and comply to the table below:
1621xxxxx (Flasher ARM V2)
1630xxxxx (Flasher ARM V3)
4210xxxxx (Flasher PPC V1)
4110xxxxx (Flasher RX V1)
# Status of LED Meaning
0
GREEN high frequency blinking (On/Off time: 50ms => 10Hz)
Flasher is waiting for USB enumeration or ether­net link. As soon as USB has been enumerated or ethernet link has been established, the green LED stops flashing and is switched to constant green. In stand-alone-mode, Flasher remains in the high fre­quency blinking state until state #1 is reached. Flasher goes to state #1 as soon as a #START com­mand has been received via the ASCII interface or the Start button has been pushed.
1
GREEN constant
Connect to target and perform init sequence.
2
GREEN slow blinking
Flashing operation in progress:
Erasing (slow blinking on/off time: 80 ms => 6.25 Hz)
Programming (slow blinking on/off time: 300ms => ~1.67 Hz)
Verifying (slow blinking, on/off time: 100ms => 5 Hz)
3
GREEN: constant RED: off or constant
GREEN constant, RED off: Operation successful. GREEN constant, RED constant: Operation failed Goes back to state #0 automatically, but in case of operation failed, RED remains on until state #1 is entered the next time.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
45 CHAPTER 2 Operating modes
The Flasher ATE uses different LEDs, see the following table:
# Status of mainboard LEDs Meaning
0
USB GREEN high frequency blinking (On/Off time: 50ms => 10Hz)
The mainboard is waiting for USB enumeration. As soon as USB has been enumerated, the green LED stops flashing and is switched to constant green.
1
USB GREEN constant
The mainboard has completed USB enumeration or no USB connection present.
2
USB RED constant
The mainboard is in bootloader mode.
3
READY/BUSY GREEN
No operation, the Flasher is ready.
4
READY/BUSY RED
Flashing operation in progress on at least one mod­ule.
5
PASS/ERROR GREEN
The last operation was successful on all modules.
6
PASS/ERROR RED
The last operation has failed on at least one mod­ule.
7
VMAIN GREEN
VMAIN is used as module power supply.
8
VUSB GREEN
VUSB is used as module power supply1.
1
The VUSB LED does not work on some mainboards. This has no influence on functionality.
# Status of module LED Meaning
0
STATUS GREEN short flashing
The module waits for a start trigger.
1
STATUS GREEN slow blinking
Flashing operation in progress:
Erasing (slow blinking on/off time: 80 ms => 6.25 Hz)
Programming (slow blinking on/off time: 300ms => ~1.67 Hz)
Verifying (slow blinking, on/off time: 100ms => 5 Hz)
2
STATUS RED constant
a) The module is in bootloader mode. b) The last operation has failed.
3
5V GREEN
Internal power supply for 5V is working.
4
3.3V GREEN
Internal power supply for 3.3V is working.
5
VCC5V GREEN
Target power is enabled via internal supply.
6
VTGT GREEN
Target power is enabled via external supply.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
46 CHAPTER 2 Operating modes
2.6.3 MSD mode
When pressing the Start/Stop button of Flasher while connecting it to the PC, Flasher will boot in the “MSD mode”. This mode can be used to downdate a Flasher firmware version if a firmware update did not work properly and it can be used to configure Flasher for the “stand-alone mode”, without using J-Flash. If Flasher has been configured for “stand-alone mode” as described in the section above, there will be four files on the MSD, FLASHER.CFG,
FLASHER.DAT, FLASHER.LOG, SERIAL.TXT.
FLASHER.CFG contains the configuration settings for programming the target device and FLASHER.DAT contains the data to be programmed. FLASHER.LOG contains all logging infor-
mation about the commands, performed in stand-alone mode. The SERIAL.TXT contains the serial number, which will be programmed next. J-Flash supports to configure Flasher for automated serial number programming.
Currently, J-Flash does not support to configure Flasher for automated serial number pro­gramming.
If you want to configure multiple Flasher for the same target you do not have to use J-Flash all the time. It is also possible to copy the FLASHER.CFG and the FLASHER.DAT files from a configured Flasher to another one. To copy these files boot Flasher in “MSD mode”.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
47 CHAPTER 2 Setting up Flasher for stand-alone mode
2.7 Setting up Flasher for stand-alone mode
In order to set up Flasher for the stand-alone 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 Flasher shall be configured for, by selecting File -> Open Project. If J-Flash does not come with an ap­propriate 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 pro­grammed needs to be loaded, by selecting File -> Open. After this J-Flash should look like in the screenshot below.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
48 CHAPTER 2 Setting up Flasher for stand-alone mode
Before downloading the configuration (project) and program data (data file) to Flasher, the connection type (USB/IP) needs to be selected in the project. These settings are also saved on a per-project basis, so this also only needs to be setup once per J-Flash project. The connection dialog is opened by clicking Options -> Project settings -> General.
The connection dialog allows the user to select how to connect to Flasher. When connecting to a Flasher via TCP/IP it is not mandatory to enter an IP address. If the field is left blank and File -> Download to programmer is selected, an emulator selection dialog pops up which shows all Flasher which have been found on the network. The user then can simply select the Flash he wants to download the configuration to.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
49 CHAPTER 2 Setting up Flasher for stand-alone mode
In order to download the configuration and program data to the Flasher, simply select File
-> Download config & data file to Flasher.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
50 CHAPTER 2 Setting up Flasher for stand-alone mode
The J-Flash log window indicates that the download to the emulator was successful.
From now on, Flasher can be used in stand-alone mode (without host PC interaction) for stand-alone programming.
2.7.1 Preparing for stand-alone operation manually
As an alternative, J-Flash can also be used to save config and data file to a hard drive.
This files can later be copied to a Flasher without using J-Flash, which is useful to prepare additional Flasher for stand-alone programming, if for example a company plans to widen its production, new Flasher units can be bought and used in production by simply copying the files to the new units.
Creating config and data files
J-Flash config (*.CFG) and data (*.DAT) files can be created by using the “Save Flasher config file…” and “Save Flasher data file…” options in the “File” menu.
For some devices, additional files (*.PEX) are needed. J-Flash will create a subdirectory (in the same directory as the config file) with the same name as the config file and place the files needed in this directory.
About *.PEX files
When using the “Save Flasher config file…” menu point or when using the “multiple config­urations stored on Flasher” feature (See Multiple File Support on page 60.) feature, the following needs to be taken care of:
For some devices, special connect, reset etc. sequences are necessary which are stored in so-called *.PEX files on the Flasher.
When using the “Download config & data file to Flasher”, J-Flash takes care of correct use and download of these files to Flasher.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
51 CHAPTER 2 Setting up Flasher for stand-alone mode
When creating the config files manually and later download them to the Flasher manually, it is user’s responsibility to put them at the right place. The *.PEX files need to be placed in a subdirectory with the same name as the corresponding *.cfg file. J-Flash creates a directory with the correct name automatically when a config file is created.
Example:
MyConf0 is a project for a device that requires a *.PEX file for connect. MyConf1 is a project for a device that requires no *.PEX file at all.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
52 CHAPTER 2 Universal Flash Loader mode
2.8 Universal Flash Loader mode
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.
The Universal Flash Loader is available for the Flasher PRO and for the Flasher Portable. For some of the supported devices, SEGGER offers specific adapters.
2.8.1 Preparing manually
The Universal Flash Loader uses an initialization file (*.UNI), a device specific flash pro­gramming algorithm (*.PEX) and a data file (*.HEX, *.MOT, *.BIN or *.DAT).
2.8.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.
An .ini file might look as follows:
[OPTIONS] TargetPower = "0" ChipErase = "0"
[TASKS] CheckBlank = "1" Erase = "1" Program = "1" Verify = "1" Secure = "1"
[DEVICE] Algo = "RL78.PEX" Data = "ALL_6k.mot" Offset = "0x00000000"
[BANK0] ; Code Flash Base = "0x00000000" Size = "0x00004000" Sect = "0x00000400"
[BANK1] ; Data Flash Base = "0x000F1000" Size = "0x00000800" Sect = "0x00000400"
[CONFIG] BaudRate = "1000000" ClearConfigOnConnect = "0x00" Security = "0xFF" ShieldStart = "0x0000" ShieldEnd = "0x000F"
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
53 CHAPTER 2 Universal Flash Loader mode
[OPTIONS] TargetPower
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.
ChipErase
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.
Base
Base address of the flash bank.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
54 CHAPTER 2 Universal Flash Loader mode
Size
Total size of the flash bank.
Sect
Sector size of the flash bank.
[CONFIG]
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.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
55 CHAPTER 2 Universal Flash Loader mode
2.8.1.2 Configuration Data for Renesas RL78/G10
The RL78/G10 devices do not require any configuration data.
2.8.1.3 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:
Item Contents
Bit 7 Fixed to 1
Bit 6 Fixed to 1
Bit 5 Fixed to 1
Bit 4
Programming disable flag (1: Enable programming, 0: Disable programming)
Bit 3 Fixed to 1
Bit 2
Block erase disable flag (1: Enable block erase, 0: Disable block erase)
Bit 1
Boot block cluster rewrite disable flag (1: Enable boot block cluster rewrite, 0: Disable boot block cluster rewrite)
Bit 0 Fixed to 1
Note
Any bit set to 0 cannot be set to 1 again.
ShieldStart
Flash shield window start block number
ShieldEnd
Flash shield window end block number
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
56 CHAPTER 2 Universal Flash Loader mode
2.8.1.4 Configuration Data for ST STM8
HighSpeed
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 Interface Signal
Pin 1 VCCT
Pin 2 VCCT
Pin 4 GND
Pin 6 GND
Pin 8 GND
Pin 9 SWIM
Pin 10 GND
Pin 12 GND
Pin 14 GND
Pin 15 Reset
Pin 16 GND
Pin 18 GND
Pin 20 GND
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.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
57 CHAPTER 2 Universal Flash Loader mode
2.8.1.5 Configuration Data for TI MSP430: 1xx, 2xx and 4xx series
JTAGSpeed
The JTAG interface speed used for communication.
ClocksMassErase
Number of clocks required for a mass erase. This value depends on the device, please refer to the data sheet.
ClocksSegmentErase
Number of clocks required for a segment erase. This value depends on the device, please refer to the data sheet.
ClocksProgram
Number of clocks required for a word programming operation. This value depends on the device, please refer to the data sheet.
2.8.1.6 Configuration Data for TI MSP430: 5xx and 6xx series
JTAGSpeed
The JTAG interface speed used for communication.
Pins are connected as follows:
Flasher Interface Signal
Pin 1 VCC_OUT
Pin 3 TEST
Pin 4 GND
Pin 5 TDI
Pin 6 GND
Pin 7 TMS
Pin 8 GND
Pin 9 TCK
Pin 10 GND
Pin 12 GND
Pin 13 TDO
Pin 14 GND
Pin 15 RST/NMI
Pin 16 GND
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
58 CHAPTER 2 Universal Flash Loader mode
Flasher Interface Signal
Pin 18 GND
Pin 20 GND
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
59 CHAPTER 2 Universal Flash Loader mode
2.8.2 Preparing using the PC utility
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 pro­gramming 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.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
60 CHAPTER 2 Multiple File Support
2.9 Multiple File Support
It is also possible to have multiple data files and config files on Flasher, to make Flasher more easy to use in production environment. To choose the correct configuration file and data file pair, a FLASHER.INI file is used. This init file contains a [FILES] section which describes which configuration file and which data file should be used for programming. A sample content of a FLASHER.INI file is shown below:
[FILES] DataFile = "Flasher1.dat" ConfigFile = "Flasher1.cfg"
Using this method all configuration files and data files which are used in the production only have to be downloaded once. From there on a configuration file / data file pair can be switched by simply replacing the FLASHER.INI by a new one, which contains the new descriptions for the configuration file and data file. The FLASHER.INI can be replaced in two ways:
1. Boot Flasher in MSD mode in order to replace the FLASHER.INI
2. If Flasher is already integrated into the production line, runs in stand-alone mode and can not be booted in other mode: Use the file I/O commands provided by the ASCII interface of Flasher, to replace the FLASHER.INI. For more information about the file I/ O commands, please refer to File I/O commands on page 95.
Note
Flasher supports 8.3 filenames only (8 characters filename, 3 characters file exten­sion). Using longer filenames may result in incorrect operation.
2.9.1 Flasher Portable specifics
Flasher Portable allows to choose between four configuration and data file pairs during runtime by using the select/arrow button on the front of Flasher Portable.
Which config / data file pair is used for which image selection position is determined by the contents of the FLASHER.INI. For this, the FLASHER.INI contents in the [FILES] section have been extended. The sample below shows how to enable the user to select between four different images on the Flasher portable via the select / arrow button:
[FILES] DataFile = "First.dat" ConfigFile = "First.cfg" DataFile1 = "Second.dat" ConfigFile1 = "Second.cfg" DataFile2 = "Third.dat" ConfigFile2 = "Third.cfg" DataFile3 = "Fourth.dat" ConfigFile3 = "Fourth.cfg"
Using this method, all configuration files and data files which are used in the production only have to be stored on Flasher Portable via MSD mode. From there on, switching between the files can be done by simply using the selection button of Flasher Portable.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
61 CHAPTER 2 Multiple File Support
2.9.2 Example
1 Target, 2 Datafiles (e.g. boot loader und application) –> same configuration file (*.CFG) but different data files (*.DAT) should be used.
Open pre-configured J-Flash project
File -> Save Flasher config file … (DEFAULT.CFG)
Open data file 1 (boot loader)
File -> Save Flasher data file … (BOOT.DAT)
Open data file 2 (application)
File -> Save Flasher data file … (APP.DAT)
Create the a FLASHER.INI file (content see below)
Connect the Flasher in MSD mode to the PC
Copy DEFAULT.CFG, BOOT.DAT, APP.DAT and FLASHER.INI on the Flasher
FLASHER.INI content:
[FILES] DataFile = "BOOT.DAT" ConfigFile = "DEFAULT.CFG" DataFile1 = "APP.DAT" ConfigFile1 = "DEFAULT.CFG"
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
62 CHAPTER 2 Custom labels
2.10 Custom labels
Flasher supports to assign custom labels to configurations. This allows to specify easy to remember names for configurations that are stored on the Flasher.
2.10.1 Hardware and software requirements
This feature is supported by the following models:
Flasher Portable PLUS
This feature is supported since V6.30e of the software package and firmware
2.10.2 Assigning labels
The configuration and data file pairs are specified in the FLASHER.INI file:
[FILES] DataFile = "IMAGE0.dat" ConfigFile = "IMAGE0.cfg" DataFile1 = "IMAGE1.dat" ConfigFile1 = "IMAGE1.cfg"
By default, Flasher will show the names of the configuration and data file:
By adding DisplayName, DisplayName1, … keys to the FLASHER.INI, a custom label can be shown instead:
[FILES] DisplayName = "FW smartwatch" DataFile = "IMAGE0.dat" ConfigFile = "IMAGE0.cfg" DisplayName1 = "FW smart meter" DataFile1 = "IMAGE1.dat" ConfigFile1 = "IMAGE1.cfg"
The images will now be shown as follows:
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
63 CHAPTER 2 Custom labels
2.10.3 Considerations
The maximum length of a custom label is 32 characters. If this length is exceeded, the label is ignored and Flasher switches back to default mode for the affected configuration.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
64 CHAPTER 2 Programming multiple targets
2.11 Programming multiple targets
It is possible to program multiple targets which are located in a JTAG chain. The targets will be programmed each with a configuration and a data file. The configuration for the desired target must be selected before it can be programmed, this can be done with the #SELECT command. For more information how to use the #SELECT command please refer to Chapter “3.3.5 Commands to Flasher”.
Example
Three devices should be programmed.
JTAG Chain: TDI –> Device2 –> Device1 –> Device0 –> TDO
Three configurations would be stored on the flasher:
Config 0: Configured to program Device0 (DEVICE0.CFG, DEVICE0.DAT) Config 1: Configured to program Device1 (DEVICE1.CFG, DEVICE1.DAT) Config 2: Configured to program Device2 (DEVICE2.CFG, DEVICE2.DAT)
Selection and programming of the target will be done via the ASCII interface:
#SELECT DEVICE0 #AUTO #SELECT DEVICE1 #AUTO #SELECT DEVICE2 #AUTO
2.11.1 Programming multiple targets with J-Flash
Programming multiple targets can also be done via J-Flash using the command line inter­face. For this each target must be handled with its own project file.
Example
JFlash.exe -openproj"Device0.jflash" -open"Device0.hex" -auto -exit JFlash.exe -openproj"Device1.jflash" -open"Device1.hex" -auto -exit JFlash.exe -openproj"Device2.jflash" -open"Device2.hex" -auto -exit
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
65 CHAPTER 2 Batch Programming in stand-alone mode
2.12 Batch Programming in stand-alone mode
Batch programming allows to execute different stand-alone mode jobs in batch to be exe­cuted in immediate succession, without any user interaction in between. This can be used for example to program multiple targets in a JTAG-Chain or multiple data files to a target. A batch may contains an unlimited number of configurations which consist of a data file (*.DAT) and config file (*.CFG). For further information regarding config and data files, please refer to Preparing for stand-alone operation manually on page 50. In order to specify the batch jobs, a FLASHER.INI file is used. This init file contains a [BATCH] section which describes which configuration pairs (*.DAT and *.CFG file) should be used for each batch job. A sample content of a FLASHER.INI file is shown below:
[BATCH] DataFile = "Flasher0.dat" ConfigFile = "Flasher0.cfg" DataFile1 = "Flasher1.dat" ConfigFile1 = "Flasher1.cfg"
Creating / Replacing of the FLASHER.INI file can done in two ways:
1. Boot Flasher in MSD mode in order to replace the FLASHER.INI
2. If Flasher is already integrated into the production line, runs in stand-alone mode and can not be booted in other mode: Use the file I/O commands provided by the ASCII interface of Flasher, to replace the FLASHER.INI . For more information about the file I/O commands, please refer to File I/O commands on page 95. In case of an error occurred during execution, the Flasher terminates the entire batch processing.
Note
Please note that the batch programming feature can not be used with the multiple file support feature. Therefore, neither the #SELECT ASCII command nor the [FILES] tag in the FLASHER.INI file can be used.
Note
Flasher supports 8.3 filenames only (8 characters filename, 3 characters file exten­sion). Using longer filenames may result in incorrect operation.
2.12.1 Flasher Portable specifics
Flasher Portable allows to choose between four different batches during runtime by using the select/arrow button on the front of Flasher Portable. Which batch configuration is used for which image selection position is specified in the FLASHER.INI. For this, the FLASHER.INI contents in the [BATCH] section have been extended. The sample below shows how to enable the user to select between four different batches on the Flasher Portable via the select / arrow button:
[BATCH] DataFile = "Flasher0.dat" ConfigFile = "Flasher0.cfg" DataFile1 = "Flasher1.dat" ConfigFile1 = "Flasher1.cfg" DataFile2 = "Flasher2.dat" ConfigFile2 = "Flasher2.cfg" [BATCH1] DataFile = "TEST.dat" ConfigFile = "Test.cfg" [BATCH2] DataFile = "VALIDATE.dat" ConfigFile = "Flasher0.cfg"
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
66 CHAPTER 2 Batch Programming in stand-alone mode
Using this method allows to have different batches for different setups used in the produc­tion to be stored once on the Flasher Portable via MSD mode. From there on, switching between the batches can be done by simply using the selection button of Flasher Portable.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
67 CHAPTER 2 Batch Programming in stand-alone mode
2.12.2 Examples
Example 1: Programming two Data files to the same target
Open your J-Flash project.
Use File -> Save Flasher config file… to save the .CFG file (in this example: STM32F4.CFG).
Select the first binary and use File -> Save Flasher Data file… to save the first .DAT file (in this example: DATA0.DAT).
Select the second binary and use File -> Save Flasher Data file… to save the second data file .DAT file (in this example: DATA1.DAT).
Copy the Files to the Flasher e.g. by using MSD mode.
Create a FLASHER.INI file in the root directory of the Flasher.
Exemplary content of FLASHER.INI:
[BATCH] DataFile = "DATA0.dat" ConfigFile = "STM32F4.cfg" DataFile1 = "DATA1.dat" ConfigFile1 = "STM32F4.cfg"
Example 2: Programming one Data file to the first target in a JTAG-Chain and then pro­gramming two data files to another device in the JTAG chain. Example scenario: 2 Devices in a JTAG chain, a STM32F1 and a STM32F4.
Follow the same as described before and additionally:
Create one project file per target (and create a .CFG file of each one).
Make sure each project file is configured correctly, especially the JTAG-Chain position (See UM8003 “J-Flash” for more detailed info).
Exemplary content of FLASHER.INI:
[BATCH] DataFile = "F1DATA.dat" ConfigFile = "STM32F1.cfg" DataFile1 = "F4DATA0.dat" ConfigFile1 = "STM32F4.cfg" DataFile2 = "F4DATA1.dat" ConfigFile2 = "STM32F4.cfg"
Example 3: Using multiple Batch sections with Flasher Portable. Example scenario: 2 Devices in a JTAG chain, a STM32F1 and a STM32F4. Selection 1 will program the STM32F1 target. Selection 2 will program the STM32F4 target using “F4DATA0.dat”. Selection 3 will program the STM32F4 target using “F4DATA1.dat”. Selection 4 will execute 1, 2 and 3 in sequence.
Exemplary content of FLASHER.INI:
[BATCH] DataFile = "F1DATA.dat" ConfigFile = "STM32F1.cfg" [BATCH1] DataFile = "F4DATA0.dat" ConfigFile = "STM32F4.cfg" [BATCH2] DataFile = "F4DATA1.dat" ConfigFile = "STM32F4.cfg" [BATCH3] DataFile = "F1DATA.dat" ConfigFile = "STM32F1.cfg" DataFile1 = "F4DATA0.dat" ConfigFile1 = "STM32F4.cfg" DataFile2 = "F4DATA1.dat" ConfigFile2 = "STM32F4.cfg"
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
68 CHAPTER 2 Serial number programming
2.13 Serial number programming
Flasher supports programming of serial numbers. In order to use the serial number pro­gramming feature, the J-Flash project to be used as well as some files on the Flasher (de­pending on the configuration) need to be configured first.
In general, Flasher 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.
In the following some generic information how to setup Flasher & the J-Flash project for serial number programming are given.
Note
Full serial number programming support has been introduced with V4.51d of the J­Flash software and the Flasher firmware that comes with it.
Note
Currently, programming of serial numbers is only supported for stand-alone mode. Future versions of J-Flash may also support serial number programming in J-Link mode.
2.13.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:
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
69 CHAPTER 2 Serial number programming
Setting Meaning
Address
The address the serial number should be programmed at.
Len
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 of 8 is selected as length, the seri­al number and its complementary is pro­grammed at the given address. In case a serial number list file is given, Flasher 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.
Next SN
In case no serial number list file is giv­en, Next SN is next serial number which should be programmed. The serial number is always stored in little endian format in the flash memory. 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 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.
Increment
Specifies how much Next SN is increment­ed.
2.13.2 Serial number file
When selecting File -> Download serial number file to Flasher, J-Flash will create a Serial number file named as <JFlashProjectName>_Serial.txt. This file is downloaded as SERIAL.TXT on Flasher. The file is generated based on the serial number settings in the J-Flash project and will contain the value defined by the Next SN option. The serial number file can also be manually edited by the user, since the serial number is written ASCII encoded in the SERIAL.TXT file.
2.13.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 num­bers or having gaps between the serial numbers), a so called serial number list file needs to be created by the user. When selecting File-> Download serial number file to Flasher, J-Flash will look for a serial number list file named as <JFlashProjectName>_SNList.txt in the directory where the J-Flash project is located. This file is downloaded as SNList.txt on Flasher. The serial number list file needs to be created manually by the user and has the following syntax:
One serial number per line
Each byte of the serial number is described by two hexadecimal digits.
Example
A 8-byte serial number should be programmed at address 0x08000000.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
70 CHAPTER 2 Serial number programming
It should be programmed as follows in the memory:
0x08000000: 0x01 0x02 0x03 0x04 0x55 0x66 0x77 0x88
The serial number list 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 68.
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 68. 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 filled with 0s by Flasher.
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.
2.13.4 Programming process
Flasher 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 on the Flasher 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 in case if serial number programming is disabled, to make sure that for the Flasher logfile there is a reference which programming cycle passed and which not. As long as serial number program-
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
71 CHAPTER 2 Serial number programming
ming has not been enabled in the J-Flash project, Flasher does not merge any serial number data into the image data to be programmed.
2.13.5 Downloading serial number files to Flasher
Downloading the serial number files needs to be done explicitly by selecting File-> Down­load serial number file to Flasher. Please note that the File -> Download config & data file to Flasher option does only download the configuration and data file to Flasher
since usually the current serial number used for programming shall not be reset/overwrit­ten when just updating the image Flasher shall program.
2.13.6 Sample setup
In the following a small sample is given how to setup Flasher for serial number program­ming. In the following sample, 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:
Address is 0x08001000
Next SN is 1234567
Increment is 1
Len is 4 (bytes)
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
72 CHAPTER 2 Serial number programming
Downloading configuration, data and serial number to Flasher.
After setting up the rest of the configuration (Target interface etc.) and selecting an appro­priate data file, the configuration, data and serial number file is downloaded into Flasher via the File -> Download config & data file to Flasher and File-> Download serial number file to Flasher option.
After downloading the serial number to Flasher, J-Flash also created the <JFlashProject- Name>_Serial.txt.
Now Flasher is prepared to program the 8-byte serial number.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
73 CHAPTER 2 Patch file support
2.14 Patch file support
In stand-alone mode Flasher supports patch files which allows to patch the content of the data to be programmed. Before starting programming process in stand-alone mode, Flasher will look for a file named Patches.txt being present on the Flasher. 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:
<NumPatches>,<Addr>,<NumBytes>:<Data>,<Addr>,<NumBytes>:<Data>,<Addr>, <NumBytes>:<Data>,<Addr>,<NumBytes>:<Data>\r\n
Find below a table which describes each parameter.
Parameter Description
<NumPatches>
Describes the number of patches in this patch line. Max. val­ue is 4.
<Addr>
Describes the address to be patched. Value is expected in hex.
<NumBytes>
Number of bytes for the current patch. Max. value is 20h (32 in decimal). Value is expected in hex.
<Data>
Describes the data to be patched. <Data> is always expect­ed as 2 hexadecimal characters per byte.
Note
All values are expected in hexadecimal format (hex). <Data> section is always preceded by “:”, not “,”.
Example
Please find below a sample sequence which clarifies the usage of patch files.
Patches.txt, which is located on the Flasher, contains the following line:
3,100025,3:AABBCC,100063,2:DDEE,100078,1:FF
Serial.txt contains a “0” which forces the Flasher to use line 0 from Patches.txt.
After starting the programming cycle, the following data will be patched: Addr 0x100025: 3 byte 0xAA 0xBB 0xCC
Addr 0x100063: 2 byte 0xDD 0xEE Addr 0x100078: 1 byte 0xFF
Single patch via RS232
Alternatively, you can start a programming cycle with patch data that is only valid for this one cycle (no need for a Patches.txt file):
Send the #AUTO PATCH <NumPatches>,<Addr>,<NumBytes>:<Data>
command via Flasher ASCII interface. The parameters have the same function as described in the table above.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
74 CHAPTER 2 Limiting the number of programming cycles
2.15 Limiting the number of programming cycles
Flasher 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. To make use of this feature, a file called Cntdown.txt needs to be placed on the Flasher. This file simply contains a decimal number (32-bit unsigned integer) that describes how many programming cycles can be performed with the current setup.
This feature especially makes sense when used in combination with authorized flashing. For more information about authorized flashing, please refer to Authorized flashing on page 75.
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.
2.15.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 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, …)
2.15.2 Required Flasher hardware version for Cntdown.txt support
Older Flasher models do not support the limiting of programming cycles. The Flashers with the following serial number ranges do not support limiting of programming cycles:
1621xxxxx (Flasher ARM V2)
1630xxxxx (Flasher ARM V3)
4210xxxxx (Flasher PPC V1)
4110xxxxx (Flasher RX V1)
All other models / hardware versions support limiting of programming cycles.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
75 CHAPTER 2 Authorized flashing
2.16 Authorized flashing
Current hardware versions of Flasher support creation of a so called secure area which allows to pre-configure the Flasher with a given setup and then give it to external production facilities etc. without the possibility to read out the Flasher contents via MSD, FILE I/O functionality (J-Link Commander) or RS232 commands. This section describes how to setup a secure area on a Flasher and how to move the configuration/data file(s) into it.
2.16.1 Creating / Adding the secure area
By default, Flashers are shipped with a public area only (full Flasher flash size accessible via MSD etc.). The secure area has to be activated / created once, to make use of it. This will reserve half of the Flasher storage size (on current models this will be ~64 MB) for the secure area. The secure area can be removed at any time, providing the full flasher storage to the public area again. The secure area can be created / removed via J-Link Commander, which is part of the software package that comes with Flasher.
The following secure area related commands are available in J-Link Commander:
securearea create
securearea remove
Note
When creating or removing the secure area, all configuration and data files being stored on the Flasher, are lost. Please make sure that they are not needed anymore, before adding / removing the security area.
2.16.2 Moving files to the secure area
Before moving configuration + data to the secure area, proper functionality of the setup should be tested in stand-alone mode. Once the setup is working as expected, do the following, to move the configuration + data into the secure area:
Start Flasher in MSD mode (For more info, please refer to: MSD mode on page 46)
Create a folder “_SECURE
Move all files that shall be moved to the secure area, into this folder
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
76 CHAPTER 2 Authorized flashing
Reboot Flasher (Do not enter MSD mode again, yet! Otherwise, contents will not be moved). Now, depending on the configuration and data file size, it may take a bit, before the Flasher Power LED lit. Once it lit, all contents have been moved to the secure area and the _SECURE folder in the public area has been deleted.
Now Flasher can be used in stand-alone mode, as normal, but the files cannot be read back by the user / operator.
2.16.3 Considerations to be taken when using the secure area
When using the secure area, some things need to be considered:
All features like multiple file support, patch file support etc. can also be used when operating from the secure area.
The secure area cannot be read back by any utility. Solely the FLASHER.LOG is always placed and updated in the public area, even when Flasher operates from the secure area.
If there is any file/folder in the public area, except the FLASHER.LOG and there is also any configuration / data present in the secure area, stand-alone flashing will fail because it is not unambiguous which configuration / data shall be used. In such cases, Flashers with Ethernet / RS232 interface will output an appropriate error message on programming. All Flasher models will output an appropriate error message in the FLASHER.LOG.
Moving files from the public into the secure area can be done multiple times, as explained in Moving files to the secure area on page 75. Each time files are moved from the public area to the secure area, all contents of the secure area are erased first, to make sure that no previous configuration is present there.
2.16.4 Required Flasher hardware version
Older Flasher models do not support authorized flashing. The Flashers with the following serial number ranges do not support authorized flashing:
1621xxxxx (Flasher ARM V2)
1630xxxxx (Flasher ARM V3)
4210xxxxx (Flasher PPC V1)
4110xxxxx (Flasher RX V1)
All other models / hardware versions support authorized flashing.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
77 CHAPTER 2 Target interfaces
2.17 Target interfaces
The table below shows the supported target interfaces of the different Flasher models.
Hardware Supported interfaces
Flasher ATE JTAG, SWD
Flasher PRO JTAG, SWD
Flasher ARM JTAG, SWD
Flasher RX JTAG
Flasher PPC JTAG
For more information about the target interfaces itself, please refer to:
UM08001, chapter “Working with J-Link and J-Trace”, section “JTAG interface”
UM08001, chapter “Working with J-Link and J-Trace”, section “SWD interface”
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
78 CHAPTER 2 Supported microcontrollers
2.18 Supported microcontrollers
2.18.1 Flasher
Flasher supports download into the internal flash of a large number of microcontrollers. The number of supported devices is steadily growing, so you can always find the latest list of supported devices on our website:
http://www.segger.com/supported-devices.html
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
79 CHAPTER 2 Support of external flashes
2.19 Support of external flashes
2.19.1 Flasher ARM
In general Flasher ARM supports programming of external flashes listed below:
parallel NOR flash
serial NOR flash
NAND flash
DataFlash
If the parallel NOR flash device which is used is not CFI-compliant you have to select the flash device in J-Flash explicitly, for a list of all parallel NOR flash devices which can be ex­plicitly selected in J-Flash, please refer to UM08003, J-Flash User Guide, chapter Supported Flash Devices. For serial NOR flash, NAND flash and DataFlash devices a custom RAMCode is needed since the connection of the flash to the CPU differs from device to device. The J­Flash software comes with sample projects for custom RAMCodes. For a complete list of all custom RAMCode projects which come with the J-Flash software, please refer to: http://
www.segger.com/supported-devices.html
2.19.2 Flasher RX
Programming of external parallel NOR flash is currently not supported by Flasher RX. This limitation will be lifted in the near future.
2.19.3 Flasher PPC
Programming of external parallel NOR flash is currently not supported by Flasher PPC. This limitation will be lifted in the near future.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
80 CHAPTER 2 Supported cores
2.20 Supported cores
2.20.1 Flasher ARM
Flasher ARM supports and has been tested with the following cores, but should work with any ARM7/9, Cortex-M0/M1/M3/M4 core. If you experience problems with a particular core, do not hesitate to contact Segger.
ARM7TDMI (Rev 1)
ARM7TDMI (Rev 3)
ARM7TDMI-S (Rev 4)
ARM920T
ARM922T
ARM926EJ-S
ARM946E-S
ARM966E-S
Cortex-M0
Cortex-M1
Cortex-M3
Cortex-M4
2.20.2 Flasher RX
Flasher RX supports and has been tested with the following cores. If you experience prob­lems with a particular core, do not hesitate to contact Segger.
RX610
RX621
RX62N
RX62T
2.20.3 Flasher PPC
Flasher PPC supports and has been tested with the following cores. If you experience prob­lems with a particular core, do not hesitate to contact Segger.
e200z0
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
81 CHAPTER 2 Newline encoding
2.21 Newline encoding
In general, for all patch files, init files etc. Flasher supports both newline encodings:
Windows: \r\n
Unix/Mac: \n
All parser functionality etc. are written to be independent from the host operating system.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
82 CHAPTER 2 Programming multiple targets in parallel
2.22 Programming multiple targets in parallel
To program multiple targets in parallel, a Flasher ATE or multiple Flashers will be needed (each connecting to one CPU). The Flasher ATE can be used to program up to 10 targets in parallel by using a single control unit.
Using multiple Flashers, this can be done using the production programming soft­ware J-Flash. For further information, please refer to Chapter “Command Line Inter- face” Sub-chapter “Programming multiple targets in parallel” of the J-Flash User Guide (UM08003_JFlash.pdf) which is part of the J-Link Software and Documentation package.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
Chapter 3 TCP Services
This chapter describes the integrated TCP services.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
84 CHAPTER 3 FTP Server
3.1 FTP Server
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.
3.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.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
85 CHAPTER 3 Web server
3.2 Web server
All Flashers which come with an Ethernet interface also come 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 op­erating system, the IP stack and the target hardware. The Flasher ATE’s web interface fur­thermore allows monitoring of the individual modules.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
Chapter 4 Remote control
This chapter describes how to control Flasher via the 9-pin serial interface connector or via the integrated Telnet interface.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
87 CHAPTER 4 Overview
4.1 Overview
There are 3 ways to control Flasher operation:
Manual: Programming operation starts when pressing the button. The LEDs serve as visible indicators.
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.
Terminal communication via RS232.
Terminal communication via Telnet.
Note
All ways to control Flasher operation are working only if Flasher is in standalone mode. In J-Link / MSD mode they have no effect.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
88 CHAPTER 4 Handshake control
4.2 Handshake control
The Flasher can be remote controlled by automated testers without the need of a connection to a PC. Therefore the Flasher 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. Function Description
1 START
A positive pulse of any voltage between 5 and 30V with duration of min. 30 ms starts “Auto” function (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.
4 BUSY
As soon as the “Auto” function is started, BUSY becomes active, which means that transistor is switched OFF.
5 GND Common Signal ground.
7 OK
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.
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 sig­naled 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
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
89 CHAPTER 4 Handshake control
ASCII command interface, described in the next chapter, for the Flasher ATE as it gives better remote control capabilities.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
90 CHAPTER 4 ASCII command interface
4.3 ASCII command interface
4.3.1 Introduction
Once set up using J-Flash, the Flasher can be driven by any application or just a simple terminal using ASCII commands.
Every known command is acknowledged by the Flasher and then executed. After command execution, Flasher sends an ASCII reply message.
Note
There are situations where the execution of a known command is rejected with #NACK:ERRxxx if Flasher is currently busy and the received command is not allowed to be sent while Flasher is busy
4.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
4.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. For the Flasher ATE, all commands triggering a flash programming function (#AUTO, #CANCEL, #ERASE, #PROGRAM, #VERIFY) may be used for other modules, before a reply for the current operation has been received.
4.3.4 Settings for ASCII interface via RS232
Flasher is driven via a RS232 serial port with the following interface settings:
9600 baud
8 data bits
no parity
1 stop bit
The baud rate can be changed by using the #BAUDRATE command.
4.3.5 Settings for ASCII interface via Telnet
A client application can connect to Flasher via Telnet on port 23. Find below a screenshot of Flasher which is remote controlled via Telnet:
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
91 CHAPTER 4 ASCII command interface
4.3.6 Commands and replies
The table below gives an overview about the commands which are supported by the current version of Flasher firmware. Click on the names for a detailed description:
Commands to the Flasher ARM/PRO ATE
#BAUDRATE<Baudrate> Yes Yes #AUTO Yes
Yes
1
#AUTO PATCH Yes
Yes
1
#AUTO NOINFO Yes No #CANCEL Yes
Yes
1
#ERASE Yes
Yes
1
#PROGRAM Yes
Yes
1
#RESULT Yes
Yes
1
#SELECT <Filename> Yes
Yes
1
#START Yes
Yes
1
#STATUS Yes Yes #VERIFY Yes
Yes
1
#SELMODULE <Module1>[,<Module2>] No Yes #TERMINAL <Baudrate>,<Databits>,<Pari-
ty>,<Stopbits>
No
Yes
1
YES Yes
File I/O commands
#FCLOSE Yes No #FCRC Yes No #FDELETE <Filename> Yes No #FOPEN <Filename> Yes No #FREAD <Offset>,<NumBytes> Yes No #FSIZE Yes No #FWRITE <Offset>,<NumBytes>:<Data> Yes No #FLIST Yes No #MKDIR <Dirname> Yes No
Replies from the Flasher
#ACK Yes Yes #NACK Yes Yes #OK Yes Yes #OK:<NumBytes>:<Data> Yes Yes #OK:<Size> Yes Yes #STATUS: Yes No #RESULT:<Module>: No Yes #DONE No Yes #ERRxxx Yes Yes
1
For these commands, the module number has to be given as the first parameter when
using a Flasher ATE.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
92 CHAPTER 4 ASCII command interface
4.3.6.1 Commands to the Flasher
#AUTO
The #AUTO command behaves exactly as the start button or external remote control input. Usually, the following command sequence will be performed when receiving the #AUTO
command:
The Flasher erases the target CPU (if not blank)
The Flasher programs the target CPU
The Flasher verifies the target CPU
Depending on the settings chosen in the Production tab in J-Flash, this sequence can differ from the one shown above.
Finally, Flasher 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.
During execution of the #AUTO command, Flasher automatically sends “status” messages via RS232 to reflect the state of execution. Typically during execution of #AUTO command, Flasher will reply the following sequence of messages:
#ACK #STATUS:INITIALIZING #STATUS:CONNECTING #STATUS:UNLOCKING #STATUS:ERASING #STATUS:PROGRAMMING #STATUS:VERIFYING #OK (Total 13.993s, Erase 0.483s, Prog 9.183s, Verify 2.514s)
#AUTO PATCH
The #AUTO PATCH command allows patching of the content of the data to be programmed.
Flasher 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 Patch file support on page 73.
#AUTO NOINFO
This command may be used instead of #AUTO, if no status messages from Flasher should be sent during execution. The NOINFO extension is also available for all other commands.
The command ends with #OK or #ERRxxx
#BAUDRATE<Baudrate>
This command can be sent in order to change the baud rate of the Flasher’s RS232 interface used for communication. <Baudrate> is expected in decimal format.
If this command succeeds, Flasher responds with:
#ACK #OK
Otherwise it will respond with one of the following error messages:
#ERR255: Invalid parameters
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
93 CHAPTER 4 ASCII command interface
or #ERR255: Baudrate is not supported
Note
After sending the #BAUDRATE command you will first have to wait until the Flasher responds with the #OK message. It is recommended wait 5ms before sending the next command with the new baudrate in order to give the Flasher the time to change the baudrate.
#CANCEL
This command can be sent to abort a running program. It may take a while until the current program is actually canceled.
Flasher will respond with:
#ERR007:CANCELED.
#ERASE
This command can be sent to erase all selected target flash sectors.
Flasher will reply the following sequence of messages:
#ACK #STATUS:INITIALIZING #STATUS:CONNECTING #STATUS:UNLOCKING #STATUS:ERASING #OK (Total 0.893s, Erase 0.483s)
#PROGRAM
This command can be used instead of #AUTO to program a target without erasing the target before programming and without performing a final verification.
#RESULT
This command can be sent any time, even during other command execution. Flasher re­sponds with the last result of the previously executed command.
#SELECT <Filename>
The #SELECT command is used to select a specific config and data file pair which should be used by Flasher to program the target. <Filename> specifies the name of file pair without extensions (.CFG and .DAT) on the Flasher which should be selected. Flasher saves the selected config and data file in the FLASHER.INI file. So this selection is remembered even between power-cycling Flasher.
This may be verfy helpful in cases where several config and data files are stored on Flasher. The user can easily switch between these config and data files without connecting Flasher to a host.
If this command succeeds, Flasher responds with:
#ACK #OK
Find below a sample sequence which shows how to use the #SELECT command: #SELECT ATSAM7_1 // ATSAM7_1.CFG and ATSAM7_1.DAT is selected
#ACK #OK #AUTO // Start auto programming #ACK #STATUS:INITIALIZING
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
94 CHAPTER 4 ASCII command interface
#STATUS:CONNECTING #STATUS:UNLOCKING #STATUS:ERASING #STATUS:PROGRAMMING #STATUS:VERIFYING #OK (Total 8.416s, Erase 0.005s, Prog 6.845s, Verify 0.959s) #SELECT ATSAM7_2 // ATSAM7_2.CFG and ATSAM7_2.DAT is selected #ACK #OK #AUTO // Start auto programming #ACK #STATUS:INITIALIZING #STATUS:CONNECTING #STATUS:UNLOCKING #STATUS:ERASING #STATUS:PROGRAMMING #STATUS:VERIFYING #OK (Total 8.632s, Erase 0.005s, Prog 7.051s, Verify 0.969s)
#START
This command can be sent to release Flasher’s target interface. All signals from Flasher to target will be set into high-Z mode, reset of target will be released. It may be used to start target application program.
Flasher will reply with the following sequence of messages:
#ACK #STATUS:INITIALIZING #STATUS:CONNECTING #OK (Total 1.148s)
#STATUS
This command can be sent any time, even during other command execution. Flasher re­sponds with its current state. All defined state messages are described under Replies from Flasher on page 98.
#VERIFY
This command can used to verify the target flash content against the data stored in Flasher.
#SELMODULE <Module1>[,<Module2>]
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.
Note
This command only applies to the Flasher ATE.
#TERMINAL <Baudrate>,<Databits>,<Parity>,<Stopbits>
This command enables the UART transceiver. The baud rate can be up to 115,200 bits per second. The databits parameter currently is ignored and defaults to 8 bit. Parity can be
N (no parity)
E (even parity)
O (odd parity)
The stopbits parameter is currently also ignored and defaults to 1 stop bit. We recommend to set the ignored parameters to their default values, as these parameters may be used in future versions of the ASCII interface.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
95 CHAPTER 4 ASCII command interface
Note
This command only applies to the Flasher ATE.
4.3.6.2 File I/O commands
The ASCII interface of the Flasher, except the Flasher ATE, also supports file I/O operations. For the Flasher ATE, the integrated FTP server has to be used in order to perform file I/ O operations on the modules.
The following file I/O commands are supported:
#FCLOSE
The #FCLOSE command closes the file on Flasher which was opened via #FOPEN. After this command has been issued further file I/O operations except #FDELETE are not allowed until the #FOPEN command is send again.
A typical sequence when using the #FCLOSE command does look like as follows:
#FCLOSE #ACK #OK
Note
When using the #FCLOSE command a file has to be open (previously opened by #FOPEN). Otherwise Flasher will respond with the following if no file has been opened:
#ACK #ERR255:No file opened
#FCRC
The #FCRC command calculates a 32-bit CRC of the given file. This CRC can be used to verify file integrity. This command should not be used while a file has been opened via #FOPEN. The CRC will be also reported by J-Flash when downloading or saving files via J-Flash.
A typical sequence when using the #FCRC command does look like as follows:
#FCRC flasher.dat #ACK #OK:0x75BC855A
#FDELETE <Filename>
The #FDELETE command is used to delete a file on Flasher where <Filename> specifies the name of the file.
A typical sequence when using the #FDELETE command does look like as follows:
#FDELETE flasher.dat #ACK #OK
Note
If deletion of the file fails for example if the file does not exist, Flasher will respond with the following sequence:
#ACK #ERR255:Failed to delete file
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
96 CHAPTER 4 ASCII command interface
#FOPEN <Filename>
The #FOPEN command is used to open a file on Flasher for further file I/O operations. <Filename> specifies the file on the Flasher which should be opened. If <Filename> can
not be found on Flasher a new one will be created. A typical sequence using the #FOPEN command does look like as follows:
#FOPEN flasher.dat #ACK #OK
Note
Currently only one file can be open at the same time. If #FOPEN is send and another file is already open, Flasher will respond with:
#ACK #ERR255:A file has already been opened
#FREAD <Offset>,<NumBytes>
The #FREAD command is used to read data from a file on Flasher. <Offset> specifies the offset in the file, at which data reading is started. <NumBytes> specifies the number of bytes which should be read.
A typical sequence when using the #FREAD command does look like as follows:
#FREAD 0,4 #ACK #OK:04:466c6173
If the #FREAD command succeeds, Flasher will finally respond with a #OK:<NumBytes>:<Da- ta> reply message. For more information about the Flasher reply messages, please refer
to Replies from Flasher on page 98.
Note
In order to use the #FREAD command. A file has to be opened before, via the #FOPEN command. Otherwise Flasher will respond with the following sequence:
#ACK #ERR255:No file opened
#FSIZE
The #FSIZE command is used to get the size of the currently opened file on Flasher. A typical sequence when using the #FSIZE command does look like as follows:
#FSIZE #ACK #OK:10 // file on flasher which is currently open, has a size of 16 bytes
If the #FSIZE command succeeds, Flasher will respond with a #OK:<Size> reply message. For more information about the Flasher reply messages, please refer to Replies from Flasher on page 98.
Note
In order to use the #FREAD command. A file has to be opened before, via the #FOPEN command. Otherwise Flasher will respond with the following sequence:
#ACK
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
97 CHAPTER 4 ASCII command interface
#ERR255:No file opened
#FWRITE <Offset>,<NumBytes>:<Data>
The #FWRITE command is used to write to a file on Flasher. <Offset> specifies the offset in the file, at which data writing is started. <NumBytes> specifies the number of bytes which are send with this command and which are written into the file on Flasher. <NumBytes> is limited to 512 bytes at once. This means, if you want to write e.g. 1024 bytes, you have to send the #FWRITE command twice, using an appropriate offset when sending it the second time.
<Offset> and <NumBytes> are expected in hexadecimal format. #FWRITE 0,200:<Data>
#FWRITE 200,200:<Data>
The data is expected in hexadecimal format (two hexadecimal characters per byte). The following example illustrates the use of #FWRITE:
Data to be send: Hello ! ASCII values: 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x21
#FWRITE 0,7:48656C6C6F2021
Note
In order to use the #FWRITE command a file has to be opened via the #FOPEN command, first. Otherwise Flasher will respond with the following sequence:
#ACK #ERR255:No file opened
#FLIST
The #LIST command is used to list all files stored on the Flasher. A typical sequence using the #FLIST command does look like as follows:
#FLIST #ACK FLASHER.INI Size: 60 SERIAL.TXT Size: 3 FLASHER.LOG Size: 207 FOLDER (DIR) FOLDER\TEST1.CFG Size: 2048 FOLDER\TEST1.DAT Size: 12288 #OK
#MKDIR <Dirname>
The #MKDIR command is used to create a directory on Flasher. <Dirname> specifies the name of the new directory. <Dirname> may also specify a path to create a subdirectory.
A typical sequence using the #MKDIR command does look like as follows:
#MKDIR folder #ACK #OK
Note
If the directory can not be created because of a bad <Dirname> argument, Flasher will respond with:
#ACK
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
98 CHAPTER 4 ASCII command interface
#ERR255:Failed to create directory
4.3.6.3 Replies from Flasher
The reply messages from Flasher 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:
#OK (Total 13.993s, Erase 0.483s, Prog 9.183s, Verify 2.514s)
The following reply messages from Flasher are defined:
#ACK
Flasher replies with #ACK message on reception of any defined command before the com­mand itself is executed.
#NACK
Flasher replies with #NACK, if an undefined command was received.
#OK
Flasher replies with #OK, if a command other than #STATUS or #RESULT was executed and ended with no error.
#OK:<NumBytes>:<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).
#OK:<Size>
Flasher replies if #OK:<Size> if a #FSIZE command has been executed. <Size> is the size (in bytes) of the currently opened file. <Size> is send in hexadecimal format.
#STATUS:
The Flasher replies with its current state.
The following status messages are currently defined:
Message Description
#STATUS:READY
Flasher is ready to receive a new com­mand.
#STATUS:CONNECTING
Flasher initializes connection to target CPU.
#STATUS:INITIALIZING
Flasher performs self check and internal init.
#STATUS:UNLOCKING Unlocking flash sectors.
#STATUS:ERASING
Flasher is erasing the flash of the target device.
#STATUS:PROGRAMMING
Flasher is programming the flash of the target device.
#STATUS:VERIFYING
Flasher verifies the programmed flash con­tents.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
99 CHAPTER 4 ASCII command interface
#RESULT:<Module>:
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.
Note
This command only applies to the Flasher ATE.
#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 Nov 22 2017 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
Note
This command only applies to the Flasher ATE.
#ERRxxx
If any command other than #STATUS or #RESULT was terminated with an error, Flasher 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:
Message Description
#ERR007
Flasher received #CANCEL command and has canceled the current operation.
#ERR008
Flasher is already busy with execution of previous command.
#ERR009 Failed to allocate memory. #ERR010 Failed to open file. #ERR011 Failed to read file. #ERR012 Failed to write file. #ERR013 Failed to delete file.
#ERR255
Undefined error occurred. This reply is fol­lowed by an error string.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
Chapter 5 Performance
The following chapter lists programming performance of common flash devices andmicro­controllers.
Flasher User Guide (UM08022) © 2004-2018 SEGGER Microcontroller GmbH
Loading...