This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Power measurements with CoAP IPv6 example

Hello,

 

I am using the CoAP IPv6 example from the SDK 15.2 on a nRF52840 board. I am measuring the energy consumption with the Power Profiler Kit. My problem is that the values I get are much higher than expected, when compared to the Online Profiler target values.
I have the bridges SB40 and SB41 cut. My main.c is the original nRF5_SDK_15.2.0_9412b96\examples\iot\coap\ipv6\client\main.c with the following 2 modifications:

  • The line {blink_timeout_handler, LED_BLINK_INTERVAL_MS} is commented
  • I added #if 0 and #endif around the blink_timeout_handler definition (otherwise the connection is not done)

 

Here are screenshots of the graph I get on the Power Profiler:

 

Before, during and after connection establishment:

Once the IPv6 over BTE is connection established:

The lowest current

:

The online profiler shows me this:

I have way too much peeks and no power sleep time. The lowest current value is 10 times higher than the target idle current value. What could be causing the sinusoid peeks after the connection is established?

 

Thank you very much,

  • HI Raja, 

    the Online Power Profiler is designed for BLE examples that only runs the SoftDevice. 

    The IoT examples does use the SoftDevice, but in addition there is a embedded IPv6 stack running in the application region,  also referred to as the lwIP stack. ThelwIP requires regular servicing of the stack to check out time-outs, so all example applications for lwIP that are included in theSDK implement a timer, servicing lwIP time-outs every 100 ms. 

    This regular servicing in addition to the BLE stack interrupts might lead to a higher current consumption compared to a standard BLE app. 

    Hence, the figures from the Online Power Profiler isnt directly comparable to the measured current consumption of the IoT examples. Note: These examples are also labled experimental so they might not be full optimized. 

    Best regards
    BJørn

  • Hi Bjorn,

    Thank you for the explanation. In the IoT SDK examples for CoAP, there are 2 folders: one called IPv6, the other lwIP. Here we are talking about the IPv6 one. Does it also implement lwIP? What is the difference, then?

    For the power measurements, it turns out that disabling UART logging in the sdk_config.h reduced it greatly.

  • Hi Bjorn,

    all example applications for lwIP that are included in theSDK implement a timer


    What is exactly the purpose of this timer, how essential is it and can we modify its value? Would it be possible to synchronize its function with the connection event in order to minimize the energy consumption?

  • Hi Olivia, 

    Yes, if you're performing current consumption measurements, then make sure that you disable the logging module. 

    The timer is created using the IoT Timer library and in the examples you will find the LWIP_SYS_TICK_MS definition that sets the system clock interval. The timer is essential as it is  periodically  servicing the LwIP protocol timers and is also used to  trigger sending on the TCP Connection. 

    I think it will be hard to sync the BLE connection with the lwIP protocol timer interrupts. 

Related