STMicroelectronics UM2406 The RF-Flasher Utility Software Package User Manual

August 7, 2024
STMicroelectronics

STMicroelectronics UM2406 The RF-Flasher Utility Software Package

Specifications

  • Supports BlueNRG-LP, BlueNRG-LPS, BlueNRG-1, and BlueNRG-2 devices
  • Interface: UART mode and SWD mode
  • Features: Flash memory programming, reading, mass erase, content verification
  • System Requirements: 2 GB of RAM, USB ports, Adobe Acrobat Reader 6.0 or later

Product Usage Instructions

Getting Started
This section provides information on the system requirements and software package setup.

System Requirements:

  • At least 2 GB of RAM
  • USB ports
  • Adobe Acrobat Reader 6.0 or later
  • Recommended display scale and settings up to 150%

Software Package Setup:
To run the utility, click on the RF-Flasher utility icon located at [Start]

[ST RF-Flasher Utility x.x.x] > [RFFlasher Utility].

Toolbar Interface
In the toolbar section of the RF-Flasher utility main window, users can perform the following operations:

  • Load an existing .bin or .hex file: [File] > [Open file…]
  • Save the current memory image: [File] > [Save File As…]
  • Close an existing .bin or .hex file: [File] > [Close file]
  • Set the ST-LINK frequency: [Tools] > [Settings…]
  • Enable or disable log file creation: [Tools] > [Settings…]

FAQ

  • What devices are supported by the RF-Flasher utility software package?
    The software package currently supports BlueNRG-LP, BlueNRG-LPS, BlueNRG-1, and BlueNRG-2 devices.

  • What are the minimum system requirements to run the RF-Flasher utility?
    The minimum system requirements include at least 2 GB of RAM, USB ports, and Adobe Acrobat Reader 6.0 or later.

  • How can I save the current memory image in the RF-Flasher utility?
    To save the current memory image, go to [File] > [Save File As…] and select the memory section to be saved to a .bin file.

UM2406
User manual

The RF-Flasher utility software package

Introduction

This document describes the RF-Flasher utility software package (STSW- BNRGFLASHER), which includes the RF-Flasher utility PC application.
The RF-Flasher utility is a standalone PC application, which allows the BlueNRG-1, BlueNRG-2, BlueNRG-LP, and BlueNRG-LPS Bluetooth® Low Energy systems-on-chip flash memory to be read, mass erased, written, and programmed.
It currently supports the interface to the BlueNRG-LP, BlueNRG-LPS, BlueNRG-1, and BlueNRG-2 flash memory through UART mode using the device internal UART bootloader. It also currently supports the interface to the BlueNRG-LP, BlueNRG-LPS, BlueNRG-1, and BlueNRG-2 flash memory through SWD mode by using the standard SWD interface through standard hardware programming/debugging tools (CMSIS-DAP, ST-LINK, and J-Link).
Moreover, it also allows a MAC address to be stored in a specific flash memory location selected by the user in both UART and SWD modes.
The RF-Flasher software package also provides a standalone flasher launcher utility, allowing flash memory programming, reading, mass erase, and content verification. The flasher launcher utility requires a PC DOS window only.

Note:
The RF term currently refers to BlueNRG-LP, BlueNRG-LPS, BlueNRG-1, and BlueNRG-2 devices. Any specific differences are highlighted where needed.

General information

List of acronyms

Table 1. List of acronyms

Term Meaning
RF Radio frequency
SWD Serial wire debug
UART Universal asynchronous receiver-transmitter
USB Universal series bus

Reference documents

Table 2. Reference documents

Reference Type Title
DS11481 BlueNRG-1 datasheet Programmable Bluetooth® Low Energy wireless SoC
DS12166 BlueNRG-2 datasheet Programmable Bluetooth® Low Energy wireless SoC
DB3557 STSW-BNRGFLASHER data brief Data brief for the RF-Flasher software

package
DS13282| BlueNRG-LP datasheet| Programmable Bluetooth® Low Energy wireless SoC
DS13819| BlueNRG-LPS datasheet| Programmable Bluetooth® Low Energy wireless SoC

Getting started

This section describes all system requirements to run the RF-Flasher utility PC application and the related software package installation procedure.

System requirements
The RF-Flasher utility has the following minimum requirements:

  • PC with Intel® or AMD processor running the following Microsoft® operating system:
    • Windows® 10
  • At least 2 GB of RAM
  • USB ports
  • Adobe Acrobat Reader 6.0 or later
  • Recommended display scale and settings are up to 150%.

Software package setup
The user can run this utility by clicking on the RF-Flasher utility icon ([Start]>[ST RF-Flasher Utility x.x.x]>[RF-Flasher Utility]).

Toolbar interface

