I'm writing some code to control external devices using the Teensy 4.0. I'd like to measure the overhead my code is placing on the Teensy.
I am using DMA extensively, SPIs, flexPWM, and a few timer interrupts. I'd like to quantize the impact of my code on the general performance of the Teensy, so I can either forewarn others who may eventually use my code libraries, or focus on improving my code relative to a quantitative measure.
Has anyone written anything I might be able to leverage? Does anyone have suggestions?
My initial thoughts seem simplistic; while my code is controlling the external devices, run some algorithm like:
* Calculate PI : how many digits in X minutes
* Move memory around : how many bytes in X Minutes
Then run the same tests without controlling the external devices, and compare performance.
I was hoping someone has already developed such a benchmarking program for the Teensy.
Thanks,
I am using DMA extensively, SPIs, flexPWM, and a few timer interrupts. I'd like to quantize the impact of my code on the general performance of the Teensy, so I can either forewarn others who may eventually use my code libraries, or focus on improving my code relative to a quantitative measure.
Has anyone written anything I might be able to leverage? Does anyone have suggestions?
My initial thoughts seem simplistic; while my code is controlling the external devices, run some algorithm like:
* Calculate PI : how many digits in X minutes
* Move memory around : how many bytes in X Minutes
Then run the same tests without controlling the external devices, and compare performance.
I was hoping someone has already developed such a benchmarking program for the Teensy.
Thanks,