Cortex-M3/M4 has a DWT (Data Watch and Trace Unit) which includes a clock cycle register (CYCCNT) and C-SPY implements a 64-bit cycle register accordingly, CYCLECOUNTER. This register enables accurate and extended measure execution times and combined with C-SPY macros becomes a very useful instrument in developers’ toolbox.
CYCLECOUNTER
https://www.iar.com/support/reso ... -with-cyclecounter/
精准匹配,可惜是M0的核,不支持这个功能。
https://www.iar.com/support/resources/articles/techniques-for-measuring-the-elapsed-time/
一周热门 更多>