In the toolbar section of the RF-Flasher utility main window, the user can perform the following operations:

  • Load an existing .bin or .hex (Intel extended) file, using [File]>[Open file…]
  • Save the current memory image in a .bin file, using [File]>[Save File As…]. The start address and the size of the memory section to be saved to the file are selectable from the Device Memory tab.
  • Close an existing .bin or .hex file, using [File]>[Close file]
  • Set the ST-LINK frequency, using [Tools]>[Settings…]
  • Enable or disable log file creation in UART/SWD modality, using [Tools]>[Settings…]. If log files are saved, it is possible to set the level of debug information to save (for SWD only). All log files are saved to {insta llation path}\ST\RF-Flasher Utility x.x.x\Logs\.
  • Mass erase, using [Tools]>[Mass erase].
  • Verify flash memory content [Tools]>[Verify flash content].
  • Get the application version, using [Help]>[About].
  • Download a file, using [Tools]>[Flash].
  • Erase device sectors, using [Tools]>[Erase Pages…]
  • Compare device memory with the selected image file, using [Tools]>[Compare Device Memory with file]. The two image files are displayed in the Compare Device Memory with Image File tab and the related differences are highlighted in red.
  • Compare two files, using [File]>[Compare two files]
  • Read bootloader sector (only in SWD mode), using [Tools]>[Read Bootloader Sector (SWD)].
  • Read OTP area (only in SWD mode), using [Tools]>[Read OTP Area (SWD)].
  • Save bootloader sectors or OTP area in a .bin file, using [File]>[Save File As…].

The user can also select two image files and compare them. The two image files are displayed in the Compare Two Files tab and the related differences are highlighted in red. .bin and .hex file formats are supported.

In the upper section of the RF-Flasher utility main window, the user can select the image file through the [Select Image File] button. The user can select the type of memory: flash memory, bootloader, or OTP area. For the flash memory area, the user can set the start address (only for the bin file)
All these options are available in UART and SWD mode.
The user needs to enable access to the selected mode (UART or SWD). They can do this by opening the associated COM port for UART mode, or by connecting an SWD hardware programming/debugging tool to the device SWD lines.

UART main window
In the UART main window tab of the RF-Flasher utility main window, the user can select the COM port to be used to interface the device through the List of COM Ports section.
The serial baud rate used for the RF device evaluation board is 460800 bps.

UART mode: how to run
Image file selection
To load an existing .bin or .hex file, use the [Select Image File] button on the main page, navigate to [File]>[Open File…], or go to the Image File tab. The full path of the selected file appears next to the button and the [Flash] button becomes active when the file has loaded.
The List of COM Ports tab displays all connected devices on the PC USB ports. The [Select All], [Unselect All], and [Invert All] buttons let the user define which connected devices (all, none, or some of them) should be the target of the utility operations. This way, the same operation (that is, flash memory programming) can be performed simultaneously on multiple devices. The [Refresh] button allows the user to refresh the list of connected devices.
By default, the [Mass erase] option in the [Actions] section is not checked, and only the required memory pages are erased and written with the file content. When this option is checked, a full mass erase precedes the flash memory programming phase.
The [Verify] 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 the flash memory.
The readout protection option enables readout protection of the device after flash memory programming.
Check the [Auto Baudrate] option only if a hardware reset is performed on the board to force the [Auto Baudrate] operation. By default, the [Auto Baudrate] option is not checked.

The Image File tab
The selected file name, size, and parsed contents to be programmed in the device flash memory can be viewed in the Image File tab.

The Device Memory tab
Select this tab to view the memory contents of a connected device (through the [Read] button) and the log containing operations performed on the selected device.

