Flasher Hub

From SEGGER Wiki
Revision as of 18:08, 26 March 2021 by Leon (talk | contribs)
Jump to: navigation, search

This is the user documentation for owners of a SEGGER Flasher Hub.

SEGGER Flasher Hub

How Flasher Hub works

Example setup for Flasher Hub

Flasher Hub makes ultra-fast high speed parallel programming ("gang programming") with up to 24 channels possible.
Flasher Hub is connected to one or more modules (Flasher Compact). Each module is connected to a target chip.
Using one of the Flasher Hub's host interfaces, flash programming operations can be triggered and responses from the Flasher Hub can be read and evaluated.
This makes the Flasher Hub a perfect fit for small-scale as well as large-scale production environments.


Getting started

USB-C port on the Flasher Hub
Ethernet port on the Flasher Hub
USB ports on the Flasher Hub

Before putting the Flasher Control Server into operation, make sure to have the following devices at hand:

The Flasher Control Server is set up and good-to-go in less than 30 minutes

After making sure that the devices mentioned above are all available, the Flasher Hub can be setup:

  1. Connect Flasher Hub to power supply via USB-C
  2. Connect Flasher Hub to LAN via Ethernet cable
  3. Connect USB Hub to power supply
  4. Connect USB Hub to Flasher Hub via USB
  5. Connect Flasher Compact(s) to Flasher Hub via USB
  6. Wait for the Flasher Hub to finish booting (green LED stops flashing)
  7. Note the serial number of your Flasher Hub
  8. Open the Flasher Hub's web interface by visiting http://flasherhub-<SerialNo>/ (Make sure to replace <SerialNo> with the serial number of your Flasher Hub)
  9. Flasher Hub is now up and running


Preparing a module

One-time setup via J-Flash

Before a Flasher Hub module can program a target chip, it needs to know what data that should be programmed. Additionally, the module needs information on the configuration to use.
A module is prepared accordingly by downloading a Flasher data and configuration file pair into the module (.dat + .cfg files).
Both are generated using J-Flash, SEGGER's free multi-platform production programming software.
More information on J-Flash can be found on segger.com and the SEGGER Wiki

  1. Download and install the most recent version of the J-Link software package.
  2. Start J-Flash
  3. Create a new project
  4. Select a target device, target interface, target interface speed, ...
  5. Adjust the project settings as needed (see here for more information)
  6. Open the data file to be programmed in J-Flash (via drag-and-drop)
  7. File --> Save Flasher config file
  8. File --> Save Flasher data file
  9. File --> Save project
  10. Close J-Flash
  11. Make sure Flasher Hub is up and running and connected to the LAN
  12. Make sure the module that should be prepared is connected to Flasher Hub
  13. Connect to the Flasher Hub FTP server using a FTP Client (e.g. FileZilla)
  14. Download the .cfg and .dat file to the designated modules
  15. Done

After providing a Flasher Hub module with data and configuration file, the module is ready to be used for programming operations.

Starting production programming

PuTTY console output when programming via Flasher Hub

