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.

Parents
  • Ok, thank you for clarifying!

    What does the stateMachineRun() function do? If you're just scanning/advertising, I guess the radio is still active in your application. Also, do you use the SoftDevice in this application? If not, sd_app_evt_wait() and other sd function won't work, which might be why you're seeing these spikes.

    Best regards,

    Simon

  • I am using SoftDevice in the application.

    stateMachineRun() runs some tasks in order. It mostly runs task that scans for 2.4 seconds, then stops scanning, processes scan results, starts scanning again , starts advertising to advertise processed data(at the time which is not in scan window). It calls a bool function and that function always returns false until 2.4 seconds completed. I couldn't explain well, I hope you can understand me. Can calling a function continuously cause this?

Reply
  • I am using SoftDevice in the application.

    stateMachineRun() runs some tasks in order. It mostly runs task that scans for 2.4 seconds, then stops scanning, processes scan results, starts scanning again , starts advertising to advertise processed data(at the time which is not in scan window). It calls a bool function and that function always returns false until 2.4 seconds completed. I couldn't explain well, I hope you can understand me. Can calling a function continuously cause this?

Children
No Data
Related