Click on 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 [Entire Memory] option.
The first column gives the base address of the following 16 bytes in a row (for example, row 0x10040050, column 4 holds the hexadecimal byte value at 0x10040054. The user can change the byte values by double-clicking a cell and entering a new hexadecimal value. Edited bytes appear in red.
Click on the [Write] button to program the entire page with the new byte values into the device flash memory.
The [Flash] button allows a flash memory programming operation to start with the selected option. If the [MAC Address] checkbox is checked, the user can specify the memory address where the selected MAC address is stored. When the [Flash] button is clicked on, the MAC address is programmed after the image file.

The Compare Device Memory with Image File tab
The user can compare the current device memory with the selected image file. The two image files are displayed and any differences are highlighted in red. .bin and .hex files format are supported.

Using the RF-Flasher utility with other boards
The RF-Flasher utility automatically detects the BlueNRG-1, BlueNRG-2, BlueNRG-LP, and BlueNRG-LPS evaluation boards (displayed as STDK) connected to the PC USB ports. It uses an auxiliary STM32 (driven by the GUI) to reset the device and put it in UART bootloader mode.
The application also works with custom boards, providing simple UART access to the connected device, but the user must put the device in bootloader mode manually. Upon the selection of any non-STEVAL COM ports, the following pop-up appears:

When this pop-up appears and depending on the device type, bootloader mode is activated as follows:

  • For BlueNRG-LP and BlueNRG-LPS devices, the user must set the PA10 pin to a high value and perform a reset cycle of the device (keeping PA10 at a high value).
  • For BlueNRG-1 and BlueNRG-2 devices, the user must set the DIO7 pin to a high value and reset the device (keeping DIO7 at a high value).

The user can also set a preferred baud rate for the UART in the pop-up window and then press OK to return to the GUI.

Note:
The user must avoid resetting the device while using the RF-Flasher utility, unless the ComPort Setting pop-up is active. If the device is reset, the 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, and BlueNRG-LPS devices through a USB FTDI interface, the user should double-check the latency associated with the USB FTDI PC driver. This allows the connected port to be recognized as a USB virtual COM. On a typical USB-FTDI PC driver, double-check the related device USB driver settings in [Properties]>[Port
Settings]>[Advanced]. Make sure that the latency timer value is set to 1 ms. This setting is strongly recommended to speed up flash memory operations on custom boards.

SWD main window

To use the SWD main window tab in the RF-Flasher utility main window, the user must connect the SWD hardware programming/debugging tool to the device SWD lines (BlueNRG-1, BlueNRG-2, BlueNRG-LP, and BlueNRG-LPS devices).
The following SWD hardware programming/debugging interfaces are supported, assuming that the selected hardware and related software tools support the connected device:

  1. CMSIS-DAP
  2. ST-LINK
  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 done easily by using the tool HYPERLINK Zadig (https://zadig.akeo.ie) as follows:

  • Select J-Link from the device list
  • Select “WinUSB” as the driver
  • Click on [Install Driver] to install the WinUSB driver

Note:
Refer to the HYPERLINK J-Link OpenOCD website (https://wiki.segger.com/OpenOCD) for more information.

Note:
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. To use SEGGER J-Link software again, the USB driver needs to be switched back to its default.

SWD mode: how to run
Image file selection
Use the [Select Image File] button on the main page or go to [File]>[ Open File…] to load an existing .bin or .h ex file. The full path of the selected file appears next to the button and the [Flash] button becomes active at the end of the file loading.
In the Actions tab, the user can select the following options:

  • [Verify]: forces a check to ensure that the memory content has been written correctly
  • [Readout protection]: enables the device readout protection after programming the selected image file
  • [Mass erase]: allows a mass erase of the device to be performed before programming the selected image file
  • [Update Device Memory]: allows the device memory table to be updated after a flash memory programming operation
  • [Plug&Play mode]: allows the plug-and-play flash memory programming mode to be enabled/disabled when only one SWD programming tool is available. In this case, boards are programmed one at a time. When the programming operation has completed on one board, it is possible to unplug it and plug another board.

By default, the [Mass erase] option next to 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-LINK, and J-Link). Press the [Refresh] button to update the list of connected interfaces.
The user can also select which specific SWD hardware interface must be displayed through the [Interface] field.
The [Select All], [Unselect All], and [Invert All] buttons allow the user to define which connected SWD interfaces (all, none, or some of them) should be the target of the utility operations. This way, the same operation (that is, flash memory programming) can be performed simultaneously on multiple devices.
The [Flash] button allows a flash memory programming operation to start with the selected option. If the [MAC Address] checkbox is checked, the user can specify the memory address where the selected MAC address is stored. When the [Flash] button is clicked on, the MAC address is programmed after the image file.
‘Image File’ tab
The selected file name, size, and parsed contents to be programmed in the device flash memory can be viewed in theImage File tab.

The Device Memory tab
Select this tab to view the memory contents of a connected device (through the [Read] button) and the log containing operations performed on the selected device.

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 [Entire Memory] option.
The first column gives the base address of the following 16 bytes in a row (for example, row 0x10040050, column 4 holds the hexadecimal byte value at 0x10040054. The user can change byte values by double-clicking a cell and entering a new hexadecimal value. Edited bytes appear in red.
Click on the [Write] button to program the entire page with the new byte values into the device flash memory.

Note:
[Compare Device Memory to File] is also supported in SWD mode, with the same features as described in Section 4.1: UART mode: how to run.

SWD mode: read bootloader sector
The user can read the bootloader sector of the connected device through the SWD hardware programming interface by selecting [Tools]>[Read Bootloader Sector (SWD)]. The bootloader sector content is displayed in the Bootloader/OTP tab.

Note:
This feature is supported only in SWD mode and accessible only through the GUI.

SWD mode: read OTP area
The user can read the OTP area connected device (where supported) through the SWD hardware programming interface by selecting [Tools]>[Read OTP Area (SWD)]. The OTP area content is displayed in the Bootloader/OTP tab.
This feature is not supported in UART mode.

SWD Plug &Play programming mode
The SWD Plug&Play programming mode allows the user to enter a programming loop by connecting a new device platform to be programmed. When the flash memory image file and programming actions have been selected, the Flasher PC application asks the user to connect a device to the SWD interface (a Waiting for device N. 1 message is displayed).
When the user connects the device, a Device N. 1 connected message is displayed, and the application starts programming the device with the selected image file and options. When the programming operation has finished, the Flasher application displays the message Please disconnect device N. 1. When the user disconnects the device, the message Waiting for device N. 2 is displayed. The user can stop this automatic mode by pressing the [Stop] button.
When using the Plug&Play mode, the user must select the interface to be used (CMSIS-DAP, ST-LINK, or J-Link).

MAC address programming

MAC address programming allows the MAC address to be stored in a specific flash memory location on the device.
The user can choose to enable this option or not by checking or unchecking the [MAC address] checkbox. The specific flash memory location is set through the [MAC Flash location] field.
The [Set MAC address] button allows the user to select the MAC address as follows:

  1. Check the [Range] checkbox and provide the start address in the [Start Address] field. The start address 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 programmed in the Num. Boards tab, or by entering the [End Address] value:
    • If automatic mode has been selected in the Actions tab, the selected MAC address list is used for the automatic programming operations. If not, only one device is programmed, using the [Start Address] field.
  2. The user can provide a list of MAC addresses to be used through an input file:
    • Check the [File] checkbox and select the input text file in the [Load File] field.
    • If automatic mode has been selected in the Actions tab, the selected MAC address list is used for the automatic programming operations. If not, only the first address is used for a single programming operation.

The [Save MAC Address log] checkbox allows the list of used MAC addresses to be stored in a file, selected in the [File Name] field.
MAC address programming can be combined with the automatic programming mode. For each connected device, the image file is programmed first, followed by the MAC address. The number of selected MAC addresses
(incremental address list size or input file size) triggers the end of the automatic programming operations. Each programmed MAC address is displayed in the Log window.
MAC address programming is supported in UAR and SWD mode.

The user can select whether or not a timestamp is added to the saved MAC address log file name (as a suffix).
If the timestamp is not added to the name of the log file, all log information is saved in the same log file. If the timestamp is added, the log information for each run is saved in a different log file.
The name of the log file can be specified using the [File Name] field.

RF-Flasher launcher utility

The RF-Flasher launcher is a standalone utility allowing the user to run RF- Flasher utility commands using the RF-Flasher utility GUI.
A DOS command window is required and both UART and SWD modes are supported (using .bin and .hex image files).
The RF-Flasher launcher utility (RF-Flasher_Launcher.exe) is included in the RF-Flasher utility software package within the application folder. The “Release folder” in the RF-Flasher utility software package start menu
item (ST RF-Flasher utility x.x.x) allows direct access to the application folder.

Requirements
In order to use the RF-Flasher launcher utility on a specific device, the following prerequisites must be met:

  • UART mode: the BlueNRG-1, BlueNRG-2, BlueNRG-LP, or BlueNRGLPS platform must be connected to a PC USB port
  • SWD mode: an SWD hardware programming/debugging tool must be connected to the BlueNRG-1, BlueNRG-2, BlueNRG-LP, or BlueNRG-LPS SWD lines.

With the -l option, all operation steps are tracked in log files, stored in the “Logs” folder, which is created in the RF-Flasher utility software package “Application” folder.

RF-Flasher launcher utility options
To use the RF-Flasher launcher utility on a specific device, the user must open a Windows DOS shell and launch
RF-Flasher_Launcher.exe with the proper command, and options (use –h to get a list of all supported options).
RF-Flasher_Launcher.exe -h:
Usage: RF-Flasher Launcher [-h] {flash, read, mass_erase, verify_memory, erase_pages, uart, swd, read_OTP,
write_OTP}
RF-Flasher launcher version x.x.x.
Optional arguments:
-h, –help: show this help message and exit Commands:
{flash, read, mass_erase, verify_memory, erase_pages, uart, swd, read_OTP, write_OTP}

  • flash: program a flash memory
  • read: read a flash memory
  • mass_erase: erase a flash memory
  • verify_memory: verify the content of an RF device with a file
  • erase_pages: erase one or more pages from a flash memory
  • uart: show all connected COM ports (UART mode)
  • swd: show all devices connected via the SWD interface: ST-LINK, CMSIS-DAP, J-Link (SWD mode)
  • read_OTP: read OTP area (only in SWD mode)
  • write_OTP: write OTP area (only in SWD mode)

RF-Flasher launcher utility: UART & SWD modes
The RF-Flasher launcher utility supports two operating modes:

  • UART mode (connect the selected device to a PC USB port)
  • SWD mode (connect the selected BlueNRG-1, BlueNRG-2, BlueNRG-LP, or BlueNRG-LPS device SWD lines to a SWD programming/debugging tool).

RF-Flasher launcher utility: use the uart command to get a list of all available COMx ports (devices connected to the PC USB ports):

RF-Flasher_Launcher.exe uart
CONNECTED PORT = COM194 (ST DK), COM160 (ST DK)
RF-Flasher launcher utility: use the swd command to get a list of all available connected SWD hardware programming/debugging tools:
RF-Flasher_Launcher.exe swd
CONNECTED BY ST-LINK = NO ST-LINK 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

RF-Flasher launcher utility: flash command
To use the RF-Flasher launcher utility to program a specific device flash memory, the flash command is available (us the –h option to get a list of all supported options):
RF-Flasher_Launcher.exe flash -h

Flash command usage
RF-Flasher_Launcher.exe flash [-h] [-address START_ADDRESS][-f FILE_TO_FLASH
[FILE_TO_FLASH, …]] [-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 {0, 1, 2, 3, 4}] [-l](-UART |
-SWD) [-frequency {5,15,25,50,100,125,240,480,900,1800,4000}]

Flash command optional arguments

  • -address START_ADDRESS, –-address START_ADDRESS: start address.

  • -all, –all: all connected devices (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-link ID in SWD mode).

  • -d DEVICE_ID, –device DEVICE_ID: set the ID of the hardware tool used for the connection (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-Link ID in SWD mode).

  • -erase, –-erase: enable the [Mass Erase] option.

  • -f FILE_TO_FLASH [FILE_TO_FLASH …], –fileToFlash FILE_TO_FLASH
    [FILE_TO_FLASH …]: list of .bin or .hex files to program the RF device: a BlueNRG-1, BlueNRG-2, BlueNRG-LP, or BlueNRG-LPS device.

  • 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 – ST-LINK hardware). The default value is 4000.

  • -h, –help: show this help message and exit.

  • -l, –log: log data.

  • -mac, –mac: enable the [Mac Address] option.

  • -mac_address –MAC_ADDRESS: the flash memory location where the Bluetooth® public address is stored.

  • -mac_file MAC_FILE_ADDRESS, –mf MAC_FILE_ADDRESS: file containing a list of MAC addresses.

  • -mac_log_file MAC_LOG_FILE, –ml MAC_LOG_FILE: files containing the logs of stored/unstored and used/unused MAC addresses.

  • -mac_start MAC_START_ADDRESS, –ms MAC_START_ADDRESS: first MAC address.

  • -rp, –-readout_protection: enable the [ReadOut Protection] option.

  • -SWD, –-swd: SWD modality (ST-LINK, CMSIS-DAP, J-Link hardware programming/debugging tool).

  • -UART, –-uart: UART mode. A custom board must be put in bootloader mode (DIO7 pin value high while performing a reset cycle of the BlueNRG-1 or BlueNRG-2 device; PA10 pin value high while resetting a BlueNRG-LP or BlueNRG-LPS device) before performing the operation.

  • -verbose {0, 1, 2, 3, 4}, –verbose {0, 1, 2, 3, 4}: increase output verbosity; set debug level up to 4 (only for SWD modality and log data). The default value is 2.

  • -verify, –verify: enable the [Verify] option.

Note:

  • 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. Alternatively, the user can specify each COM port using the –d option.

  • If SWD mode is selected, an SWD hardware programming/debugging tool must be connected to the selected device SWD lines, and it is necessary to use the -SWD option. If more than one device is connected to the PC through the SWD interface, the –all option allows all of them to be selected. Alternatively, the user can specify each interface using the –d option.

  • The binary file to be loaded is specified using the –f option. If the user wants to program the BlueNRG-1, BlueNRG-2, BlueNRG-LP, or BlueNRG-LPS devices with different binary files during the same programming session, they can specify the respective binary images following this order: BlueNRG-1, BlueNRG-2, BlueNRG-LP, BlueNRG-LPS.
    RF-Flasher_Launcher.exe flash -UART -all
    – f “C:\{user_path}\BlueNRG-1_2 DK
    3.2.2\Firmware\BlueNRG1_Periph_Examples\Micro\Hello_World\BlueNRG-1\Micro_Hell o_World.bin”
    – f “C:\{user_path}\BlueNRG-1_2 DK
    3.2.2\Firmware\BlueNRG1_Periph_Examples\Micro\Hello_World\BlueNRG-2\Micro_Hell o_World.bin” –l
    – f “C:{user_path}\BlueNRG-LP DK 1.4.0\Firmware
    \Peripheral_Examples\Examples_MIX\MICRO\MICRO_Hello_World\STEVAL-
    IDB011V1\Micro_Hello_World.bin”
    – f “C:{user_path}\BlueNRG-LP DK 1.4.0\Firmware
    \Peripheral_Examples\Examples_MIX\MICRO\MICRO_Hello_World\STEVAL-
    IDB012V1\Micro_Hello_World.bin”
    The first file is programmed on the connected BlueNRG-1 devices; the second file is programmed on the connected BlueNRG-2 devices; the third file is programmed on the connected BlueNRG-LP devices; the fourth file is programmed on the connected BlueNRG-LPS devices.

  • If the –f option is not used, the binary images files specified in 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

    Image file for BlueNRG_LPS device

    BLUENRG_LPS = “user_path”/bluenrg_lps_binary.hex
    The user must specify the full binary image path for each device.

RF-Flasher launcher utility: read command
To use the RF-Flasher launcher utility to read a specific device flash memory, the read command is available (use –h to get a list of all supported options):
RF-Flasher_Launcher.exe read –h
Read command usage
RF-Flasher_Launcher.exe read [-h] [-address START_ADDRESS][-size SIZE] [–entire] [-s] (-all | -d DEVICE_ID)(-UART | -SWD) [-verbose {0, 1, 2, 3, 4}] [-l] [-frequency {5,15,25,50,100,125,240,480,900,1800,4000}]

Read command optional arguments

  • -address START_ADDRESS, –-address START_ADDRESS: start address (the default value is 0x10040000).

  • -all, –all: all connected devices (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-link ID in SWD mode).

  • -d DEVICE_ID, –device DEVICE_ID: set the ID of the hardware tool used for the connection (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-Link ID in SWD mode).

  • -entire, –entire: read the entire flash memory.

  • -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 – ST-LINK hardware). The default value is 4000.

  • -h, -–help: show this help message and exit.

  • -l, –-log: log data.

  • -s, –-show: show the flash memory after a read operation.

  • -size SIZE, –-size SIZE: size of the flash memory to read (the default value is 0x3000).

  • -SWD, –-swd: SWD modality (ST-LINK, CMSIS-DAP, J-Link hardware programming/debugging tool).

  • -UART, –-uart: UART modality. Custom boards must be put in bootloader mode before performing this operation. For BlueNRG-LP and BlueNRG-LPS devices, the user must set the PA10 pin to a high value and perform a reset cycle of the device, keeping PA10 at a high value. For BlueNRG-1 and BlueNRG-2 devices, the user must set the DIO7 pin to a high value and reset the device, keeping DIO7 at a high value.

  • -verbose {0, 1, 2, 3, 4}, –verbose {0, 1, 2, 3, 4}: increase output verbosity; set debug level up to 4 (only for SWD modality and log data). The default value is 2.

  • 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. Alternatively, the user can specify each COM port using the –d option.

  • If SWD mode is selected, an SWD hardware programming/debugging tool must be connected to the selected device SWD lines, and it is necessary to use the -SWD option. If more than one device is connected to the PC through the SWD interface, the –all option allows all of them to be selected. Alternatively, the user can specify each interface using the –d option.

RF-Flasher launcher utility: mass erase command
To use the RF-Flasher launcher utility to perform a mass erase of the flash memory of a specific device, the
mass_erase command is available (use –h to get a list of all supported options):
RF-Flasher_Launcher.exe mass_erase –h
Mass erase command usage
RF-Flasher_Launcher.exe mass_erase [-h] [-s] (-all | -d DEVICE_ID)(-UART | -SWD) [-verbose {0, 1, 2, 3, 4}] [-l][-frequency
{5,15,25,50,100,125,240,480,900,1800,4000}]

Mass erase command optional arguments

  • -all, –all: all connected devices (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-link ID in SWD mode).

  • -d DEVICE_ID, –device DEVICE_ID: set the ID of the hardware tool used for the connection (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-Link ID in 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 – ST-LINK hardware). The default value is 4000.

  • -h, –-help: show this help message and exit.

  • -l, –-log: log data.

  • -s, –-show: show the flash memory after a mass erase operation.

  • -SWD, –-swd: SWD modality (ST-LINK, CMSIS-DAP, J-Link hardware programming/debugging tool).

  • -UART, –-uart: UART modality. Custom boards must be put in bootloader mode before performing this operation. For BlueNRG-LP and BlueNRG-LPS devices, the user must set the PA10 pin to a high value and perform a reset cycle of the device, keeping PA10 at a high value. For BlueNRG-1 and BlueNRG-2 devices, the user must set the DIO7 pin to a high value and reset the device, keeping DIO7 at a high value.

  • -verbose {0, 1, 2, 3, 4}, –verbose {0, 1, 2, 3, 4}: increase output verbosity; set debug level up to 4 (only for SWD modality and log data). The default value is 2.

Note

  • 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. Alternatively, the user can specify each COM port using the –d option.
  • If SWD mode is selected, an SWD hardware programming/debugging tool must be connected to the selected device SWD lines, and it is necessary to use the -SWD option. If more than one device is connected to the PC through the SWD interface, the –all option allows all of them to be selected. Alternatively, the user can specify each interface using the –d option.

RF-Flasher launcher utility: verify memory command
To use the RF-Flasher launcher utility to verify the flash memory content of a specific device, the
verify_memory command is available (use –h to get a list of all supported options):
RF-Flasher_Launcher.exe verify_memory –h

Verify memory command usage
RF-Flasher_Launcher.exe verify_memory [-h] -f FLASH_VERIFY_FILE[-s][-address START_ADDRESS](-all | -d DEVICE_ID) [-verbose {0, 1, 2, 3, 4}][-l] (-UART |-SWD)[-frequency {5,15,25,50,100,125,240,480,900,1800,4000}]

Verify memory command optional arguments

  • -address START_ADDRESS, –-address START_ADDRESS: start address for verification (for .bin files only). The default value is 0x10040000.
  • -all, –all: all connected devices (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-link ID in SWD mode).
  • -d DEVICE_ID, –device DEVICE_ID: set the ID of the hardware tool used for the connection (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-Link ID in SWD mode).
  • -f FLASH_VERIFY_FILE, –-file FLASH_VERIFY_FILE: file to be used to verify the flash memory
  • -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 – ST-LINK hardware). The default value is 4000.
  • -h, -–help: show this help message and exit
  • -l, -–log: log data.
  • -s, –-show: show the flash memory after a verify operation
  • -SWD, –-swd: SWD mode (ST-LINK, CMSIS-DAP, J-Link hardware programming/debugging tool).
  • -UART, –-uart: UART mode.
  • -verbose {0, 1, 2, 3, 4}, –verbose {0, 1, 2, 3, 4}: increase output verbosity; set debug level up to 4 (only for SWD modality and log data). The default value is 2.
  • 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. Alternatively, the user can specify each COM port using the –d option.
  • If SWD mode is selected, an SWD hardware programming/debugging tool must be connected to the selected device SWD lines, and it is necessary to use the -SWD option. If more than one device is connected to the PC through the SWD interface, the –all option allows all of them to be selected. Alternatively, the user can specify each interface using the –d option.

