![Analog Devices Blackfin ADSP-BF537 Скачать руководство пользователя страница 981](http://html.mh-extra.com/html/analog-devices/blackfin-adsp-bf537/blackfin-adsp-bf537_hardware-reference-manual_2939700981.webp)
ADSP-BF537 Blackfin Processor Hardware Reference
18-23
Real-Time Clock
Programming Examples
The following RTC code examples show how to enable the RTC pres-
caler, how to set up a stopwatch event to take the RTC out of deep sleep
mode, and how to use the RTC alarm to exit hibernate state. Each of these
code examples assumes that the appropriate header file is included in the
source code (that is,
#include <defBF537.h>
for ADSP-BF537 projects).
Enable RTC Prescaler
properly enables the prescaler and clears any pending
interrupts.
Listing 18-1. Enabling the RTC Prescaler
RTC_Initialization:
P0.H = HI(RTC_PREN);
P0.L = LO(RTC_PREN);
R0=PREN(Z);
/* enable pre-scalar for 1 Hz ticks */
W[P0] = R0.L;
P0.L = LO(RTC_ISTAT);
R0 = 0x807F(Z);
W[P0] = R0.L;
/* clear any pending interrupts */
R0 = WRITE_COMPLETE(Z);
/* mask for WRITE-COMPLETE bit */
Poll_WC:
R1 = W[P0](Z);
R1 = R1 & R0;
/* wait for Write Complete */
CC = AZ;
IF CC JUMP Poll_WC;
RTS;
Содержание Blackfin ADSP-BF537
Страница 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Страница 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...