Keeping time with a real-time clock
Having all clocks synchronized throughout a system is often an assumption that doesn't
hold for embedded devices. Specialized devices may not need to know the time to perform
their function. However, in security protocols, accurate time keeping is often important.
For example, in TLS, the X.509 certificates that are used to prove the identity of web serv-
ers contain a validity range. There is a not before and not after time that specifies when that
certificate is valid. Without an accurate time keeping system, a device can't enforce this
date range allowing it to possibly accept expired or not yet valid certificates.
If you use your BBB in an offline environment, but still need accurate time, then you can
insert a coin cell battery into the battery compartment of the CryptoCape. When the BBB is
disconnected from power, the RTC will receive enough power from the battery to maintain
The BBB already contains an RTC; however, it lacks a dedicated battery. It is possible to
power the entire BBB from a battery using the battery access pads located near the DC bar-
rel plug adapter; however, a greater capacity battery would be needed since the entire board
is powered from these pads.
The RTC driver is loaded automatically, which you can verify by running:
dmesg | grep rtc
This should result in the following:
[ 0.729101] omap_rtc 44e3e000.rtc: rtc core: registered
44e3e000.rtc as rtc0
[ 0.748605] rtc-ds1307 1-0068: rtc core: registered
ds1307 as rtc1
[ 0.748627] rtc-ds1307 1-0068: 56 bytes nvram
[ 0.977426] [drm] Cannot find any crtc or sizes - going
[ 1.048851] omap_rtc 44e3e000.rtc: setting system clock
to 2000-01-01 00:00:01 UTC (946684801)
The previous example shows the BBB's RTC, omap_rtc , registered as rtc0 and the not-
so-accurate-time of 2000-01-01 being set. The CryptoCape's RTC is rtc1 and the time
value is not manipulated.