RF-Flasher launcher utility: erase pages command
To use the RF-Flasher launcher utility to erase a flash memory content page from a specific device, the
erase_pages command is available (use –h to get a list of all supported options):
RF-Flasher_Launcher.exe erase_pages –h
Erase pages command usage
RF-Flasher_Launcher.exe erase_pages [-h](-UART |-SWD)(-all | -d DEVICE_ID) [-l] [-verbose {0, 1, 2, 3, 4}] [-frequency {5,15,25,50,100,125,240,480,900,1800,4000}] [-s] (-p PAGES | -range RANGE RANGE)

Erase pages command optional arguments

  • -all, –all: all connected devices (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-link ID in SWD mode).

  • -d DEVICE_ID, –device DEVICE_ID: set the ID of the hardware tool used for the connection (COM port in UART mode; ST-LINK ID, CMSIS-DAP ID, and J-Link ID in SWD mode).

  • -h, –-help: show this help message and exit.

  • -l, –-log: 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 – ST-LINK hardware). The default value is 4000.

  • -p PAGES, –page PAGES: list of pages to erase (starts at 0).

  • -range RANGE RANGE, –range RANGE RANGE: range of pages to erase (where the first RANGE indicates the smallest page number and the second RANGE indicates the highest page number).

  • -s, –-show: show the flash memory after a verify operation.

  • -SWD, –-swd: SWD modality (ST-LINK, CMSIS-DAP, J-Link hardware programming/debugging tool).

  • -UART, –-uart: UART modality. Custom boards must be put in bootloader mode before performing this operation. For BlueNRG-LP and BlueNRG-LPS devices, the user must set the PA10 pin to a high value and perform a reset cycle of the device, keeping PA10 at a high value. For BlueNRG-1 and BlueNRG-2 devices, the user must set the DIO7 pin to a high value and reset the device, keeping DIO7 at a high value.

  • -verbose {0, 1, 2, 3, 4}, –verbose {0, 1, 2, 3, 4}: increase output verbosity; set debug level up to 4 (only for SWD modality and log data). The default value is 2.

  • 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. Alternatively, the user can specify each COM port using the –d option.

  • If SWD mode is selected, an SWD hardware programming/debugging tool must be connected to the selected device SWD lines, and it is necessary to use the -SWD option. If more than one device is connected to the PC through the SWD interface, the –all option allows all of them to be selected. Alternatively, the user can specify each interface using the –d option.

