yes! this was solved here: [SOLVED] How to do MCU utilization measurements - #3 by StaffanMelin
I’m using it my code, its easy to integrate:
- import this lib: daisy1/main.cpp at d91e4efb311202c0b34821c616ab2ec5a7a49891 · schollz/daisy1 · GitHub
- setup the code in the main loop: daisy1/main.cpp at d91e4efb311202c0b34821c616ab2ec5a7a49891 · schollz/daisy1 · GitHub
- start measurement at the beginning of callback: daisy1/main.cpp at d91e4efb311202c0b34821c616ab2ec5a7a49891 · schollz/daisy1 · GitHub
- save result to global variable at end of callback: daisy1/main.cpp at d91e4efb311202c0b34821c616ab2ec5a7a49891 · schollz/daisy1 · GitHub
- use the Log library and print out the percentage of the audio block used:
(float)audiocallback_time_needed / CYCLES_AVAILBLE * 100.0f
(audiocallback_time_needed
is my global variable).