Real Time Clocks (RTCs) are devices used to track absolute time in nonvolatile memory, which may be internal to the processor or externally connected through the I2C or SPI bus.
You may use an RTC to do the following:
- Read and set the absolute clock, and generate interrupts during clock updates
- Generate periodic interrupts
- Set alarms
RTCs and the system clock have different purposes. The former is a hardware clock that maintains absolute time and date in a nonvolatile manner, whereas the latter is a software clock maintained by the kernel and used to implement the gettimeofday(2) and time(2) system calls, as well as setting timestamps on files and so on. The system clock reports seconds and microseconds from a start point, defined to be the POSIX epoch: 1970-01-01 00:00:00 +0000 (UTC).
In this chapter, we will cover the following topics:
- Introducing...