RF-Flasher launcher utility: read OTP command
To use the RF-Flasher launcher utility to read the OTP of a specific device, the read_OTP command is available (use –h to get a list of all supported options):
RF-Flasher_Launcher.exe read_OTP –h
Read OTP command usage
RF-Flasher_Launcher.exe read_OTP [-h] (all | -d DEVICE_ID) [-address OTP_ADDRESS][-num NUM] [-frequency {5,15,25,50,100,125,240,480,900,1800,4000}] [-l] [-s] [-verbose {0,1,2,3,4}]

Read OTP command optional arguments

  • -address OTP_ADDRESS, –address OTP_ADDRESS: address of the OTP area (default: 0x10001800
    – word aligned).

  • -all, –all: all connected devices (ST-LINK ID, CMSIS-DAP ID, and J-link ID in SWD mode).

  • -d DEVICE_ID, –device DEVICE_ID: set the ID of the hardware tool used for the connection (ST-LINK ID, CMSIS-DAP ID, and J-Link ID in 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 – ST-LINK hardware). The default value is 4000.

  • -h, –-help: show this help message and exit.

  • -l, –-log: log data.

  • -num NUM, –number NUM: number of words to read inside the OTP area. The default value is 256.

  • -s, –-show: show the OTP area.

  • -verbose {0, 1, 2, 3, 4}, –verbose {0, 1, 2, 3, 4}: increase output verbosity; set debug level up to 4 (only for SWD modality and log data). The default value is 2.

