User's Manual

UMXXX
9. How to program and debug
In order to Flash and debug the BlueNRG-2 sensor node BCN002V1, the corresponding
motherboard BCN002V1D is needed.
The following software must be installed on the computer:
STSW-STM32102 STM32 Virtual COM port driver (VCOM), not needed for
Windows 10.
STSW-BNRGFLASHER utility to Flash using any of the options illustrated below
(options A, B, C or D).
STSW-BNRG1STLINK utility to Flash and debug using an ST-Link (see below,
options B, C or D).
The user MUST remove the battery from the BlueNRG-2 sensor node, then plug the
sensor node on its motherboard as shown in figure 6.
Four different options are supported to Flash and debug:
A. Flash using the motherboard (BCN002V1D), no debug is possible.
1. SW2 and SW3 switches must be in position 2-3 to connect the
BlueNRG-2 to the STM32L151 microcontroller on the motherboard.
2. Plug the USB of the motherboard to the computer to power the target
microcontroller and connect the UART VCOM
3. Run the STSW-BNRGFLASHER utility. The utility will exploit the
microcontroller which is assembled on the motherboard (STM32L151)
B. Flash and debug using the motherboard (BCN002V1D) and the NUCLEO ST-Link
V2 (connected and shown in figure 6).
1. Plug the 5-pin JTAG/SWD connector of motherboard to the corresponding
connector of the NUCLEO ST-Link
2. Plug the USB of the motherboard to power the target microcontroller
3. Plug the USB of the NUCLEO ST-Link to the computer to connect the
UART VCOM
4. Run the STSW-BNRG1STLINK utility. The utility will exploit the
microcontroller of the NUCLEO ST-Link.
C. Flash and debug using the motherboard (BCN002V1) and an external ST-Link V2
(not connected and not shown in figure 6).
1. Plug the 20-pin JTAG/SWD connector to the external ST-Link