Future Electronics Logo

Share this post

See full series:

STMicroelectronics STM32WB MCU Part 2 (demo video), an Innovative & Versatile Wireless Connectivity Solution

Wireless Just Got Better

Welcome to another episode of Techventures! This episode is a continuation of our last edition. Find the previous video and transcript here.

In this continuation, Lazina will guide us through one of the many uses of the STM32WB.

Get the BLE Health Thermometer application up and running on the p-nucleo-wb55, one of the many corresponding development kits for the STM32WB wireless MCU series. 

Take a look at this video or read along the transcript with screenshots below and get started.

Hi! Welcome back to TechVentures. 

My name is Lazina, and I’m a Technical Marketing Engineer at Future Electronics 

In our last episode we talked about a wireless MCU series from STMicroelectronics, the STM32WB series, wireless just got better! If you need a refresher, you can find the link in the description box below. 

In this episode, I’m going to show you how to get the BLE Health Thermometer application running on the p-nucleo-wb55, one of the many corresponding development kits for the STM32WB wireless MCU series. 

Before we can get started with our demo, we’re going to need a few things: 

On the hardware side, we need the p-nucelo-wb55 kit. For today’s demonstration purposes, we will use the shield so you may leave your dongle on the side. 

A quick walkthrough of the hardware: 

We have the PCB antenna over here, the STM32WB55 Module, the Arduino and morpho headers, and here we have the ST-LINK debugger. We will need a micro-USB cable to power our board, and we will use this USB port. I’m going to connect the other end of the wire to my laptop. 

On the software side, ST Microelectronics offers a wide range of tools for development and prototyping. 

We will be using the STM32CubeIDE, STM32CubeMX and STM32Cube Programmer, we will also need the ST BLE Toolbox app which can be found on both Google Play store and the App store for Apple devices. 

First, we will need the STM32CubeMX, this is a graphical configuration tool for generating and initializing C code for the STM32 microcontroller family. This is available for download on the ST Microelectronics website. Once you’ve gone through the installation procedure, open STM32CubeMX, I have a shortcut on my desktop. 

You’ll be greeted with a screen like so: 

Then, we’ll need the STM32CubeWB which is the embedded software package that includes low-level drivers, middleware wireless stacks and the application examples for the ST32WB MCU. This package is available for download through st.com  

or through the STM32Cube MX. If you open your CubeMX, you’ll be greeted by this screen. Click on the install/ remove button. 

Scroll down until you get to the STM32WB section. 

When we installed the STM32CubeMX, we installed a repository folder on our C: drive. 

We can navigate to this folder through the filepath on the screen. 

Go into your C Drive, navigate to users, then select your name, then STM32Cube, then Repository and select the latest firmware package for the STM32WB, at the time of this tutorial, it is 1.15.0. 

Here you’ll find many folders, they contain valuable information such as the CMSIS modules, the drivers, middleware libraries and a full set of software projects that includes basic examples, applications, and demonstrations for each board provided for the corresponding STM32 series. 

We are going to need this folder for 2 things: 

  1.  To update the wireless stack firmware  
  1.  To run our health thermometer project 

To update the wireless stack, we’re going to need the STM32CubeProgrammer, which is an all-in-one multi-OS software tool for programming STM32 products. It is available for download on St.com, at the time of this tutorial the latest version is 2.12.0. 

Open the programmer, and you will be greeted with a screen like this: 

On the top righthand side select ST-LINK and connect. The drivers should have loaded onto your machine automatically when you powered on the board. 

Next, we’re going to select the icon that looks like wi-fi on the lefthand side. 

And we’ve arrived to the Firmware upgrade services page. 

First, we will hit the button that says Start FUS. You should receive a message that says it has been activated successfully. 

Next, we will select the button that says Read FUS infos. Notice that the numbers in this box are populated. 

Now, we are going to browse to our repository and point to the location of our stack (C:\Users\Lazina.Rahman\STM32Cube\Repository\STM32Cube_FW_WB_V1.15.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x).  

Here you’ll find the stacks for BLE, Thread and Zigbee. For today’s demo we will select this one.  

Now we need identify the start address. That information can be found through the release notes in the file directory. 

And next, we will select the firmware upgrade button. You’ll be notified if you were successful. 

Now we need to select the start wireless stack button. 

Once again, you’ll be notified if you were successful. 

We’ve finished upgrading our firmware and we’re ready to move on to the next step! 

Let’s go ahead and go back into our repository file and navigate to the BLE projects folder 

Today’s tutorial will be on the health thermometer, so go ahead and select the folder. 

In summary, to make the program work, we must two things: 

1. Open our toolchain  

2. Rebuild all files and flash our board with the executable file 

The great thing about ST Microelectronics is that they offer application examples and source code for many industry preferred toolchains, such as Keil and IAR. Sometimes, the challenge there, is that a license is required to build our code. The alternative, to bypass that, is to use STM32CubeIDE. It’s a free IDE tool to develop and debug code and there are no memory size limitations! 

My preferred choice of toolchain is the STM32CubeIDE. I’m going to open the folder and select the file with the “.project” extension 

And the STM32CubeIDE will open the project file. On my screen, I see the project is open in the project explorer file directory. To get this project running is pretty easy, I’m going to select the hammer icon to build. It really didn’t take long for the file to build. 

The bug icon is for debugging, and the green play button is to run our project. I’m going to select that, and now I can see on my board, that LED2 is lit green. 

Now, for the fun part, I’m going to open the ST BLE toolbox app, and if everything worked out smoothly, I should see it advertising as “HTSTM”. I have an android device, and my Bluetooth and location are enabled. I see on there are many Bluetooth devices that are advertising around me, let me scroll down and see where my health thermometer is, ah there it is!  

Select connect. And now we can see the different services on the health temperature profile, and the generic attributes. 

Well, there you have it, now you know how to get the health temperature profile running on the p-nucleo-wb55. 

To learn more about ST Microelectronics wireless MCU modules, please contact your local future electronics representative, or visit us online at futureelectronics.com 

Thanks for watching and I’ll catch you next time on TechVentures with Lazina! 

More Episodes

Need Engineering Expertise?

Get in touch with our Engineers!

Follow us: