In a previous post (Post #5), I compared the charge consumption of the XIAO_nRF52840, 54L15, and 54LM20A for applications with low operating charge consumption, where the overhead from the boot process accounts for a significant portion of the total charge consumption.
At that time, because the charge consumption during setup() was extremely high in the nrf54-arduino-core (hereinafter referred to as Arduino Core) environment, software optimization through BSP tuning was highly anticipated. Furthermore, comparative testing in the nRF Connect SDK (hereinafter referred to as NCS) environment had not yet been conducted.
Since then, Arduino Core v1.0.19 has been released, successfully halving the charge consumed during boot initialization and setup(). (Thanks, @Loren_Bufanu) I also conducted similar measurements in the previously untested NCS environment and obtained data nearly identical to that of the Arduino Core environment. Note that the XIAO_nRF52840 was excluded from this evaluation because it had no new updates or improvements relevant to this comparison.
Build and Testing Environment
nrf54-arduino-core (Arduino IDE 2.3.10)
XIAO_nRF54L15 BSP: 1.0.19, Board: XIAO nRF54L15 / Sense
XIAO_nRF54LM20A BSP: 1.0.19, Board: XIAO nRF54LM20A
nRF Connect SDK (Visual Studio Code 1.140.0)
XIAO_nRF54L15 NCS & Toolchain: v3.2.4, Target: xiao_nrf54l15/nrf54l15/cpuapp
XIAO_nRF54LM20A NCS & Toolchain: v3.3.0, Target: xiao_nrf54lm20a/nrf54lm20a/cpuapp
Board library: platform-seeedboards Release 1.0.0
Note: To prevent build errors during v3.3.0 environment setup, unnecessary files and folders unrelated to XIAO_nRF54 were removed from the platform- seeedboards/zephyr/ directory.
The sketches and projects used in the experiment can be found here.
POST_Projects.zip (698.1 KB)
Measurement Conditions
Measurements were taken with a 3.8 V supply from the PPK2 connected to the battery pads.
Sleep Mode APIs Used
Delay mode: Arduino Core: `delay()` / NCS: `k_msleep()`
System OFF mode: Arduino Core: `delaySystemOffNoRetention()` / NCS: `sys_poweroff()`
Hibernate mode: Arduino Core: `npm1300_enter_timed_hibernate_ms()` / NCS: `mfd_npm13xx_hibernate()`
Boot Overhead
The figure (Boot Overhead) illustrates the breakdown of the current waveforms during wake-up and transmission in System OFF mode and Hibernate mode, both of which require a system boot.
Of the total charge consumed during the active period, boot overhead (initialization and setup) accounts for approximately 56–62% in System OFF mode and more than 85% in Hibernate mode. The sleep current (average current during the sleep interval) was measured at approximately 3 μA for both the L15 and LM20A in System OFF mode. Furthermore, Hibernate mode on the LM20A, utilizing the nPM1300, achieved an ultra-low sleep current of 0.5 μA or less.
These consumption ratios remained nearly identical regardless of whether the project was built using Arduino Core or NCS, indicating that the build environment has no significant impact on power efficiency. The issue of high charge consumption during setup(), which was a bottleneck in the previous evaluation, has been fully resolved in the latest Arduino Core v1.0.19, bringing it down to a level comparable to NCS.
Cycle Time and Amount of Charge Consumed
The figure (Amount of Charge Consumed) plots the total charge consumption as a function of the cycle time (transmission interval). The crossover points, where the relative advantages of each mode change, are marked with circles (◯).
Because the setup overhead was halved, these crossover points have shifted significantly compared with the previous results, where the crossover points were approximately 10 minutes for the L15 and 5 minutes for the LM20A.
minute or less (Short Cycle)
Although the boot overhead has been reduced, utilizing Delay mode during sleep remains the most efficient choice for such short intervals.
1 to 5 minutes (Mid Cycle)
Once the cycle time exceeds 1 minute (60 seconds), the sleep current becomes the dominant factor. For both the L15 and LM20A, System OFF mode reduces total charge consumption more effectively than Delay mode, making System OFF more efficient.
5 minutes and beyond (Long Cycle)
Furthermore, when the cycle time exceeds 5 minutes, Hibernate mode on the LM20A, which reduces sleep current to 0.5 μA or less, completely offsets the penalty of its high initialization overhead, making it overwhelmingly superior.
Summary
The experimental results demonstrated no significant differences between the Arduino Core and NCS build environments.
For this specific application, the criteria for selecting the optimal sleep mode based on the cycle time are as follows:
1 minute or less: Delay mode
1 to 5 minutes: System OFF mode
5 minutes or more: Hibernate mode
The actual crossover points and charge consumption values can vary significantly depending on the application. However, the overall trends should remain valid, and I hope these results will provide a useful reference for your own hardware and software design.