Note:
The read_OTP command only works in SWD mode. Therefore, an SWD hardware programming/debugging tool must be connected to the selected device SWD lines. If more than one device is connected to the PC through the SWD interface, the –all option allows all of them to be selected. Alternatively, the user can specify each interface using the –d option.

RF-Flasher launcher utility: write OTP command
To use the RF-Flasher launcher utility to read the OTP of a specific device, the write_OTP command is available (use –h to get a list of all supported options):
RF-Flasher_Launcher.exe write_OTP –h

Write OTP command usage
RF-Flasher_Launcher.exe write_OTP [-h] (all | -d DEVICE_ID) -address OTP_ADDRESS
-value OTP_VALUE [-frequency {5,15,25,50,100,125,240,480,900,1800,4000}] [-l] [-verbose {0,1,2,3,4}]

Write OTP command optional arguments

  • -address OTP_ADDRESS, –address OTP_ADDRESS: address of the OTP area (default: 0x10001800 – word aligned).
  • -all, –all: all connected devices (ST-LINK ID, CMSIS-DAP ID, and J-link ID in SWD mode).
  • -d DEVICE_ID, –device DEVICE_ID: set the ID of the hardware tool used for the connection (ST-LINK ID, CMSIS-DAP ID, and J-Link ID in 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 – ST-LINK hardware). The default value is 4000.
  • -h, –-help: show this help message and exit.
  • -l, –-log: log data.
  • -s, –-show: show the flash memory after a verify operation.
  • -value OTP_VALUE, –value OTP_VALUE: OTP value (a word, such as 0x11223344)
  • -verbose {0, 1, 2, 3, 4}, –verbose {0, 1, 2, 3, 4}: increase output verbosity; set debug level up to 4 (only for SWD modality and log data). The default value is 2.

