RTEMS  5.1

The RTT driver provides the interface to configure and use the RTT peripheral.

The Real-time Timer is used to count elapsed seconds.
This timer is clocked by the 32kHz system clock divided by a programmable 16-bit value. To be accurate, it is better to use an external 32kHz crystal instead of the internal 32kHz RC.
To count elapsed seconds, the user could follow these few steps:

An alarm can be set to happen on second by setting alarm value in RTT_AR. Alarm occurrence can be detected by polling or interrupt.

For more accurate information, please look at the RTT section of the Datasheet.

Related files :
rtt.c
rtt.h.