3. Write
RTC_STAT
4. Read
RTC_STAT
5. Wait for 1 Hz tick.
6. Read
RTC_STAT
Using the Stopwatch
The RTC stopwatch count register (
value for the stopwatch. The stopwatch counts down seconds from the
programmed value and generates an interrupt (if enabled) when the count
reaches 0. The counter stops counting at this point and does not resume
counting until a new value is written to
counter may be overwritten with a new value. This allows the stopwatch
to be used as a watchdog timer with a precision of one second.
The stopwatch can be programmed to any value between 0 and (2
seconds, which is a range of 18 hours, 12 minutes, and 15 seconds.
Typically, software should wait for a 1 Hz tick, then write
second later,
RTC_SWCNT
ing. Because the register write occupies nearly one second, the time from
writing a value of N until the stopwatch interrupt is nearly N + 1 seconds.
To produce an exact delay, software can compensate by writing N – 1 to
get a delay of nearly N seconds. This implies that you cannot achieve a
delay of 1 second with the stopwatch. Writing a value of 1 immediately
after a 1 Hz tick results in a stopwatch interrupt nearly two seconds later.
To wait one second, software should just wait for the next 1 Hz tick.
The
RTC_SWCNT
ning. When the stopwatch is not used, writing it to 0 to force it to stop
saves a small amount of power.
ADSP-BF537 Blackfin Processor Hardware Reference
to current time, 13:10:59.
, still get old time 10:45:30.
, get new current time, 13:11:00.
changes to the new value and begins decrement-
register is not reset. After initial powerup, it may be run-
Real-Time Clock
) contains the countdown
RTC_SWCNT
. Once running, the
RTC_SWCNT
16
– 1)
. One
RTC_SWCNT
18-13
Need help?
Do you have a question about the Blackfin ADSP-BF537 and is the answer not in the manual?