Difference between revisions of "Flasher Hub (Legacy)"
(→Power supply) |
(→How to enable fail-safe mode) |
||
Line 1,014: | Line 1,014: | ||
#* Make sure to use a file system '''other''' than exFAT. |
#* Make sure to use a file system '''other''' than exFAT. |
||
# Rename the USB flash drive label to '''"flasherhubrw"''' |
# Rename the USB flash drive label to '''"flasherhubrw"''' |
||
+ | #* With Flasher Hub firmware version V1.10 onwards, the label "'''flasher'''" is accepted, as well |
||
#* On Windows, this can be done by right-clicking on the device in file explorer and selecting '''Rename''' |
#* On Windows, this can be done by right-clicking on the device in file explorer and selecting '''Rename''' |
||
# Eject and remove the USB flash drive from the PC |
# Eject and remove the USB flash drive from the PC |
Revision as of 10:49, 5 February 2024
This is the user documentation for owners of a SEGGER Flasher Hub.
Contents
- 1 How Flasher Hub works
- 2 Getting started
- 3 Power supply
- 4 Web interface
- 5 FTP interface
- 6 ASCII command interface
- 6.1 Protocol
- 6.1.1 Commands
- 6.1.1.1 Specifying modules
- 6.1.1.2 ASSIGNMODULE Command
- 6.1.1.3 AUTO Command
- 6.1.1.4 AUTO NOPATCH Command
- 6.1.1.5 AUTO PATCH Command
- 6.1.1.6 CANCEL Command
- 6.1.1.7 ERASE Command
- 6.1.1.8 FWVERSION Command
- 6.1.1.9 FWVERSIONMOD Command
- 6.1.1.10 IPCONFIG Command
- 6.1.1.11 POWERON Command
- 6.1.1.12 POWEROFF Command
- 6.1.1.13 PROGRAM Command
- 6.1.1.14 PROJECT Command
- 6.1.1.15 PROTVER Command
- 6.1.1.16 RESETIPCONFIG Command
- 6.1.1.17 RESTART Command
- 6.1.1.18 RESULT Command
- 6.1.1.19 SELECT Command
- 6.1.1.20 SELMODULE Command
- 6.1.1.21 SERIAL Command
- 6.1.1.22 SERIALMOD Command
- 6.1.1.23 SETVTREF Command
- 6.1.1.24 START Command
- 6.1.1.25 STATUS Command
- 6.1.1.26 TERMINAL Command
- 6.1.1.27 VERIFY Command
- 6.1.2 Replies
- 6.1.1 Commands
- 6.1 Protocol
- 7 Fail-safe mode
How Flasher Hub works
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
Before putting the Flasher Hub into operation, make sure to have the following devices at hand:
- Flasher Hub
- Power supply (see below for more information)
- Externally powered USB Hub
- One or more Flasher Compacts
- Ethernet cable (not mandatory)
The Flasher Hub 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:
- Connect Flasher Hub to power supply via USB-C
- Connect Flasher Hub to LAN via Ethernet cable
- Connect USB Hub to power supply
- Connect USB Hub to Flasher Hub via USB
- Connect Flasher Compact(s) to Flasher Hub via USB
- Wait for the Flasher Hub to finish booting (green LED stops flashing)
- Note the serial number of your Flasher Hub
- 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)
- Flasher Hub is now up and running
Preparing a module
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
- Download and install the most recent version of the J-Link software package.
- Start J-Flash
- Create a new project
- Select a target device, target interface, target interface speed, ...
- Adjust the project settings as needed (see here for more information)
- Open the data file to be programmed in J-Flash (via drag-and-drop)
- File --> Save Flasher config file
- File --> Save Flasher data file
- File --> Save project
- Close J-Flash
- Make sure Flasher Hub is up and running and connected to the LAN
- Make sure the module that should be prepared is connected to Flasher Hub
- Connect to the Flasher Hub FTP server using a FTP Client (e.g. FileZilla)
- Download the .cfg and .dat file to the designated modules
- 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
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:
- Make sure the Flasher Hub is up and running and connected to the LAN
- Make sure the Flasher Hub modules are prepared with a .dat and .cfg file
- Make sure each Flasher Hub module is connected to its target chip
- Open a terminal application (e.g. PuTTY) on a desktop PC
- Connect to the Flasher Hub's TELNET terminal
- Host name: flasherhub-<SerialNo>
- Port: 23
- Upon successful connection, the Flasher Hub sends a welcome message
- Now commands can be sent to the Flasher Hub using the ASCII command protocol explained below
- 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.
- The Flasher Hub will acknowledge the command (#ACK response)
- Now the production programming process is up and running
- As soon as a module finishes production programming, the Flasher Hub sends a response with the programming result (#RESULT:... response)
- 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 3A 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
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
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
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)
ASSIGNMODULE Command
Description: The serial number of a Flasher Compact is assigned to the module position of the Flasher Hub.
When the new module position is taken, a swap is performed. The Flasher Compact with the serial number must be connected to the Flasher Hub.
Syntax:
#ASSIGN <Serial>, <Position>
Parameters:
Parameter | Description |
---|---|
<Serial> | Serial number of a Flasher Compact. |
<Position> | Module position. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#ASSIGN 1015000001, 1 | |
#ACK | |
#OK |
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 |
PROJECT Command
Description: Returns the selected projects from the specified module numbers.
Syntax:
#PROJECT <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules from which you can get selected projects. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#PROJECT 1,2 | |
#ACK | |
#RESULT:1:OK:FLASHER.UNI | |
#RESULT:2:OK:PROJECT.CFG | |
#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 |
RESETIPCONFIG Command
Description: Reset the IP configuration to DHCP.
Syntax:
#RESETIPCONFIG
Example:
Command sent to Flasher Hub | Reply |
---|---|
#RESETIPCONFIG | |
#ACK | |
#RESULT:The new IP configuration will take effect after restarting Flasher Hub. | |
#DONE |
RESTART Command
Description: Restarts the Flasher Hub firmware.
Syntax:
#RESTART
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 |
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 |
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 |
TERMINAL Command
Description: Turns the UART transceiver on or off for selected modules. Configures the UART settings for this modules.
Syntax:
#TERMINAL <Modules> <Baudrate>[, <NumDataBits>, <Parity>, <NumStopBits>]
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules which will be accessed. |
<Baudrate> | Baudrate or "off" to disable UART for specified modules. |
<NumDataBits> | Number of data bits. |
<Parity> | Parity: "N" (None), "E" (Even) or "O" (Odd) |
<NumStopBits> | Number of stop bits. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#TERMINAL 1,2,3 115200, 8, N, 1 | |
#ACK | |
#DONE | |
Command sent to Flasher Hub | Reply |
#TERMINAL 1,2,3 off | |
#ACK | |
#DONE |
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 |
Replies
Replies from the Flasher Hub |
---|
#ACK |
#NACK |
#OK |
#OK:<NumBytes>: |
#OK: |
#OK:<Module>: |
#RESULT:<Module>: |
#DONE |
#ERRxxx |
Fail-safe mode
Flasher Hub's fail-safe mode was introduced with Flasher Hub firmware version 1.08 and makes Flasher Hub more reliable in case of a power outage.
Early units of Flasher Hub run the risk of "breaking" after a power outage while running (e.g. due to disconnecting the power supply).
After that, Flasher Hub could not be used anymore without restoring it as described below.
New Flasher Hubs are now shipped with a USB flash drive which enables Flasher Hub's fail-safe mode,
making sure Flasher Hub does not break with sudden power outages.
For early units of Flasher Hub that were produced and shipped before fail-safe mode was introduced (e.g. no USB flash drive was shipped with Flasher Hub),
fail-safe mode can be enabled as described below.
How to restore a broken Flasher Hub
In case a Flasher Hub became unreachable following a power outage while running in non fail-safe mode, the following steps describe how to restore the Flasher Hub:
- Remove power supply from Flasher Hub
- Remove any cables attached to Flasher Hub
- Using a Phillips screwdriver, remove the one screw at the top and the four screws on the bottom of the Flasher Hub casing
- Remove the separate parts of Flasher Hubs' casing and put them aside
- Remove the SD card from the PCB
- Using an SD card reader and a PC, read back the contents of the SD card (e.g. using Win32DiskImager on a PC running Windows)
- Write the exact same contents that were read from the SD card back onto the SD card
- Make sure not to modify the contents at all!
- Put the SD card back into the PCB
- Reassemble the Flasher Hub casing
- Power Flasher Hub
- Reattach USB/ Ethernet/ ... cables, if necessary
- Flasher Hub is now restored
How to enable fail-safe mode
For Flasher Hub units that were shipped with a USB flash drive, fail-safe mode is enabled by default.
For early units of Flasher Hub that were produced and shipped before fail-safe mode was introduced (e.g. no USB flash drive was shipped with Flasher Hub),
fail-safe mode can be enabled by following the steps below.
When switching to fail-safe mode, the current configuration is lost.
This means that the module positioning and other settings need to be manually checked and reconfigured.
- Update Flasher Hub's firmware to the most recent release version available at segger.com
- Get a USB flash drive
- A capacity of a few MB (e.g. 128 MB) is sufficient already
- Format the USB flash drive
- Make sure to use a file system other than exFAT.
- Rename the USB flash drive label to "flasherhubrw"
- With Flasher Hub firmware version V1.10 onwards, the label "flasher" is accepted, as well
- On Windows, this can be done by right-clicking on the device in file explorer and selecting Rename
- Eject and remove the USB flash drive from the PC
- Attach the USB flash drive to Flasher Hub
- The USB flash drive does not need to be directly attached to Flasher Hub. It is also possible to connect it via a USB hub.
- In the Flasher Hub web interface Config tab, click "Restart now" to restart Flasher Hub
- Flasher Hub is now running in fail-safe mode, storing any non-volatile data on the external USB flash drive
Although possible, it is not recommended to switch back to non-fail-safe mode.