![Infineon SPI F-RAM FM33256B Скачать руководство пользователя страница 8](http://html1.mh-extra.com/html/infineon/spi-f-ram-fm33256b/spi-f-ram-fm33256b_manual_2055116008.webp)
Application Note
8 of 19
001-87564 Rev.*D
2021-06-01
A Design Guide to SPI F-
RAM™ Processor Companion
- FM33256B
Real-Time Clock
r e s t r i c t e d
5
Real-Time Clock
A real-time clock (RTC) counts time in steps of seconds and can report time, day of the week, calendar day,
week, and year. It can be used to record time when certain system events occur. The RTC consists of an
oscillator and counters that derive the time/calendar information, and several registers that hold the time and
RTC control settings. The RTC will run continuously even if the main power fails as long as a 3-V backup power
source is connected to the V
BAK
input pin. A backup source can be either a 3-V battery or a super capacitor.
The default factory settings disable the RTC oscillator. To start and configure the RTC, the
OSCEN
̅̅̅̅̅̅̅̅̅
bit (register
00h, bit 7) must first be set to
‘
0
’
. Then, the clock and calendar registers must be written to reflect the current
time, day, and date. The RTC register map is shown in
Figure 4
RTC Register Map
The 32.768-kHz oscillator is divided down through a series of counters. The first counter divides it by 32,768 to
derive the 1-Hz signal for the seconds counter. The next counter uses the seconds counter to drive a signal once
per minute to the minutes counter. Subsequent counters continue to divide down until there is one pulse per
hour, month, and year driving their respective counters. The counters hold the time and date information that
is memory-mapped (locations 02h through 08h) into the RTC address space. Because the FM33256B uses
different opcodes for the companion register space, they do not appear as F-RAM locations. You may read and
write the time and date by reading and writing these locations without affecting the F-RAM locations.