I'm trying to benchmark software running on a c6424 EVM board, and I'm seeing a discrepancy in the times reported by the high and low resolution clocks. Here is an example:
printf("Long Time Test...\n"); t = CLK_getltime(); TSK_sleep(1000); t = CLK_getltime() - t; printf("\tDone! Took: %f ms\n", ((float) t * CLK_getprd()) / CLK_countspms());
printf("Short Time Test...\n"); t = CLK_gethtime(); TSK_sleep(1000); t = CLK_gethtime() - t; printf("\tDone! Took: %f ms\n", ((float) t) / (float) CLK_countspms());
The DSP clock is running at 594 MHz, and I have the low resolution clock configured for 100 us intervals. When I execute the above code, I see that the elapsed time reported using CLK_getltime() is 100 ms, while the time reported by CLK_gethtime() is around 82 ms. I've verified that this isn't a wrap-around problem, but I'm not sure what to check next.
Any thoughts on why this would occur?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.