7. ble_central example test case

Establishing a BLE connection involves a peripheral advertising its presence and a central device scanning for these advertisements. When a central device detects a signal from a peripheral, it decides whether to establish a connection or not. To analyze scanning power consumption, we’ll examine the scanning plot on Powerprofiler during a 10-second scanning period.

The scan interval, one of the key parameters, determines how frequently the central device scans for advertisements. A shorter scan interval increases power consumption due to more frequent scanning, while a longer interval reduces consumption but might delay device discovery. Additionally, the scan window, defining the duration of each scan interval where the receiver is active, affects power usage. A longer window increases the likelihood of detecting advertisements but consumes more power. Receiver sensitivity, determining the minimum signal strength for detection, also influences power consumption.

Notably, the Tx power setting has minimal impact during scanning, as it mainly involves the radio receiver. Conducting measurements in an RF isolated environment ensures reproducible results by minimizing external interference, critical for accurate power consumption assessment.

  1. Open the ble_central example from SDK_10.1.4.104\projects\dk_apps\features\ble_central

BLE central task that scans for nearby devices, connects to them, and performs GATT service discovery.The task communicates with the BLE manager to handle BLE events asynchronously. It employs a watchdog timer for task monitoring and performs periodic scanning and connection attempts to maintain connectivity with peripheral devices. The code demonstrates efficient event-driven BLE communication and management in a central role, focusing on reliability and power efficiency.

  1. Build the project and start the debugging session

Warning

To accurately measure the power consumption of your application under normal operating conditions, it’s essential to remove the effects of debugging. This means stopping the debugging session, which halts the debugging activities and allows your program to run independently without interruptions. Once the debugging session is stopped, the power consumption chart should stabilize, reflecting the true power consumption of your application without the additional overhead introduced by debugging activities.

  1. Open Powerprofiler and similar to last chapter set Auto stop to 10 seconds.

  2. On the Motherboard switch off the UART on S1.

  3. Push the Reset button on daughter board once

  4. Initialize and start the measurement session.

There are some points that we can validate by this test. Scanning consumes more power than advertising because it involves continuous radio operation and packet processing to actively listen for advertising packets from other devices, whereas advertising requires periodic transmission of short advertising packets.

First of all you will see that the scanning interval is around 100ms.

../_images/x1.svg

Figure 23 Scanning interval

Before each event the M0+ processor wakes up and starts scanning. You will see that each event duration is about 50ms. As you will see in the following figure, the amount of charge in each event is about 120uC while Iavg=2.4mA.

../_images/x2.svg

Figure 24 Scanning event

Towards the end, the “Info” table illustrates a substantial contrast compared to the peripheral role, indicating significantly higher power consumption in the central role. This higher power consumption often requires a continuous connection to a power source or frequent recharging.

../_images/x3.svg

Figure 25 Central Info table