STMicroelectronics BlueNRG-X User Manual

UM2406
User manual
The BlueNRG-X Flasher SW package
Introduction
This document describes the BlueNRG-X Flasher SW package (STSW-BNRGFLASHER) which provides the Flasher Utility PC application.
The BlueNRG-X Flasher Utility is a standalone PC application, which allows the BlueNRG-1, BlueNRG-2 and BlueNRG-LP Bluetooth low energy systems-on-chip Flash to be read, mass erased, written and programmed.
Besides, it supports interface to the BlueNRG-LP UART bootloader. It also supports interface to the BlueNRG-LP, BlueNRG-1, BlueNRG-2 Flash through SWD mode by using the standard SWD interface through standard HW programming/debugging tools (CMSIS-DAP, ST-Link/V2 and J-Link).
Finally, it also allows a MAC address to be stored on a specific Flash location selected by the user on both UART and SWD mode.
The BlueNRG-X Flasher SW package also provides a standalone flasher launcher utility which allows the flash programming, reading, mass erase and memory content verification. The flasher launcher utility requires a PC DOS window only.
Note: The BLUENRG-X term refers the BlueNRG-LP, BlueNRG-1 and BlueNRG-2 devices. Any specific difference is
highlighted whenever it is needed.
, BlueNRG-1, BlueNRG-2 Flash through UART mode using the internal device
UM2406 - Rev 6 - December 2020 For further information contact your local STMicroelectronics sales office.
www
.st.com

1 Getting started

This section describes all system requirements to run the BlueNRG-X Flasher Utility PC application, as well as the relative SW package installation procedure.

1.1 System requirements

The BlueNRG-X Flasher Utility has the following minimum requirements:
PC with Intel® or AMD® processor running one of the following Microsoft® operating systems:
Windows 10
Windows 7
At least 128 MB of RAM
USB ports
40 MB of free hard disk space
Adobe Acrobat Reader 6.0 or later
Note: Recommended display scale and settings are up to 125%
UM2406
Getting started

1.2 SW package setup

User can run this Utility by clicking on the BlueNRG-X Flasher Utility icon under: Start → ST BlueNRG -X Flasher Utility x.x.x → BlueNRG-X Flasher Utility
.
Figure 1. BlueNRG-X Flasher Utility
UM2406 - Rev 6
page 2/26

2 Toolbar interface

In the toolbar section of the BlueNRG-X Flasher - Utility main window, user can perform the following operations:
Load an existing .bin or .hex (Intel extended) file (from File menu: open file.. option)
Save the current memory image in a .bin File (from File menu: save file as option). The start address and the
• size of the memory section to be saved to file are selectable from the ‘Device Memory’ tab
Close an existing .bin or .hex file (from File menu: close file option)
Set ST Link frequency (from Tools menu: Settings... option)
Enable or disable log files creation in UART/SWD modality (from Tools menu: Settings... option). If log files are saved, it is possible to set the level of debug information to save (for SWD only). All log files will be saved under path: {Installation Path}\ST\BlueNRG-X Flasher Utility x.x.x\Logs\”
Mass erase (from Tools menu: mass erase option)
Verify Flash content (from Tools menu: verify flash content option)
Get application version (from Help menu: about option)
Flash (from Tools menu: Flash option)
Erase device sectors (from Tools menu: Erase Pages...option)
Compare the device memory with the selected image file (from Tools menu: Compare Device Memory with a file option). The two image files are displayed on "Compare Device Memory to File" tab and the related differences are highlighted in red
Compare two files (from Tools menu, Compare two files... option)
The user can also select two image files and compare them. The two image files are displayed on "Compare Two Files" tab and the related differences are highlighted in red. *.bin and *.hex files format are supported.
UM2406
Toolbar interface
Figure 2. Compare Two Files tab
UM2406 - Rev 6
page 3/26
UM2406
Toolbar interface
In the upper section of the BlueNRG-X Flasher – Utility main window, user can select the image file through the ‘Select Image File’ button.
All these options are available both on UART and SWD mode.
User needs to enable access to the selected mode (UAR COM port for UART mode, or by connecting an SWD HW programming/debugging tool to the device SWD lines.
T or SWD), by opening, respectively, the associated
UM2406 - Rev 6
page 4/26

3 UART main window

In the UART main window tab of the BlueNRG-X Flasher Utility main window, user can select the COM port to be used to interface the device through the 'List of COM Ports' section.
The serial baudrate used for the BlueNRG-X evaluation board is 460800 bps.
UM2406
UART main window
Figure 3. Flasher Utility UART main window

3.1 UART mode: how to run

