I'm trying to find an efficient way of grabbing the system time using the motorware libraries but I could not find any examples or forum topics. I found that there already exists a timer object in motorware, which is initialized in hal.c. I tried the following, but did not have any success:
gMotorVars.Time_sec = (float_t)(TIMER_getCount(hal_obj->timerHandle[1])) / (float_t)(TIMER_getPeriod(hal_obj->timerHandle[1]));
How should I interface to the timerHandle object in order to compute the system clock time in seconds?
Thank you for your support!
Best regards,
Chris