cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB, cube and BLE time advertising

PCu1
Senior

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Issamos
Lead II

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

View solution in original post

3 REPLIES 3
Issamos
Lead II

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

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...

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