Image file selection
Use the ‘Select Image File’ button on the main page (or the File> Open File... option or clicking on Image File tab) to load an existing .bin or .hex file. The full path of the selected file appears next to the button and the ‘Flash’ button becomes active at the end of file loading.
The 'List of COM Ports' tab displays all the connected devices on PC USB ports. The 'Select All', Unselect All' and "Invert All' buttons allow to define which connected devices (all, none or some of them) should be the target of the utility operations. This allows to perform same operation (i.e. Flash programming) on multiple devices.
By default, the ‘Mass erase’ option on "Actions" section is not checked, and only the required memory pages are erased and written with the file content. When this option is checked, the memory Flash phase is preceded by a full mass erase.
The ‘V
erify’ option forces a check to ensure that the memory content has been written correctly.
Check the ‘Update Device Memory’ option to update the ‘Device Memory’ table after an operation on Flash memory
The readout protection option enables the readout protection of the device after flash programming.
Check the "Auto Baudrate' option only if an HW reset is performed on the board in order to force the 'Auto Baudrate' operation. By default, the 'Auto Baudrate' option is not checked.
‘Image File’ tab
The selected file name, size and parsed contents to be flashed to the device memory can be viewed in the ‘Image File’ tab.
.
UM2406 - Rev 6
page 5/26
Figure 4. Flasher utility UART mode: image file
UM2406
UART mode: how to run
'Device Memory’ tab
Select this tab to view the memory contents of a connected device (through the Read button) and the log about the performed operations on the selected device.
Figure 5. Flasher utility UART mode: device memory
UM2406 - Rev 6
Click the ‘Read’ button to transfer the memory segment defined by ‘Start Address and Size’ into the table.
To read the entire Flash memory
, check the option "Entire Memory".
The first column gives the base address of the following 16 bytes in a row (e.g., row 0x10040050, column 4 holds the hexadecimal byte value at 0x10040054.
User can change byte values by double-clicking a cell and entering a new hexadecimal value; edited bytes appear in red.
Click the ‘Write’ button to flash the entire page with the new byte values into the device memory.
page 6/26
UM2406
UART mode: how to run
The ‘Flash’ button allows Flash programming operation to start with the selected option. If the ‘MAC address checkbox is selected user can specify the Flash address where to store the selected MAC address. The MAC address is programmed after image file programming, when the ‘Flash’ button is selected.
Figure 6. Flasher utility UART mode: changing memory fields
'Compare Device Memory to File’ tab
User can compare the current Device memory with the selected image file. The two image files are displayed and the related differences are highlighted in red.
*.bin and *.hex files format are supported.
Figure 7. Compare Device Memory to File
UM2406 - Rev 6
Using the BlueNRG-X Flasher Utility with other boards
page 7/26
UM2406
UART mode: how to run
The BlueNRG-X Flasher Utility automatically detects the BlueNRG-1, BlueNRG-2, BlueNRG-LP evaluation boards (displayed as STDK) connected to PC USB ports, and uses an auxiliary STM32 (driven by the GUI) to reset the device and put it into UART bootloader mode. The application also works with custom boards providing simple UAR the selection of any non-STEVAL COM port, the following pop-up appears
T access to the connected device, but user must put the device in bootloader mode manually. Upon
Figure 8. Flasher Utility UART mode: UART ‘Comport Setting’ pop-up
When this pop-up appears, user must set the BlueNRG-LP pin PA10 high and perform a reset cycle of the BlueNRG-LP device (keeping the PA10 high) or must set the BlueNRG-1, BlueNRG-2 pin DIO7 high and reset the BlueNRG-1, BlueNRG-2 device (keeping the DIO7 high); the device should now be in bootloader mode.
User can also set a preferred baudrate for the UAR
T in the pop-up window and then press OK to return to the
GUI.
Note: User must avoid resetting the device while using the BlueNRG-X Flasher Utility unless the "ComPort Setting"
pop-up is active. If the device is reset, user must toggle the COM port to use the Flasher Utility again.
Note: When custom boards are used by providing UART access to the BlueNRG-1, BlueNRG-2, BlueNRG-LP devices
through a USB FTDI interface, user should double check the latency associated to the USB FTDI PC driver allowing the connected port as an USB Virtual COM to be recognized. On typical USB-FTDI PC driver, just double check the related device USB driver settings from Properties, Port Settings, Advanced and make sure latency timer value is set to 1 ms. This setting is strongly recommended in order to speed up the Flash operations on custom boards.
UM2406 - Rev 6
page 8/26
UM2406
SWD main window

4 SWD main window

In order to use the SWD main window tab of the BlueNRG-X Flasher Utility main window, user must connect SWD HW programming/debugging tool to the device SWD lines (BlueNRG-1, BlueNRG-2, BlueNRG-LP devices).
The following SWD HW programming/debugging interfaces are supported, assuming that the selected HW and related SW tool supports the connected device:
1.
CMSIS-DAP
ST-Link/V2
2.
3. J-Link
Note: To use the J-Link as a debug adapter, the USB driver needs to be changed from the J-Link driver to WinUSB.
This can be easily done by using the tool HYPERLINK Zadig ("https://zadig.akeo.ie/") as follows:
Select the J-Link from the device list, the "WinUSB" as driver and then click "Install Driver" to install the WinUSB driver.
Refer to HYPERLINK JLink OpenOCD web page ("https://wiki.segger.com/OpenOCD") for more information.
WARNING: Once the J-Link USB driver has been replaced, no SEGGER software from the J-Link software package is able to communicate with J-Link anymore. To use SEGGER J-Link software again, the USB driver needs to be switched back to its default.

4.1 SWD mode: how to run

Image file selection
Use the ‘Select Image File’ button on the main page (or the File> Open file... option) to load an existing .bin or .hex file. The full path of the selected file appears next to the button and the ‘Flash’ becomes active at the end of the file loading.
On Actions tab, user can select the following options:
V
erify: it allows a check to be forced to ensure that the memory content has been written correctly
Readout protection: it enables the device readout protection after programming the selected image file
Mass erase: it allows a device mass erase to be performed before programming the selected image file
Update Device Memory: it allows the 'Device Memory' table to be updated after a Flash operation
Figure 9. Flasher Utility: SWD main window
UM2406 - Rev 6
page 9/26
UM2406
SWD mode: how to run
Plug&Play mode: it allows the Plug and Play Flash programming mode to be enabled/disabled when only one SWD programming tool is available. In this case, boards are flashed one each time: when the Flash programming operation is completed on a board, it is possible to unplug and plug another board.
By default, the ‘Mass erase’ option beside the ‘Flash’ button is not checked, and only the required memory pages are erased and written with the file content.
The ' List of connected interfaces' tab displays all the connected SWD interfaces (CMSIS-DAP, ST J-Link).
User can also select which specific SWD HW interface must be displayed through the 'Interface' field.
The 'Select All', Unselect All' and "Invert All' buttons allow to define which connected SWD interfaces (all, none or some of them) should be the target of the utility operations. This allows to perform same operation (i.e. Flash programming) on multiple devices.
‘Flash’ button allows Flash programming operation to start with the selected option. If the ‘MAC address’ checkbox is selected user can specify the Flash address where to store the selected MAC address. The MAC address is programmed after image file programming, when the ‘Flash’ button is selected.
‘Image File’ tab
The selected file name, size and parsed contents to be flashed to device memory can be viewed in the ‘Image File’ tab
‘Device Memory’ tab
Select this tab to view the memory contents of a connected device and the log about the performed operations on the selected device. To view the memory contents of a connected device, it is necessary to select the 'Read' button on the "Device Memory" tab.
-Link/V2 and
Figure 10. Flasher Utility SWD mode: device memory
Click the ‘Read’ button to transfer the memory segment defined by ‘Start Address and ‘Size’ into the table.
To read the entire flash memory
, check the option "Entire Memory".
The first column gives the base address of the following 16 bytes in a row (e.g., row 0x10040050, column 4 holds the hexadecimal byte value at 0x10040054.
User can change byte values by double-clicking a cell and entering a new hexadecimal value; edited bytes appear in red.
Click the ‘Write’ button to flash the entire page with the new byte values into device memory.
UM2406 - Rev 6
page 10/26
SWD mode: how to run
Figure 11. Flasher Utility SWD mode: changing memory fields
Note: 'Compare Device Memory to File' is also supported on SWD mode with same features as described in
Section 3.1 UART mode: how to run.
UM2406
UM2406 - Rev 6
page 11/26

5 SWD Plug&Play programming mode

The SWD Plug&Play programming mode allows user to enter a programming loop by connecting a new device platform to be programmed. Once the selected Flash image file and programming actions have been selected, Flasher PC application asks user to connect a device to the SWD interface (“Waiting for Device N. 1” message is displayed).
Once user connects it, “Device N 1 Connected” message is displayed, Flasher starts the device programming with the selected image file and options. Once completed, Flasher displays the message “ Please disconnect device N 1 …” and, then after user disconnects the device, a new message “Waiting for Device N. 2” is displayed. User can stop the automatic mode by selecting the ‘ Stop’ button.
When using the Plug&Play mode, the user must select the Interface to be used (CMSIS-DAP or ST-Link/V2 or J-Link).
Figure 12. Flasher Utility: SWD Plug&Play mode
UM2406
SWD Plug&Play programming mode
UM2406 - Rev 6
page 12/26

6 MAC address programming

MAC address programming section allows the MAC address and the specific device Flash location to be selected to store MAC address.
User can choose to enable on not the MAC address programming by selecting the ‘MAC address’ checkbox. Flash location is set through the ‘MAC Flash location’ field.
‘Set MAC address’ button allows to select MAC address as follow:
1.
Check ‘Range’ and provide the ‘Start Address’ on related field: this is the MAC address to be stored on the first connected device.
It is possible to set incremental steps starting from the ‘Start address’ value, by entering the number of
boards to be flashed on Num. Boards tab, or by entering the ‘End Address’ value:
If automatic mode has been selected on Actions tab, the selected MAC address list is used during
the automatic programming operations, otherwise only one device is programmed with the ‘Start Address’ field.
2. User can provide the list of MAC addresses to be used through an input file:
Check ‘File’ and select the input text file through the ‘Load File’ field
If automatic mode has been selected on Actions tab, the selected MAC address list is used during the
automatic programming operations, otherwise only the first address is used for a single programming operation.
The ‘Save MAC Address log’ check box allows the list of used MAC addresses to be stored on a file entered through the ‘File Name’ field.
As already highlighted, MAC Address programming can be combined with the automatic programming mode. For each connected device, the image file is programmed followed by the MAC address programming. The number of selected MAC addresses (incremental addresses list size or input file size) triggers the automatic programming operations end. Each programmed MAC address is displayed on the Log window.
MAC address programming is supported on both UAR and SWD mode.
UM2406
MAC address programming
Figure 13. Flasher Utility: MAC address selection
UM2406 - Rev 6
page 13/26
Figure 14. Flasher Utility: UART MAC address programming
UM2406
MAC address programming
Figure 15. Flasher Utility: SWD MAC address programming
User can select either adding or not the timestamp on the saved MAC address log file name (as suffix).
If the timestamp is not added to the name of log file, all log information is saved in the same selected log file name. Otherwise, for each run the log information is saved in a different log file.
The name of log file can be specified using 'File Name' field.
UM2406 - Rev 6
page 14/26
UM2406
Flasher launcher utility

7 Flasher launcher utility

The flasher launcher is a standalone utility allowing the BlueNRG-X Flasher Utility commands to be run without using the BlueNRG-X Flasher Utility GUI tool.
A DOS command window is required and both UART and SWD modes are supported (*.bin and *.hex image files).
The flasher launcher utility (BlueNRG-X_Flasher_Launcher.exe) is included on the BlueNRG-X Flasher Utility software package within the folder "Application".
"Release folder" on the BlueNRG-X Flasher Utility SW package start menu (ST BlueNRG-X Flasher Utility x.x.x) allows direct access to the "Application" folder

7.1 Requirements

In order to use the flasher launcher utility on a specific device, the following prerequisites must be addressed:
UAR
T mode: the BlueNRG-1, BlueNRG-2 and BlueNRG-LP platform must be connected to a PC USB port
SWD mode: an SWD HW programming/debugging tool must be connected to the BlueNRG-1, BlueNRG-2, BlueNRG-LP SWD lines.
Note: Using the option -l, all operation steps are tracked in log files stored on "Logs" folder, which is created within the
BlueNRG-X Flasher Utility software package, "Application" folder.
.

7.2 Flasher launcher utility options

In order to use the flasher launcher utility on a specific device, a Windows DOS shell must be opened and user has to launch the related BlueNRG-X_Flasher_Launcher.exe with proper command and options (type –h to get the list of all supported options):
BlueNRG-X_Flasher_Launcher.exe -h:
usage: BlueNRG-X Flasher Launcher [-h] [-v]
{flash,read,mass_erase,verify_memory,erase_pages,uart,swd}
BlueNRG-X Flasher Launcher version x.x.x.
optional arguments:
-h, --help
-v, --version show program's version number and exit
commands:
{flash,read,mass_erase,verify_memory,erase_pages, uart, swd}
flash:
read: Reads a flash memory
mass_erase: Erases a flash memory
verify_memory Verifies the content of a BlueNRG-x device with a file
erase_pages Erase one or more pages from a Flash memory
uart: Shows all connected COM ports (UART mode)
swd: Shows all devices connected by SWD interface: ST-LINK/V2, CMSIS-DAP, J-Link (SWD mode)
show this help message and exit
Programs a flash memory

7.3 Flasher launcher utility: UART, SWD modes

The flasher launcher utility supports two operating modes:
UAR
SWD mode (just connect the selected BlueNRG-1, BlueNRG-2, BlueNRG-LP
1. It is natively available on the BlueNRG-LP, STEVAL-IDB01xVx kits. User must just connect the STEVAL kit to a PC USB
UM2406 - Rev 6
T mode (just connect the selected device to a PC USB port)
programming/debugging tool.
port.
(1)
device SWD lines to a SWD
page 15/26
Flasher launcher utility: command uart for getting the list of all available COMx ports (which devices are connected to the PC USB ports):
BlueNRG-X_Flasher_Launcher.exe uart
CONNECTED PORT = COM194 (ST DK), COM160 (ST DK)
Flasher launcher utility: command swd to get the list of all available connected SWD HW programming/debugging tools:
BlueNRG-X_Flasher_Launcher.exe swd
CONNECTED BY ST-Link/V2 = NO ST-Link/V2 CONNECTED
CONNECTED BY CMSIS-DAP (serial number of CMSIS-DAP interfaces):
1) 07200001066fff333231545043084259a5a5a5a597969908
2) 07200001066dff383930545043205830a5a5a5a597969908
3) 07200001066dff333231545043084255a5a5a5a597969908
CONNECTED BY J-Link = NO J-Link CONNECTED

