采用AM5728,DSP搭载RTOS,想计算某段程序的运行时间或者数据传输时间,
请问RTOS DSP中有无类似linux中gettimeofday之类的打印时间戳的函数?如何使用?
ps:精确到微秒
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
采用AM5728,DSP搭载RTOS,想计算某段程序的运行时间或者数据传输时间,
请问RTOS DSP中有无类似linux中gettimeofday之类的打印时间戳的函数?如何使用?
ps:精确到微秒
是用在C6678核上的吗?可以利用TSC寄存器来实现,原理是计算消耗的cpu cycle数来计算执行的时间。
#include "c6x.h" ... int start, stop; TSCL = 0; // need to write to it to start counting start = TSCL; ///... critical code stop = TSCL; stop -= start; // stop will have the total number of CPU cycles