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.

[RM57L] How to measure the real world time

Dear community,

Is there a built-in function or a hardware module on the RM57Lx to measure the real world time in milliseconds or microseconds? Like the the POSIX function gettimeofday(), I tried to use it, but the following code doesn't work:

#include <sys/time.h>

Does the RTI module have to be used? See https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/300674

  • Honig,

    One option would be to use the time functions provided by the C runtime library. But I think you would need to implement a low level stub function that reads the RTI and converts to time.

    The RTI is probably best for this job but you could use any timer. I think though I would recommend the RTI because the way RTI is structured it is never necessary to reset the RTI counter.

    There are some docs here: .../ccsv6/tools/compiler/arm_5.1.7/docs/dinkum/c99/time.html#<time.h>

    You likely would need to implement your own 'clock_t clock(void);' function that gets the clock cycles from the RTI.

    If you have trouble with the compiler runtime library itself - you can post questions to the TI C/C++ Compiler - Forum e2e.ti.com/.../ to get a compiler specialist to help.
  • Good day, you want to use an RTC module ?, to timing the real world.
    if so, I share with you an example of a DS1302 RTC module that works with the Hercules RM57.

     

     

    2248.RM57_RTC.rar