RTC Programming Model
18-12
ADSP-BF537 Blackfin Processor Hardware Reference
Writes posted together at the beginning of the same second take effect
together at the next 1 Hz tick. The following sequence is safe and does not
result in any spurious interrupts from a previous state.
1. Wait for 1 Hz tick.
2. Write 1s to clear the
RTC_ISTAT
flags for alarm, day alarm, stop-
watch, and/or per-interval.
3. Write new values for
RTC_STAT
,
RTC_ALARM
, and/or
RTC_SWCNT
.
4. Write new value for
RTC_ICTL
with alarm, day alarm, stopwatch,
and/or per-interval interrupts enabled.
5. Wait for 1 Hz tick.
6. New values have now taken effect simultaneously.
Setting Time of Day
The RTC status register (
RTC_STAT
) is used to read or write the current
time. Reads return a 32-bit value that always reflects the current state of
the days, hours, minutes, and seconds counters. Reads and writes must be
32-bit transactions; attempted 16-bit transactions result in an MMR
error. Reads always return a coherent 32-bit value. The hours, minutes,
and seconds fields are usually set to match the real time of day. The day
counter value is incremented every day at midnight to record how many
days have elapsed since it was last modified. Its value does not correspond
to a particular calendar day. The 15-bit day counter provides a range of 89
years, 260 or 261 days (depending on leap years) before it overflows.
After the 1 Hz tick, program
RTC_STAT
with the current time. At the next
1 Hz tick,
RTC_STAT
takes on the new, incremented value. For example:
1. Wait for 1 Hz tick.
2. Read
RTC_STAT
, get 10:45:30.
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...