Operation
Setting and Reading the Date and Time
To set the date and time of the real-time clock, the real-time clock service
provides an API function called
function, the application declares a structure of type
dard time structure defined in the system include file,
application sets the fields of this structure with the month, day, year,
hour, minute, and second and passes a pointer to the structure to
adi_rtc_SetDateTime(
format and loads it into the
hardware maintains the date and time. The
below. Each field of the
within the register.
31
30
29
28
15
14
13
Hour (0–23)
The
adi_rtc_SetDateTime()
although it can be called multiple times. The date and time take effect on
the next 1 Hz tick and are maintained in one-second increments for as
long as the external battery power source is present. An application may
subsequently call upon the real-time clock service to obtain the current
date and time, or to install callbacks for the clock-driven events.
The real-time clock service provides an API function called
adi_rtc_GetDateTime()
and time from the memory-mapped
tion, the application declares a structure of type
time structure defined in the system include file,
11-4
adi_rtc_SetDateTime()
). The function converts the data to 32-bit integer
RTC_STAT
structure is represented by a range of bits
tm
27
26
25
24
Day Counter (0–32767)
12
11
10
9
Minutes (0–59)
function only needs to be called once,
which allows the application to retrieve the date
VisualDSP++ 5.0 Device Drivers and System
register, where the real-time clock
RTC_STAT
23
22
21
20
19
8
7
6
5
4
register. To use this func-
RTC_STAT
, which is a C-standard
tm
time.h
Services Manual for Blackfin Processors
. To use this
, which is a C-stan-
tm
. The
time.h
register is shown
18
17
16
Hour (cont'd)
3
2
1
0
Seconds (0–59)
. The application
Need help?
Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?