After preparing the Flasher Hub modules, the Flasher Hub is ready for production programming.
The following instructions describe how to start production programming via the TELNET terminal:

  1. Make sure the Flasher Hub is up and running and connected to the LAN
  2. Make sure the Flasher Hub modules are prepared with a .dat and .cfg file
  3. Make sure each Flasher Hub module is connected to its target chip
  4. Open a terminal application (e.g. PuTTY) on a desktop PC
  5. Connect to the Flasher Hub's TELNET terminal
    • Host name: flasherhub-<SerialNo>
    • Port: 23
  6. Upon successful connection, the Flasher Hub sends a welcome message
  7. Now commands can be sent to the Flasher Hub using the ASCII command protocol explained below
  8. Production programming is started by sending the AUTO command and specifying the positions of the modules to address
    • Enter #AUTO 1,2,3 to start production programming for the modules at positions 1, 2 and 3.
  9. The Flasher Hub will acknowledge the command (#ACK response)
  10. Now the production programming process is up and running
  11. As soon as a module finishes production programming, the Flasher Hub sends a response with the programming result (#RESULT:... response)
  12. After all modules are done programming, Flasher Hub responds with #DONE

Power supply

The Flasher Hub is powered via USB-C. The power supply must be able to supply up to 1A at 5V to the Flasher Hub.
Note:
Undefined behavior may occur when the Flasher Hub is not powered sufficiently.

The Flasher Compacts connected to the Flasher Hub via USB must be powered externally, e.g. via an externally powered USB hub.
Note:
Undefined behavior may occur when the Flasher Compacts are not powered sufficiently.

Web interface

Flasher Hub Web interface

The Flasher Hub comes with a built-in web interface which provides a status overview as well as controls for the Flasher Hub.
The web interface can be accessed by navigating to the following location using a web browser (e.g. Mozilla Firefox, Google Chrome, ...): http://flasherhub-<SerialNo>/

Note: The web interface is only available if the Flasher Hub is connected to the LAN.


FTP interface

FTP Client (FileZilla) connected to Flasher Hub FTP Server

The Flasher Hub comes with a built-in FTP server for transferring files from or to the Flasher Compacts connected to the Flasher Hub.
Any FTP client software (e.g. FileZilla, etc...) can be used to connect to the Flasher Hub's FTP server.

Host: flasherhub-<SerialNo>
Port: 21

Credentials for read-only access:
User: anonymous
Pass: <None>

Credentials for read/write access:
User: admin
Pass: 1234


ASCII command interface

The Flasher Hub comes with an ASCII command interface (aka. Terminal) which can be used to send commands to the Flasher Hub, as well as receive responses from the Flasher Hub.
The Terminal can be accessed by connecting to the Flasher Hub via TELNET:

Host: flasherhub-<SerialNo>
Port: 23

Once a successful connection to the Flasher Hub Terminal has been established, it will handle commands as described in the protocol below.

Protocol

Commands

Commands to the Flasher Hub
#AUTO
#AUTO NOPATCH
#AUTO PATCH
#CANCEL
#ERASE
#FWVERSION
#FWVERSIONMOD
#IPCONFIG
#POWERON
#POWEROFF
#PROGRAM
#PROTVER
#RESULT
#SELECT
#SETVTREF
#START
#STATUS
#VERIFY
#SELMODULE
#SERIAL
#SERIALMOD
#SETVTREF

Specifying modules

Most commands affect one or more modules connected to the Flasher Hub. Those commands expect the list of modules to address as the very first parameter following the command identifier itself, e.g.

#AUTO <Modules>

There are different ways to specify the list of modules to address.
Comma-separated list

#AUTO 1,3,5  // Starts production programming for modules 1, 3 and 5. Other modules are not affected by this command

"All"

#AUTO ALL    // Starts production programming for all currently connected modules

Wildcard (*)

#SELMODULE 2,4,6     // Selects modules 2, 4 and 6 for following operations using '*'
[...]
#AUTO *              // Starts production programming for all previously selected modules (2, 4 and 6)
[...]
#SELMODULE 10,11,12  // Selects modules 10, 11 and 12 for following operations
[...]
#AUTO *              // Starts production programming for all previously selected modules (10, 11 and 12)

AUTO Command

Description: Starts production programming. Production programming refers to a sequence of the following operations, specified by the current configuration (.cfg):

  • Erase
  • Program
  • Verify

Syntax:

#AUTO <Modules>

Parameters:

Parameter Description
<Modules> List of modules to start production programming with

Example:

Command sent to Flasher Hub Reply
#AUTO 1,2
#ACK
#RESULT:1:OK (Total 13.993s, Erase 0.483s, Prog 9.183s, Verify 2.514s)
#RESULT:2:OK (Total 13.995s, Erase 0.483s, Prog 9.189s, Verify 2.510s)
#DONE

AUTO NOPATCH Command

Description: Starts production programming but ignores an existing patch file for the programming.

Syntax:

#AUTO NOPATCH <Modules>

Parameters:

Parameter Description
<Modules> List of modules to start production programming with

Example:

Command sent to Flasher Hub Reply
#AUTO NOPATCH 1,2
#ACK
#RESULT:1:OK (Total 13.993s, Erase 0.483s, Prog 9.183s, Verify 2.514s)
#RESULT:2:OK (Total 13.995s, Erase 0.483s, Prog 9.189s, Verify 2.510s)
#DONE

AUTO PATCH Command

Description: Starts production programming and allows patching of the content of the data to be programmed.

Syntax:

#AUTO PATCH <Modules> <NumPatches>,<Addr>,<NumBytes>:[,...]


Parameters:

Parameter Description
<Modules> List of modules to start production programming with
<NumPatches> Number of patches that follow
<Addr> 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> Data to be patched. Value is expected in hex, e.g. 2 hexadecimal characters per byte (0xAB 0xCD --> "ABCD").
... <Next patch information>

Example:

Command sent to Flasher Hub Reply
#AUTO PATCH 1 1,08000000,4:DEADBEEF
#ACK
#RESULT:1:OK (Total 10.476s, Erase 8.293s, Prog 1.832s, Verify 0.137s)
#DONE

CANCEL Command

Description: Cancels an ongoing operation (e.g. erase, program, verify, ...).

Syntax:

#CANCEL <Modules>

Parameters:

Parameter Description
<Modules> List of modules to cancel ongoing operation for.

Example:

Command sent to Flasher Hub Reply
#AUTO 1
#ACK
#CANCEL 1
#ACK
#RESULT:1:ERR255:Error while flashing
#DONE

ERASE Command

Description: Erases all selected target flash sectors.

Syntax:

#ERASE <Modules>

Parameters:

Parameter Description
<Modules> List of modules to erase all selected target flash sectors for.

Example:

Command sent to Flasher Hub Reply
#ERASE 1,2
#ACK
#RESULT:1:OK (Total 2.164s, Erase 1.936s)
#RESULT:2:OK (Total 8.780s, Erase 8.552s)
#DONE

FWVERSION Command

Description: Returns the firmware version of the Flasher Hub.

Syntax:

#FWVERSION

Example:

Command sent to Flasher Hub Reply
#FWVERSION
#ACK
#OK:1.00
#DONE

FWVERSIONMOD Command

Description: Returns the firmware version for the specified modules.

Syntax:

#FWVERSIONMOD <Modules>

Parameters:

Parameter Description
<Modules> List of modules to return firmware version for.

Example:

Command sent to Flasher Hub Reply
#FWVERSIONMOD 1,2
#ACK
#OK:1:J-Link / Flasher Compact V5 compiled Feb 3 2021 10:44:44
#OK:2:J-Link / Flasher Compact V5 compiled Feb 3 2021 10:44:44
#DONE

IPCONFIG Command

Description: Returns the Flasher Hub's current IP configuration.

Syntax:

#IPCONFIG

Example:

Command sent to Flasher Hub Reply
#IPCONFIG
#ACK
#RESULT:IP address:192.168.11.35
#RESULT:Subnet mask:255.255.0.0
#RESULT:Gateway:0.0.0.0
#RESULT:IP mode:User assigned
#DONE

POWERON Command

Description: Enables the Flasher Compact's 5V target power supply for the given modules.

Syntax:

#POWERON <Modules> <PowerSource>,<Discharge>

Parameters:

Parameter Description
<Modules> List of modules to enable target power supply for.
<PowerSource> Must be 0. Parameter exists to stay compatible to Flasher ATE, which supports different power sources.
<Discharge> Must be 0. Parameter exists to stay compatible to Flasher ATE, which supports discharging target power.

Example:

Command sent to Flasher Hub Reply
#POWERON 1 0,0
#ACK
#DONE

POWEROFF Command

Description: Disables the Flasher Compact's 5V target power supply for the given modules.

Syntax:

#POWEROFF <Modules>

Parameters:

Parameter Description
<Modules> List of modules to disable target power supply for.

Example:

Command sent to Flasher Hub Reply
#POWEROFF 1
#ACK
#DONE

PROGRAM Command

Description: Programs the target. Other than #AUTO, this command does not erase nor verify target flash contents.

Syntax:

#PROGRAM <Modules>

Parameters:

Parameter Description
<Modules> List of modules to start programming for.

Example:

Command sent to Flasher Hub Reply
#PROGRAM 1,2
#ACK
#RESULT:1:OK (Total 2.076s, Prog 1.833s)
#RESULT:2:OK (Total 2.132s, Prog 1.888s)
#DONE

PROTVER Command

Description: Returns the version of the ASCII command protocol in use.

Syntax:

#PROTVER

Example:

Command sent to Flasher Hub Reply
#PROTVER
#ACK
#OK:2.02b
#DONE

RESULT Command

Description: Returns the last result of the previously executed command

Syntax:

#RESULT <Modules>

Parameters:

Parameter Description
<Modules> List of modules to return result for.

Example:

Command sent to Flasher Hub Reply
#RESULT 1,2
#ACK
#RESULT:1:OK (Total 2.076s, Prog 1.833s)
#RESULT:2:OK (Total 2.132s, Prog 1.888s)
#DONE

SELECT Command

Description: Selects a specific config and data file pair which should be used to program the target.

Syntax:

#SELECT <Modules> <Filename>

Parameters:

Parameter Description
<Modules> List of modules to select .cfg + .dat file pair for.
<Filename> Name of .cfg + .dat file pair to select.

Example:

Command sent to Flasher Hub Reply
#SELECT 1,2 FWTest
#ACK
#RESULT:1:OK
#RESULT:2:OK
#DONE

SETVTREF Command

Description: Sets a fixed voltage for I/O pins of the Flasher Compact's target interface.

Syntax:

#SETVTREF <Modules> <Voltage>

Parameters:

Parameter Description
<Modules> List of modules to set VTref for.
<Voltage> Voltage in millivolt [mV].

Example:

Command sent to Flasher Hub Reply
#SETVTREF 1 3300
#ACK
#DONE

START Command

Description: Starts the target application. The Flasher Compact's configuration (.cfg file) determines the method of how the target application is started.

Syntax:

#START <Modules>

Parameters:

Parameter Description
<Modules> List of modules to start target application for.

Example:

Command sent to Flasher Hub Reply
#START 1
#ACK
#RESULT:1:OK (Total 0.252s)
#DONE

STATUS Command

Description: Returns the current status of the Flasher Hub (READY or BUSY).

Syntax:

#STATUS

Example:

Command sent to Flasher Hub Reply
#STATUS
#ACK
#STATUS:READY

VERIFY Command

Description: Verifies target flash contents by comparing them to the data (.dat) file.

Syntax:

#VERIFY <Modules>

Parameters:

Parameter Description
<Modules> List of modules to verify target flash contents for.

Example:

Command sent to Flasher Hub Reply
#VERIFY 1,2
#ACK
#RESULT:1:OK (Total 0.331s, Verify 0.117s)
#RESULT:2:OK (Total 0.332s, Verify 0.117s)
#DONE

SELMODULE Command

Description: Selects one or more modules. Commands with the wildcard character (*) in place of the <Modules> parameter will address the modules specified by this command.

Syntax:

#SELDMOULE <Modules>

Parameters:

Parameter Description
<Modules> List of modules to select.

Example:

Command sent to Flasher Hub Reply
#SELMODULE 1,2,3
#ACK
#SELECTED:1,2,3

SERIAL Command

Description: Returns the serial number of the Flasher Hub.

Syntax:

#SERIAL

Example:

Command sent to Flasher Hub Reply
#SERIAL
#ACK
#RESULT:1021000000
#DONE

SERIALMOD Command

Description: Returns the serial number for the specified modules.

Syntax:

#SERIALMOD <Modules>

Parameters:

Parameter Description
<Modules> List of modules to select.

Example:

Command sent to Flasher Hub Reply
#SERIALMOD 1,2
#ACK
#OK:1:1015000000
#OK:1:1015000001
#DONE

Replies

Replies from the Flasher Hub
#ACK
#NACK
#OK
#OK:<NumBytes>:
#OK:
#OK:<Module>:
#RESULT:<Module>:
#DONE
#ERRxxx