Hi,
Does anyone know how can I get time stamp with RL-ARM? Is there a convenient API to get a time? I searched the examples and googled but came up with nothing.
Thanks.
I found an example how to create timer in RL-ARM. It's in the Traffic example. It uses os_itv_set() and os_itv_wait() to construct a timer.
But this will not allow you to set a time reference as RTX timers do not maintain the system time, and they are vulnerable to usage violations and disabled interrupts. As mentioned, you should use an external RTC or program the internal one.
Best is to use a hw timer to generate an interrupt every x milliseconds and then update a software counter. If you have a battery-backed RTC you could implement a real clock and integrate it with the CRTL so that time() returns the seconds since 1970-01-01 00:00.