cancel
Showing results for 
Search instead for 
Did you mean: 

PM0271, Rev 3, errata and formula?

Scott Löhr
Senior II

Hello ST - would you please clarify these two errata and share the missing formula from PM0271:

Slot guard time (1.25 ms or 1.5 ms?

The last sentence of 5.2 specifies a 1.25 ms guard time.

5.2.2 specifies a 1.5 ms guard time and Figure 22 shows 1.5 ms guard times.

Advertising interval minimum?

5.1.1 specifies a random offset of 0..10 ms.

5.2.3 specifies a length of 14.6 ms which "cannot be reduced" but only references min/max interval plus 5 ms (i.e. not min/max plus 10 ms).

So is the realizable minimum advertising interval 14.6 + 10 --> 24.6 (plus I presume a 1.5 ms guard time, so 26.1 rounded to 1.25 ms multiple, so 26.25).

Or is the random delay specified at 10 ms but ST SW truncates to 5 ms, so min adv int that can be realized is actually 14.6 + 5 --> 19.6? If so, would a mandatory 1.5 ms guard time be added to that?

Finally, where can we find the formula referred to in 5.4:

The following formula is defined:

• GET_Master_Slave_device_connection_parameters(Num_Masters, Num_Slaves, Scan_Window, Sleep_Time)

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

Before going further in the details, did you read the programming manual PM0271 "STM32WB BLE stack programming guidelines" and the chapter 5.2 BLE stack timing and slot allocation concepts?

View solution in original post

4 REPLIES 4
Remi QUINTIN
ST Employee

Before going further in the details, did you read the programming manual PM0271 "STM32WB BLE stack programming guidelines" and the chapter 5.2 BLE stack timing and slot allocation concepts?

@Remi QUINTIN​ thank you for the reminder to re-RTFM (re-read the fantastic manual) ... hehehe, it looks like I got a little lazy with my original question which I have transmogrified into a request for clarification on errata and for the mysterious, missing formula :\

Remi QUINTIN
ST Employee

Slot guard time (1.25 ms or 1.5 ms?

The last sentence of 5.2 specifies a 1.25 ms guard time.

5.2.2 specifies a 1.5 ms guard time and Figure 22 shows 1.5 ms guard times.

=>   Typo: guard time = 1.5 ms

Advertising interval minimum?

5.1.1 specifies a random offset of 0..10 ms.

5.2.3 specifies a length of 14.6 ms which "cannot be reduced" but only references min/max interval plus 5 ms (i.e. not min/max plus 10 ms).

So is the realizable minimum advertising interval 14.6 + 10 --> 24.6 (plus I presume a 1.5 ms guard time, so 26.1 rounded to 1.25 ms multiple, so 26.25).

Or is the random delay specified at 10 ms but ST SW truncates to 5 ms, so min adv int that can be realized is actually 14.6 + 5 --> 19.6? If so, would a mandatory 1.5 ms guard time be added to that?

=> Advertising interval could have a random delay between 0 to 10 ms, on average it is equal to 5ms

=> Length of adv_event fixed and equals to 14.6 ms, this value includes the guard time and the random delay

Finally, where can we find the formula referred to in 5.4:

The following formula is defined:

• GET_Master_Slave_device_connection_parameters(Num_Masters, Num_Slaves, Scan_Window, Sleep_Time)

=>   5.4 removed in next version + updates

Scott Löhr
Senior II

@Remi QUINTIN​ , thanks for your diligent follow-up, as always.

WRT advertising length, now it makes sense how the BLE stack can accept the request to advertise at the shortest interval of 20 ms.

But there is still some other work or delays or padding going on under the hood - for example, when I request the 2nd fastest advertising interval recommended by the iOS Accessory Guidelines, 152.5 ms, and then call aci_hal_get_anchor_period() after advertising is on, the result is 244 and 215 (0.625 ms ticks). So my target interval of 152.5 ms (244 X 0.625) is achieved, but with only 134.375 ms of slot bandwidth leftover. Or, 244 - 215 = 29 X 0.625 --> 18.125 ms consumed by the advertising alone. I will presume that aci_hal_get_anchor_period() is giving the "usable" slot available, so in other words, already subtracting another 1.5 ms guard. So that would imply 18.125 - 1.5 = 16.625 ms for the advertising length, not merely 14.6 ms as specified above. Thus, could 14.6 be another typo, @Remi QUINTIN​ , with the actual length really being 16.6(25)?

Also interesting to note, I cannot achieve my target advertising interval of exactly 152.5 ms by this request:

aci_gap_set_discoverable(ADV_SCAN, 244, 244, PUBLIC_ADDR, NO_WHITE_LIST_USE, 0, NULL, 0, NULL, 0, 0);

I have to play with the +/-5 ms and subtract 10 ms from the minimum interval like this:

aci_gap_set_discoverable(ADV_SCAN, 228, 244, PUBLIC_ADDR, NO_WHITE_LIST_USE, 0, NULL, 0, NULL, 0, 0);