You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update intro section to refer to new BLE optimiztion section, correct spelling (optimise/optimize etc.) in various places for consitency (including a filename change), and minor improvements to wording in new BLE topics.
-[Experimental services for Mbed OS BLE](https://github.com/ARMmbed/mbed-os-experimental-ble-services)
6
+
7
+
This is a community led effort to provide implementations of services both from the official BLE specification and user defined ones. It contains libraries which you can import into your project to use the services. For details see the documentation in the repository:
Copy file name to clipboardExpand all lines: docs/api/connectivity/bluetooth/Optimizing_for_performance.md
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# Optimising application for throughput and power consumption
1
+
# Optimizing applications for throughput and power consumption
2
2
3
3
BLE (Bluetooth Low Energy) devices are usually battery powered so performance might mean different things in different
4
-
applications. You will need to decide what is more important in your application - minimising power consumption on one
5
-
or both sides of the communication or maximising throughput and/or latency. Some optimisation steps can in fact achieve
4
+
applications. You will need to decide what is more important in your application - minimizing power consumption on one
5
+
or both sides of the communication or maximizing throughput and/or latency. Some optimization steps can in fact achieve
6
6
both.
7
7
8
8
This guide will discuss some trade-offs that should be considered and best practices that improve performance on all
@@ -118,16 +118,18 @@ will only have to turn on the radio when the expected packet is due.
118
118
119
119
## Increasing throughput
120
120
121
+
The following approaches can help to increase throughput, but you might need to consider whether power consumption will be adversely affected in your application.
122
+
121
123
### Modulation schemes
122
124
123
125
Depending on controller support different modulation schemes are available in BLE through `setPreferredPhys()` and
124
126
`setPhy()`. While the coded PHY will increase reliability in noisy environments and increase range at the cost of
125
-
power consumption, 2M PHY will increase the throughput saving power ber bit. If both devices support it and the signal
126
-
quality is good then this is recommended to be enabled.
127
+
power consumption, 2M PHY will increase the throughput saving power per bit. If both devices support it and the signal
128
+
quality is good then this is recommended to be enabled.
127
129
128
130
### Data length and ATT_MTU
129
131
130
-
Packet overhead strongly affects throughput. Newer controllers allow you to negotiate bigger MTUs thus decreasing the
132
+
Packet overhead strongly affects throughput. Newer controllers allow you to negotiate bigger MTUs thus decreasing the
131
133
fragmentation overhead.
132
134
133
135
There are two separate MTUs to consider: the `ATT_MTU` (which affects ATT protocol operations) and data length extension
@@ -149,7 +151,7 @@ retransmissions (this is only related to data length, ATT_MTU does not affect th
149
151
### ATT protocol
150
152
151
153
GATT client writes and GATT server updates come in two versions - with and without confirmation. Requiring confirmations
152
-
limits the throughput severely so to maximise throughput you can move reliability up from the stack to your application.
154
+
limits the throughput severely so to maximize throughput you can move reliability up from the stack to your application.
153
155
Without confirmations more than a single Peripheral <=> Central data exchange can be made per connection event. With
154
156
confirmations, the connection event ends when the peripheral replies as it needs to prepare the acknowledgement which
155
157
will be sent possibly in the next event.
@@ -158,18 +160,18 @@ will be sent possibly in the next event.
158
160
159
161
If you're not constrained by battery power it might be tempting to use maximum/minimum values where possible.
160
162
Advertising at maximum frequency and scanning continuously will speed up connecting. Setting intervals on connections
161
-
will minimise latency and maximise number of connection events.
163
+
will minimize latency and maximize number of connection events.
162
164
163
165
One key thing to consider when setting the connection interval low is that you are creating a boundary between which a
164
166
sequence of packets must fit. This means that the last transfer must end before the next connection event starts
165
167
(plus 150us of inter packet space). This dead time may become significant if the connection interval is short and packet
166
-
length is long.
168
+
length is long.
167
169
168
170
The connection interval shouldn't be shorter than what your data requires in terms of latency.
169
171
170
172
# Test and measure
171
173
172
-
Due to complexity of the stack the only reliable way to truly maximise performance is to test your application with
174
+
Due to complexity of the stack the only reliable way to truly maximize performance is to test your application with
173
175
representative data and measure the throughput and power usage. It's important to keep in mind that tweaking
174
176
parameters by trial and error and fine-tuning them will only be reliable for sequential operations on known stacks.
Copy file name to clipboardExpand all lines: docs/bare_metal/mbed2_porting.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ If you haven't used Greentea before, [you can learn more in our documentation](.
146
146
147
147
Please ignore tests with similar errors.
148
148
149
-
Further optimisations for targets with small flash memories:
149
+
Further optimizations for targets with small flash memories:
150
150
- Append `--profile release` to the command above. Use of the release profile helps keep some tests within the size limit.
151
151
- Save additional memory by using a [minimal console](https://github.com/ARMmbed/mbed-os-example-blinky-baremetal#using-a-minimal-console) to remove file handling functionality from the system I/O retarget code.
Copy file name to clipboardExpand all lines: docs/bare_metal/using_bare_metal.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ To create the application using Mbed CLI:
42
42
43
43
The `mbed_app.json` file specifies which **profile** to use (`"requires": ["bare-metal"]`) and which **C library** to use (`"target.c_lib": "small"`).
44
44
45
-
This example uses `"target.c_lib": "small"` (small C library). This means your application will use an optimised version of the C library with lower memory footprint. For more details, see [Using small C libraries in Mbed OS bare metal](../bare-metal/using-small-c-libraries.html).
45
+
This example uses `"target.c_lib": "small"` (small C library). This means your application will use an optimized version of the C library with lower memory footprint. For more details, see [Using small C libraries in Mbed OS bare metal](../bare-metal/using-small-c-libraries.html).
Copy file name to clipboardExpand all lines: docs/introduction/introduction.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The Mbed OS source code is available on [GitHub](https://github.com/ARMmbed/mbed
8
8
9
9
The **full profile** of Mbed OS is an RTOS (it includes [Keil RTX](https://www2.keil.com/mdk5/cmsis/rtx) and all RTOS APIs), so it supports deterministic, multithreaded, real-time software execution. The RTOS primitives are always available, allowing drivers and applications to rely on threads, semaphores, mutexes and other RTOS features. It also includes all APIs by default, although you can remove unused ones at build time.
10
10
11
-
The **bare metal profile** doesn't include Keil RTX and is therefore not an RTOS - it is designed for applications that do not require complex thread management. It is also designed for constrained devices, and therefore focuses on minimising the size of the final application: by default, it includes only the smallest possible set of APIs, to which you can manually add APIs that your application requires. The bare metal profile can use the small C libraries (which are not thread safe) to further minimise the size of the application. Mbed 2 users who want to move to Mbed OS 6 should use the bare metal profile.
11
+
The **bare metal profile** doesn't include Keil RTX and is therefore not an RTOS - it is designed for applications that do not require complex thread management. It is also designed for constrained devices, and therefore focuses on minimizing the size of the final application: by default, it includes only the smallest possible set of APIs, to which you can manually add APIs that your application requires. The bare metal profile can use the small C libraries (which are not thread safe) to further minimize the size of the application. Mbed 2 users who want to move to Mbed OS 6 should use the bare metal profile.
12
12
13
13
## Licensing
14
14
@@ -24,6 +24,7 @@ Our [quick start](../quick-start/index.html) guides show how to build an example
24
24
25
25
## Recently updated documentation
26
26
27
+
- A new section about [optimizing for low power](../apis/optimizing-application-for-throughput-and-power-consumption.html) with Bluetooth Low Energy (BLE). We've also removed old material relating to services which are no longer supported and instead provided links to the [Experimental services for Mbed OS BLE](../apis/ble-services.html) repository.
27
28
- We've updated the [unit testing](../debug-test/unit-testing.html) information to reflect changes to the version of CMake used. You will need to update to CMake version 3.19 or above and alter your test code structure.
28
29
- A new [Mbed CLI1 to CLI2 migration guide](../build-tools/migration-guide.html).
29
30
- A new [tutorial about link time optimization](../apis/link-time-optimization.html).
0 commit comments