RTEMS: Working with RTT

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Working with RTT
Board Support Packages » ARM » Atmel/Microchip SAM E70, S70, V70 and V71 » Contributed Code

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:

- Programming PTPRES in RTT_MR to feeding the timer with a 1Hz signal.
- Writing the bit RTTRST in RTT_MR to restart the timer with new settings.

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.