Skip to main content
SStoy.1
Associate II
February 4, 2021
Question

How do I achieve 2 Mbit/s (or close to that) data rate on STM32WB55 ?

  • February 4, 2021
  • 2 replies
  • 3463 views

Hi,

 

I am running the BLE_DataThroughput example for the STM32WB55 with two boards as described in the documentation- one set as a client, one as a server. I have connected the client board to a desktop PC via UART, and I am monitoring the output with PuTTy. With this setup, the highest data throughput rate I get is ~ 98 600 bytes/s as reported at the UART by the board. This is with PHY = 2M. When I press the SW2 button on the baord it switches to PHY = 1M, and the data throughput rate falls to ~2 500 bytes/s. My question is whether this is normal and how can I get the advertised 2 Mbit/s datarates for this chip, or at least something closer? The current data rate corresponds to ~ 0.8 Mbit/s.

 

I referred to AN5289 Building wireless applications withSTM32WB Series microcontrollers, section 7.6.5- How to maximize data throughput where it is advised that I set the connection interval and connection event length at 50 ms, which I did correctly as far as I can tell. The effect this produced was to increase the PHY=1M data rate from ~ 2 500 bytes/s to ~ 30 000 bytes/s, however the PHY=2M data rate was reduced from ~ 98 600 bytes/s to ~ 85 000 bytes/s. What am I doing wrong? How can I get the advertised 2 Mbit/s (or at least close to that)? These data rates are for the two boards almost on top of each other so loss due to range is not a problem.

This topic has been closed for replies.

2 replies

DHunt.1
Visitor II
April 5, 2021

Hi!

I have the same issue.

I used the tips from AN5289, but it didn't solve a problem. Throughput remains low for about 20 kbit/s.

If you got a result, could you please let me know what did you do?

Best Regards

Den

SStoy.1
SStoy.1Author
Associate II
April 5, 2021

Hi,

No, unfortunately, I do not have an answer yet. I will post here if I find a working solution. Please do the same if you come up with one first. Meanwhile I am looking at Nordic Semiconductors' forums as it seems they offer better support and more discussion. The microcontroller they offer is quite similar. I think they use the same Bluetooth stack so my thinking is that if it is some parameter configuration that would allow fast data rate, it would work both on the STM32WB55 and the nRF.

Best,

Svet

RNiel.2
Associate II
April 12, 2021

Hi,

When I tried the example back in February I managed to get a throughput of 171 kBytes/s (close to theoretical maximum). I have since tried to recreate the performance with a custom service, though without any luck as my throughput is limited to 47 kBytes/s. So I tried to go back to the data throughput example to see what I did differently.

Going back to the data throughput example I can now reach a maximum of 153 kBytes/s with the following settings.

In app_conf.h

#define CFG_TX_PHY  2

#define CFG_RX_PHY  2

In app_ble.c -> Connection_Update(void)

I changed the CONN_P1_400 and CONN_P2_400 to CONN_P2_50 and CONN_P2_50. I know data throughput should be best at 400 ms but I got better results this way.

And most importantly I build the project with release setting instead of debug, in CubeIDE. This increased both the throughput and stability of the connection.

Does these settings help you, @DHunt.1​ and @SStoy.1​ ?

(I still haven't managed to increase throughput on my custom service above the 47 kBytes/s)

Best,

Robert

SStoy.1
SStoy.1Author
Associate II
April 13, 2021

Hi,

First, thank you for replying! I have tried these configurations of

#define CFG_TX_PHY  2

#define CFG_RX_PHY  2

and changing the CONN_P1_400 and CONN_P2_400 to CONN_P2_50 and CONN_P2_50 but unfortunately, I was unable to get such a good result. I also tried building with release instead of debug settings. This refers to the little drop-down menu that pops up from the little hammer 'build' button in STM32CubeIDE, correct? Unfortunately, this did not improve throughput for me either. I am still stuck at ~96000 bytes/s.

Is it possible for you to upload the project where you manage 150-170 kBytes/s so that I can test my boards with it?

Best,

Svet

RNiel.2
Associate II
April 14, 2021

Hi,

Weird it didn't work, I'll upload my project. Hope this works for you!

Yes, I did refer to the hammer icon release build.

This is the output I receive from the dongle

0693W000008zUFFQA2.png/Robert