Note:
The write_OTP command only works in SWD mode. Therefore, an SWD hardware programming/debugging tool must be connected to the selected device SWD lines. If more than one device is connected to the PC through the SWD interface, the –all option allows all of them to be selected. Alternatively, the user can specify each interface using the –d option.
RF-Flasher launcher utility: examples
Program a binary image on the connected BlueNRG-1 and BlueNRG-2 devices with an ST-LINK hardware tool (in SWD mode):
RF-Flasher_Launcher.exe flash -SWD -all -f “User_Application.hex” –l
Program a binary image on the connected Bluetooth® Low Energy devices via the USB COM ports (in UART mode):
RF-Flasher_Launcher.exe flash -UART –all -f “User_Application.hex” –l
Program a binary image on the connected devices via the CMSIS-DAP channel using the erase, verify, and log data options (in SWD mode):

Revision history

Table 3. Document revision history

Date Version Changes
15-May-2018 1 Initial release.



03-Jul-2018

| ****



2

| Updated Figure 1. BlueNRG-1, BlueNRG-2 Flasher Utility, Figure 2. Flasher Utility UART main window, Figure 3. Flasher utility UART mode: image file , 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.

26-Feb-2019| 3| Updated the Section Introduction and Section 3.1 UART mode: how to run.
Added Section 8 Flasher launcher utility and all its sub sections.


09-Apr-2019

| ****

4

| Added reference to “Application folder” in Section 8: RF-Flasher launcher utility.

Updated Section 8.4: RF-Flasher launcher utility: flash command.






14-Jul-2020

| ****


5

| Changed BlueNRG-1 and BlueNRG-2 to BlueNRG-X Flasher software package

Added reference to BlueNRG-LP device.

Updated Figure 1. RF-Flasher utility, Figure 3. Flasher utility UART main window, Figure 5. Flasher utility UART mode: Device Memory tab, Figure 6. Flasher utility UART mode: changing memory fields,

Figure 9. Flasher utility: SWD main window, Figure 10. Flasher utility SWD mode: Device Memory tab, Figure 14. Flasher utility: SWD Plug&Play mode, Figure 15. Flasher utility: MAC address selection and Figure 18. RF-Flasher launcher: flash command with –erase, -l, -verify option





05-Dec-2020

| **** 6| Updated Section Introduction, Section 2.1: System requirements, Section 4.1: UART mode: how to run, Section 5: SWD main window,Section 5.1: SWD mode: how to run, Section 8.1: Requirements,

Section 8.2: RF-Flasher launcher utility options, Section 8.3: RF-Flasher launcher utility: UART & SWD modes, Section 8.4: RF-Flasher launcher utility: flash command, Section 8.5: RF-Flasher launcher utility: read command, Section 8.6: RF-Flasher launcher utility: mass erase command,

Section 8.7: RF-Flasher launcher utility: verify memory command.

Added Section 8.8: RF-Flasher launcher utility: erase pages command.







04-Oct-2021

| ****






7

| Added Section 5.2: SWD mode: read bootloader sector and Section 5.3: SWD mode: read OTP area.

Updated the title, Section Introduction, Section 2: Getting started, Section 2.1: System requirements, Section 2.2: Software package setup,

Section 3: Toolbar interface, Section 4: UART main window, Section 8: RF- Flasher launcher utility, Section 8.1: Requirements, Section 8.2: RF-Flasher launcher utility options, Section 8.3: RF-Flasher launcher utility: UART & SWD modes, Section 8.4: RF-Flasher launcher utility: flash command,

Section 8.5: RF-Flasher launcher utility: read command, Section 8.6: RF- Flasher launcher utility: mass erase command, Section 8.7: RF-Flasher launcher utility: verify memory command, Section 8.8: RF-Flasher launcher utility: erase pages command, Section 1.1: List of acronyms and Section 1.2: Reference documents.

Date Version Changes
Updated Figure 1. RF-Flasher utility, Figure 2. Compare Two Files tab,

Figure 3. Flasher utility UART main window, Figure 4. Flasher utility UART mode: Image File tab, Figure 5. Flasher utility UART mode: Device Memory tab, Figure 6. Flasher utility UART mode: changing memory fields,

Figure 7. Flasher utility UART mode: Compare Device Memory with Image File tab, Figure 9. Flasher utility: SWD main window, Figure 10. Flasher utility SWD mode: Device Memory tab, Figure 16. Flasher utility: UART MAC address programming, Figure 17. Flasher utility: SWD MAC address programming and Figure 18. RF-Flasher launcher: flash command with – erase, -l, -verify option.


06-Apr-2022

| ****

8

| Added the BlueNRG-LPS reference throughtout the document.

Updated Section 8.3: RF-Flasher launcher utility: UART & SWD modes and Section 8.4: RF-Flasher launcher utility: flash command.














10-Jul-2024

| ****













9

| Updated:

  • Document title
  • Section Introduction
  • Section 1.1: List of acronyms
  • Section 1.2: Reference documents
  • Figure 1. RF-Flasher utility
  • Section 3: Toolbar interface
  • Figure 3. Flasher utility UART main window
  • Section 4.1: UART mode: how to run
  • Section 5: SWD main window
  • Section 5.1: SWD mode: how to run
  • Figure 12. Flasher utility SWD mode: read bootloader
  • Section 5.3: SWD mode: read OTP area
  • Figure 14. Flasher utility: SWD Plug&Play mode
  • Section 7: MAC address programming
  • Section 8.1: Requirements
  • Section 8.2: RF-Flasher launcher utility options
  • Section 8.3: RF-Flasher launcher utility: UART & SWD modes
  • Section 8.4: RF-Flasher launcher utility: flash command
  • Section 8.5: RF-Flasher launcher utility: read command
  • Section 8.6: RF-Flasher launcher utility: mass erase command
  • Section 8.7: RF-Flasher launcher utility: verify memory command
  • Section 8.8: RF-Flasher launcher utility: erase pages command
  • Section 8.9: RF-Flasher launcher utility: read OTP command
  • Section 8.10: RF-Flasher launcher utility: write OTP command

IMPORTANT NOTICE – 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’s terms and conditions of sale in place at the time of order acknowledgment.
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 different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service 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.
© 2024 STMicroelectronics – All rights reserved
UM2406 – Rev 9

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

STMicroelectronics User Manuals

Related Manuals