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

average_measurement_stop() in ppk.py takes more than a minute to execute

Hello Nordic support,

For long term power profiling of nrf52 hardware, I am using the suggestion given here, that makes use of functions in python script ppk.py:
https://devzone.nordicsemi.com/f/nordic-q-a/45770/using-power-profiler-kit-for-average-current-consumption-for-1-hour-or-more

While running the program for the power profiling, I noticed that the function average_measurement_stop takes ~ 70 s to execute and return. Since this function basically just clears the buffer, why does it take a long time to execute? Is there a way to reduce this time?

Thanks.

Parents
  • Hi

    There should be a LED toggling on/off when you do the average_measurement_stop() function. Can you observe that LED to confirm whether or not it is the stop command that takes time. I suspect what takes time is emptying all the buffers, since logging over time with the Python API lags more over time when you get alot of data, which we do not have an exact fix for.

    Best regards,

    Simon

  • Hi Simon,

    I believe you're referring to LED1 on the PPK board and yes, it turns on when average_measurement_start() is called and turns off after returning from average_measurement_stop(). Just so you know, logging data just for 60 s takes ~70 s for emptying the buffer. If I decrease the logging time (even with 30 s), I get an empty buffer ppk.avg_buffer. 

    Is there any kind of workaround to avoid the time consumed for emptying the buffer?

Reply
  • Hi Simon,

    I believe you're referring to LED1 on the PPK board and yes, it turns on when average_measurement_start() is called and turns off after returning from average_measurement_stop(). Just so you know, logging data just for 60 s takes ~70 s for emptying the buffer. If I decrease the logging time (even with 30 s), I get an empty buffer ppk.avg_buffer. 

    Is there any kind of workaround to avoid the time consumed for emptying the buffer?

Children
No Data
Related