|
|||||||||||
Technical Support Support Resources
Product Information |
CMSIS: How to retrieve RTX timer tick counterInformation in this knowledgebase article applies to:
QUESTIONIn my project, I'm using RTX v4.x, namely CMSIS RTOS v1 APIs. I modified the RTX timer tick interval value OS_TICK defined inRTX_Conf_CM.c from the default value 1ms to 100us. Is there any way to retrieve the RTX timer tick counter with the resolution of this 100us tick interval? ANSWERIn the CMSIS RTOS source code folder, e.g. C:\Keil\ARM\PACK\ARM\CMSIS\5.0.1\CMSIS\RTOS\RTX\SRC, you can find a global variable os_time defined in rt_Time.c, which is the RTX system timer tick counter based on the resolution of RTX Timer tick interval value OS_TICK. Additionally, there is a function rt_time_get() defined in rt_Time.c that you can use to retrieve this RTX system timer tick counter os_time. To use the function rt_time_get() in your project, you can include the header file rt_Time.h into your project, and add e.g. C:\Keil\ARM\PACK\ARM\CMSIS\5.0.1\CMSIS\RTOS\RTX\SRC to Options for Target - C/C++ - Include Paths in µVision. Last Reviewed: Thursday, November 5, 2020 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.