STM32WB Series Microcontrollers Bring-Up Procedure
Application Note
Introduction
The STM32WB Series microcontrollers are ultra-low-power devices which embed wireless functions compliant with both the Bluetooth® Low Energy SIG specification v5.0 and / or IEEE 802.15.4-201. These protocols work on radio frequency which abbreviates to RF.
The objective of this document is to provide detailed guidelines to optimize the application implementation.
The application is optimized through the following steps:
- Board and environment setup
- Device configuration
- Power supply
- HSE trimming
- Output power test
- Sensitivity test
- Packet exchange test
- Power consumption in advertising mode
- RF tests for certification
- RF tests for production
This application note uses the NUCLEO-WB55 board, MB1355C, as the reference hardware platform for the configuration. The configuration settings can then be applied to a custom implementation.
Although this application addresses all the STM32WB Series microcontrollers' wireless functions, the Bluetooth® Low Energy standard is used as the implementation example for the STM32WB Series microcontrollers' dedicated application. The same process, however, is used for the IEEE 802.15.4-201 standard implementation.
For further information contact your local STMicroelectronics sales office. Visit www.st.com.
1 General information
This document applies to the STM32WB Series dual-core Arm®-based microcontroller. Specific examples will be based on STM32WB55 devices but they apply to the whole Series.
Note: Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
2 Board setup
The MB1355C NUCLEO-WB55 board is designed around the STM32WB55RG microcontroller in a 68-pin VFQFPN68 package. This board is included in the P-NUCLEO-WB55 pack with a USB dongle.
The hardware block diagram in Figure 1 illustrates the connection between the MCU and peripherals (ST-LINK/V2-1, push buttons, LEDs, Arduino™ UNO V3 connector and ST-Morpho connectors).
[Textual description of the block diagram: The diagram shows the STM32WB55RG microcontroller connected to various peripherals including the ST-LINK/V2-1 debugger, USB connectors, RF circuitry, GPIO pins, crystal oscillators (32 MHz and 32 kHz), LEDs, and push buttons. It also indicates connections to external interfaces like the Arduino™ UNO V3 connector and ST-Morpho connectors.]
For the hardware layout and configuration details of the MB1355C board, refer to the Bluetooth® Low Energy and 802.15.4 Nucleo pack based on STM32WB Series microcontrollers user manual (UM2435).
By default, the MB1355C board is configured to output the RF signal through the PCB antenna path. So, C35 is fitted and C38 not fitted as shown in Figure 2.
[Textual description of the antenna configuration circuit: This diagram illustrates the RF signal path for the MB1355C board. It shows a matching network connected to the STM32WB55RG's RF pins, followed by an RF switch. The signal can be routed to either a PCB antenna (default, with C35 fitted and C38 not fitted) or an SMA connector (for testing, requiring C35 removed and C38 fitted). The diagram includes components like capacitors (C1, C2, C35, C36, C37, C38, C39, C40), inductors (L5, L3, L4), and a band-pass filter (FLT1). It also shows connections for antenna matching networks and filter options for evaluation/debug.]
To perform certain tests, the RF signal has to be directed through the SMA path. In this case, C35 must be removed and C38 fitted. An SMA board edge connector must also be soldered to J2.
3 Environment setup
STM32CubeMonitor-RF is a tool to provide a radio performance test environment for the STM32WB Series microcontrollers. It provides both transmission and reception tests, and PER measurement facilities. Figure 3 illustrates a typical screen representation. This software package is freely available on www.st.com.
[Textual description of the STM32CubeMonitor-RF interface: The screenshot shows the STM32CubeMonitor-RF software with sections for ACI Commands, Scripts, Beacon, RF Tests, and ACI Utilities. It displays a device connection status, firmware versions, a command log, and a command input area with parameter details. The interface allows users to select test modes like Transmitter (TX) or Receiver (RX) and configure parameters such as PA Level, TX Frequency, and PHY.]
For a complete description of this tool software, refer to STM32CubeMonitor-RF software tool for wireless performance measurements (UM2288). The M4 transparent mode firmware must be programmed on the STM32WB Series microcontroller to use STM32CubeMonitor-RF.
4 Device configuration
STM32CubeProg is the tool used to program STM32 products and provides a user friendly environment for programming and validating the device memory through both:
- The debug interface (JTAG and SWD) – Refer to, for example, Multiprotocol wireless 32-bit MCU Arm®-based Cortex®-M4 with FPU, Bluetooth® Low-Energy and 802.15.4 radio solution reference manual (RM0434) for the STM32WB55 devices.
- The bootloader interface (UART, USB DFU, I2C, SPI, and CAN) – Refer to, for example, Multiprotocol wireless 32-bit MCU Arm®-based Cortex®-M4 with FPU, Bluetooth® Low-Energy and 802.15.4 radio solution reference manual (RM0434) for the STM32WB55 devices.
The STM32CubeProg interface is illustrated in Figure 4. This software is freely available on www.st.com.
[Textual description of the STM32CubeProg interface: The screenshot displays the STM32CubeProg software, showing memory and file editing capabilities. It includes sections for device memory view (address, data, ASCII), ST-LINK configuration (serial number, port, frequency, mode), access port settings, and a log output detailing operations like device ID reading and firmware uploading. Device information such as Flash size and CPU type is also visible.]
For a complete description of this software tool, refer to STM32CubeProgrammer software description user manual (UM2237).
For the Bluetooth® Low Energy, the direct test mode (DTM) is used to send instructions through the application commands interface (ACI) and host commands interface (HCI) to the STM32WB Series microcontroller.
To program the STM32WB Series microcontroller on the MB1355C, follow the procedure 'How to flash the wireless coprocessor binary' described in Getting started with STM32CubeWB for STM32WB Series user manual (UM2550). The stm32wb5x_BLE_Stack_fw firmware must be flashed in the Arm® Cortex®-M0+ coprocessor and the STM32WB Series microcontrollers example BLE_TransparentMode must be flashed in the Arm® Cortex®-M4 processor. Refer to Getting started with STM32CubeWB for STM32WB Series user manual (UM2550) for firmware location.
5 Power supply
Power up the board with the firmware loaded in both the Arm® Cortex®-M0+ (stm32wb5x_BLE_Stack_fw) and Arm® Cortex®-M4 (BLE_TransparentMode) as described in Section 4.
Using a multimeter, measure the voltage at the following points (refer to the board schematic for more information):
- VDD
- VDDA
- VBAT
- VDDSMPS (does not apply to the STM32WBx0)
- VFBSMPS (does not apply to the STM32WBx0)
- VDDRF
- VDDUSB (does not apply to the STM32WBx0).
On the MB1355C, the maximum available voltage is 3.3V due to the embedded level shifters. The VDD, VBAT, VDDUSB, VDDA and VDDSMPS power supplies by default are connected to a global power supply named VDD_MCU and the voltage level can be checked at JP2.
More generally, the measured pin voltage must be aligned with the following values if the SMPS is enabled.
Symbol | Parameter | Conditions | Min | Max | Unit |
---|---|---|---|---|---|
VDD | Standard operating voltage | ADC or COMP used | 1.71(1) | 3.6 | |
VREFBUF used | 1.62(2) | ||||
VDDA | Analog supply voltage | ADC, COMP, VREFBUF not used | 0 | 3.6 | |
VBAT | Backup operating voltage | 1.55 | 3.6 | V | |
VDDSMPS | SMPS operating voltage | 1.71 | 3.6 | V | |
VFBSMPS | SMPS feedback voltage | 1.4 | 3.6 | ||
VDDRF | Minimum RF voltage | 1.71 | 3.6 | ||
VDDUSB | USB supply voltage | USB used | 3.0 | 3.6 | |
USB not used | 0 | 3.6 |
(1) STM32WBx0 min = 2V
(2) STM32WBx0 not concerned
If the SMPS is disabled, VFBSMPS is connected to VDDSMPS.
For more information on how to use the SMPS on STM32WB Series microcontrollers, refer to Usage of SMPS on STM32WB Series microcontrollers application note (AN5246).
In the STM32WB Series microcontroller datasheet, the KPI BLE test cases power consumption refers to VDD but RF static values refer to VDDRF + VDDSMPS.
6 HSE trimming
The STM32WB microcontrollers use an external 32 MHz crystal oscillator with a frequency tolerance of less than 50 ppm for BLE, 40 ppm for 802.15.4 and when both BLE and 802.15.4 are used. The device includes internal programmable capacitance that can be used to tune the crystal frequency in order to compensate for the PCB parasitic capacitance.
This is a very important procedure because the RF depends on accurate clocks for its correct operation. A deviation in clock frequency affects the radio frequency directly which results in a degraded RF performance, violating legal requirements or in the worst case leading to a non-functional system.
Precise HSE frequency trimming using STM32 wireless MCUs application note (AN5042) describes three HSE tuning methods for the STM32WB Series microcontrollers.
The X-CUBE-CLKTRIM expansion software illustrates the trimming of an HSE crystal oscillator in order to reach the high-accuracy frequency required by RF applications.
An easy way to verify the correct centering of the HSE crystal oscillator is to program the device with a carrier wave on CH17 (2440 MHz) and to measure the accuracy of the tone frequency with a spectrum analyzer. To do it, follow this procedure:
- Connect the MB1355C board to the spectrum analyzer through an RF cable if there is an SMA connector on J2 (in that case, remove C35 and fit C38), otherwise plug a 2.4 GHz antenna into the input port of the instrument.
- Power up the MB1355C.
- Set the spectrum analyzer to: SPAN = 500 kHz, RBW and VBW AUTO
[Textual description of the STM32CubeMonitor-RF configuration for tone test: This screenshot shows the STM32CubeMonitor-RF interface configured for a transmitter (TX) test. Key settings include Test mode set to Transmitter (TX), PA Level set to 31 (+6dBm), TX Frequency set to 2440 MHz (Channel 17), and PHY set to LE 1M PHY. The 'START TONE' button is visible, indicating the test initiation.]
The accuracy of the frequency is determined from the tone obtained on the spectrum analyzer.
[Textual description of the spectrum analyzer output: The graph displays the RF spectrum with a central peak representing the transmitted tone. The spectrum analyzer settings are shown as RBW 10 kHz, VBW 30 kHz, SWT 20 ms. Marker 1 indicates a peak power of 4.59 dBm at a frequency of 2.439998397 GHz. The span is 500 kHz, centered at 2.44 GHz. The output confirms the tone frequency is within the specified limits for BLE and 802.15.4.]
7 Output power test
The power output test is the main test to validate the transmission chain is working properly. The test procedure is given here:
- Connect the MB1355C board to the spectrum analyzer through an RF cable using an SMA connector on J2 (in that case, C35 is not fitted and C38 is soldered), otherwise plug a 2.4 GHz antenna into the input port of the instrument.
- Power up the MB1355C.
- Set the spectrum analyzer to: SPAN = 500 kHz, RBW and VBW AUTO
- Once the STM32WB Series microcontroller is started, use the STM32CubeMonitor-RF and run a START TONE (transmit test) with the parameters show in Figure 7 (in TONE mode, length of data and packet payload are ignored):
[Textual description of the STM32CubeMonitor-RF configuration for output power test: Similar to Figure 5, this screenshot shows the STM32CubeMonitor-RF interface configured for a transmitter (TX) test. The parameters include Test mode: Transmitter (TX), PA Level: 25 (0dBm), TX Frequency: 2440 MHz (Channel 17), and PHY: LE 1M PHY. The 'START TONE' button is highlighted.]
With the peak search function of the marker menu, check the power of the tone obtained when 0 dBm is programmed at the output of the chip.
[Textual description of the spectrum analyzer output for power measurement: This graph shows the RF spectrum with a prominent peak. The spectrum analyzer settings are RBW 10 kHz, VBW 30 kHz, SWT 20 ms. Marker 1 indicates a peak power of -1.04 dBm at a frequency of 2.439997596 GHz. The span is 500 kHz, centered at 2.44 GHz. This measurement reflects the output power programmed to 0 dBm, adjusted for board losses.]
8 Sensitivity test
The sensitivity test validates the quality of the receiving chain with the following procedure:
- Connect the SMA connector J2 (C35 is not fitted and C38 is soldered) of the MB1355C board to a signal generator through a RF cable (with no significant loss). Make sure the generator sends the packets as defined in the specification.
- Power up the MB1355C.
- Once the STM32WB Series microcontroller is started, use the STM32CubeMonitor-RF to run a START RX (receive test) with the parameters show in Figure 9:
[Textual description of the STM32CubeMonitor-RF receive test configuration: The screenshot shows the STM32CubeMonitor-RF interface configured for a receiver (RX) test. Key settings include Test mode: Receiver (RX), RX Frequency: 2440 MHz (Channel 17), PHY: LE 1M PHY, and Index modulation: standard. The 'START RX' button is visible. The test measurement section shows transmitted and received packet counts, and the calculated Packet Error Rate (PER) and RSSI.]
With the signal generator at the same frequency as the STM32WB Series microcontroller, decrease the power until the PER reaches 30.8%. The power obtained for PER = 30.8% corresponds to the sensitivity.
9 Packet exchange test
Unlike previous tests performed in conducted mode (even if they are also possible in radiated mode), this test is in over the air (OTA) mode. Two MB1355C are needed, one in TX and the other in RX mode. The RF signal is exchanged between the two boards through the PCB antenna.
- Power up the two MB1355C boards.
- Once the STM32WB Series microcontroller is started, use the STM32CubeMonitor-RF to run the packet error rate (PER) test with the parameters show in Figure 10:
[Textual description of the STM32CubeMonitor-RF packet rate exchange test configuration: This screenshot shows the STM32CubeMonitor-RF interface configured for Packet Error Rate (PER) tests in over-the-air (OTA) mode. It allows configuration for multiple channels and saving test verdicts. The test measurement section displays a graph of RSSI (dBm) over time, with settings for measurement period and start/reset buttons.]
The received signal strength indication (RSSI) is displayed. This parameter provides an indication of the intensity of the received signal.
10 Power consumption in advertising mode
As with the previous test, the power consumption in advertising mode is in the OTA mode. This test uses one MB1355C with an application which puts the device in advertising mode (examples are available in the firmware package). The Transparent mode and the HCI commands start. The STM32CubeMonitor-RF advertising sequence is also available for use. A power analyzer is connected in series to VDD (J2 on the MB1355C). Once the board is powered up, the current has a shape similar to that shown below during advertising (see Figure 11).
[Textual description of the advertising mode current output graph: This graph illustrates the current consumption of the STM32WB microcontroller during advertising mode. It shows fluctuating current levels over time, with markers indicating specific time points and measured current values (e.g., average current, peak current). The graph provides insights into the power profile during wireless communication.]
It is also possible to obtain this kind of measurement with STM32CubeMonPwr as illustrated in Figure 12. This software is freely available on www.st.com.
[Textual description of the STM32CubeMonPwr sample screen: This screenshot shows the STM32CubeMonPwr software, which is used for power measurement. It displays a similar current output graph as Figure 11, with options for setting markers and viewing measurements like average, min, max, and peak-to-peak current values.]
11 RF tests for certification
The STM32WB Series microcontrollers are compliant with the Bluetooth® Low Energy SIG specification v5.0 and with IEEE 802.15.4-201. When the STM32WB Series microcontrollers support in a new RF design, the RF-PHY layer must be tested.
- For the Bluetooth® Low Energy SIG specification v5.0, the RF tests to be performed are (details in “RF-PHY.TS.5.0.2" document):
- RF-PHY/TRM-LE/CA/BV-01-C [output power, no constant tone extension]
- RF-PHY/TRM-LE/CA/BV-03-C [in-band emissions, uncoded data at 1 Ms/s]
- RF-PHY/TRM-LE/CA/BV-05-C [modulation characteristics, uncoded data at 1 Ms/s]
- RF-PHY/TRM-LE/CA/BV-06-C [carrier frequency offset and drift, uncoded data at 1 Ms/s, preamble through payload]
- RF-PHY/TRM-LE/CA/BV-08-C [in-band emissions at 2 Ms/s]
- RF-PHY/TRM-LE/CA/BV-10-C [modulation characteristics at 2 Ms/s]
- RF-PHY/TRM-LE/CA/BV-12-C [carrier frequency offset and drift at 2 Ms/s, preamble through payload]
- RF-PHY/RCV-LE/CA/BV-01-C [receiver sensitivity, uncoded data at 1 Ms/s]
- RF-PHY/RCV-LE/CA/BV-03-C [C/I and receiver selectivity performance, uncoded data at 1 Ms/s]
- RF-PHY/RCV-LE/CA/BV-04-C [blocking performance, uncoded data at 1 Ms/s]
- RF-PHY/RCV-LE/CA/BV-05-C [intermodulation performance, uncoded data at 1 Ms/s]
- RF-PHY/RCV-LE/CA/BV-06-C [maximum input signal level, uncoded data at 1 Ms/s]
- RF-PHY/RCV-LE/CA/BV-07-C [PER report integrity, uncoded data at 1 Ms/s]
- RF-PHY/RCV-LE/CA/BV-08-C [receiver sensitivity at 2 Ms/s]
- RF-PHY/RCV-LE/CA/BV-09-C [C/I and receiver selectivity performance at 2 Ms/s]
- RF-PHY/RCV-LE/CA/BV-10-C [blocking performance at 2 Ms/s]
- RF-PHY/RCV-LE/CA/BV-11-C [intermodulation performance at 2 Ms/s]
- RF-PHY/RCV-LE/CA/BV-12-C [maximum input signal level at 2 Ms/s]
- RF-PHY/RCV-LE/CA/BV-13-C [PER report integrity at 2 Ms/s]
- For the IEEE 802.15.4-201, the RF tests to be performed are (details in "ZigBee 4 Document 095436r21 ZB_CSG-ZigBee-IP IEEE 802.15.4 Level Test Specification” document and 'ZigBee Alliance IEEE 802.15.4 Test spec–ZigBee Doc. 14-0332-01' used for certification):
- TP/154/PHY24/TRANSMIT-01 (correct modulation)
- TP/154/PHY24/TRANSMIT-02 (error vector magnitude or EVM)
- TP/154/PHY24/TRANSMIT-03 (center frequency tolerance)
- TP/154/PHY24/TRANSMIT-04 (output power level)
- TP/154/PHY24/TRANSMIT-05 (power spectral density mask limits)
- TP/154/PHY24/RECEIVER-01 (sensivity PER)
- TP/154/PHY24/RECEIVER-02 (adjacent channel)
- TP/154/PHY24/RECEIVER-03 (alternate channel)
- TP/154/PHY24/RECEIVER-04 (maximum input power)
- TP/154/PHY24/RECEIVER-05 (energy detection ED)
- TP/154/PHY24/RECEIVER-06 (link quality indicator LQI)
- TP/154/PHY24/RECEIVER-07 (clear channel assessment CCA)
- TP/154/PHY24/TURNAROUND-TIME-01 (Rx to Tx turnaround time)
- TP/154/PHY24/TURNAROUND-TIME-02 (Tx to Rx turnaround time).
Moreover, depending on the country of use, the product must be compliant with one or more standards before it can be sold. For example:
- FCC in North America
- RED in Europe
- JRL/MIC in Japan.
12 RF tests for production
Once the custom application board is designed and ready to be sent to production, the following tests must be run to confirm that the application is correctly configured and the STM32WB Series microcontroller is working correctly:
- Power supply
- Output power
- Receiver sensitivity
- Packet exchange test
- RF test certification.
The details of the tests are given in the previous sections.
Revision history
Date | Version | Changes |
---|---|---|
08-Oct-2019 | 1 | Initial release. |
04-May-2020 | 2 | Updated: Section 1 General information, Section 4 Device configuration, Section 6 HSE trimming, Section 7 Output power test, Section 9 Packet exchange test, Section 11 RF tests for certification |