Skip to main content
PCu1
Senior
September 13, 2023
Solved

STM32WB, cube and BLE time advertising

Hello,

I'm working with the STM32WB in BLE mode.

Cube generates the advertising time interval with these values:

#define CFG_FAST_CONN_ADV_INTERVAL_MIN (0x80) /**< 80ms */
#define CFG_FAST_CONN_ADV_INTERVAL_MAX (0xA0) /**< 100ms */

Cube indicates that this is the maximum allowed. 

Nevertheless, the function aci_gap_set_discoverable() accepts value up to 0x4000. 

I tried with these values by overwritting the generated values and it seems that it works (verified with current and BLE sniffer)

Is it a bug in Cube?

This topic has been closed for replies.
Issamos
IssamosBest answer
Super User
September 13, 2023

Hello @PCu1 

It's not necessarily a bug in STM32CubeMX. Those values generated by STM32CubeMX are likely intended to provide safe and recommended values for fast connection intervals. These values are aligned with Bluetooth specifications and are generally suitable for most use cases. It may other values like 0x4000 is possible for your application. But you should be careful using it.

Best regards.

II

3 replies

Issamos
IssamosBest answer
Super User
September 13, 2023

Hello @PCu1 

It's not necessarily a bug in STM32CubeMX. Those values generated by STM32CubeMX are likely intended to provide safe and recommended values for fast connection intervals. These values are aligned with Bluetooth specifications and are generally suitable for most use cases. It may other values like 0x4000 is possible for your application. But you should be careful using it.

Best regards.

II

PCu1
PCu1Author
Senior
September 13, 2023

Thanks Issamos,

I agree that it is not the recommend values, but what is disturbing is that a new Cube generation overwrites the 'edited' text values.

Allowing larger values with a warning in the Cube field description could be another solution...

Issamos
Super User
September 13, 2023

Hello again @PCu1 

CubeMX, as I said, always give the best choice for all use cass. If you want to look for something out of that. It's up to the user to do it.

If your question is answered. Close the topic by choosing a best.

Best regards.

II