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.

Query Time in C2000 Piccolo Microcontroller using Motorware libraries

Other Parts Discussed in Thread: MOTORWARE

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