power consumption -- zephyr vs bare-metal

having just seen the announcment about the bare-metal SDK, i gave it a try using my "hello world" of BLE -- a minimal beacon app which i actually use to benchmark BLE platforms from multiple silicon vendors....

for sure, my bare-metal program image is much smaller than zephyr -- ~42K of code versus ~180K of code....  same target HW, of course -- the nRF54L15-DK

but for some reason, measuring current consumption shows the bare-metal version somewhat behind....

as a "baseline", here's a PPK capture of one advertising event:on my zephyr version:

and here's the same advertising event (same payload, same TX power, etc) using the bare-metal SDK:

(i've also done captures with my higher-precision joulescope js220....  same differences)

the extra time (and current consumption) seems to occur during the transmission itself....  there appears to be ~100us of **additional** TX time per packet TX in the bare-metal version -- accounting for the ~300us of additional event duration....

any ideas where i might have missed something??? 

Parents Reply Children
  • here's 10 advertising events from the bare-metal app captured with a 3V3 source....

    bare.ppk2

    the duration of the advertising events seems "better" now (around 2.7-2.8 ms)....

    but this is quite different from the 2.0 ms shown in the capture you show above....

    i'm also struck by how "fast" you return to deep-sleep after the last TX.... i wouldn't have expected this....

    several questions:

    my DK is PCA10156 | 0.9.2 | 2025.71057719565  .... don't know if this is the "latest" or whether that even matters???

    and like you, i'll forget to load the softdevice....  i'll often be switching between the zephyr and bare-metal app on the *same* board, reloading their images through vscode....  does zephyr itself program the "softdevice area", and if so perhaps i was running my bare-metal app with the wrong system firmware???

    still, i'm seeing **more** current consumption (per event, per second) in the bare-metal capture versus my zephyr capture:

    zeph.ppk2

    why is bare-metal higher than zephyr???  and why don't is see 2s events like the one you showed above???

Related