Replies: 21 comments 47 replies
|
Thanks for the detailed captures and the test projects. I made one more timing pass in the BLE connection scheduler and published it as The change keeps the wider first-event/resync windows, but tightens the steady-state default connection RX lead/listen margins so the peripheral should spend less time awake before each 50 ms connection event. I tested the attached Arduino central/peripheral sketches compile with the low-power/interoperability profile, plus the existing BLE connection examples. I also installed the public Could you please retest with Edit: The reason why I cannot test it myself with PPK2 is that I am at work, and don't have the setup here. |
|
You were right, the 0.7.21 timing change was too small to show up clearly in the PPK2 trace. I found the repeated cost was still mostly the steady-state connection HFXO prewarm, not just the RX listen margin. I published Please retest the same PPK2 setup with |
|
I had another look at the traces and I do not think the remaining gap was just the HFXO lead time. The Arduino trace showed a connected-idle floor, and the XIAO low-power delay path can collapse the board rails while the BLE connection is still alive. Connected BLE events now explicitly own/re-enable the RF path for the event, then release it again if BLE had to power it. I also changed the peripheral side to enter the background connected scheduler immediately after CONNECT_IND, and fixed the central scanner state so I pushed this as 0.7.24. I tested the two sketches from your zip on two XIAO boards: the link stayed up and the central showed 1M PHY, data length 251, MTU 23, and interval 40 units, so the 50 ms connection cadence is still there. One thing worth noting: the Arduino and Zephyr sketches are still not exactly identical at the GATT level. Zephyr uses Write Without Response for the RX characteristic, while the Arduino sketch currently exposes/uses normal Write. That can change the shape and charge of the TX/RX exchange even when the connection interval is the same. Could you please retest 0.7.24 with the same PPK2 setup? I would mainly look for whether the connected-idle floor drops and whether the event bursts look less stretched. |
|
Can you retest please? |
|
Thanks for the detailed captures. The Tx/Rx pictures pointed at one concrete mismatch: the Arduino test sketch has I pushed v0.7.57 with a narrow fix for that: connected BLE paths can now let long microsecond waits use the tickless idle delay path, while short microsecond waits stay busy/precise and non-BLE timing paths do not opt in. One other thing to keep in mind for exact Zephyr comparison: the Zephyr sketch uses Write Without Response. If the Arduino sketch exposes a normal Write characteristic, that can still add an ATT response packet. The |
|
Thanks, that RSSI comparison helped narrow it down. I found one real bug: when the link does a PHY reconfiguration, the RADIO block gets soft-reset and the core was not restoring the TX power selected by the sketch. So I pushed v0.7.58 with that fixed. I also tightened the already-synced connected-event timing so the default profile should spend less time sitting in the receive window between 50 ms connection events, while still keeping the wider resync window after missed events. I tested with your central/peripheral current sketches on two XIAO boards: the link stayed connected, |
|
this is a stubborn bug! :D I foresee it will take some time to be resolved :( |
|
Thanks, that last check was the useful clue. The remaining idle gap was not the RF switch path. The core was still waking the CPU before the steady-state peripheral RX window and then sitting through part of the RX lead/listen time in firmware. Zephyr avoids that by using timer/DPPI hardware to start RADIO at the event time. I pushed I tested the current central/peripheral sketches on two XIAO boards before publishing: the link stayed up, interval was 40 units, PHY was 1M, data length was 251, MTU was 23, and packets kept moving once per second for the soak I ran. I cannot measure the PPK trace here, so please retest |
|
Please test latest version when you get a chance. I've tested the average current consumption and it's close to Zephyr. |
|
Plain board without rf switch and buck converter destroy the xiao numbers! |
|
I suspect the spikes observed on my PPK2 are caused by a broken wire. I discovered a partial break near the base of the connector. I’m currently rebuilding it, so I’ll let you know the results as soon as I have them. To determine whether the issue is related to the RF_SW being turned on or off, you can write a test Core that toggles Port D1 in sync with the RF_SW’s state. This way, you can monitor the current waveform and the Digital Channel simultaneously on the PPK2. |
|
Please take a look at the PPK2 file when 3.35 V is applied to the 3V3 pin to bypass the buck converter. No spikes are observed on the load side at all. It seems the buck converter is indeed the cause. Although the datasheet does not provide details, it appears that the system automatically switches between PWM mode and PF mode in the low-current range, but I suspect some kind of discontinuity occurs at the moment of the switch. Could you please write a test core that sets Port D1 to High/Low at the same time RF_SW is turned ON/OFF? |
|
nrf54l15clean-0.7.68-rfsw-d1-debug-arduino15-overlay.zip
|
|
I still think there is plenty of room of improvement on the central part at least at the moment, the average i am getting is about 700uA, but that is still way too high for what it does. |
|
I swapped out the v0.7.68 folder and tried running it, butPeripheral port D1 remains LOW. |
|
I will check to see the issue when I get back home, this evening |
|
I posted a summary on the Seeed Forum. |












Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I compared the current consumption during bidirectional BLE communication between Zephyr and Arduino Core. It appears there is still considerable room for improvement in Arduino Core.
I set the transmit power to 8 dBm and the connection interval to 50 ms.
In the test, I repeated a sequence where 16 bytes of data—including battery voltage and RSSI—were transmitted bidirectionally via Notify/Write every second, followed by a 1-second idle period. Using a PPK2, I supplied 3.8 V from the battery pad on the back of the board and measured the current consumption waveforms of Peripheral. The vertical and horizontal scales of the waveforms are aligned, allowing for direct comparison.
I also used the PPK2’s Digital channels to observe the relationship between the sequence and the waveforms.
The code used in the experiment is attached below. I used Arduino Core v0.7.14, but the sketch was written in the nRF52840-compatible Bluefruit style. I used nRF Connect v3.3.0 for Zephyr.
TEST_BROJECTS.zip
PPK2.zip
VBAT_READ-Tx-Rx

Tx section

Rx section

Idle section

All reactions