7.4 Flasher launcher utility: flash command

In order to use the flasher launcher utility for programming a specific device flash memory, the flash command is available (type –h for getting the list of all supported options):
>BlueNRG-X_Flasher_Launcher.exe flash -h
flash command usage:
BlueNRG-X_Flasher_Launcher.exe flash [-h] [-address START_ADDRESS][-f [FILE_BLUENRG_1,FILE_BLUENRG_2,FILE_BLUENRG_LP ][-erase] [-verify] [-rp] [-mac] [­mac_address MAC_ADDRESS][-mac_log_file MAC_LOG_FILE][-mac_start MAC_START_ADDRESS |
-mac_file MAC_FILE_ADDRESS](-all | -d DEVICE_ID) [-verbose{1,2,3}] [-l](-UART | -
SWD) [-frequency {5,15,25,50,100,125,240,480,900,1800,4000}]
flash command optional arguments:
-h, –help Show this help message and exit
-address START_ADDRESS, –address START_ADDRESS Start Adress
-f [FILE_BLUENRG_1,FILE_BLUENRG_2, FILE_BLUENRG_LP], –fileToFlash
[FILE_BLUENRG_1,FILE_BLUENRG_2, FILE_BLUENRG_LP]
File .bin or .hex to flash for the BlueNRG-1, BlueNRG-2, BlueNRG-LP devices
-erase, –erase Enable Mass Erase option
-verify Enable V
-rp, –readout_protection Enable ReadOut Protection option
-mac, –mac Enable Mac Address option
-all, --all All connected devices (COM port in UAR SWD mode)
-d DEVICE_ID, --device DEVICE_ID. Set ID of HW tool used for the connection: COM port (UART mode); ST-Link/V2 ID, CMSIS-DAP ID, J-Link ID (SWD mode)
-l, –log Log data
-UART, –uart UART mode. For custom board put it in bootloader mode (DIO7 high while performing a reset cycle of the BlueNRG-1/2 or PA10 high while resetting device for BlueNRG-LP) before performing the operation
-SWD, –swd SWD mode
-mac_address MAC_ADDRESS Flash Location where storing the Bluetooth public address
-mac_log_file MAC_LOG_FILE, -ml MAC_LOG_FILE Files containing the log of stored/used MAC Addresses and not stored/not used MAC addresses
-mac_start MAC_START_ADDRESS, -ms MAC_START_ADDRESS First MAC Address
-mac_file MAC_FILE_ADDRESS, -mf MAC_FILE_ADDRESS File containing the list of MAC addresses
frequency {5,15,25,50,100,125,240,480,900,1800,4000}, --frequency {5,15,25,50,100,125,240,480,900,1800,4000} Set frequency value (only for SWD modality)
erify option
UM2406
Flasher launcher utility: flash command
T mode; ST-Link/V2 ID, CMSIS-DAP ID, J-link ID in
UM2406 - Rev 6
page 16/26
Note:
UM2406
Flasher launcher utility: read command
verbose {1,2,3}, --verbose {1,2,3} Increase output verbosity, set debug level to 3 (only for SWD modality and log data)
1. If UART mode is selected, the device must be connected to a PC USB COM port and the –UART option must be used. If more than one device is connected to PC USB ports, the –all option allows all of them to be selected or user must specify each COM port with the –d option.
2. If SWD mode is selected, SWD HW programming/debugging tool must be connected to the selected device SWD lines and it is necessary to specify the -swd option. If more than one device is connected to PC by SWD interface, the –all option allows all of them to be selected or user must specify each interface with the –d option.
3. The binary file to be loaded is specified with –f option. If user must program the BlueNRG-1, BlueNRG-2 and BlueNRG-LP devices with related different binary files, on same programming session, the user can specify the related binary images following this order: the BlueNRG-1, BlueNRG-2, BlueNRG-LP.
BlueNRG-X_Flasher_Launcher.exe flash -UART -all
-f "C:\{user_path}\BlueNRG-1_2 DK
3.2.1\Firmware\BlueNRG1_Periph_Examples\Micro\Hello_World\BlueNRG-1\Micro_Hell o_World.bin"
-f "C:\{user_path}\BlueNRG-1_2 DK
3.2.1\Firmware\BlueNRG1_Periph_Examples\Micro\Hello_World\BlueNRG-2\Micro_Hell o_World.bin" –l
-f "C:{user_path}\BlueNRG-LP DK 1.0.0\Firmware \Peripheral_Examples\Examples_MIX\MICRO\MICRO_Hello_World\Micro_Hello_World.bi n"
The first file is programmed on connected the BlueNRG-1 devices; the second file is programmed on connected BlueNRG-2 devices, the third file is programmed on connected BlueNRG-LP devices
4. If –f option is not used, the binary images files specified on Application/config_file.conf are used:
#Image file for BlueNRG_1 device
BLUENRG_1 = “user_path”/bluenrg_1_binary_file.hex
#Image file for BlueNRG_2 device
BLUENRG_2 = “user_path”/bluenrg_2_binary.hex
#Image file for BlueNRG_LP device BLUENRG_LP = “user_path”/ bluenrg_lp_binary.hex
User must specify the full binary image path for each device.

7.5 Flasher launcher utility: read command

In order to use the flasher launcher utility for reading a specific device flash memory, the read command is available (type –h for getting the list of all supported option):
BlueNRG-X_Flasher_Launcher.exe read –h
read command usage:
BlueNRG-X_Flasher_Launcher.exe read [-h] [-address START_ADDRESS][-size SIZE] [-s] (-all | -d DEVICE_ID)(-UART | -SWD) [-verbose{1,2,3}] [-l]
[-frequency {5,15,25,50,100,125,240,480,900,1800,4000}]
UM2406 - Rev 6
page 17/26
UM2406
Flasher launcher utility: mass erase command
read command optional arguments:
-h, –help Show this help message and exit
-address START_ADDRESS, –address START_ADDRESS Start Address
-size SIZE, –size SIZE Size of memory flash to read
-s, –show Show the flash memory after a read operation
frequency {5,15,25,50,100,125,240,480,900,1800,4000}, --frequency {5,15,25,50,100,125,240,480,900,1800,4000}
-all, --all All connected devices (COM port in UART mode;ST-Link/V2 ID, CMSIS-DAP ID, J-Link ID in SWD mode)
-d DEVICE_ID, --device DEVICE_ID. Set ID of HW tool used for the connection: COM port (UART mode); ST-Link/V2 ID, CMSIS-DAP ID, J-Link ID (SWD mode)
-UART, –uart UART mode
-SWD, –swd SWD mode
-verbose Increase output verbosity (only for SWD mode and log data)
-l, –log Log data
-verbose {1,2,3}, --verbose {1,2,3} Increase output verbosity, set debug level to 3 (only for SWD modality and log data)
Note: 1. If UART mode is selected, the device must be connected to a PC USB COM port and the –UART option
must be used. If more than one device is connected to PC USB ports, the –all option allows all of them to be selected or user must specify each COM port with the –d option
2. If SWD mode is selected, an SWD HW programming/debugging tool must be connected to the selected device SWD lines and it is necessary to specify the -swd option. If more than one device is connected to PC by SWD interface, the –all option allows all of them to be selected or the user must specify each interface with the –d option.
Set frequency value (only for SWD modality)

7.6 Flasher launcher utility: mass erase command

In order to use the flasher launcher utility to perform a specific device flash mass erase, the mass_erase command is available (type –h to get the list of all supported options):
BlueNRG-X_Flasher_Launcher.exe mass_erase –h
mass_erase command usage:
BlueNRG-X_Flasher_Launcher.exe mass_erase [-h] [-s] (-all | -d DEVICE_ID)(-UART |
-SWD) [-verbose{1,2,3}] [-l][-frequency {5,15,25,50,100,125,240,480,900,1800,4000}]
mass_erase command optional arguments:
-h, –help Show this help message and exit
-s, –show Show memory flash after a mass erase operation
-all, --all All connected devices (COM port in UART mode;ST SWD mode)
-d DEVICE_ID, --device DEVICE_ID. Set ID of HW tool used for the connection: COM port (UART mode); ST-Link/V2 ID, CMSIS-DAP ID, J-Link ID (SWD mode)
-frequency {5,15,25,50,100,125,240,480,900,1800,4000}, --frequency {5,15,25,50,100,125,240,480,900,1800,4000} Set frequency value (only for SWD modality)
-UART, –uart UART mode
-SWD, –swd SWD mode
-l, –log Log data
-verbose {1,2,3}, --verbose {1,2,3}Increase output verbosity, set debug level to 3 (for SWD modality and log data only)
-Link/V2 ID, CMSIS-DAP ID, J-Link ID in
UM2406 - Rev 6
page 18/26
UM2406
Flasher launcher utility: verify memory command
Note: 1. If UART mode is selected, the device must be connected to a PC USB COM port and the –UART option
allows all of them to be selected. If more than one device is connected to PC USB ports, the –all option must be used or user must specify each COM port with the –d option.
2. If SWD mode is selected, an SWD HW programming/debugging tool must be connected to the selected device SWD lines and it is necessary to specify the -swd option. If more than one device is connected to PC by SWD interface, the –all option allows all of them to be selected or user must specify each interface with the –d option.

7.7 Flasher launcher utility: verify memory command

In order to use the flasher launcher utility for verify a specific device flash memory content, the verify_memory command is available (type –h
BlueNRG-X_Flasher_Launcher.exe verify_memory –h
verify_memory command usage:
BlueNRG-X_Flasher_Launcher.exe verify_memory [-h] -f FLASH_VERIFY_FILE[-s][-address START_ADDRESS](-all | -d DEVICE_ID) [-verbose{1,2,3}][-l] (-UART |-SWD)[-frequency {5,15,25,50,100,125,240,480,900,1800,4000}]
verify_memory command optional arguments:
-h, –help
-f FLASH_VERIFY_FILE, –file FLASH_VERIFY_FILE File to use to verify flash memory
-s, –show
-address START_ADDRESS, –address START_ADDRESS Start Adress
-frequency {5,15,25,50,100,125,240,480,900,1800,4000}, --frequency {5,15,25,50,100,125,240,480,900,1800,4000} Set frequency value (only for SWD modality)
-all, --all All connected devices (COM port in UART mode;ST-Link/V2 ID, CMSIS-DAP ID, J-Link ID in SWD mode)
-d DEVICE_ID, --device DEVICE_ID. Set ID of HW tool used for the connection: COM port (UART mode); ST-Link/V2 ID, CMSIS-DAP ID, J-Link ID (SWD mode)
-verbose {1,2,3}, --verbose {1,2,3} Increase output verbosity, set debug level to 3 (only for SWD modality and log data)
-l, –log Log data in a txt file
-UART, –uart UART mode
-SWD, –swd SWD mode
Show this help message and exit
Show memory flash after a verify operation
for getting the list of all supported option):
Note: 1. If UART mode is selected, the device must be connected to a PC USB COM port and the –UART option
must be used. If more than one device is connected to PC USB ports, the –all option allows all of them to be selected or user must specify each COM port with the –d option.
2. If SWD mode is selected, an SWD HW programming/debugging tool must be connected to the selected device SWD lines and it is necessary to specify the -swd option. If more than one device is connected to PC by SWD interface, the –all option allows all of them to be selected or user must specify each interface with the –d option.

7.8 Flasher launcher utility: erase pages command

In order to use the flasher launcher utility for erase a specific device flash memory content page, the erase_pages command is available (type –h for getting the list of all supported option):
BlueNRG-X_Flasher_Launcher.exe erase_pages –h
erase_pages command usage:
BlueNRG-X_Flasher_Launcher.exe erase_pages [-h](-UART |-SWD)(-all | -d DEVICE_ID) [-l] [-verbose {1,2,3}] [-frequency
{5,15,25,50,100,125,240,480,900,1800,4000}] [-s] -p pages
erase_pages command optional arguments:
-h, –help Show this help message and exit
-UART, –uart
UM2406 - Rev 6
UAR
T mode
page 19/26
UM2406
Flasher launcher utility: examples
-SWD, –swd SWD mode
-all, --all All connected devices (COM port in UART mode;STlink/V2 ID, CMSIS-DAP ID, Jlink ID in SWD mode)
-d DEVICE_ID, --device DEVICE_ID mode); STlink/V2 ID, CMSIS-DAP ID, Jlink ID (SWD mode)
-l, –log Log data in a txt file
-verbose {1,2,3}, --verbose {1,2,3} Increase output verbosity, set debug level to 3 (only for SWD modality and log data)
-frequency {5,15,25,50,100,125,240,480,900,1800,4000}, --frequency {5,15,25,50,100,125,240,480,900,1800,4000} Set frequency value (only for SWD modality)
-s, –show Show memory flash after a erase_pages operation
-p PAGES, --page PAGES List of pages to erase (it starts from 0)
Note: 1. If UART mode is selected, the device must be connected to a PC USB COM port and the –UART option
must be used. If more than one device is connected to PC USB ports, the –all option allows all of them to be selected or user must specify each COM port with the –d option.
2. If SWD mode is selected, an SWD HW programming/debugging tool must be connected to the selected device SWD lines and it is necessary to specify the -swd option. If more than one device is connected to PC by SWD interface, the –all option allows all of them to be selected or user must specify each interface with the –d option.
Set ID of HW tool used for the connection: COM port (UART

7.9 Flasher launcher utility: examples

Flash a binary image on the connected BlueNRG-1,2 devices with an ST-Link/V2 HW tool (SWD mode)
>BlueNRG-X_Flasher_Launcher.exe flash -SWD -all -f "User_Application.hex" –l
Flash a binary image on the connected BLE devices on USB COM ports (UAR
>BlueNRG-X_Flasher_Launcher.exe flash -UART –all -f "User_Application.hex" –l
Flash a binary image on the connected devices on CMSIS-DAP channel with erase, verify and log data options (SWD mode)
Figure 16.
BlueNRG-X Flasher launcher, flash with –erase, -l, -verify option
T mode)
UM2406 - Rev 6
page 20/26

8 List of acronyms

Term Meaning
BLE Bluetooth low energy
HW Hardware
USB Universal serial bus
SW Software
SWD Serial wire debug UART
UART Universal asynchronous receiver-transmitter
UM2406
List of acronyms
Table 1. List of acronyms
UM2406 - Rev 6
page 21/26
UM2406
References

Appendix A References

Table 2. Reference
Name Title
BlueNRG-1 datasheet Programmable Bluetooth® Low Energy wireless SoC
BlueNRG-2 datasheet Programmable Bluetooth® Low Energy wireless SoC
STSW-BNRGFLASHER Databrief for the BlueNRG-X Flasher SW package
BlueNRG-LP datasheet Programmable Bluetooth® Low Energy wireless SoC
UM2406 - Rev 6
page 22/26

Revision history

Table 3. Document revision history
Date Version Changes
15-May-2018 1 Initial release.
Updated Figure 1. BlueNRG-1, BlueNRG-2 Flasher Utility, Figure 2. Flasher
03-Jul-2018 2
26-Feb-2019 3
09-Apr-2019 4
14-Jul-2020 5
05-Dec-2020 6
Utility UART main window Figure 4. Flasher utility UART mode: device memory , Figure 5. Flasher utility UART mode: changing memory fields, Figure 7. Flasher Utility: SWD main window, Figure 8. Flasher Utility SWD mode: device memory , Figure
10. Flasher Utility: SWD automatic mode, Figure 11. Flasher utility: UART automatic mode, Figure 12. Flasher utility: UART automatic programming is completed and Figure 13. Flasher Utility: SWD MAC address selection.
Minor text changes throughout the document.
Updated the Section Introduction and Section 3.1 UART mode: how to run.
Added Section 8 Flasher launcher utility and all its sub sections.
Added reference to "Application folder" in Section 7 Flasher launcher utility.
Updated Section 7.4 Flasher launcher utility: flash command.
Changed BlueNRG-1 and BlueNRG-2 to BlueNRG-X Flasher SW package
Added reference to BlueNRG-LP device.
Updated Figure 1. BlueNRG-X Flasher Utility, Figure 3.
T main window, Figure 5. Flasher utility UART mode: device
UAR memory , Figure 6. Flasher utility UART mode: changing memory fields, Figure 9. Flasher Utility: SWD main window, Figure 10. Flasher Utility SWD mode: device memory , Figure 12. Flasher Utility: SWD Plug&Play mode, Figure 13. Flasher Utility: MAC address selection and Figure 16. BlueNRG-X Flasher launcher, flash with –erase, -l, -verify option
Updated Section Introduction, Section 1.1 System requirements,
Section 3.1 UART mode: how to run window,Section 4.1 SWD mode: how to run, Section 7.1 Requirements, Section 7.2 Flasher launcher utility options, Section 7.3 Flasher launcher utility: UART, SWD modes, Section 7.4 Flasher launcher utility: flash command, Section 7.5 Flasher launcher utility: read command, Section 7.6 Flasher launcher utility: mass erase command, Section 7.7 Flasher launcher utility: verify memory command.
Added Section 7.8 Flasher launcher utility: erase pages command.
, Figure 3. Flasher utility UART mode: image file ,
UM2406
Flasher Utility
, Section 4 SWD main
UM2406 - Rev 6
page 23/26
UM2406
Contents
Contents
1 Getting started ....................................................................2
1.1 System requirements ...........................................................2
1.2 SW package setup .............................................................2
2 Toolbar interface ..................................................................3
3 UART main window ................................................................5
3.1 UAR
T mode: how to run.........................................................5
4 SWD main window.................................................................9
4.1 SWD mode: how to run .........................................................9
5 SW automatic programming mode ................................................12
6 MAC address programming.......................................................13
7 Flasher launcher utility ...........................................................15
7.1 Requirements ................................................................15
7.2 Flasher launcher utility options ..................................................15
7.3 Flasher launcher utility: UART, SWD modes .......................................15
7.4 Flasher launcher utility: flash command ...........................................16
7.5 Flasher launcher utility: read command ...........................................17
7.6 Flasher launcher utility: mass erase command .....................................18
7.7 Flasher launcher utility: verify memory command ...................................19
7.8 Flasher launcher utility: erase pages command ....................................19
7.9 Flasher launcher utility: examples................................................20
8 List of acronyms..................................................................21
Appendix A References ..............................................................22
Revision history .......................................................................23
UM2406 - Rev 6
page 24/26
UM2406
List of figures
List of figures
Figure 1. BlueNRG-X Flasher Utility ............................................................2
Figure 2. Compare Two Files tab ..............................................................
Figure 3. Flasher Utility UART main window.......................................................5
Figure 4. Flasher utility UART mode: image file ....................................................6
Figure 5. Flasher utility UART mode: device memory ................................................6
Figure 6. Flasher utility UART mode: changing memory fields ..........................................7
Figure 7. Compare Device Memory to File ........................................................7
Figure 8. Flasher Utility UART mode: UART ‘Comport Setting’ pop-up..................................... 8
Figure 9. Flasher Utility: SWD main window ....................................................... 9
Figure 10. Flasher Utility SWD mode: device memory ............................................... 10
Figure 11. Flasher Utility SWD mode: changing memory fields.......................................... 11
Figure 12. Flasher Utility: SWD Plug&Play mode ...................................................12
Figure 13. Flasher Utility: MAC address selection................................................... 13
Figure 14. Flasher Utility: UART MAC address programming ...........................................14
Figure 15. Flasher Utility: SWD MAC address programming ........................................... 14
Figure 16. BlueNRG-X Flasher launcher, flash with –erase, -l, -verify option.................................20
3
UM2406 - Rev 6
page 25/26
UM2406
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions dif
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
s terms and conditions of sale in place at the time of order acknowledgement.
ferent from the information set forth herein shall void any warranty granted by ST for such product.
.st.com/trademarks
© 2020 STMicroelectronics – All rights reserved
. All other product or service
UM2406 - Rev 6
page 26/26
Loading...