hi,
I want to use time() and clock() in the RTS library. I can see the clock() in the library calls the HOSTclock() and the implementation of HOSTclock is as following.
but I don't know how the HOSTclock works?
what's the meaning of __TI_readmsg()?
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.
hi,
I want to use time() and clock() in the RTS library. I can see the clock() in the library calls the HOSTclock() and the implementation of HOSTclock is as following.
but I don't know how the HOSTclock works?
what's the meaning of __TI_readmsg()?
The details are in this wiki article. Here is a summary. The command _DTGETCLK and the relevant parameters are copied into the CIO buffer (which is explained in the wiki article). Then the target device is stopped at a special breakpoint. The host takes over, determines how many CPU cycles have passed since the program began, and returns that value. This value propagates back to the target. Then execution on the target resumes.
As a practical matter, you can execute this code under control of CCS, but not anywhere else.
Thanks and regards,
-George