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

Current consumption

Hi, 

I tried to monitor current consumption of my device. I used

 

sd_app_evt_wait();

and then used 

 // Wait for an event.
        __WFE();
        // Clear the internal event register.
        __SEV();
        __WFE();

I saw something like this

There are spikes on everywhere.

If I comment out sd_app_evt_wait(); or last __WFE(); it beacomes like that

I am using sdk 15.0.0, before this I was using sdk 14.2 and in 14.2 I was using sd_app_evt_wait function and there was no spikes. How can I fix it?

Thanks.

  •   stateMachineRun();
        SEGGER_RTT_printf(0,"?");
        sd_app_evt_wait();
        SEGGER_RTT_printf(0,".");

    I added this to see sd_app_evt_wait() is reached or not and result is like that 

      

    Red areas happen when 2.4 seconds completed, so program is running as expected. Also sd_app_evt_wait() is working, it decreases current consumption 12 mAh to 6 mAh, only those spikes appear. 

  • Hi

    Thank you for clarifying. Could you try measuring the current of any of our SDK examples that are using sd_app_evt_wait(), in order to see if the spikes appear there as well? Also, are you able to upload some higher resolution screenshots of the top picture (the one with spikes), as I'm not able to see any details on that one.

    Best regards,

    Simon

  • This is my app, sorry for the resolution of older one.

    This is from ble_app_hrs_rscs_relay example, its both scanning and advertising. I build my app by modifying this example. 

    TThis what when I comment out sd_app_evt_wait() function, actually it is idle_state_handle() function but it calls sd_app_evt_wait() inside it. 

  • Hi

    Thanks for the updated pictures. These spikes are reminiscent of the CPU interrupting the SoftDevice and making it check something. I'm guessing this is the stateMachineRun() function processing data or something. Do the spikes still appear if you comment out stateMachineRun()?

    Best regards,

    Simon

  • When I comment out stateMachineRun() spikes still appear. In the my last comment last two pictures are from sdk 15.0 's original example. Same thing happen in there, if I comment out idle_state_handle() function in the original example those spikes are gone. Second and third pictures from sdk 15.0  ble_app_hrs_rscs_relay example. There are spikes in the original example too. I will try to run same example on sdk 14.2 and measure current consumption, then I will post here.

Related