|
1 | 1 | # Bluetooth Link Layer Scheduling |
2 | 2 |
|
3 | | -Link Layer scheduling defines how Bluetooth radio tasks share airtime on |
4 | | -the controller.\ |
5 | | -This document describes the available scheduling algorithms, Link Layer |
6 | | -task types,\ |
7 | | -anchor placement concepts, and configuration parameters. The goal is to |
8 | | -help developers\ |
9 | | -choose the most appropriate scheduling mode for their application. |
10 | | - |
11 | | ------------------------------------------------------------------------- |
| 3 | +Link Layer scheduling defines how Bluetooth radio tasks share airtime on the controller. This document describes the available scheduling algorithms, Link Layer task types, anchor placement concepts, and configuration parameters. The goal is to help developers choose the most appropriate scheduling mode for their application. |
12 | 4 |
|
13 | 5 | ## Link Layer Tasks |
14 | 6 |
|
15 | | -A *task* is any Link Layer radio activity that must occur at scheduled |
16 | | -intervals.\ |
17 | | -The Bluetooth controller treats the following as tasks: |
18 | | - |
19 | | -- One or more **connection events** |
20 | | -- **Advertising** |
21 | | -- **Scanning** |
22 | | -- **Channel Sounding** |
23 | | -- **Periodic Advertising with Responses (PAwR)** transmissions and |
24 | | - receptions |
25 | | -- **Multiple PAwR trains**, each considered a separate task |
| 7 | +A *task* is any Link Layer radio activity that must occur at scheduled intervals. The Bluetooth controller treats the following as tasks: |
26 | 8 |
|
27 | | -Tasks have intervals, required runtime, and anchor points. The scheduler |
28 | | -divides radio\ |
29 | | -time between tasks while attempting to avoid overlaps. |
| 9 | +- One or more connection events |
| 10 | +- Advertising |
| 11 | +- Scanning |
| 12 | +- Channel Sounding |
| 13 | +- Periodic Advertising with Responses (PAwR) transmissions and receptions |
| 14 | +- Multiple PAwR trains, each considered a separate task |
30 | 15 |
|
31 | | ------------------------------------------------------------------------- |
| 16 | +Tasks have intervals, required runtime, and anchor points. The scheduler divides radio time between tasks while attempting to avoid overlaps. |
32 | 17 |
|
33 | 18 | ## Anchor Concept |
34 | 19 |
|
35 | | -An *anchor point* is the reference time for a repeating Link Layer |
36 | | -procedure\ |
37 | | -(such as a connection event).\ |
38 | | -This is a Bluetooth Core Specification term; refer to the Core Spec for |
39 | | -the formal definition. |
| 20 | +An *anchor point* is the reference time for a repeating Link Layer procedure (such as a connection event). |
40 | 21 |
|
41 | | -Why anchors matter: |
| 22 | +This is a Bluetooth Core Specification term; refer to the Core Spec for the formal definition. |
42 | 23 |
|
43 | | -- Anchor placement affects **throughput**, **latency**, and |
44 | | - coexistence between tasks. |
45 | | -- Efficient anchor distribution ensures radio time is used without |
46 | | - unnecessary conflicts. |
47 | | -- Misaligned anchors may reduce available airtime or increase |
48 | | - collision likelihood. |
| 24 | +Why anchors matter: |
49 | 25 |
|
50 | | ------------------------------------------------------------------------- |
| 26 | +- Anchor placement affects throughput, latency, and coexistence between tasks. |
| 27 | +- Efficient anchor distribution ensures radio time is used without unnecessary conflicts. |
| 28 | +- Misaligned anchors may reduce available airtime or increase the likelihood of a collision. |
51 | 29 |
|
52 | 30 | ## Scheduling Algorithms |
53 | 31 |
|
54 | | -The Bluetooth Link Layer supports three selectable scheduling |
55 | | -algorithms.\ |
56 | | -Developers may choose the most suitable one based on device role, |
57 | | -resource needs,\ |
58 | | -and traffic requirements. |
59 | | - |
60 | | ------------------------------------------------------------------------- |
| 32 | +The Bluetooth Link Layer supports three selectable scheduling algorithms. Developers may choose the most suitable one based on device role, |
| 33 | +resource needs, and traffic requirements. |
61 | 34 |
|
62 | 35 | ### Basic Scheduling |
63 | 36 |
|
64 | | -Enabled when the *Bluetooth Controller Anchor Selection* component is |
65 | | -**not installed**. |
| 37 | +Enabled when the *Bluetooth Controller Anchor Selection* component is **not installed**. |
66 | 38 |
|
67 | | -Basic scheduling does not attempt to optimize latency or throughput.\ |
68 | | -It ensures tasks share the radio and resolves conflicts only when |
69 | | -overlaps occur. |
| 39 | +Basic scheduling does not attempt to optimize latency or throughput. It ensures tasks share the radio and resolves conflicts only when overlaps occur. |
70 | 40 |
|
71 | | -Best for: - Advertising / **Peripheral low‑throughput** applications |
72 | | -- Applications where **latency is not critical** |
73 | | -- **PAwR synchronizers** |
74 | | -- Designs requiring **lowest RAM, flash, and power usage** |
| 41 | +Best for: |
75 | 42 |
|
76 | | ------------------------------------------------------------------------- |
| 43 | +- Advertising / Peripheral low‑throughput applications |
| 44 | +- Applications where latency is not critical |
| 45 | +- PAwR synchronizers |
| 46 | +- Designs requiring lowest RAM, flash, and power usage |
77 | 47 |
|
78 | 48 | ### Even Anchor Selection Algorithm |
79 | 49 |
|
80 | | -Enabled when the *Bluetooth Controller Anchor Selection* component is |
81 | | -installed and\ |
82 | | -**Anchor selection is done in an even manner** is selected. |
| 50 | +Enabled when the *Bluetooth Controller Anchor Selection* component is installed and **Anchor selection is done in an even manner** is selected. |
| 51 | + |
| 52 | +Best for: |
83 | 53 |
|
84 | | -Best for: - Local device acting as **Central** connected to **multiple |
85 | | -Peripherals** |
| 54 | +- Local device acting as **Central** connected to multiple peripherals |
86 | 55 | - Central devices performing **Channel Sounding** where the Central is |
87 | 56 | the initiator |
88 | 57 |
|
89 | | -Behavior: - Tries to **maximize airtime for connection events** |
90 | | -- Distributes anchors evenly across the interval for balanced use across |
91 | | -connections |
| 58 | +Behavior: |
92 | 59 |
|
93 | | -Tradeoffs: - Uses **more RAM, flash, and power** than Basic Scheduling |
94 | | -- Not recommended for **simple Peripheral-only devices** |
95 | | -- Does **not fully utilize maximum possible radio time** |
| 60 | +- Tries to maximize airtime for connection events |
| 61 | +- Distributes anchors evenly across the interval for balanced use across connections |
96 | 62 |
|
97 | | ------------------------------------------------------------------------- |
| 63 | +Tradeoffs: |
| 64 | + |
| 65 | +- Uses more RAM, flash, and power than Basic Scheduling |
| 66 | +- Not recommended for simple Peripheral-only devices |
| 67 | +- Does not fully utilize maximum possible radio time |
98 | 68 |
|
99 | 69 | ### Empty Center Anchor Selection Algorithm |
100 | 70 |
|
101 | | -Enabled when *Bluetooth Controller Anchor Selection* is installed and\ |
102 | | -**Anchors are placed in alternating manner** is selected. |
| 71 | +Enabled when *Bluetooth Controller Anchor Selection* is installed and **Anchors are placed in alternating manner** is selected. |
| 72 | + |
| 73 | +Best for: |
103 | 74 |
|
104 | | -Best for: - Devices acting as **Central + PAwR Advertiser** |
105 | | -- Use cases where **PAwR subevents** and **connections** share the same |
| 75 | +- Devices acting as **Central + PAwR Advertiser** |
| 76 | +- Use cases where PAwR subevents and connections share the same |
106 | 77 | interval |
107 | 78 |
|
108 | | -Behavior: - Places anchors to reserve "center" airtime for PAwR |
109 | | -operations |
| 79 | +Behavior: |
| 80 | + |
| 81 | +- Places anchors to reserve "center" airtime for PAwR operations |
110 | 82 | - Works best when all task runtimes fit comfortably inside a single |
111 | 83 | interval |
112 | 84 |
|
113 | | -Multiple PAwR trains: - Each train is treated as a separate task |
114 | | -- Developers must ensure **system‑level timing** prevents PAwR response |
115 | | -slot overlap |
| 85 | +Multiple PAwR trains: |
116 | 86 |
|
117 | | ------------------------------------------------------------------------- |
| 87 | +- Each train is treated as a separate task |
| 88 | +- Developers must ensure **system‑level timing** prevents PAwR response slot overlap |
118 | 89 |
|
119 | 90 | ## Task Runtime Considerations |
120 | 91 |
|
121 | 92 | Scheduling quality depends on the relationship between task runtimes and |
122 | 93 | their intervals: |
123 | 94 |
|
124 | | -- When total runtime is small compared to the interval, anchors can be |
125 | | - spaced optimally |
126 | | -- As total runtime approaches the interval: |
127 | | - - Anchor placement becomes constrained |
128 | | - - Throughput and latency may degrade |
129 | | - - PAwR slot alignment becomes more difficult |
130 | | - - Lower‑priority tasks may lose airtime |
| 95 | +- When total runtime is small compared to the interval, anchors can be spaced optimally |
| 96 | +- As total runtime approaches the interval: |
| 97 | + - Anchor placement becomes constrained |
| 98 | + - Throughput and latency may degrade |
| 99 | + - PAwR slot alignment becomes more difficult |
| 100 | + - Lower‑priority tasks may lose airtime |
131 | 101 |
|
132 | 102 | A full PAwR use‑case example is available internally. |
133 | 103 |
|
134 | | ------------------------------------------------------------------------- |
135 | | - |
136 | 104 | ## Configuration Parameters |
137 | 105 |
|
138 | | -The *Bluetooth Low Energy Controller* component provides parameters |
139 | | -affecting scheduling. |
| 106 | +The *Bluetooth Low Energy Controller* component provides parameters affecting scheduling. |
140 | 107 |
|
141 | 108 | ### Bluetooth Controller Minimum Connection Event Duration |
142 | 109 |
|
143 | 110 | Hints the scheduler to reserve a minimum runtime for each connection. |
144 | 111 |
|
145 | | -Example:\ |
146 | | -Transmitting + receiving 251‑byte packets on 1M PHY requires \~4.3 ms. |
| 112 | +Example: |
147 | 113 |
|
148 | | -If the Host sets a larger minimum event length, the scheduler uses the |
149 | | -larger value. |
| 114 | +Transmitting + receiving 251‑byte packets on 1M PHY requires ~4.3 ms. |
150 | 115 |
|
151 | | ------------------------------------------------------------------------- |
| 116 | +If the Host sets a larger minimum event length, the scheduler uses the larger value. |
152 | 117 |
|
153 | 118 | ### Bluetooth Controller Connection Event Extension |
154 | 119 |
|
155 | | -Allows connection events to extend beyond their scheduled window if they |
156 | | -still\ |
157 | | -have data to exchange and have not exceeded the maximum connection event |
158 | | -length.\ |
159 | | -This may temporarily overrun lower‑priority tasks. |
160 | | - |
161 | | ------------------------------------------------------------------------- |
| 120 | +Allows connection events to extend beyond their scheduled window if they still have data to exchange and have not exceeded the maximum connection event length. This may temporarily overrun lower‑priority tasks. |
162 | 121 |
|
163 | 122 | ### Bluetooth Controller Scanner Reception Early Abort |
164 | 123 |
|
165 | 124 | Allows the scanner to abort packet reception if continuing would delay a |
166 | | -higher‑priority task.\ |
167 | | -Useful for ensuring extended advertisements do not overrun upcoming |
| 125 | +higher‑priority task.. Useful for ensuring extended advertisements do not overrun upcoming |
168 | 126 | scheduled tasks. |
169 | 127 |
|
170 | | ------------------------------------------------------------------------- |
171 | | - |
172 | 128 | ## Choosing a Scheduling Algorithm |
173 | 129 |
|
174 | | -Choose **Basic Scheduling** when: - Peripheral-only roles\ |
| 130 | +Choose **Basic Scheduling** when: |
| 131 | + |
| 132 | +- Peripheral-only roles |
175 | 133 | - Low throughput and non‑critical latency |
176 | 134 | - PAwR synchronizer use cases |
177 | 135 | - Minimal RAM/flash/power usage required |
178 | 136 |
|
179 | | -Choose **Even Anchor Selection** when: - Central device with multiple |
| 137 | +Choose **Even Anchor Selection** when: |
| 138 | + |
| 139 | +- Central device with multiple |
180 | 140 | Peripherals |
181 | 141 | - Central performing Channel Sounding |
182 | 142 | - Balanced airtime allocation across connections is needed |
183 | 143 |
|
184 | | -Choose **Empty Center Anchor Selection** when: - Central + PAwR |
185 | | -Advertiser roles |
186 | | -- PAwR and connections share intervals\ |
187 | | -- Developer can ensure PAwR train timing does not overlap |
| 144 | +Choose **Empty Center Anchor Selection** when: |
188 | 145 |
|
189 | | ------------------------------------------------------------------------- |
| 146 | +- Central + PAwR Advertiser roles |
| 147 | +- PAwR and connections share intervals |
| 148 | +- Developer can ensure PAwR train timing does not overlap |
190 | 149 |
|
191 | 150 | ## Summary |
192 | 151 |
|
193 | | -Link Layer scheduling determines how radio airtime is shared between |
194 | | -tasks.\ |
195 | | -Choosing the correct scheduler depends on device role, task mix, |
196 | | -throughput and\ |
197 | | -latency requirements, and resource constraints. |
| 152 | +Link Layer scheduling determines how radio airtime is shared between tasks. Choosing the correct scheduler depends on device role, task mix, throughput and latency requirements, and resource constraints. |
198 | 153 |
|
199 | | -The anchor selection algorithms allow improved radio‑time distribution |
200 | | -when needed,\ |
201 | | -while Basic Scheduling provides the lowest resource footprint. |
| 154 | +The anchor selection algorithms allow improved radio‑time distribution when needed, while Basic Scheduling provides the lowest resource footprint. |
0 commit comments